@tscircuit/runframe 0.0.493 → 0.0.494
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.
|
@@ -1093,7 +1093,7 @@ var RenderLogViewer = ({
|
|
|
1093
1093
|
};
|
|
1094
1094
|
|
|
1095
1095
|
// package.json
|
|
1096
|
-
var version = "0.0.
|
|
1096
|
+
var version = "0.0.493";
|
|
1097
1097
|
|
|
1098
1098
|
// lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
|
|
1099
1099
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
useOrderDialog,
|
|
28
28
|
useOrderDialogCli,
|
|
29
29
|
useRunFrameStore
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JKEX7WXS.js";
|
|
31
31
|
|
|
32
32
|
// lib/components/RunFrame/RunFrame.tsx
|
|
33
33
|
import { createCircuitWebWorker } from "@tscircuit/eval/worker";
|
|
@@ -364,7 +364,7 @@ var RunFrame = (props) => {
|
|
|
364
364
|
return /* @__PURE__ */ jsx(
|
|
365
365
|
CircuitJsonPreview,
|
|
366
366
|
{
|
|
367
|
-
code: fsMap.get(props.entrypoint ??
|
|
367
|
+
code: fsMap.get(props.entrypoint ?? props.mainComponentPath),
|
|
368
368
|
defaultActiveTab: props.defaultActiveTab,
|
|
369
369
|
showToggleFullScreen: props.showToggleFullScreen,
|
|
370
370
|
autoroutingGraphics,
|
|
@@ -13438,4 +13438,4 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return sie}JDt();function GNe(r,e,t,n=
|
|
|
13438
13438
|
&:hover {
|
|
13439
13439
|
background-color: rgba(255, 255, 255, 0.1);
|
|
13440
13440
|
}
|
|
13441
|
-
`,onClick:n=>{n.stopPropagation(),t()},children:[dt.jsx("input",{type:"checkbox",checked:e}),dt.jsx("span",{style:{color:"#eee"},children:r})]}),TUt=({children:r,elements:e})=>{const[t,n]=hb(Y=>[Y.is_mouse_over_container,Y.setIsMouseOverContainer]),[i,a]=_t.useState(!1),[o,s]=_t.useState(!1),[l,c]=_t.useState(!1),[u,f]=hb(Y=>[Y.selected_layer,Y.selectLayer]),[h,v,x,S,b,E]=hb(Y=>[Y.in_move_footprint_mode,Y.in_draw_trace_mode,Y.is_showing_rats_nest,Y.is_showing_multiple_traces_length,Y.is_showing_autorouting,Y.is_showing_drc_errors]),C=hb(Y=>Y.setEditMode),D=hb(Y=>Y.setIsShowingRatsNest),U=hb(Y=>Y.setIsShowingMultipleTracesLength),q=hb(Y=>Y.setIsShowingAutorouting),G=hb(Y=>Y.setIsShowingDrcErrors);Ow("1",()=>f("top")),Ow("2",()=>f("bottom")),Ow("3",()=>f("inner1")),Ow("4",()=>f("inner2")),Ow("5",()=>f("inner3")),Ow("6",()=>f("inner4")),Ow("7",()=>f("inner5")),Ow("8",()=>f("inner6"));const X=(e==null?void 0:e.filter(Y=>Y.type.includes("error")).length)??0;return dt.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:Y=>{n(!1),s(!1)},children:[r,dt.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",wUt.version]}),dt.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:C2.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[dt.jsxs(BC,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[dt.jsxs("div",{children:["layer:"," ",dt.jsx("span",{style:{marginLeft:2,fontWeight:500,color:FC[u]},children:u})]}),o&&dt.jsx("div",{style:{marginTop:4,minWidth:120},children:Hie.map(Y=>Y.replace(/-/g,"")).map(Y=>dt.jsx(MUt,{name:Y,selected:Y===u,onClick:()=>{f(Y.replace(/-/,""))}},Y))})]}),dt.jsxs(BC,{style:X>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[dt.jsxs("div",{children:[X," errors"]}),l&&dt.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(Y=>Y.type.includes("error")).map((Y,J)=>dt.jsxs(_t.Fragment,{children:[dt.jsx("div",{children:Y.error_type}),dt.jsx("div",{children:Y.message})]},J))})]}),dt.jsx(BC,{style:{},onClick:()=>{C(v?"off":"draw_trace")},children:dt.jsxs("div",{children:[v?"✖ ":"","Edit Traces"]})}),dt.jsx(BC,{style:{},onClick:()=>{C(h?"off":"move_footprint")},children:dt.jsxs("div",{children:[h?"✖ ":"","Move Components"]})}),dt.jsx(BC,{style:{},onClick:()=>{D(!x)},children:dt.jsxs("div",{children:[x?"✖ ":"","Rats Nest"]})}),dt.jsx(BC,{onClick:()=>{a(!i)},children:dt.jsxs("div",{children:[dt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",dt.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&dt.jsxs("div",{style:{marginTop:4,minWidth:120},children:[dt.jsx(Xie,{label:"Show All Trace Lengths",checked:S,onClick:()=>{U(!S)}}),dt.jsx(Xie,{label:"Show Autorouting Animation",checked:b,onClick:()=>{q(!b)}}),dt.jsx(Xie,{label:"Show DRC Errors",checked:E,onClick:()=>{G(!E)}})]})]})})]})]})},CUt=r=>{const{transform:e,elements:t}=r,[n,i]=_t.useMemo(()=>{const c=r.elements.flatMap(f=>kzt(f,r.elements)),u=YM(r.elements);return[c,u]},[r.elements]),[a,o]=_t.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=_t.useMemo(()=>Uzt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=_t.useCallback(c=>{var h,v;const u=[];for(const x of c)if(x._element){const S=i.getNetConnectedToId("pcb_port_id"in x._element?(h=x._element)==null?void 0:h.pcb_port_id:"pcb_trace_id"in x._element?(v=x._element)==null?void 0:v.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(S))}const f=new Set(c.map(x=>x._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:f,primitiveIdsInMousedOverNet:u})},[i]);return dt.jsx(SUt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:dt.jsx(aUt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(cUt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(rUt,{transform:e,focusOnHover:r.focusOnHover,children:dt.jsx(TUt,{elements:t,children:dt.jsx(dUt,{transform:e,elements:t,children:dt.jsx(EUt,{transform:e,soup:t,children:dt.jsx(tUt,{transform:e,debugGraphics:r.debugGraphics,children:dt.jsx(nUt,{transform:e,elements:t,children:dt.jsx(eUt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},RUt=Hd(Vp(400,300),Ab(40,-40)),AUt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=_t.useState(!l),[f,h]=qie(),[v,x]=_t.useState(RUt),{ref:S,setTransform:b,cancelDrag:E}=zzt({transform:v,onSetTransform:x,enabled:c});let[C,D]=_t.useState([]);C=a??C;const U=_t.useRef(!1),q=_t.useRef(null),G=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,X=()=>{const le=(h==null?void 0:h.width)>0?h:{width:500,height:500},{center:he,width:Se,height:Te}=J.some(xe=>xe.type.startsWith("pcb_"))?Mzt(J.filter(xe=>xe.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},ye=Math.min((le.width??0)/Se,(le.height??0)/Te,100)*.75,we=Hd(Vp((le.width??0)/2,(le.height??0)/2),Ab(ye,-ye,0,0),Vp(-he.x,-he.y));b(we)};_t.useEffect(()=>{h!=null&&h.width&&r&&r.length!==0&&(U.current||(X(),U.current=!0))},[r,h]);const Y=_t.useMemo(()=>(r==null?void 0:r.filter(le=>le.type.startsWith("pcb_")||le.type.startsWith("source_")))??[],[G]),J=_t.useMemo(()=>Yrt({circuitJson:Y,editEvents:C}),[Y,C]),W=le=>{D([...C,le]),o==null||o([...C,le])},ue=le=>{const he=C.map(Se=>Se.edit_event_id===le.edit_event_id?{...Se,...le}:Se);D(he),o==null||o(he)};return dt.jsxs("div",{ref:S,style:{position:"relative"},children:[dt.jsx("div",{ref:f,children:dt.jsxs(Czt,{initialState:n,children:[dt.jsx(CUt,{transform:v,height:t,width:h.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:W,onModifyEditEvent:ue,grid:{spacing:1,view_window:{left:0,right:h.width||500,top:t,bottom:0}},elements:J,debugGraphics:e},h.width),dt.jsx(Azt,{})]})}),l&&!c&&dt.jsx("div",{onClick:()=>{u(!0),X()},onTouchStart:le=>{const he=le.touches[0];q.current={x:he.clientX,y:he.clientY}},onTouchEnd:le=>{const he=le.changedTouches[0],Se=q.current;if(!Se)return;const Te=Math.abs(he.clientX-Se.x),ye=Math.abs(he.clientY-Se.y);Te<10&&ye<10&&(le.preventDefault(),u(!0),X()),q.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:C2.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const NUt=({containerClassName:r,...e})=>{const t=_t.useRef(null),[n,i]=_t.useState(620);return _t.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:dt.jsx(AUt,{...e,height:n})})},PUt='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[60vw\\]{max-width:60vw!important}.\\!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-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-xl{max-width:36rem}.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-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-\\[-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-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-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!important}.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-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-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-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-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-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-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-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-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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-text-left{text-align:left}}@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))}.\\[\\&_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}',DUt=()=>{_t.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=PUt,document.head.appendChild(e)},[])},rLe=r=>`hsl(${o5.indexOf(r)*137.5%360}, 70%, 50%)`,LUt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:o5.map(t=>{const n=r[t]||0,i=n/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:rLe(t)},children:dt.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,": ",n.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},OUt=({renderLog:r})=>{const[e,t]=_t.useState("chronological");if(!r)return dt.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 n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>o5.indexOf(a[0])-o5.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(LUt,{phaseTimings:r.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:n.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:o5.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:rLe(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},zUt="0.0.492",UUt=["assembly","bom","circuit_json","errors","render_log"],IUt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJson:n,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:h=!0,className:v,headerClassName:x,leftHeaderContent:S,readOnly:b,isStreaming:E,autoroutingLog:C,onReportAutoroutingLog:D,isRunningCode:U,hasCodeChangedSinceLastRun:q,onEditEvent:G,editEvents:X,defaultActiveTab:Y,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:W=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:le=!1})=>{var Ie;DUt();const he=_t.useMemo(()=>n?n.filter(Ue=>Ue&&"error_type"in Ue||Ue.type.includes("error")):null,[n]),[Se,Te]=_t.useState(Y??"pcb"),[ye,we]=_t.useState(le),xe=_t.useCallback(Ue=>{Te(Ue),u==null||u(Ue)},[u]),Pe=()=>{we(!ye)};_t.useEffect(()=>{t&&xe("errors")},[t]),_t.useEffect(()=>{(Se==="code"||Se==="errors")&&n&&!t&&xe(Y??"pcb")},[n]);const ze=_t.useCallback(Ue=>{window.TSCIRCUIT_3D_OBJECT_REF=Ue===null?void 0:Ue},[]);return dt.jsx("div",{className:F1("flex flex-col relative rf-overflow-x-hidden",v),children:dt.jsx("div",{className:F1("rf-md:sticky rf-md:top-2",ye&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(cIe,{value:Se,onValueChange:xe,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:F1("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",x),children:[S,S&&dt.jsx("div",{className:"rf-flex-grow"}),!S&&U&&dt.jsx(m6e,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!S&&dt.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Ie=f.lastRenderEvent)==null?void 0:Ie.phase)??""}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(m6e,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&dt.jsxs(ese,{children:[o&&dt.jsx(DM,{value:"code",children:"Code"}),dt.jsxs(DM,{value:"pcb",className:"rf-whitespace-nowrap",children:[n&&dt.jsx("span",{className:F1("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"]}),dt.jsxs(DM,{value:"schematic",className:"rf-whitespace-nowrap",children:[n&&dt.jsx("span",{className:F1("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"]}),dt.jsxs(DM,{value:"cad",children:[n&&dt.jsx("span",{className:F1("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"]}),!["pcb","cad","schematic"].includes(Se)&&dt.jsx(DM,{value:Se,children:Joe(Se)}),dt.jsxs(M7e,{children:[dt.jsx(T7e,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(VAt,{className:"rf-w-4 rf-h-4"}),(he&&he.length>0||t)&&dt.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"})]})}),dt.jsxs(vre,{className:"rf-*:text-xs",children:[UUt.map(Ue=>dt.jsxs(GU,{onSelect:()=>xe(Ue),children:[Se!==Ue&&dt.jsx(p6e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Se===Ue&&dt.jsx(d6e,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Joe(Ue)}),Ue==="errors"&&(he&&he.length>0||t)&&dt.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:t?1:he==null?void 0:he.length})]},Ue)),dt.jsx(GU,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",zUt.split(".").map((Ue,it)=>it===2?parseInt(Ue)+1:Ue).join(".")]})})]})]})]}),ue&&dt.jsx(ww,{onClick:Pe,variant:"ghost",children:ye?dt.jsx(qAt,{size:16}):dt.jsx(jAt,{size:16})})]}),o&&dt.jsx(t3,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:s})}),dt.jsx(t3,{value:"pcb",children:dt.jsx("div",{className:F1("rf-overflow-hidden",ye?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallbackRender:({error:Ue})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:n?dt.jsx(NUt,{focusOnHover:!1,circuitJson:n,debugGraphics:i,containerClassName:F1("rf-h-full rf-w-full",ye?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ue=>{G&&Ue.forEach(it=>G(it))}}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"assembly",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:n?dt.jsx(_Dt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"schematic",children:dt.jsx("div",{className:F1("rf-overflow-auto rf-bg-white",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallbackRender:({error:Ue})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:n?dt.jsx(vDt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ue=>{G==null||G(Ue)},debugGrid:W,colorOverrides:{schematic:{background:"transparent"}}}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"cad",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{FallbackComponent:RAt,children:n?dt.jsx(TAt,{ref:ze,circuitJson:n,autoRotateDisabled:J}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"bom",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallbackRender:({error:Ue})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:n?dt.jsx(wDt,{circuitJson:n}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"circuit_json",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:n?dt.jsx(SDt,{elements:n}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"errors",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||he&&he.length>0?dt.jsx(VNt,{code:r,circuitJsonErrors:he,errorMessage:t,autoroutingLog:C,onReportAutoroutingLog:D}):dt.jsx(dM,{onRunClicked:e})})}),c&&dt.jsx(t3,{value:"render_log",children:dt.jsx(OUt,{renderLog:f})})]})})})};xoe.createRoot(document.getElementById("root")).render(dt.jsx(IUt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}))});
|
|
13441
|
+
`,onClick:n=>{n.stopPropagation(),t()},children:[dt.jsx("input",{type:"checkbox",checked:e}),dt.jsx("span",{style:{color:"#eee"},children:r})]}),TUt=({children:r,elements:e})=>{const[t,n]=hb(Y=>[Y.is_mouse_over_container,Y.setIsMouseOverContainer]),[i,a]=_t.useState(!1),[o,s]=_t.useState(!1),[l,c]=_t.useState(!1),[u,f]=hb(Y=>[Y.selected_layer,Y.selectLayer]),[h,v,x,S,b,E]=hb(Y=>[Y.in_move_footprint_mode,Y.in_draw_trace_mode,Y.is_showing_rats_nest,Y.is_showing_multiple_traces_length,Y.is_showing_autorouting,Y.is_showing_drc_errors]),C=hb(Y=>Y.setEditMode),D=hb(Y=>Y.setIsShowingRatsNest),U=hb(Y=>Y.setIsShowingMultipleTracesLength),q=hb(Y=>Y.setIsShowingAutorouting),G=hb(Y=>Y.setIsShowingDrcErrors);Ow("1",()=>f("top")),Ow("2",()=>f("bottom")),Ow("3",()=>f("inner1")),Ow("4",()=>f("inner2")),Ow("5",()=>f("inner3")),Ow("6",()=>f("inner4")),Ow("7",()=>f("inner5")),Ow("8",()=>f("inner6"));const X=(e==null?void 0:e.filter(Y=>Y.type.includes("error")).length)??0;return dt.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:Y=>{n(!1),s(!1)},children:[r,dt.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",wUt.version]}),dt.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:C2.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[dt.jsxs(BC,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[dt.jsxs("div",{children:["layer:"," ",dt.jsx("span",{style:{marginLeft:2,fontWeight:500,color:FC[u]},children:u})]}),o&&dt.jsx("div",{style:{marginTop:4,minWidth:120},children:Hie.map(Y=>Y.replace(/-/g,"")).map(Y=>dt.jsx(MUt,{name:Y,selected:Y===u,onClick:()=>{f(Y.replace(/-/,""))}},Y))})]}),dt.jsxs(BC,{style:X>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[dt.jsxs("div",{children:[X," errors"]}),l&&dt.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(Y=>Y.type.includes("error")).map((Y,J)=>dt.jsxs(_t.Fragment,{children:[dt.jsx("div",{children:Y.error_type}),dt.jsx("div",{children:Y.message})]},J))})]}),dt.jsx(BC,{style:{},onClick:()=>{C(v?"off":"draw_trace")},children:dt.jsxs("div",{children:[v?"✖ ":"","Edit Traces"]})}),dt.jsx(BC,{style:{},onClick:()=>{C(h?"off":"move_footprint")},children:dt.jsxs("div",{children:[h?"✖ ":"","Move Components"]})}),dt.jsx(BC,{style:{},onClick:()=>{D(!x)},children:dt.jsxs("div",{children:[x?"✖ ":"","Rats Nest"]})}),dt.jsx(BC,{onClick:()=>{a(!i)},children:dt.jsxs("div",{children:[dt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",dt.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&dt.jsxs("div",{style:{marginTop:4,minWidth:120},children:[dt.jsx(Xie,{label:"Show All Trace Lengths",checked:S,onClick:()=>{U(!S)}}),dt.jsx(Xie,{label:"Show Autorouting Animation",checked:b,onClick:()=>{q(!b)}}),dt.jsx(Xie,{label:"Show DRC Errors",checked:E,onClick:()=>{G(!E)}})]})]})})]})]})},CUt=r=>{const{transform:e,elements:t}=r,[n,i]=_t.useMemo(()=>{const c=r.elements.flatMap(f=>kzt(f,r.elements)),u=YM(r.elements);return[c,u]},[r.elements]),[a,o]=_t.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=_t.useMemo(()=>Uzt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=_t.useCallback(c=>{var h,v;const u=[];for(const x of c)if(x._element){const S=i.getNetConnectedToId("pcb_port_id"in x._element?(h=x._element)==null?void 0:h.pcb_port_id:"pcb_trace_id"in x._element?(v=x._element)==null?void 0:v.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(S))}const f=new Set(c.map(x=>x._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:f,primitiveIdsInMousedOverNet:u})},[i]);return dt.jsx(SUt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:dt.jsx(aUt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(cUt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(rUt,{transform:e,focusOnHover:r.focusOnHover,children:dt.jsx(TUt,{elements:t,children:dt.jsx(dUt,{transform:e,elements:t,children:dt.jsx(EUt,{transform:e,soup:t,children:dt.jsx(tUt,{transform:e,debugGraphics:r.debugGraphics,children:dt.jsx(nUt,{transform:e,elements:t,children:dt.jsx(eUt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},RUt=Hd(Vp(400,300),Ab(40,-40)),AUt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=_t.useState(!l),[f,h]=qie(),[v,x]=_t.useState(RUt),{ref:S,setTransform:b,cancelDrag:E}=zzt({transform:v,onSetTransform:x,enabled:c});let[C,D]=_t.useState([]);C=a??C;const U=_t.useRef(!1),q=_t.useRef(null),G=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,X=()=>{const le=(h==null?void 0:h.width)>0?h:{width:500,height:500},{center:he,width:Se,height:Te}=J.some(xe=>xe.type.startsWith("pcb_"))?Mzt(J.filter(xe=>xe.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},ye=Math.min((le.width??0)/Se,(le.height??0)/Te,100)*.75,we=Hd(Vp((le.width??0)/2,(le.height??0)/2),Ab(ye,-ye,0,0),Vp(-he.x,-he.y));b(we)};_t.useEffect(()=>{h!=null&&h.width&&r&&r.length!==0&&(U.current||(X(),U.current=!0))},[r,h]);const Y=_t.useMemo(()=>(r==null?void 0:r.filter(le=>le.type.startsWith("pcb_")||le.type.startsWith("source_")))??[],[G]),J=_t.useMemo(()=>Yrt({circuitJson:Y,editEvents:C}),[Y,C]),W=le=>{D([...C,le]),o==null||o([...C,le])},ue=le=>{const he=C.map(Se=>Se.edit_event_id===le.edit_event_id?{...Se,...le}:Se);D(he),o==null||o(he)};return dt.jsxs("div",{ref:S,style:{position:"relative"},children:[dt.jsx("div",{ref:f,children:dt.jsxs(Czt,{initialState:n,children:[dt.jsx(CUt,{transform:v,height:t,width:h.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:W,onModifyEditEvent:ue,grid:{spacing:1,view_window:{left:0,right:h.width||500,top:t,bottom:0}},elements:J,debugGraphics:e},h.width),dt.jsx(Azt,{})]})}),l&&!c&&dt.jsx("div",{onClick:()=>{u(!0),X()},onTouchStart:le=>{const he=le.touches[0];q.current={x:he.clientX,y:he.clientY}},onTouchEnd:le=>{const he=le.changedTouches[0],Se=q.current;if(!Se)return;const Te=Math.abs(he.clientX-Se.x),ye=Math.abs(he.clientY-Se.y);Te<10&&ye<10&&(le.preventDefault(),u(!0),X()),q.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:C2.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const NUt=({containerClassName:r,...e})=>{const t=_t.useRef(null),[n,i]=_t.useState(620);return _t.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:dt.jsx(AUt,{...e,height:n})})},PUt='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[60vw\\]{max-width:60vw!important}.\\!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-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-xl{max-width:36rem}.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-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-\\[-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-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-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!important}.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-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-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-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-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-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-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-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-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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-text-left{text-align:left}}@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))}.\\[\\&_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}',DUt=()=>{_t.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=PUt,document.head.appendChild(e)},[])},rLe=r=>`hsl(${o5.indexOf(r)*137.5%360}, 70%, 50%)`,LUt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:o5.map(t=>{const n=r[t]||0,i=n/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:rLe(t)},children:dt.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,": ",n.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},OUt=({renderLog:r})=>{const[e,t]=_t.useState("chronological");if(!r)return dt.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 n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>o5.indexOf(a[0])-o5.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(LUt,{phaseTimings:r.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:n.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:o5.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:rLe(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},zUt="0.0.493",UUt=["assembly","bom","circuit_json","errors","render_log"],IUt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJson:n,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:h=!0,className:v,headerClassName:x,leftHeaderContent:S,readOnly:b,isStreaming:E,autoroutingLog:C,onReportAutoroutingLog:D,isRunningCode:U,hasCodeChangedSinceLastRun:q,onEditEvent:G,editEvents:X,defaultActiveTab:Y,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:W=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:le=!1})=>{var Ie;DUt();const he=_t.useMemo(()=>n?n.filter(Ue=>Ue&&"error_type"in Ue||Ue.type.includes("error")):null,[n]),[Se,Te]=_t.useState(Y??"pcb"),[ye,we]=_t.useState(le),xe=_t.useCallback(Ue=>{Te(Ue),u==null||u(Ue)},[u]),Pe=()=>{we(!ye)};_t.useEffect(()=>{t&&xe("errors")},[t]),_t.useEffect(()=>{(Se==="code"||Se==="errors")&&n&&!t&&xe(Y??"pcb")},[n]);const ze=_t.useCallback(Ue=>{window.TSCIRCUIT_3D_OBJECT_REF=Ue===null?void 0:Ue},[]);return dt.jsx("div",{className:F1("flex flex-col relative rf-overflow-x-hidden",v),children:dt.jsx("div",{className:F1("rf-md:sticky rf-md:top-2",ye&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(cIe,{value:Se,onValueChange:xe,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:F1("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",x),children:[S,S&&dt.jsx("div",{className:"rf-flex-grow"}),!S&&U&&dt.jsx(m6e,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!S&&dt.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Ie=f.lastRenderEvent)==null?void 0:Ie.phase)??""}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(m6e,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&dt.jsxs(ese,{children:[o&&dt.jsx(DM,{value:"code",children:"Code"}),dt.jsxs(DM,{value:"pcb",className:"rf-whitespace-nowrap",children:[n&&dt.jsx("span",{className:F1("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"]}),dt.jsxs(DM,{value:"schematic",className:"rf-whitespace-nowrap",children:[n&&dt.jsx("span",{className:F1("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"]}),dt.jsxs(DM,{value:"cad",children:[n&&dt.jsx("span",{className:F1("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"]}),!["pcb","cad","schematic"].includes(Se)&&dt.jsx(DM,{value:Se,children:Joe(Se)}),dt.jsxs(M7e,{children:[dt.jsx(T7e,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(VAt,{className:"rf-w-4 rf-h-4"}),(he&&he.length>0||t)&&dt.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"})]})}),dt.jsxs(vre,{className:"rf-*:text-xs",children:[UUt.map(Ue=>dt.jsxs(GU,{onSelect:()=>xe(Ue),children:[Se!==Ue&&dt.jsx(p6e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Se===Ue&&dt.jsx(d6e,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Joe(Ue)}),Ue==="errors"&&(he&&he.length>0||t)&&dt.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:t?1:he==null?void 0:he.length})]},Ue)),dt.jsx(GU,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",zUt.split(".").map((Ue,it)=>it===2?parseInt(Ue)+1:Ue).join(".")]})})]})]})]}),ue&&dt.jsx(ww,{onClick:Pe,variant:"ghost",children:ye?dt.jsx(qAt,{size:16}):dt.jsx(jAt,{size:16})})]}),o&&dt.jsx(t3,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:s})}),dt.jsx(t3,{value:"pcb",children:dt.jsx("div",{className:F1("rf-overflow-hidden",ye?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallbackRender:({error:Ue})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:n?dt.jsx(NUt,{focusOnHover:!1,circuitJson:n,debugGraphics:i,containerClassName:F1("rf-h-full rf-w-full",ye?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ue=>{G&&Ue.forEach(it=>G(it))}}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"assembly",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:n?dt.jsx(_Dt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"schematic",children:dt.jsx("div",{className:F1("rf-overflow-auto rf-bg-white",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallbackRender:({error:Ue})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:n?dt.jsx(vDt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ue=>{G==null||G(Ue)},debugGrid:W,colorOverrides:{schematic:{background:"transparent"}}}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"cad",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{FallbackComponent:RAt,children:n?dt.jsx(TAt,{ref:ze,circuitJson:n,autoRotateDisabled:J}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"bom",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallbackRender:({error:Ue})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:n?dt.jsx(wDt,{circuitJson:n}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"circuit_json",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(gC,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:n?dt.jsx(SDt,{elements:n}):dt.jsx(dM,{onRunClicked:e})})})}),dt.jsx(t3,{value:"errors",children:dt.jsx("div",{className:F1("rf-overflow-auto",ye?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||he&&he.length>0?dt.jsx(VNt,{code:r,circuitJsonErrors:he,errorMessage:t,autoroutingLog:C,onReportAutoroutingLog:D}):dt.jsx(dM,{onRunClicked:e})})}),c&&dt.jsx(t3,{value:"render_log",children:dt.jsx(OUt,{renderLog:f})})]})})})};xoe.createRoot(document.getElementById("root")).render(dt.jsx(IUt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}))});
|
package/dist/standalone.min.js
CHANGED
|
@@ -13467,7 +13467,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return cse}hBt();function mOe(n,e,t,r=
|
|
|
13467
13467
|
&:hover {
|
|
13468
13468
|
background-color: rgba(255, 255, 255, 0.1);
|
|
13469
13469
|
}
|
|
13470
|
-
`,onClick:r=>{r.stopPropagation(),t()},children:[Ge.jsx("input",{type:"checkbox",checked:e}),Ge.jsx("span",{style:{color:"#eee"},children:n})]}),BVt=({children:n,elements:e})=>{const[t,r]=Nb(B=>[B.is_mouse_over_container,B.setIsMouseOverContainer]),[i,a]=at.useState(!1),[s,o]=at.useState(!1),[l,c]=at.useState(!1),[u,f]=Nb(B=>[B.selected_layer,B.selectLayer]),[d,m,g,E,b,S]=Nb(B=>[B.in_move_footprint_mode,B.in_draw_trace_mode,B.is_showing_rats_nest,B.is_showing_multiple_traces_length,B.is_showing_autorouting,B.is_showing_drc_errors]),w=Nb(B=>B.setEditMode),R=Nb(B=>B.setIsShowingRatsNest),z=Nb(B=>B.setIsShowingMultipleTracesLength),V=Nb(B=>B.setIsShowingAutorouting),F=Nb(B=>B.setIsShowingDrcErrors);m4("1",()=>f("top")),m4("2",()=>f("bottom")),m4("3",()=>f("inner1")),m4("4",()=>f("inner2")),m4("5",()=>f("inner3")),m4("6",()=>f("inner4")),m4("7",()=>f("inner5")),m4("8",()=>f("inner6"));const Y=(e==null?void 0:e.filter(B=>B.type.includes("error")).length)??0;return Ge.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{r(!0)},onMouseLeave:B=>{r(!1),o(!1)},children:[n,Ge.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",kVt.version]}),Ge.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:Z2.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ge.jsxs(DR,{onClick:()=>{o(!s)},onMouseLeave:()=>{s&&o(!1)},children:[Ge.jsxs("div",{children:["layer:"," ",Ge.jsx("span",{style:{marginLeft:2,fontWeight:500,color:PR[u]},children:u})]}),s&&Ge.jsx("div",{style:{marginTop:4,minWidth:120},children:Vse.map(B=>B.replace(/-/g,"")).map(B=>Ge.jsx(FVt,{name:B,selected:B===u,onClick:()=>{f(B.replace(/-/,""))}},B))})]}),Ge.jsxs(DR,{style:Y>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ge.jsxs("div",{children:[Y," errors"]}),l&&Ge.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(B=>B.type.includes("error")).map((B,$)=>Ge.jsxs(at.Fragment,{children:[Ge.jsx("div",{children:B.error_type}),Ge.jsx("div",{children:B.message})]},$))})]}),Ge.jsx(DR,{style:{},onClick:()=>{w(m?"off":"draw_trace")},children:Ge.jsxs("div",{children:[m?"✖ ":"","Edit Traces"]})}),Ge.jsx(DR,{style:{},onClick:()=>{w(d?"off":"move_footprint")},children:Ge.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ge.jsx(DR,{style:{},onClick:()=>{R(!g)},children:Ge.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ge.jsx(DR,{onClick:()=>{a(!i)},children:Ge.jsxs("div",{children:[Ge.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ge.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ge.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ge.jsx($se,{label:"Show All Trace Lengths",checked:E,onClick:()=>{z(!E)}}),Ge.jsx($se,{label:"Show Autorouting Animation",checked:b,onClick:()=>{V(!b)}}),Ge.jsx($se,{label:"Show DRC Errors",checked:S,onClick:()=>{F(!S)}})]})]})})]})]})},HVt=n=>{const{transform:e,elements:t}=n,[r,i]=at.useMemo(()=>{const c=n.elements.flatMap(f=>Kjt(f,n.elements)),u=LT(n.elements);return[c,u]},[n.elements]),[a,s]=at.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),o=at.useMemo(()=>Zjt({primitivesWithoutInteractionMetadata:r,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[r,a]),l=at.useCallback(c=>{var d,m;const u=[];for(const g of c)if(g._element){const E=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(m=g._element)==null?void 0:m.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(E))}const f=new Set(c.map(g=>g._pcb_drawing_object_id));s({drawingObjectIdsWithMouseOver:f,primitiveIdsInMousedOverNet:u})},[i]);return Ge.jsx(UVt,{elements:t,transform:e,primitives:r,onMouseHoverOverPrimitives:l,children:Ge.jsx(_Vt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(EVt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(gVt,{transform:e,focusOnHover:n.focusOnHover,children:Ge.jsx(BVt,{elements:t,children:Ge.jsx(TVt,{transform:e,elements:t,children:Ge.jsx(IVt,{transform:e,soup:t,children:Ge.jsx(mVt,{transform:e,debugGraphics:n.debugGraphics,children:Ge.jsx(vVt,{transform:e,elements:t,children:Ge.jsx(pVt,{transform:e,primitives:o,width:n.width,height:n.height,grid:n.grid})})})})})})})})})})},jVt=zd(zp(400,300),Eb(40,-40)),VVt=({circuitJson:n,debugGraphics:e,height:t=600,initialState:r,allowEditing:i=!0,editEvents:a,onEditEventsChanged:s,focusOnHover:o=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=at.useState(!l),[f,d]=Wse(),[m,g]=at.useState(jVt),{ref:E,setTransform:b,cancelDrag:S}=$jt({transform:m,onSetTransform:g,enabled:c});let[w,R]=at.useState([]);w=a??w;const z=at.useRef(!1),V=at.useRef(null),F=`${(n==null?void 0:n.length)||0}_${(n==null?void 0:n.editCount)||0}`,Y=()=>{const ie=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:ue,width:_e,height:he}=$.some(ge=>ge.type.startsWith("pcb_"))?Fjt($.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((ie.width??0)/_e,(ie.height??0)/he,100)*.75,Se=zd(zp((ie.width??0)/2,(ie.height??0)/2),Eb(pe,-pe,0,0),zp(-ue.x,-ue.y));b(Se)};at.useEffect(()=>{d!=null&&d.width&&n&&n.length!==0&&(z.current||(Y(),z.current=!0))},[n,d]);const B=at.useMemo(()=>(n==null?void 0:n.filter(ie=>ie.type.startsWith("pcb_")||ie.type.startsWith("source_")))??[],[F]),$=at.useMemo(()=>Qct({circuitJson:B,editEvents:w}),[B,w]),G=ie=>{R([...w,ie]),s==null||s([...w,ie])},oe=ie=>{const ue=w.map(_e=>_e.edit_event_id===ie.edit_event_id?{..._e,...ie}:_e);R(ue),s==null||s(ue)};return Ge.jsxs("div",{ref:E,style:{position:"relative"},children:[Ge.jsx("div",{ref:f,children:Ge.jsxs(Hjt,{initialState:r,children:[Ge.jsx(HVt,{transform:m,height:t,width:d.width,allowEditing:i,focusOnHover:o,cancelPanDrag:S,onCreateEditEvent:G,onModifyEditEvent:oe,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:$,debugGraphics:e},d.width),Ge.jsx(Vjt,{})]})}),l&&!c&&Ge.jsx("div",{onClick:()=>{u(!0),Y()},onTouchStart:ie=>{const ue=ie.touches[0];V.current={x:ue.clientX,y:ue.clientY}},onTouchEnd:ie=>{const ue=ie.changedTouches[0],_e=V.current;if(!_e)return;const he=Math.abs(ue.clientX-_e.x),pe=Math.abs(ue.clientY-_e.y);he<10&&pe<10&&(ie.preventDefault(),u(!0),Y()),V.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:Z2.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ge.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const GVt=({containerClassName:n,...e})=>{const t=at.useRef(null),[r,i]=at.useState(620);return at.useLayoutEffect(()=>{const a=()=>{if(t.current){const o=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(o,620),l))}};a();const s=new ResizeObserver(a);return t.current&&s.observe(t.current),window.addEventListener("resize",a),()=>{s.disconnect(),window.removeEventListener("resize",a)}},[]),Ge.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ge.jsx(VVt,{...e,height:r})})},qVt='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[60vw\\]{max-width:60vw!important}.\\!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-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-xl{max-width:36rem}.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-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-\\[-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-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-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!important}.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-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-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-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-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-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-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-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-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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-text-left{text-align:left}}@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))}.\\[\\&_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}',YVt=()=>{at.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=qVt,document.head.appendChild(e)},[])},RUe=n=>`hsl(${AS.indexOf(n)*137.5%360}, 70%, 50%)`,WVt=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ge.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ge.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:AS.map(t=>{const r=n[t]||0,i=r/e*100;return Ge.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:RUe(t)},children:Ge.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,": ",r.toFixed(1),"ms"]})},t)})}),Ge.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},XVt=({renderLog:n})=>{const[e,t]=at.useState("chronological");if(!n)return Ge.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 r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,s)=>AS.indexOf(a[0])-AS.indexOf(s[0])):r.sort((a,s)=>s[1]-a[1]);const i=r.reduce((a,[s,o])=>a+o,0);return Ge.jsxs("div",{className:"rf-bg-white",children:[Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ge.jsx("div",{children:"Render Logs"}),Ge.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ge.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ge.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ge.jsx("option",{value:"chronological",children:"Phase Order"}),Ge.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ge.jsx(WVt,{phaseTimings:n.phaseTimings}),Ge.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ge.jsx("thead",{children:Ge.jsxs("tr",{children:[Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ge.jsx("tbody",{children:r.map(([a,s])=>Ge.jsxs("tr",{children:[Ge.jsx("td",{className:"rf-p-2",children:AS.indexOf(a)}),Ge.jsx("td",{className:"rf-p-2",children:a}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsx("div",{className:"rf-w-8",children:Ge.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:RUe(a),width:`${s/i*100}%`}})})}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsxs("div",{className:"rf-flex w-full",children:[Ge.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),Ge.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},$Vt="0.0.492",ZVt=["assembly","bom","circuit_json","errors","render_log"],QVt=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:s=!1,codeTabContent:o,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:d=!0,className:m,headerClassName:g,leftHeaderContent:E,readOnly:b,isStreaming:S,autoroutingLog:w,onReportAutoroutingLog:R,isRunningCode:z,hasCodeChangedSinceLastRun:V,onEditEvent:F,editEvents:Y,defaultActiveTab:B,autoRotate3dViewerDisabled:$,showSchematicDebugGrid:G=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:ie=!1})=>{var Le;YVt();const ue=at.useMemo(()=>r?r.filter(Te=>Te&&"error_type"in Te||Te.type.includes("error")):null,[r]),[_e,he]=at.useState(B??"pcb"),[pe,Se]=at.useState(ie),ge=at.useCallback(Te=>{he(Te),u==null||u(Te)},[u]),Ae=()=>{Se(!pe)};at.useEffect(()=>{t&&ge("errors")},[t]),at.useEffect(()=>{(_e==="code"||_e==="errors")&&r&&!t&&ge(B??"pcb")},[r]);const Ne=at.useCallback(Te=>{window.TSCIRCUIT_3D_OBJECT_REF=Te===null?void 0:Te},[]);return Ge.jsx("div",{className:M0("flex flex-col relative rf-overflow-x-hidden",m),children:Ge.jsx("div",{className:M0("rf-md:sticky rf-md:top-2",pe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ge.jsxs(Pge,{value:_e,onValueChange:ge,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ge.jsxs("div",{className:M0("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[E,E&&Ge.jsx("div",{className:"rf-flex-grow"}),!E&&z&&Ge.jsx(cR,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!E&&Ge.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Le=f.lastRenderEvent)==null?void 0:Le.phase)??""}),Ge.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ge.jsx(cR,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ge.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Ge.jsxs(Eq,{children:[s&&Ge.jsx(zw,{value:"code",children:"Code"}),Ge.jsxs(zw,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:M0("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",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ge.jsxs(zw,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:M0("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",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ge.jsxs(zw,{value:"cad",children:[r&&Ge.jsx("span",{className:M0("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(_e)&&Ge.jsx(zw,{value:_e,children:Nge(_e)}),Ge.jsxs(mae,{children:[Ge.jsx(vae,{asChild:!0,children:Ge.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ge.jsx(iOt,{className:"rf-w-4 rf-h-4"}),(ue&&ue.length>0||t)&&Ge.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"})]})}),Ge.jsxs(KI,{className:"rf-*:text-xs",children:[ZVt.map(Te=>Ge.jsxs(o3,{onSelect:()=>ge(Te),children:[_e!==Te&&Ge.jsx(zNe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),_e===Te&&Ge.jsx(Eie,{className:"rf-w-3 rf-h-3"}),Ge.jsx("div",{className:"rf-pr-2",children:Nge(Te)}),Te==="errors"&&(ue&&ue.length>0||t)&&Ge.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:t?1:ue==null?void 0:ue.length})]},Te)),Ge.jsx(o3,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ge.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",$Vt.split(".").map((Te,qe)=>qe===2?parseInt(Te)+1:Te).join(".")]})})]})]})]}),oe&&Ge.jsx(v2,{onClick:Ae,variant:"ghost",children:pe?Ge.jsx(lOt,{size:16}):Ge.jsx(sOt,{size:16})})]}),s&&Ge.jsx(P3,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ge.jsx("div",{className:"rf-h-full",children:o})}),Ge.jsx(P3,{value:"pcb",children:Ge.jsx("div",{className:M0("rf-overflow-hidden",pe?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallbackRender:({error:Te})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Te==null?void 0:Te.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(GVt,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:M0("rf-h-full rf-w-full",pe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Te=>{F&&Te.forEach(qe=>F(qe))}}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"assembly",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallback:Ge.jsx("div",{children:"Error loading Assembly"}),children:r?Ge.jsx(LFt,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"schematic",children:Ge.jsx("div",{className:M0("rf-overflow-auto rf-bg-white",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallbackRender:({error:Te})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Te==null?void 0:Te.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(NFt,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Te=>{F==null||F(Te)},debugGrid:G,colorOverrides:{schematic:{background:"transparent"}}}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"cad",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{FallbackComponent:qLt,children:r?Ge.jsx(VLt,{ref:Ne,circuitJson:r,autoRotateDisabled:$}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"bom",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallbackRender:({error:Te})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Te==null?void 0:Te.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(kFt,{circuitJson:r}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"circuit_json",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallback:Ge.jsx("div",{children:"Error loading JSON viewer"}),children:r?Ge.jsx(UFt,{elements:r}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"errors",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||ue&&ue.length>0?Ge.jsx(nkt,{code:n,circuitJsonErrors:ue,errorMessage:t,autoroutingLog:w,onReportAutoroutingLog:R}):Ge.jsx(ZM,{onRunClicked:e})})}),c&&Ge.jsx(P3,{value:"render_log",children:Ge.jsx(XVt,{renderLog:f})})]})})})};var Gk="Dialog",[AUe,NUe]=EE(Gk),[KVt,f3]=AUe(Gk),PUe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=n,o=at.useRef(null),l=at.useRef(null),[c,u]=qT({prop:r,defaultProp:i??!1,onChange:a,caller:Gk});return Ge.jsx(KVt,{scope:e,triggerRef:o,contentRef:l,contentId:wE(),titleId:wE(),descriptionId:wE(),open:c,onOpenChange:u,onOpenToggle:at.useCallback(()=>u(f=>!f),[u]),modal:s,children:t})};PUe.displayName=Gk;var DUe="DialogTrigger",LUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(DUe,t),a=Xx(e,i.triggerRef);return Ge.jsx(y1.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Kse(i.open),...r,ref:a,onClick:Up(n.onClick,i.onOpenToggle)})});LUe.displayName=DUe;var Zse="DialogPortal",[JVt,OUe]=AUe(Zse,{forceMount:void 0}),zUe=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=f3(Zse,e);return Ge.jsx(JVt,{scope:e,forceMount:t,children:at.Children.map(r,s=>Ge.jsx(A3,{present:t||a.open,children:Ge.jsx(Jie,{asChild:!0,container:i,children:s})}))})};zUe.displayName=Zse;var qk="DialogOverlay",UUe=at.forwardRef((n,e)=>{const t=OUe(qk,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=f3(qk,n.__scopeDialog);return a.modal?Ge.jsx(A3,{present:r||a.open,children:Ge.jsx(tGt,{...i,ref:e})}):null});UUe.displayName=qk;var eGt=GT("DialogOverlay.RemoveScroll"),tGt=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(qk,t);return Ge.jsx(aae,{as:eGt,allowPinchZoom:!0,shards:[i.contentRef],children:Ge.jsx(y1.div,{"data-state":Kse(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),rT="DialogContent",IUe=at.forwardRef((n,e)=>{const t=OUe(rT,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=f3(rT,n.__scopeDialog);return Ge.jsx(A3,{present:r||a.open,children:a.modal?Ge.jsx(nGt,{...i,ref:e}):Ge.jsx(rGt,{...i,ref:e})})});IUe.displayName=rT;var nGt=at.forwardRef((n,e)=>{const t=f3(rT,n.__scopeDialog),r=at.useRef(null),i=Xx(e,t.contentRef,r);return at.useEffect(()=>{const a=r.current;if(a)return BPe(a)},[]),Ge.jsx(kUe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Up(n.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=t.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Up(n.onPointerDownOutside,a=>{const s=a.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&a.preventDefault()}),onFocusOutside:Up(n.onFocusOutside,a=>a.preventDefault())})}),rGt=at.forwardRef((n,e)=>{const t=f3(rT,n.__scopeDialog),r=at.useRef(!1),i=at.useRef(!1);return Ge.jsx(kUe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=n.onCloseAutoFocus)==null||s.call(n,a),a.defaultPrevented||(r.current||(o=t.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),kUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=n,o=f3(rT,t),l=at.useRef(null),c=Xx(e,l);return tPe(),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(kie,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ge.jsx(Oie,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Kse(o.open),...s,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(aGt,{titleId:o.titleId}),Ge.jsx(oGt,{contentRef:l,descriptionId:o.descriptionId})]})]})}),Qse="DialogTitle",FUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(Qse,t);return Ge.jsx(y1.h2,{id:i.titleId,...r,ref:e})});FUe.displayName=Qse;var BUe="DialogDescription",HUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(BUe,t);return Ge.jsx(y1.p,{id:i.descriptionId,...r,ref:e})});HUe.displayName=BUe;var jUe="DialogClose",VUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(jUe,t);return Ge.jsx(y1.button,{type:"button",...r,ref:e,onClick:Up(n.onClick,()=>i.onOpenChange(!1))})});VUe.displayName=jUe;function Kse(n){return n?"open":"closed"}var GUe="DialogTitleWarning",[iGt,qUe]=Qut(GUe,{contentName:rT,titleName:Qse,docsSlug:"dialog"}),aGt=({titleId:n})=>{const e=qUe(GUe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13470
|
+
`,onClick:r=>{r.stopPropagation(),t()},children:[Ge.jsx("input",{type:"checkbox",checked:e}),Ge.jsx("span",{style:{color:"#eee"},children:n})]}),BVt=({children:n,elements:e})=>{const[t,r]=Nb(B=>[B.is_mouse_over_container,B.setIsMouseOverContainer]),[i,a]=at.useState(!1),[s,o]=at.useState(!1),[l,c]=at.useState(!1),[u,f]=Nb(B=>[B.selected_layer,B.selectLayer]),[d,m,g,E,b,S]=Nb(B=>[B.in_move_footprint_mode,B.in_draw_trace_mode,B.is_showing_rats_nest,B.is_showing_multiple_traces_length,B.is_showing_autorouting,B.is_showing_drc_errors]),w=Nb(B=>B.setEditMode),R=Nb(B=>B.setIsShowingRatsNest),z=Nb(B=>B.setIsShowingMultipleTracesLength),V=Nb(B=>B.setIsShowingAutorouting),F=Nb(B=>B.setIsShowingDrcErrors);m4("1",()=>f("top")),m4("2",()=>f("bottom")),m4("3",()=>f("inner1")),m4("4",()=>f("inner2")),m4("5",()=>f("inner3")),m4("6",()=>f("inner4")),m4("7",()=>f("inner5")),m4("8",()=>f("inner6"));const Y=(e==null?void 0:e.filter(B=>B.type.includes("error")).length)??0;return Ge.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{r(!0)},onMouseLeave:B=>{r(!1),o(!1)},children:[n,Ge.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",kVt.version]}),Ge.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:Z2.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ge.jsxs(DR,{onClick:()=>{o(!s)},onMouseLeave:()=>{s&&o(!1)},children:[Ge.jsxs("div",{children:["layer:"," ",Ge.jsx("span",{style:{marginLeft:2,fontWeight:500,color:PR[u]},children:u})]}),s&&Ge.jsx("div",{style:{marginTop:4,minWidth:120},children:Vse.map(B=>B.replace(/-/g,"")).map(B=>Ge.jsx(FVt,{name:B,selected:B===u,onClick:()=>{f(B.replace(/-/,""))}},B))})]}),Ge.jsxs(DR,{style:Y>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ge.jsxs("div",{children:[Y," errors"]}),l&&Ge.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(B=>B.type.includes("error")).map((B,$)=>Ge.jsxs(at.Fragment,{children:[Ge.jsx("div",{children:B.error_type}),Ge.jsx("div",{children:B.message})]},$))})]}),Ge.jsx(DR,{style:{},onClick:()=>{w(m?"off":"draw_trace")},children:Ge.jsxs("div",{children:[m?"✖ ":"","Edit Traces"]})}),Ge.jsx(DR,{style:{},onClick:()=>{w(d?"off":"move_footprint")},children:Ge.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ge.jsx(DR,{style:{},onClick:()=>{R(!g)},children:Ge.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ge.jsx(DR,{onClick:()=>{a(!i)},children:Ge.jsxs("div",{children:[Ge.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ge.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ge.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ge.jsx($se,{label:"Show All Trace Lengths",checked:E,onClick:()=>{z(!E)}}),Ge.jsx($se,{label:"Show Autorouting Animation",checked:b,onClick:()=>{V(!b)}}),Ge.jsx($se,{label:"Show DRC Errors",checked:S,onClick:()=>{F(!S)}})]})]})})]})]})},HVt=n=>{const{transform:e,elements:t}=n,[r,i]=at.useMemo(()=>{const c=n.elements.flatMap(f=>Kjt(f,n.elements)),u=LT(n.elements);return[c,u]},[n.elements]),[a,s]=at.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),o=at.useMemo(()=>Zjt({primitivesWithoutInteractionMetadata:r,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[r,a]),l=at.useCallback(c=>{var d,m;const u=[];for(const g of c)if(g._element){const E=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(m=g._element)==null?void 0:m.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(E))}const f=new Set(c.map(g=>g._pcb_drawing_object_id));s({drawingObjectIdsWithMouseOver:f,primitiveIdsInMousedOverNet:u})},[i]);return Ge.jsx(UVt,{elements:t,transform:e,primitives:r,onMouseHoverOverPrimitives:l,children:Ge.jsx(_Vt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(EVt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(gVt,{transform:e,focusOnHover:n.focusOnHover,children:Ge.jsx(BVt,{elements:t,children:Ge.jsx(TVt,{transform:e,elements:t,children:Ge.jsx(IVt,{transform:e,soup:t,children:Ge.jsx(mVt,{transform:e,debugGraphics:n.debugGraphics,children:Ge.jsx(vVt,{transform:e,elements:t,children:Ge.jsx(pVt,{transform:e,primitives:o,width:n.width,height:n.height,grid:n.grid})})})})})})})})})})},jVt=zd(zp(400,300),Eb(40,-40)),VVt=({circuitJson:n,debugGraphics:e,height:t=600,initialState:r,allowEditing:i=!0,editEvents:a,onEditEventsChanged:s,focusOnHover:o=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=at.useState(!l),[f,d]=Wse(),[m,g]=at.useState(jVt),{ref:E,setTransform:b,cancelDrag:S}=$jt({transform:m,onSetTransform:g,enabled:c});let[w,R]=at.useState([]);w=a??w;const z=at.useRef(!1),V=at.useRef(null),F=`${(n==null?void 0:n.length)||0}_${(n==null?void 0:n.editCount)||0}`,Y=()=>{const ie=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:ue,width:_e,height:he}=$.some(ge=>ge.type.startsWith("pcb_"))?Fjt($.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((ie.width??0)/_e,(ie.height??0)/he,100)*.75,Se=zd(zp((ie.width??0)/2,(ie.height??0)/2),Eb(pe,-pe,0,0),zp(-ue.x,-ue.y));b(Se)};at.useEffect(()=>{d!=null&&d.width&&n&&n.length!==0&&(z.current||(Y(),z.current=!0))},[n,d]);const B=at.useMemo(()=>(n==null?void 0:n.filter(ie=>ie.type.startsWith("pcb_")||ie.type.startsWith("source_")))??[],[F]),$=at.useMemo(()=>Qct({circuitJson:B,editEvents:w}),[B,w]),G=ie=>{R([...w,ie]),s==null||s([...w,ie])},oe=ie=>{const ue=w.map(_e=>_e.edit_event_id===ie.edit_event_id?{..._e,...ie}:_e);R(ue),s==null||s(ue)};return Ge.jsxs("div",{ref:E,style:{position:"relative"},children:[Ge.jsx("div",{ref:f,children:Ge.jsxs(Hjt,{initialState:r,children:[Ge.jsx(HVt,{transform:m,height:t,width:d.width,allowEditing:i,focusOnHover:o,cancelPanDrag:S,onCreateEditEvent:G,onModifyEditEvent:oe,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:$,debugGraphics:e},d.width),Ge.jsx(Vjt,{})]})}),l&&!c&&Ge.jsx("div",{onClick:()=>{u(!0),Y()},onTouchStart:ie=>{const ue=ie.touches[0];V.current={x:ue.clientX,y:ue.clientY}},onTouchEnd:ie=>{const ue=ie.changedTouches[0],_e=V.current;if(!_e)return;const he=Math.abs(ue.clientX-_e.x),pe=Math.abs(ue.clientY-_e.y);he<10&&pe<10&&(ie.preventDefault(),u(!0),Y()),V.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:Z2.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ge.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const GVt=({containerClassName:n,...e})=>{const t=at.useRef(null),[r,i]=at.useState(620);return at.useLayoutEffect(()=>{const a=()=>{if(t.current){const o=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(o,620),l))}};a();const s=new ResizeObserver(a);return t.current&&s.observe(t.current),window.addEventListener("resize",a),()=>{s.disconnect(),window.removeEventListener("resize",a)}},[]),Ge.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ge.jsx(VVt,{...e,height:r})})},qVt='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[60vw\\]{max-width:60vw!important}.\\!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-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-xl{max-width:36rem}.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-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-\\[-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-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-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!important}.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-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-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-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-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-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-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-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-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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-text-left{text-align:left}}@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))}.\\[\\&_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}',YVt=()=>{at.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=qVt,document.head.appendChild(e)},[])},RUe=n=>`hsl(${AS.indexOf(n)*137.5%360}, 70%, 50%)`,WVt=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ge.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ge.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:AS.map(t=>{const r=n[t]||0,i=r/e*100;return Ge.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:RUe(t)},children:Ge.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,": ",r.toFixed(1),"ms"]})},t)})}),Ge.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},XVt=({renderLog:n})=>{const[e,t]=at.useState("chronological");if(!n)return Ge.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 r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,s)=>AS.indexOf(a[0])-AS.indexOf(s[0])):r.sort((a,s)=>s[1]-a[1]);const i=r.reduce((a,[s,o])=>a+o,0);return Ge.jsxs("div",{className:"rf-bg-white",children:[Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ge.jsx("div",{children:"Render Logs"}),Ge.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ge.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ge.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ge.jsx("option",{value:"chronological",children:"Phase Order"}),Ge.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ge.jsx(WVt,{phaseTimings:n.phaseTimings}),Ge.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ge.jsx("thead",{children:Ge.jsxs("tr",{children:[Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ge.jsx("tbody",{children:r.map(([a,s])=>Ge.jsxs("tr",{children:[Ge.jsx("td",{className:"rf-p-2",children:AS.indexOf(a)}),Ge.jsx("td",{className:"rf-p-2",children:a}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsx("div",{className:"rf-w-8",children:Ge.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:RUe(a),width:`${s/i*100}%`}})})}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsxs("div",{className:"rf-flex w-full",children:[Ge.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),Ge.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},$Vt="0.0.493",ZVt=["assembly","bom","circuit_json","errors","render_log"],QVt=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:s=!1,codeTabContent:o,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:d=!0,className:m,headerClassName:g,leftHeaderContent:E,readOnly:b,isStreaming:S,autoroutingLog:w,onReportAutoroutingLog:R,isRunningCode:z,hasCodeChangedSinceLastRun:V,onEditEvent:F,editEvents:Y,defaultActiveTab:B,autoRotate3dViewerDisabled:$,showSchematicDebugGrid:G=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:ie=!1})=>{var Le;YVt();const ue=at.useMemo(()=>r?r.filter(Te=>Te&&"error_type"in Te||Te.type.includes("error")):null,[r]),[_e,he]=at.useState(B??"pcb"),[pe,Se]=at.useState(ie),ge=at.useCallback(Te=>{he(Te),u==null||u(Te)},[u]),Ae=()=>{Se(!pe)};at.useEffect(()=>{t&&ge("errors")},[t]),at.useEffect(()=>{(_e==="code"||_e==="errors")&&r&&!t&&ge(B??"pcb")},[r]);const Ne=at.useCallback(Te=>{window.TSCIRCUIT_3D_OBJECT_REF=Te===null?void 0:Te},[]);return Ge.jsx("div",{className:M0("flex flex-col relative rf-overflow-x-hidden",m),children:Ge.jsx("div",{className:M0("rf-md:sticky rf-md:top-2",pe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ge.jsxs(Pge,{value:_e,onValueChange:ge,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ge.jsxs("div",{className:M0("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[E,E&&Ge.jsx("div",{className:"rf-flex-grow"}),!E&&z&&Ge.jsx(cR,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!E&&Ge.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Le=f.lastRenderEvent)==null?void 0:Le.phase)??""}),Ge.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ge.jsx(cR,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ge.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Ge.jsxs(Eq,{children:[s&&Ge.jsx(zw,{value:"code",children:"Code"}),Ge.jsxs(zw,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:M0("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",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ge.jsxs(zw,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:M0("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",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ge.jsxs(zw,{value:"cad",children:[r&&Ge.jsx("span",{className:M0("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(_e)&&Ge.jsx(zw,{value:_e,children:Nge(_e)}),Ge.jsxs(mae,{children:[Ge.jsx(vae,{asChild:!0,children:Ge.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ge.jsx(iOt,{className:"rf-w-4 rf-h-4"}),(ue&&ue.length>0||t)&&Ge.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"})]})}),Ge.jsxs(KI,{className:"rf-*:text-xs",children:[ZVt.map(Te=>Ge.jsxs(o3,{onSelect:()=>ge(Te),children:[_e!==Te&&Ge.jsx(zNe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),_e===Te&&Ge.jsx(Eie,{className:"rf-w-3 rf-h-3"}),Ge.jsx("div",{className:"rf-pr-2",children:Nge(Te)}),Te==="errors"&&(ue&&ue.length>0||t)&&Ge.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:t?1:ue==null?void 0:ue.length})]},Te)),Ge.jsx(o3,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ge.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",$Vt.split(".").map((Te,qe)=>qe===2?parseInt(Te)+1:Te).join(".")]})})]})]})]}),oe&&Ge.jsx(v2,{onClick:Ae,variant:"ghost",children:pe?Ge.jsx(lOt,{size:16}):Ge.jsx(sOt,{size:16})})]}),s&&Ge.jsx(P3,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ge.jsx("div",{className:"rf-h-full",children:o})}),Ge.jsx(P3,{value:"pcb",children:Ge.jsx("div",{className:M0("rf-overflow-hidden",pe?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallbackRender:({error:Te})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Te==null?void 0:Te.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(GVt,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:M0("rf-h-full rf-w-full",pe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Te=>{F&&Te.forEach(qe=>F(qe))}}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"assembly",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallback:Ge.jsx("div",{children:"Error loading Assembly"}),children:r?Ge.jsx(LFt,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"schematic",children:Ge.jsx("div",{className:M0("rf-overflow-auto rf-bg-white",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallbackRender:({error:Te})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Te==null?void 0:Te.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(NFt,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Te=>{F==null||F(Te)},debugGrid:G,colorOverrides:{schematic:{background:"transparent"}}}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"cad",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{FallbackComponent:qLt,children:r?Ge.jsx(VLt,{ref:Ne,circuitJson:r,autoRotateDisabled:$}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"bom",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallbackRender:({error:Te})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Te==null?void 0:Te.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(kFt,{circuitJson:r}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"circuit_json",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(lR,{fallback:Ge.jsx("div",{children:"Error loading JSON viewer"}),children:r?Ge.jsx(UFt,{elements:r}):Ge.jsx(ZM,{onRunClicked:e})})})}),Ge.jsx(P3,{value:"errors",children:Ge.jsx("div",{className:M0("rf-overflow-auto",pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||ue&&ue.length>0?Ge.jsx(nkt,{code:n,circuitJsonErrors:ue,errorMessage:t,autoroutingLog:w,onReportAutoroutingLog:R}):Ge.jsx(ZM,{onRunClicked:e})})}),c&&Ge.jsx(P3,{value:"render_log",children:Ge.jsx(XVt,{renderLog:f})})]})})})};var Gk="Dialog",[AUe,NUe]=EE(Gk),[KVt,f3]=AUe(Gk),PUe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=n,o=at.useRef(null),l=at.useRef(null),[c,u]=qT({prop:r,defaultProp:i??!1,onChange:a,caller:Gk});return Ge.jsx(KVt,{scope:e,triggerRef:o,contentRef:l,contentId:wE(),titleId:wE(),descriptionId:wE(),open:c,onOpenChange:u,onOpenToggle:at.useCallback(()=>u(f=>!f),[u]),modal:s,children:t})};PUe.displayName=Gk;var DUe="DialogTrigger",LUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(DUe,t),a=Xx(e,i.triggerRef);return Ge.jsx(y1.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Kse(i.open),...r,ref:a,onClick:Up(n.onClick,i.onOpenToggle)})});LUe.displayName=DUe;var Zse="DialogPortal",[JVt,OUe]=AUe(Zse,{forceMount:void 0}),zUe=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=f3(Zse,e);return Ge.jsx(JVt,{scope:e,forceMount:t,children:at.Children.map(r,s=>Ge.jsx(A3,{present:t||a.open,children:Ge.jsx(Jie,{asChild:!0,container:i,children:s})}))})};zUe.displayName=Zse;var qk="DialogOverlay",UUe=at.forwardRef((n,e)=>{const t=OUe(qk,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=f3(qk,n.__scopeDialog);return a.modal?Ge.jsx(A3,{present:r||a.open,children:Ge.jsx(tGt,{...i,ref:e})}):null});UUe.displayName=qk;var eGt=GT("DialogOverlay.RemoveScroll"),tGt=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(qk,t);return Ge.jsx(aae,{as:eGt,allowPinchZoom:!0,shards:[i.contentRef],children:Ge.jsx(y1.div,{"data-state":Kse(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),rT="DialogContent",IUe=at.forwardRef((n,e)=>{const t=OUe(rT,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=f3(rT,n.__scopeDialog);return Ge.jsx(A3,{present:r||a.open,children:a.modal?Ge.jsx(nGt,{...i,ref:e}):Ge.jsx(rGt,{...i,ref:e})})});IUe.displayName=rT;var nGt=at.forwardRef((n,e)=>{const t=f3(rT,n.__scopeDialog),r=at.useRef(null),i=Xx(e,t.contentRef,r);return at.useEffect(()=>{const a=r.current;if(a)return BPe(a)},[]),Ge.jsx(kUe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Up(n.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=t.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Up(n.onPointerDownOutside,a=>{const s=a.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&a.preventDefault()}),onFocusOutside:Up(n.onFocusOutside,a=>a.preventDefault())})}),rGt=at.forwardRef((n,e)=>{const t=f3(rT,n.__scopeDialog),r=at.useRef(!1),i=at.useRef(!1);return Ge.jsx(kUe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=n.onCloseAutoFocus)==null||s.call(n,a),a.defaultPrevented||(r.current||(o=t.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),kUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=n,o=f3(rT,t),l=at.useRef(null),c=Xx(e,l);return tPe(),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(kie,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ge.jsx(Oie,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Kse(o.open),...s,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(aGt,{titleId:o.titleId}),Ge.jsx(oGt,{contentRef:l,descriptionId:o.descriptionId})]})]})}),Qse="DialogTitle",FUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(Qse,t);return Ge.jsx(y1.h2,{id:i.titleId,...r,ref:e})});FUe.displayName=Qse;var BUe="DialogDescription",HUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(BUe,t);return Ge.jsx(y1.p,{id:i.descriptionId,...r,ref:e})});HUe.displayName=BUe;var jUe="DialogClose",VUe=at.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=f3(jUe,t);return Ge.jsx(y1.button,{type:"button",...r,ref:e,onClick:Up(n.onClick,()=>i.onOpenChange(!1))})});VUe.displayName=jUe;function Kse(n){return n?"open":"closed"}var GUe="DialogTitleWarning",[iGt,qUe]=Qut(GUe,{contentName:rT,titleName:Qse,docsSlug:"dialog"}),aGt=({titleId:n})=>{const e=qUe(GUe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13471
13471
|
|
|
13472
13472
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
13473
13473
|
|
|
@@ -13651,7 +13651,7 @@ to {
|
|
|
13651
13651
|
* @license
|
|
13652
13652
|
* Copyright 2019 Google LLC
|
|
13653
13653
|
* SPDX-License-Identifier: Apache-2.0
|
|
13654
|
-
*/const RIe=Symbol("Comlink.proxy"),lYt=Symbol("Comlink.endpoint"),AIe=Symbol("Comlink.releaseProxy"),yoe=Symbol("Comlink.finalizer"),lF=Symbol("Comlink.thrown"),NIe=n=>typeof n=="object"&&n!==null||typeof n=="function",cYt={canHandle:n=>NIe(n)&&n[RIe],serialize(n){const{port1:e,port2:t}=new MessageChannel;return DIe(n,e),[t,[t]]},deserialize(n){return n.start(),OIe(n)}},uYt={canHandle:n=>NIe(n)&&lF 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}},PIe=new Map([["proxy",cYt],["throw",uYt]]);function fYt(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function DIe(n,e=globalThis,t=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!fYt(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(oT);let c;try{const u=o.slice(0,-1).reduce((d,m)=>d[m],n),f=o.reduce((d,m)=>d[m],n);switch(s){case"GET":c=f;break;case"SET":u[o.slice(-1)[0]]=oT(i.data.value),c=!0;break;case"APPLY":c=f.apply(u,l);break;case"CONSTRUCT":{const d=new f(...l);c=kIe(d)}break;case"ENDPOINT":{const{port1:d,port2:m}=new MessageChannel;DIe(n,m),c=vYt(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[lF]:0}}Promise.resolve(c).catch(u=>({value:u,[lF]:0})).then(u=>{const[f,d]=dF(u);e.postMessage(Object.assign(Object.assign({},f),{id:a}),d),s==="RELEASE"&&(e.removeEventListener("message",r),LIe(e),yoe in n&&typeof n[yoe]=="function"&&n[yoe]())}).catch(u=>{const[f,d]=dF({value:new TypeError("Unserializable return value"),[lF]:0});e.postMessage(Object.assign(Object.assign({},f),{id:a}),d)})}),e.start&&e.start()}function dYt(n){return n.constructor.name==="MessagePort"}function LIe(n){dYt(n)&&n.close()}function OIe(n,e){const t=new Map;return n.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=t.get(a.id);if(s)try{s(a)}finally{t.delete(a.id)}}),_oe(n,t,[],e)}function cF(n){if(n)throw new Error("Proxy has been released and is not useable")}function zIe(n){return zR(n,new Map,{type:"RELEASE"}).then(()=>{LIe(n)})}const uF=new WeakMap,fF="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(uF.get(n)||0)-1;uF.set(n,e),e===0&&zIe(n)});function hYt(n,e){const t=(uF.get(e)||0)+1;uF.set(e,t),fF&&fF.register(n,e,n)}function pYt(n){fF&&fF.unregister(n)}function _oe(n,e,t=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(s,o){if(cF(i),o===AIe)return()=>{pYt(a),zIe(n),e.clear(),i=!0};if(o==="then"){if(t.length===0)return{then:()=>a};const l=zR(n,e,{type:"GET",path:t.map(c=>c.toString())}).then(oT);return l.then.bind(l)}return _oe(n,e,[...t,o])},set(s,o,l){cF(i);const[c,u]=dF(l);return zR(n,e,{type:"SET",path:[...t,o].map(f=>f.toString()),value:c},u).then(oT)},apply(s,o,l){cF(i);const c=t[t.length-1];if(c===lYt)return zR(n,e,{type:"ENDPOINT"}).then(oT);if(c==="bind")return _oe(n,e,t.slice(0,-1));const[u,f]=UIe(l);return zR(n,e,{type:"APPLY",path:t.map(d=>d.toString()),argumentList:u},f).then(oT)},construct(s,o){cF(i);const[l,c]=UIe(o);return zR(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(oT)}});return hYt(a,n),a}function mYt(n){return Array.prototype.concat.apply([],n)}function UIe(n){const e=n.map(dF);return[e.map(t=>t[0]),mYt(e.map(t=>t[1]))]}const IIe=new WeakMap;function vYt(n,e){return IIe.set(n,e),n}function kIe(n){return Object.assign(n,{[RIe]:!0})}function dF(n){for(const[e,t]of PIe)if(t.canHandle(n)){const[r,i]=t.serialize(n);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:n},IIe.get(n)||[]]}function oT(n){switch(n.type){case"HANDLER":return PIe.get(n.name).deserialize(n.value);case"RAW":return n.value}}function zR(n,e,t,r){return new Promise(i=>{const a=gYt();e.set(a,i),n.start&&n.start(),n.postMessage(Object.assign({id:a},t),r)})}function gYt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var yYt=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(o){console.warn("[Worker] Error killing previous global worker instance:",o),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const o=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,l=await fetch(o).then(c=>c.blob());t=URL.createObjectURL(l)}const r=new Worker(t,{type:"module"}),i=OIe(r);n.snippetsApiBaseUrl&&await i.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl);let a=!1;const s={clearEventListeners:i.clearEventListeners.bind(i),execute:async(...o)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't execute");return i.execute.bind(i)(...o)},executeWithFsMap:async(...o)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return i.executeWithFsMap.bind(i)(...o)},renderUntilSettled:i.renderUntilSettled.bind(i),getCircuitJson:i.getCircuitJson.bind(i),on:(o,l)=>{const c=kIe(l);i.on(o,c)},kill:async()=>{i[AIe](),r.terminate(),a=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===s&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=s,s};const FIe=n=>{const e={};if(!n)return e;for(const r of AS)e[r]=0;const t=new Map;for(const r of n){const[,,i,a]=r.type.split(":");if(a==="start"){t.set(`${i}:${r.renderId}`,r);continue}if(a==="end"){const s=t.get(`${i}:${r.renderId}`);if(s){const o=r.createdAt-s.createdAt;e[i]=(e[i]||0)+o}}}return e},_Yt=(n,e)=>{const t={};for(const[r,i]of n.entries()){const a=e.get(r);a!==i&&(t[r]={old:i,new:a})}for(const[r,i]of e.entries())n.has(r)||(t[r]={old:void 0,new:i});return t},BIe=Xve()($ve(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"}));function xYt(){const n=at.useRef(Promise.resolve()),e=at.useRef(!1),t=at.useCallback(async i=>{await n.current;let a;const s=new Promise(o=>{a=o});try{return n.current=s,e.current=!0,await i()}finally{e.current=!1,a()}},[]),r=at.useCallback(()=>e.current,[]);return{runWithMutex:t,isLocked:r}}const bYt=26,_4=xb("run-frame:RunFrame"),SYt=n=>{const[e,t]=X5(oe=>[oe.circuitJson,oe.setCircuitJson]),[r,i]=at.useState(null),[a,s]=at.useState(null),[o,l]=at.useReducer((oe,ie)=>oe+1,0),c=BIe(oe=>oe.setLastRunEvalVersion),u=at.useRef(0),f=xYt(),[d,m]=at.useState(!1);at.useEffect(()=>{const oe=ie=>{(ie.ctrlKey||ie.metaKey)&&ie.key==="Enter"&&!d&&l(1)};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[d]);const[g,E]=at.useState(null),[b,S]=at.useState({}),[w,R]=at.useState(n.defaultActiveTab??"pcb");at.useEffect(()=>{n.debug&&xb.enable("run-frame*")},[n.debug]);const z=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((oe,[ie,ue])=>oe.set(ie,ue),new Map),V=at.useRef(null),F=at.useRef(null);at.useEffect(()=>{const oe=z instanceof Map?Object.fromEntries(z.entries()):z;if(!oe||Object.keys(oe).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const ie=n.showRunButton&&o!==u.current;if(V.current&&e){const _e=_Yt(V.current,z);if(Object.keys(_e).length>0)_4("code changes detected");else if(F.current!==n.entrypoint)_4("render triggered by entrypoint change");else if(!ie){_4("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&o===u.current)return;V.current=z,F.current=n.entrypoint??null,u.current=o,m(!0);const ue=async()=>{var Te,qe,Je,lt,vt,zt;_4("running render worker"),i(null);const _e={progress:0};let he=n.evalVersion??"latest";if(!globalThis.runFrameWorker&&n.forceLatestEvalVersion)try{const Et=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(Et.ok){const Qe=await Et.json();(Te=Qe.tags)!=null&&Te.latest&&(he=Qe.tags.latest,c(he))}}catch{}const pe=globalThis.runFrameWorker??await yYt({evalVersion:he,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=pe,(qe=n.onRenderStarted)==null||qe.call(n);const Se=z instanceof Map?Object.fromEntries(z.entries()):z;let ge=Date.now();if(pe.on("autorouting:start",Et=>{S({...b,[Et.componentDisplayName]:{simpleRouteJson:Et.simpleRouteJson}})}),pe.on("board:renderPhaseStarted",Et=>{_e.lastRenderEvent=Et,_e.eventsProcessed=(_e.eventsProcessed??0)+1;const Qe=AS.indexOf(Et.phase)/bYt*.75+_e.eventsProcessed/1e3*.25,St=1-Math.exp(-Qe*3);_e.progress=St,E({..._e})}),w==="render_log"&&pe.on("renderable:renderLifecycle:anyEvent",Et=>{_e.renderEvents=_e.renderEvents??[],Et.createdAt=Date.now(),_e.renderEvents.push(Et),Date.now()-ge>500&&(_e.phaseTimings=FIe(_e.renderEvents??[]),ge=Date.now()),E({..._e})}),pe.on("autorouting:progress",Et=>{s(Et.debugGraphics)}),!(await pe.executeWithFsMap({entrypoint:n.entrypoint,fsMap:Se,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(Et=>{var St;const Qe=Et.message.replace("Error: ","");return(St=n.onError)==null||St.call(n,Et),i({error:Qe,stack:Et.stack}),console.error(Et),{success:!1}})).success){m(!1);return}const Ne=pe.renderUntilSettled();_4("waiting for initial circuit json...");let Le=await pe.getCircuitJson().catch(Et=>{var Qe;return _4("error getting initial circuit json",Et),(Qe=n.onError)==null||Qe.call(n,Et),i({error:Et.message,stack:Et.stack}),m(!1),null});Le&&(_4("got initial circuit json"),t(Le),(Je=n.onCircuitJsonChange)==null||Je.call(n,Le),(lt=n.onInitialRender)==null||lt.call(n,{circuitJson:Le}),await Ne,_4("getting final circuit json"),Le=await pe.getCircuitJson(),(vt=n.onCircuitJsonChange)==null||vt.call(n,Le),t(Le),(zt=n.onRenderFinished)==null||zt.call(n,{circuitJson:Le}),s({}),w==="render_log"&&(_e.phaseTimings=FIe(_e.renderEvents??[])),_e.progress=1,E({..._e}),m(!1))};f.runWithMutex(ue)},[n.fsMap,n.entrypoint,o,n.evalVersion]);const Y=at.useRef(null),B=at.useRef(null),$=oe=>{if(!oe||oe===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}oe.in_progress?(Y.current=oe,B.current&&(clearTimeout(B.current),B.current=null)):(B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{var ue;const ie=oe||Y.current;(ue=n.onEditEvent)==null||ue.call(n,ie),Y.current=null,B.current=null},100))},G=async(oe,ie)=>{await goe.post("autorouting/bug_reports/create",{json:{title:oe,simple_route_json:ie.simpleRouteJson}}).json().then(({autorouting_bug_report:ue})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${ue.autorouting_bug_report_id}`,"_blank")}).catch(ue=>{console.error("Failed to report autorouting bug",ue),ue.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${ue.message}`)})};return Ge.jsx(QVt,{code:z.get(n.entrypoint??"entrypoint.tsx"),defaultActiveTab:n.defaultActiveTab,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:a,autoroutingLog:b,onReportAutoroutingLog:n.onReportAutoroutingLog||G,leftHeaderContent:Ge.jsxs(Ge.Fragment,{children:[n.showRunButton&&Ge.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ge.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:d,children:["Run"," ",d?Ge.jsx(cR,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ge.jsx(UNe,{className:"rf-w-3 rf-h-3"})]}),d&&Ge.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ge.jsx(v2,{onClick:oe=>{oe.stopPropagation(),m(!1),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:Ge.jsx(fOt,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.leftHeaderContent]}),onActiveTabChange:R,circuitJson:e,renderLog:g,isRunningCode:d,errorMessage:r==null?void 0:r.error,onEditEvent:$,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen})};function EYt(n,e){const[t,r]=at.useState(()=>{try{const i=window.localStorage.getItem(n);return i?JSON.parse(i):e}catch(i){return console.error("Error reading from localStorage:",i),e}});return at.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(i){console.error("Error writing to localStorage:",i)}},[n,t]),[t,r]}const wYt=({snippetNames:n,onSelect:e,onCancel:t,isOpen:r})=>{const[i,a]=at.useState(""),[s,o]=at.useState("");if(!r)return null;const l=n.filter(f=>f.toLowerCase().includes(s.toLowerCase())),c=s&&!n.includes(s),u=f=>{f.key==="Enter"&&(l.length===1?a(l[0]):c&&a(s))};return Ge.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:Ge.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ge.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ge.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:f=>o(f.target.value),onKeyDown:u}),Ge.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[l.map(f=>Ge.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===f?"bg-blue-50":""}`,onClick:()=>a(f),children:f},f)),c&&Ge.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===s?"bg-blue-50":""}`,onClick:()=>a(s),children:['Create new "',s,'"']})]}),Ge.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ge.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ge.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:()=>i&&e(i),disabled:!i,children:i===s?`Create "${i}"`:`Save to ${i}`})]})]})})},MYt=n=>{const e=at.useRef(null),t=X5(r=>r.recentEvents);at.useEffect(()=>{if(t.length===0)return;const r=t[0];r.event_id!==e.current&&(n(r),e.current=r.event_id)},[t,n])};var HIe="AlertDialog",[TYt,Len]=EE(HIe,[NUe]),ow=NUe(),jIe=n=>{const{__scopeAlertDialog:e,...t}=n,r=ow(e);return Ge.jsx(YUe,{...r,...t,modal:!0})};jIe.displayName=HIe;var CYt="AlertDialogTrigger",RYt=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(lGt,{...i,...r,ref:e})});RYt.displayName=CYt;var AYt="AlertDialogPortal",VIe=n=>{const{__scopeAlertDialog:e,...t}=n,r=ow(e);return Ge.jsx(WUe,{...r,...t})};VIe.displayName=AYt;var NYt="AlertDialogOverlay",GIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(Jse,{...i,...r,ref:e})});GIe.displayName=NYt;var UR="AlertDialogContent",[PYt,DYt]=TYt(UR),LYt=tft("AlertDialogContent"),qIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,children:r,...i}=n,a=ow(t),s=at.useRef(null),o=Xx(e,s),l=at.useRef(null);return Ge.jsx(iGt,{contentName:UR,titleName:YIe,docsSlug:"alert-dialog",children:Ge.jsx(PYt,{scope:t,cancelRef:l,children:Ge.jsxs(eoe,{role:"alertdialog",...a,...i,ref:o,onOpenAutoFocus:Up(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[Ge.jsx(LYt,{children:r}),Ge.jsx(zYt,{contentRef:s})]})})})});qIe.displayName=UR;var YIe="AlertDialogTitle",WIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(toe,{...i,...r,ref:e})});WIe.displayName=YIe;var XIe="AlertDialogDescription",$Ie=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(noe,{...i,...r,ref:e})});$Ie.displayName=XIe;var OYt="AlertDialogAction",ZIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(XUe,{...i,...r,ref:e})});ZIe.displayName=OYt;var QIe="AlertDialogCancel",KIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,{cancelRef:i}=DYt(QIe,t),a=ow(t),s=Xx(e,i);return Ge.jsx(XUe,{...a,...r,ref:s})});KIe.displayName=QIe;var zYt=({contentRef:n})=>{const e=`\`${UR}\` requires a description for the component to be accessible for screen reader users.
|
|
13654
|
+
*/const RIe=Symbol("Comlink.proxy"),lYt=Symbol("Comlink.endpoint"),AIe=Symbol("Comlink.releaseProxy"),yoe=Symbol("Comlink.finalizer"),lF=Symbol("Comlink.thrown"),NIe=n=>typeof n=="object"&&n!==null||typeof n=="function",cYt={canHandle:n=>NIe(n)&&n[RIe],serialize(n){const{port1:e,port2:t}=new MessageChannel;return DIe(n,e),[t,[t]]},deserialize(n){return n.start(),OIe(n)}},uYt={canHandle:n=>NIe(n)&&lF 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}},PIe=new Map([["proxy",cYt],["throw",uYt]]);function fYt(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function DIe(n,e=globalThis,t=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!fYt(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(oT);let c;try{const u=o.slice(0,-1).reduce((d,m)=>d[m],n),f=o.reduce((d,m)=>d[m],n);switch(s){case"GET":c=f;break;case"SET":u[o.slice(-1)[0]]=oT(i.data.value),c=!0;break;case"APPLY":c=f.apply(u,l);break;case"CONSTRUCT":{const d=new f(...l);c=kIe(d)}break;case"ENDPOINT":{const{port1:d,port2:m}=new MessageChannel;DIe(n,m),c=vYt(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[lF]:0}}Promise.resolve(c).catch(u=>({value:u,[lF]:0})).then(u=>{const[f,d]=dF(u);e.postMessage(Object.assign(Object.assign({},f),{id:a}),d),s==="RELEASE"&&(e.removeEventListener("message",r),LIe(e),yoe in n&&typeof n[yoe]=="function"&&n[yoe]())}).catch(u=>{const[f,d]=dF({value:new TypeError("Unserializable return value"),[lF]:0});e.postMessage(Object.assign(Object.assign({},f),{id:a}),d)})}),e.start&&e.start()}function dYt(n){return n.constructor.name==="MessagePort"}function LIe(n){dYt(n)&&n.close()}function OIe(n,e){const t=new Map;return n.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=t.get(a.id);if(s)try{s(a)}finally{t.delete(a.id)}}),_oe(n,t,[],e)}function cF(n){if(n)throw new Error("Proxy has been released and is not useable")}function zIe(n){return zR(n,new Map,{type:"RELEASE"}).then(()=>{LIe(n)})}const uF=new WeakMap,fF="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(uF.get(n)||0)-1;uF.set(n,e),e===0&&zIe(n)});function hYt(n,e){const t=(uF.get(e)||0)+1;uF.set(e,t),fF&&fF.register(n,e,n)}function pYt(n){fF&&fF.unregister(n)}function _oe(n,e,t=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(s,o){if(cF(i),o===AIe)return()=>{pYt(a),zIe(n),e.clear(),i=!0};if(o==="then"){if(t.length===0)return{then:()=>a};const l=zR(n,e,{type:"GET",path:t.map(c=>c.toString())}).then(oT);return l.then.bind(l)}return _oe(n,e,[...t,o])},set(s,o,l){cF(i);const[c,u]=dF(l);return zR(n,e,{type:"SET",path:[...t,o].map(f=>f.toString()),value:c},u).then(oT)},apply(s,o,l){cF(i);const c=t[t.length-1];if(c===lYt)return zR(n,e,{type:"ENDPOINT"}).then(oT);if(c==="bind")return _oe(n,e,t.slice(0,-1));const[u,f]=UIe(l);return zR(n,e,{type:"APPLY",path:t.map(d=>d.toString()),argumentList:u},f).then(oT)},construct(s,o){cF(i);const[l,c]=UIe(o);return zR(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(oT)}});return hYt(a,n),a}function mYt(n){return Array.prototype.concat.apply([],n)}function UIe(n){const e=n.map(dF);return[e.map(t=>t[0]),mYt(e.map(t=>t[1]))]}const IIe=new WeakMap;function vYt(n,e){return IIe.set(n,e),n}function kIe(n){return Object.assign(n,{[RIe]:!0})}function dF(n){for(const[e,t]of PIe)if(t.canHandle(n)){const[r,i]=t.serialize(n);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:n},IIe.get(n)||[]]}function oT(n){switch(n.type){case"HANDLER":return PIe.get(n.name).deserialize(n.value);case"RAW":return n.value}}function zR(n,e,t,r){return new Promise(i=>{const a=gYt();e.set(a,i),n.start&&n.start(),n.postMessage(Object.assign({id:a},t),r)})}function gYt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var yYt=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(o){console.warn("[Worker] Error killing previous global worker instance:",o),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const o=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,l=await fetch(o).then(c=>c.blob());t=URL.createObjectURL(l)}const r=new Worker(t,{type:"module"}),i=OIe(r);n.snippetsApiBaseUrl&&await i.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl);let a=!1;const s={clearEventListeners:i.clearEventListeners.bind(i),execute:async(...o)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't execute");return i.execute.bind(i)(...o)},executeWithFsMap:async(...o)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return i.executeWithFsMap.bind(i)(...o)},renderUntilSettled:i.renderUntilSettled.bind(i),getCircuitJson:i.getCircuitJson.bind(i),on:(o,l)=>{const c=kIe(l);i.on(o,c)},kill:async()=>{i[AIe](),r.terminate(),a=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===s&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=s,s};const FIe=n=>{const e={};if(!n)return e;for(const r of AS)e[r]=0;const t=new Map;for(const r of n){const[,,i,a]=r.type.split(":");if(a==="start"){t.set(`${i}:${r.renderId}`,r);continue}if(a==="end"){const s=t.get(`${i}:${r.renderId}`);if(s){const o=r.createdAt-s.createdAt;e[i]=(e[i]||0)+o}}}return e},_Yt=(n,e)=>{const t={};for(const[r,i]of n.entries()){const a=e.get(r);a!==i&&(t[r]={old:i,new:a})}for(const[r,i]of e.entries())n.has(r)||(t[r]={old:void 0,new:i});return t},BIe=Xve()($ve(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"}));function xYt(){const n=at.useRef(Promise.resolve()),e=at.useRef(!1),t=at.useCallback(async i=>{await n.current;let a;const s=new Promise(o=>{a=o});try{return n.current=s,e.current=!0,await i()}finally{e.current=!1,a()}},[]),r=at.useCallback(()=>e.current,[]);return{runWithMutex:t,isLocked:r}}const bYt=26,_4=xb("run-frame:RunFrame"),SYt=n=>{const[e,t]=X5(oe=>[oe.circuitJson,oe.setCircuitJson]),[r,i]=at.useState(null),[a,s]=at.useState(null),[o,l]=at.useReducer((oe,ie)=>oe+1,0),c=BIe(oe=>oe.setLastRunEvalVersion),u=at.useRef(0),f=xYt(),[d,m]=at.useState(!1);at.useEffect(()=>{const oe=ie=>{(ie.ctrlKey||ie.metaKey)&&ie.key==="Enter"&&!d&&l(1)};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[d]);const[g,E]=at.useState(null),[b,S]=at.useState({}),[w,R]=at.useState(n.defaultActiveTab??"pcb");at.useEffect(()=>{n.debug&&xb.enable("run-frame*")},[n.debug]);const z=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((oe,[ie,ue])=>oe.set(ie,ue),new Map),V=at.useRef(null),F=at.useRef(null);at.useEffect(()=>{const oe=z instanceof Map?Object.fromEntries(z.entries()):z;if(!oe||Object.keys(oe).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const ie=n.showRunButton&&o!==u.current;if(V.current&&e){const _e=_Yt(V.current,z);if(Object.keys(_e).length>0)_4("code changes detected");else if(F.current!==n.entrypoint)_4("render triggered by entrypoint change");else if(!ie){_4("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&o===u.current)return;V.current=z,F.current=n.entrypoint??null,u.current=o,m(!0);const ue=async()=>{var Te,qe,Je,lt,vt,zt;_4("running render worker"),i(null);const _e={progress:0};let he=n.evalVersion??"latest";if(!globalThis.runFrameWorker&&n.forceLatestEvalVersion)try{const Et=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(Et.ok){const Qe=await Et.json();(Te=Qe.tags)!=null&&Te.latest&&(he=Qe.tags.latest,c(he))}}catch{}const pe=globalThis.runFrameWorker??await yYt({evalVersion:he,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=pe,(qe=n.onRenderStarted)==null||qe.call(n);const Se=z instanceof Map?Object.fromEntries(z.entries()):z;let ge=Date.now();if(pe.on("autorouting:start",Et=>{S({...b,[Et.componentDisplayName]:{simpleRouteJson:Et.simpleRouteJson}})}),pe.on("board:renderPhaseStarted",Et=>{_e.lastRenderEvent=Et,_e.eventsProcessed=(_e.eventsProcessed??0)+1;const Qe=AS.indexOf(Et.phase)/bYt*.75+_e.eventsProcessed/1e3*.25,St=1-Math.exp(-Qe*3);_e.progress=St,E({..._e})}),w==="render_log"&&pe.on("renderable:renderLifecycle:anyEvent",Et=>{_e.renderEvents=_e.renderEvents??[],Et.createdAt=Date.now(),_e.renderEvents.push(Et),Date.now()-ge>500&&(_e.phaseTimings=FIe(_e.renderEvents??[]),ge=Date.now()),E({..._e})}),pe.on("autorouting:progress",Et=>{s(Et.debugGraphics)}),!(await pe.executeWithFsMap({entrypoint:n.entrypoint,fsMap:Se,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(Et=>{var St;const Qe=Et.message.replace("Error: ","");return(St=n.onError)==null||St.call(n,Et),i({error:Qe,stack:Et.stack}),console.error(Et),{success:!1}})).success){m(!1);return}const Ne=pe.renderUntilSettled();_4("waiting for initial circuit json...");let Le=await pe.getCircuitJson().catch(Et=>{var Qe;return _4("error getting initial circuit json",Et),(Qe=n.onError)==null||Qe.call(n,Et),i({error:Et.message,stack:Et.stack}),m(!1),null});Le&&(_4("got initial circuit json"),t(Le),(Je=n.onCircuitJsonChange)==null||Je.call(n,Le),(lt=n.onInitialRender)==null||lt.call(n,{circuitJson:Le}),await Ne,_4("getting final circuit json"),Le=await pe.getCircuitJson(),(vt=n.onCircuitJsonChange)==null||vt.call(n,Le),t(Le),(zt=n.onRenderFinished)==null||zt.call(n,{circuitJson:Le}),s({}),w==="render_log"&&(_e.phaseTimings=FIe(_e.renderEvents??[])),_e.progress=1,E({..._e}),m(!1))};f.runWithMutex(ue)},[n.fsMap,n.entrypoint,o,n.evalVersion]);const Y=at.useRef(null),B=at.useRef(null),$=oe=>{if(!oe||oe===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}oe.in_progress?(Y.current=oe,B.current&&(clearTimeout(B.current),B.current=null)):(B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{var ue;const ie=oe||Y.current;(ue=n.onEditEvent)==null||ue.call(n,ie),Y.current=null,B.current=null},100))},G=async(oe,ie)=>{await goe.post("autorouting/bug_reports/create",{json:{title:oe,simple_route_json:ie.simpleRouteJson}}).json().then(({autorouting_bug_report:ue})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${ue.autorouting_bug_report_id}`,"_blank")}).catch(ue=>{console.error("Failed to report autorouting bug",ue),ue.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${ue.message}`)})};return Ge.jsx(QVt,{code:z.get(n.entrypoint??n.mainComponentPath),defaultActiveTab:n.defaultActiveTab,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:a,autoroutingLog:b,onReportAutoroutingLog:n.onReportAutoroutingLog||G,leftHeaderContent:Ge.jsxs(Ge.Fragment,{children:[n.showRunButton&&Ge.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ge.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:d,children:["Run"," ",d?Ge.jsx(cR,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ge.jsx(UNe,{className:"rf-w-3 rf-h-3"})]}),d&&Ge.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ge.jsx(v2,{onClick:oe=>{oe.stopPropagation(),m(!1),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:Ge.jsx(fOt,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.leftHeaderContent]}),onActiveTabChange:R,circuitJson:e,renderLog:g,isRunningCode:d,errorMessage:r==null?void 0:r.error,onEditEvent:$,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen})};function EYt(n,e){const[t,r]=at.useState(()=>{try{const i=window.localStorage.getItem(n);return i?JSON.parse(i):e}catch(i){return console.error("Error reading from localStorage:",i),e}});return at.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(i){console.error("Error writing to localStorage:",i)}},[n,t]),[t,r]}const wYt=({snippetNames:n,onSelect:e,onCancel:t,isOpen:r})=>{const[i,a]=at.useState(""),[s,o]=at.useState("");if(!r)return null;const l=n.filter(f=>f.toLowerCase().includes(s.toLowerCase())),c=s&&!n.includes(s),u=f=>{f.key==="Enter"&&(l.length===1?a(l[0]):c&&a(s))};return Ge.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:Ge.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ge.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ge.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:f=>o(f.target.value),onKeyDown:u}),Ge.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[l.map(f=>Ge.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===f?"bg-blue-50":""}`,onClick:()=>a(f),children:f},f)),c&&Ge.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===s?"bg-blue-50":""}`,onClick:()=>a(s),children:['Create new "',s,'"']})]}),Ge.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ge.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ge.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:()=>i&&e(i),disabled:!i,children:i===s?`Create "${i}"`:`Save to ${i}`})]})]})})},MYt=n=>{const e=at.useRef(null),t=X5(r=>r.recentEvents);at.useEffect(()=>{if(t.length===0)return;const r=t[0];r.event_id!==e.current&&(n(r),e.current=r.event_id)},[t,n])};var HIe="AlertDialog",[TYt,Len]=EE(HIe,[NUe]),ow=NUe(),jIe=n=>{const{__scopeAlertDialog:e,...t}=n,r=ow(e);return Ge.jsx(YUe,{...r,...t,modal:!0})};jIe.displayName=HIe;var CYt="AlertDialogTrigger",RYt=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(lGt,{...i,...r,ref:e})});RYt.displayName=CYt;var AYt="AlertDialogPortal",VIe=n=>{const{__scopeAlertDialog:e,...t}=n,r=ow(e);return Ge.jsx(WUe,{...r,...t})};VIe.displayName=AYt;var NYt="AlertDialogOverlay",GIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(Jse,{...i,...r,ref:e})});GIe.displayName=NYt;var UR="AlertDialogContent",[PYt,DYt]=TYt(UR),LYt=tft("AlertDialogContent"),qIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,children:r,...i}=n,a=ow(t),s=at.useRef(null),o=Xx(e,s),l=at.useRef(null);return Ge.jsx(iGt,{contentName:UR,titleName:YIe,docsSlug:"alert-dialog",children:Ge.jsx(PYt,{scope:t,cancelRef:l,children:Ge.jsxs(eoe,{role:"alertdialog",...a,...i,ref:o,onOpenAutoFocus:Up(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[Ge.jsx(LYt,{children:r}),Ge.jsx(zYt,{contentRef:s})]})})})});qIe.displayName=UR;var YIe="AlertDialogTitle",WIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(toe,{...i,...r,ref:e})});WIe.displayName=YIe;var XIe="AlertDialogDescription",$Ie=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(noe,{...i,...r,ref:e})});$Ie.displayName=XIe;var OYt="AlertDialogAction",ZIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=ow(t);return Ge.jsx(XUe,{...i,...r,ref:e})});ZIe.displayName=OYt;var QIe="AlertDialogCancel",KIe=at.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,{cancelRef:i}=DYt(QIe,t),a=ow(t),s=Xx(e,i);return Ge.jsx(XUe,{...a,...r,ref:s})});KIe.displayName=QIe;var zYt=({contentRef:n})=>{const e=`\`${UR}\` requires a description for the component to be accessible for screen reader users.
|
|
13655
13655
|
|
|
13656
13656
|
You can add a description to the \`${UR}\` by passing a \`${XIe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
13657
13657
|
|