@tscircuit/runframe 0.0.537 → 0.0.538

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.
@@ -13494,7 +13494,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return Wle}yJt();function u6e(r,e,t,n=
13494
13494
  &:hover {
13495
13495
  background-color: rgba(255, 255, 255, 0.1);
13496
13496
  }
13497
- `,onClick:n=>{n.stopPropagation(),t()},children:[Ve.jsx("input",{type:"checkbox",checked:e}),Ve.jsx("span",{style:{color:"#eee"},children:r})]}),VZt=({children:r,elements:e})=>{const[t,n]=V1(G=>[G.is_mouse_over_container,G.setIsMouseOverContainer]),[i,o]=nt.useState(!1),[a,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=V1(G=>[G.selected_layer,G.selectLayer]),[d,f,p,C,v,_]=V1(G=>[G.in_move_footprint_mode,G.in_draw_trace_mode,G.is_showing_rats_nest,G.is_showing_multiple_traces_length,G.is_showing_autorouting,G.is_showing_drc_errors]),x=V1(G=>G.setEditMode),b=V1(G=>G.setIsShowingRatsNest),T=V1(G=>G.setIsShowingMultipleTracesLength),F=V1(G=>G.setIsShowingAutorouting),U=V1(G=>G.setIsShowingDrcErrors);Hw("1",()=>A("top")),Hw("2",()=>A("bottom")),Hw("3",()=>A("inner1")),Hw("4",()=>A("inner2")),Hw("5",()=>A("inner3")),Hw("6",()=>A("inner4")),Hw("7",()=>A("inner5")),Hw("8",()=>A("inner6"));const H=(e==null?void 0:e.filter(G=>G.type.includes("error")).length)??0;return Ve.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:G=>{n(!1),s(!1)},children:[r,Ve.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@",HZt.version]}),Ve.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:fx.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ve.jsxs(ED,{onClick:()=>{s(!a)},onMouseLeave:()=>{a&&s(!1)},children:[Ve.jsxs("div",{children:["layer:"," ",Ve.jsx("span",{style:{marginLeft:2,fontWeight:500,color:_D[u]},children:u})]}),a&&Ve.jsx("div",{style:{marginTop:4,minWidth:120},children:Mce.map(G=>G.replace(/-/g,"")).map(G=>Ve.jsx(YZt,{name:G,selected:G===u,onClick:()=>{A(G.replace(/-/,""))}},G))})]}),Ve.jsxs(ED,{style:H>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ve.jsxs("div",{children:[H," errors"]}),l&&Ve.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(G=>G.type.includes("error")).map((G,j)=>Ve.jsxs(nt.Fragment,{children:[Ve.jsx("div",{children:G.error_type}),Ve.jsx("div",{children:G.message})]},j))})]}),Ve.jsx(ED,{style:{},onClick:()=>{x(f?"off":"draw_trace")},children:Ve.jsxs("div",{children:[f?"✖ ":"","Edit Traces"]})}),Ve.jsx(ED,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ve.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ve.jsx(ED,{style:{},onClick:()=>{b(!p)},children:Ve.jsxs("div",{children:[p?"✖ ":"","Rats Nest"]})}),Ve.jsx(ED,{onClick:()=>{o(!i)},children:Ve.jsxs("div",{children:[Ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ve.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ve.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ve.jsx(kce,{label:"Show All Trace Lengths",checked:C,onClick:()=>{T(!C)}}),Ve.jsx(kce,{label:"Show Autorouting Animation",checked:v,onClick:()=>{F(!v)}}),Ve.jsx(kce,{label:"Show DRC Errors",checked:_,onClick:()=>{U(!_)}})]})]})})]})]})},KZt=r=>{const{transform:e,elements:t}=r,[n,i]=nt.useMemo(()=>{const c=r.elements.flatMap(A=>rZt(A,r.elements)),u=lB(r.elements);return[c,u]},[r.elements]),[o,a]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>tZt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:o.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:o.primitiveIdsInMousedOverNet}),[n,o]),l=nt.useCallback(c=>{var d,f;const u=[];for(const p of c)if(p._element){const C=i.getNetConnectedToId("pcb_port_id"in p._element?(d=p._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in p._element?(f=p._element)==null?void 0:f.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(C))}const A=new Set(c.map(p=>p._pcb_drawing_object_id));a({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ve.jsx(OZt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:Ve.jsx(xZt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(wZt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(_Zt,{transform:e,focusOnHover:r.focusOnHover,children:Ve.jsx(VZt,{elements:t,children:Ve.jsx(DZt,{transform:e,elements:t,children:Ve.jsx(zZt,{transform:e,soup:t,children:Ve.jsx(IZt,{transform:e,debugGraphics:r.debugGraphics,children:Ve.jsx(CZt,{transform:e,elements:t,children:Ve.jsx(vZt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},jZt=Qc(QA(400,300),P1(40,-40)),JZt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:o,onEditEventsChanged:a,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=Tce(),[f,p]=nt.useState(jZt),{ref:C,setTransform:v,cancelDrag:_}=eZt({transform:f,onSetTransform:p,enabled:c});let[x,b]=nt.useState([]);x=o??x;const T=nt.useRef(!1),F=nt.useRef(null),U=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,H=()=>{const te=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:ie,width:pe,height:de}=j.some(ge=>ge.type.startsWith("pcb_"))?Yqt(j.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},Ae=Math.min((te.width??0)/pe,(te.height??0)/de,100)*.75,Ie=Qc(QA((te.width??0)/2,(te.height??0)/2),P1(Ae,-Ae,0,0),QA(-ie.x,-ie.y));v(Ie)};nt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(T.current||(H(),T.current=!0))},[r,d]);const G=nt.useMemo(()=>(r==null?void 0:r.filter(te=>te.type.startsWith("pcb_")||te.type.startsWith("source_")))??[],[U]),j=nt.useMemo(()=>ujt({circuitJson:G,editEvents:x}),[G,x]),O=te=>{b([...x,te]),a==null||a([...x,te])},ne=te=>{const ie=x.map(pe=>pe.edit_event_id===te.edit_event_id?{...pe,...te}:pe);b(ie),a==null||a(ie)};return Ve.jsxs("div",{ref:C,style:{position:"relative"},children:[Ve.jsx("div",{ref:A,children:Ve.jsxs(Kqt,{initialState:n,children:[Ve.jsx(KZt,{transform:f,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:O,onModifyEditEvent:ne,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:j,debugGraphics:e},d.width),Ve.jsx(Jqt,{})]})}),l&&!c&&Ve.jsx("div",{onClick:()=>{u(!0),H()},onTouchStart:te=>{const ie=te.touches[0];F.current={x:ie.clientX,y:ie.clientY}},onTouchEnd:te=>{const ie=te.changedTouches[0],pe=F.current;if(!pe)return;const de=Math.abs(ie.clientX-pe.x),Ae=Math.abs(ie.clientY-pe.y);de<10&&Ae<10&&(te.preventDefault(),u(!0),H()),F.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:fx.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ve.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 WZt=({containerClassName:r,...e})=>{const t=nt.useRef(null),[n,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const o=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};o();const a=new ResizeObserver(o);return t.current&&a.observe(t.current),window.addEventListener("resize",o),()=>{a.disconnect(),window.removeEventListener("resize",o)}},[]),Ve.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:Ve.jsx(JZt,{...e,height:n})})},qZt='*,: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}',ZZt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=qZt,document.head.appendChild(e)},[])},x7e=r=>`hsl(${jx.indexOf(r)*137.5%360}, 70%, 50%)`,XZt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:jx.map(t=>{const n=r[t]||0,i=n/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:x7e(t)},children:Ve.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},$Zt=({renderLog:r})=>{const[e,t]=nt.useState("chronological");if(!r)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((o,a)=>jx.indexOf(o[0])-jx.indexOf(a[0])):n.sort((o,a)=>a[1]-o[1]);const i=n.reduce((o,[a,s])=>o+s,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx(XZt,{phaseTimings:r.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:n.map(([o,a])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:jx.indexOf(o)}),Ve.jsx("td",{className:"rf-p-2",children:o}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:x7e(o),width:`${a/i*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[a,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(a/i*100).toFixed(1),"%"]})]})})]},o))})]})]})},eXt="0.0.536",tXt=["assembly","bom","circuit_json","errors","render_log"],nXt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJson:n,autoroutingGraphics:i,showRightHeaderContent:o=!0,showCodeTab:a=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:A,showImportAndFormatButtons:d=!0,className:f,headerClassName:p,leftHeaderContent:C,readOnly:v,isStreaming:_,autoroutingLog:x,onReportAutoroutingLog:b,isRunningCode:T,hasCodeChangedSinceLastRun:F,onEditEvent:U,editEvents:H,defaultActiveTab:G,autoRotate3dViewerDisabled:j,showSchematicDebugGrid:O=!1,showToggleFullScreen:ne=!0,defaultToFullScreen:te=!1})=>{var Re;ZZt();const ie=nt.useMemo(()=>n?n.filter(Se=>Se&&"error_type"in Se||Se.type.includes("error")):null,[n]),[pe,de]=nt.useState(G??"pcb"),[Ae,Ie]=nt.useState(te),ge=nt.useCallback(Se=>{de(Se),u==null||u(Se)},[u]),Me=()=>{Ie(!Ae)};nt.useEffect(()=>{t&&ge("errors")},[t]),nt.useEffect(()=>{(pe==="code"||pe==="errors")&&n&&!t&&ge(G??"pcb")},[n]);const be=nt.useCallback(Se=>{window.TSCIRCUIT_3D_OBJECT_REF=Se===null?void 0:Se},[]);return Ve.jsx("div",{className:Mp("flex flex-col relative rf-overflow-x-hidden",f),children:Ve.jsx("div",{className:Mp("rf-md:sticky rf-md:top-2",Ae&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ve.jsxs(SIe,{value:pe,onValueChange:ge,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ve.jsxs("div",{className:Mp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",p),children:[C,C&&Ve.jsx("div",{className:"rf-flex-grow"}),!C&&T&&Ve.jsx($3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&Ve.jsx("div",{className:"rf-flex-grow"}),A&&A.progress!==1&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[A.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Re=A.lastRenderEvent)==null?void 0:Re.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ve.jsx($3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((A.progress??0)*100).toFixed(1),"%"]})]}),o&&Ve.jsxs(Lj,{children:[a&&Ve.jsx(sw,{value:"code",children:"Code"}),Ve.jsxs(sw,{value:"pcb",className:"rf-whitespace-nowrap",children:[n&&Ve.jsx("span",{className:Mp("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",F?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ve.jsxs(sw,{value:"schematic",className:"rf-whitespace-nowrap",children:[n&&Ve.jsx("span",{className:Mp("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",F?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ve.jsxs(sw,{value:"cad",children:[n&&Ve.jsx("span",{className:Mp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",F?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(pe)&&Ve.jsx(sw,{value:pe,children:BIe(pe)}),Ve.jsxs(Vse,{children:[Ve.jsx(Kse,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(T7t,{className:"rf-w-4 rf-h-4"}),(ie&&ie.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(pG,{className:"rf-*:text-xs",children:[tXt.map(Se=>Ve.jsxs(CB,{onSelect:()=>ge(Se),children:[pe!==Se&&Ve.jsx(cke,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),pe===Se&&Ve.jsx($ae,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:BIe(Se)}),Se==="errors"&&(ie&&ie.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:ie==null?void 0:ie.length})]},Se)),Ve.jsx(CB,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",eXt.split(".").map((Se,Ke)=>Ke===2?parseInt(Se)+1:Se).join(".")]})})]})]})]}),ne&&Ve.jsx(TE,{onClick:Me,variant:"ghost",children:Ae?Ve.jsx(F7t,{size:16}):Ve.jsx(k7t,{size:16})})]}),a&&Ve.jsx(WB,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:s})}),Ve.jsx(WB,{value:"pcb",children:Ve.jsx("div",{className:Mp("rf-overflow-hidden",Ae?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallbackRender:({error:Se})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Se==null?void 0:Se.message)||"An unknown error occurred"})]})}),children:n?Ve.jsx(WZt,{focusOnHover:!1,circuitJson:n,debugGraphics:i,containerClassName:Mp("rf-h-full rf-w-full",Ae?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Se=>{U&&Se.forEach(Ke=>U(Ke))}}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"assembly",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:n?Ve.jsx(uKt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"schematic",children:Ve.jsx("div",{className:Mp("rf-overflow-auto rf-bg-white",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallbackRender:({error:Se})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Se==null?void 0:Se.message)||"An unknown error occurred"})]})}),children:n?Ve.jsx(sKt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Se=>{U==null||U(Se)},debugGrid:O}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"cad",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{FallbackComponent:C7t,children:n?Ve.jsx(v7t,{ref:be,circuitJson:n,autoRotateDisabled:j}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"bom",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallbackRender:({error:Se})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Se==null?void 0:Se.message)||"An unknown error occurred"})]})}),children:n?Ve.jsx(pKt,{circuitJson:n}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"circuit_json",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:n?Ve.jsx(fKt,{elements:n}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"errors",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||ie&&ie.length>0?Ve.jsx(RYt,{code:r,circuitJsonErrors:ie,errorMessage:t,autoroutingLog:x,onReportAutoroutingLog:b}):Ve.jsx(Q9,{onRunClicked:e})})}),c&&Ve.jsx(WB,{value:"render_log",children:Ve.jsx($Zt,{renderLog:A})})]})})})};var A7="Dialog",[b7e,B7e]=jS(A7),[rXt,bB]=b7e(A7),S7e=r=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=r,s=nt.useRef(null),l=nt.useRef(null),[c,u]=RM({prop:n,defaultProp:i??!1,onChange:o,caller:A7});return Ve.jsx(rXt,{scope:e,triggerRef:s,contentRef:l,contentId:JS(),titleId:JS(),descriptionId:JS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:a,children:t})};S7e.displayName=A7;var w7e="DialogTrigger",Q7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(w7e,t),o=c1(e,i.triggerRef);return Ve.jsx(wv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Lce(i.open),...n,ref:o,onClick:Oh(r.onClick,i.onOpenToggle)})});Q7e.displayName=w7e;var Uce="DialogPortal",[iXt,M7e]=b7e(Uce,{forceMount:void 0}),D7e=r=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=r,o=bB(Uce,e);return Ve.jsx(iXt,{scope:e,forceMount:t,children:nt.Children.map(n,a=>Ve.jsx(jB,{present:t||o.open,children:Ve.jsx(Qse,{asChild:!0,container:i,children:a})}))})};D7e.displayName=Uce;var d7="DialogOverlay",R7e=nt.forwardRef((r,e)=>{const t=M7e(d7,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,o=bB(d7,r.__scopeDialog);return o.modal?Ve.jsx(jB,{present:n||o.open,children:Ve.jsx(aXt,{...i,ref:e})}):null});R7e.displayName=d7;var oXt=DM("DialogOverlay.RemoveScroll"),aXt=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(d7,t);return Ve.jsx(Pse,{as:oXt,allowPinchZoom:!0,shards:[i.contentRef],children:Ve.jsx(wv.div,{"data-state":Lce(i.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),F9="DialogContent",N7e=nt.forwardRef((r,e)=>{const t=M7e(F9,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,o=bB(F9,r.__scopeDialog);return Ve.jsx(jB,{present:n||o.open,children:o.modal?Ve.jsx(sXt,{...i,ref:e}):Ve.jsx(lXt,{...i,ref:e})})});N7e.displayName=F9;var sXt=nt.forwardRef((r,e)=>{const t=bB(F9,r.__scopeDialog),n=nt.useRef(null),i=c1(e,t.contentRef,n);return nt.useEffect(()=>{const o=n.current;if(o)return hUe(o)},[]),Ve.jsx(T7e,{...r,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oh(r.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=t.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oh(r.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Oh(r.onFocusOutside,o=>o.preventDefault())})}),lXt=nt.forwardRef((r,e)=>{const t=bB(F9,r.__scopeDialog),n=nt.useRef(!1),i=nt.useRef(!1);return Ve.jsx(T7e,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=r.onCloseAutoFocus)==null||a.call(r,o),o.defaultPrevented||(n.current||(s=t.triggerRef.current)==null||s.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=r.onInteractOutside)==null||l.call(r,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((c=t.triggerRef.current)==null?void 0:c.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),T7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=r,s=bB(F9,t),l=nt.useRef(null),c=c1(e,l);return Qke(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(hse,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:Ve.jsx(use,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Lce(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(uXt,{titleId:s.titleId}),Ve.jsx(dXt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Fce="DialogTitle",P7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(Fce,t);return Ve.jsx(wv.h2,{id:i.titleId,...n,ref:e})});P7e.displayName=Fce;var k7e="DialogDescription",U7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(k7e,t);return Ve.jsx(wv.p,{id:i.descriptionId,...n,ref:e})});U7e.displayName=k7e;var F7e="DialogClose",L7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(F7e,t);return Ve.jsx(wv.button,{type:"button",...n,ref:e,onClick:Oh(r.onClick,()=>i.onOpenChange(!1))})});L7e.displayName=F7e;function Lce(r){return r?"open":"closed"}var G7e="DialogTitleWarning",[cXt,O7e]=Dpt(G7e,{contentName:F9,titleName:Fce,docsSlug:"dialog"}),uXt=({titleId:r})=>{const e=O7e(G7e),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13497
+ `,onClick:n=>{n.stopPropagation(),t()},children:[Ve.jsx("input",{type:"checkbox",checked:e}),Ve.jsx("span",{style:{color:"#eee"},children:r})]}),VZt=({children:r,elements:e})=>{const[t,n]=V1(G=>[G.is_mouse_over_container,G.setIsMouseOverContainer]),[i,o]=nt.useState(!1),[a,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=V1(G=>[G.selected_layer,G.selectLayer]),[d,f,p,C,v,_]=V1(G=>[G.in_move_footprint_mode,G.in_draw_trace_mode,G.is_showing_rats_nest,G.is_showing_multiple_traces_length,G.is_showing_autorouting,G.is_showing_drc_errors]),x=V1(G=>G.setEditMode),b=V1(G=>G.setIsShowingRatsNest),T=V1(G=>G.setIsShowingMultipleTracesLength),F=V1(G=>G.setIsShowingAutorouting),U=V1(G=>G.setIsShowingDrcErrors);Hw("1",()=>A("top")),Hw("2",()=>A("bottom")),Hw("3",()=>A("inner1")),Hw("4",()=>A("inner2")),Hw("5",()=>A("inner3")),Hw("6",()=>A("inner4")),Hw("7",()=>A("inner5")),Hw("8",()=>A("inner6"));const H=(e==null?void 0:e.filter(G=>G.type.includes("error")).length)??0;return Ve.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:G=>{n(!1),s(!1)},children:[r,Ve.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@",HZt.version]}),Ve.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:fx.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ve.jsxs(ED,{onClick:()=>{s(!a)},onMouseLeave:()=>{a&&s(!1)},children:[Ve.jsxs("div",{children:["layer:"," ",Ve.jsx("span",{style:{marginLeft:2,fontWeight:500,color:_D[u]},children:u})]}),a&&Ve.jsx("div",{style:{marginTop:4,minWidth:120},children:Mce.map(G=>G.replace(/-/g,"")).map(G=>Ve.jsx(YZt,{name:G,selected:G===u,onClick:()=>{A(G.replace(/-/,""))}},G))})]}),Ve.jsxs(ED,{style:H>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ve.jsxs("div",{children:[H," errors"]}),l&&Ve.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(G=>G.type.includes("error")).map((G,j)=>Ve.jsxs(nt.Fragment,{children:[Ve.jsx("div",{children:G.error_type}),Ve.jsx("div",{children:G.message})]},j))})]}),Ve.jsx(ED,{style:{},onClick:()=>{x(f?"off":"draw_trace")},children:Ve.jsxs("div",{children:[f?"✖ ":"","Edit Traces"]})}),Ve.jsx(ED,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ve.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ve.jsx(ED,{style:{},onClick:()=>{b(!p)},children:Ve.jsxs("div",{children:[p?"✖ ":"","Rats Nest"]})}),Ve.jsx(ED,{onClick:()=>{o(!i)},children:Ve.jsxs("div",{children:[Ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ve.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ve.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ve.jsx(kce,{label:"Show All Trace Lengths",checked:C,onClick:()=>{T(!C)}}),Ve.jsx(kce,{label:"Show Autorouting Animation",checked:v,onClick:()=>{F(!v)}}),Ve.jsx(kce,{label:"Show DRC Errors",checked:_,onClick:()=>{U(!_)}})]})]})})]})]})},KZt=r=>{const{transform:e,elements:t}=r,[n,i]=nt.useMemo(()=>{const c=r.elements.flatMap(A=>rZt(A,r.elements)),u=lB(r.elements);return[c,u]},[r.elements]),[o,a]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>tZt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:o.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:o.primitiveIdsInMousedOverNet}),[n,o]),l=nt.useCallback(c=>{var d,f;const u=[];for(const p of c)if(p._element){const C=i.getNetConnectedToId("pcb_port_id"in p._element?(d=p._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in p._element?(f=p._element)==null?void 0:f.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(C))}const A=new Set(c.map(p=>p._pcb_drawing_object_id));a({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ve.jsx(OZt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:Ve.jsx(xZt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(wZt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(_Zt,{transform:e,focusOnHover:r.focusOnHover,children:Ve.jsx(VZt,{elements:t,children:Ve.jsx(DZt,{transform:e,elements:t,children:Ve.jsx(zZt,{transform:e,soup:t,children:Ve.jsx(IZt,{transform:e,debugGraphics:r.debugGraphics,children:Ve.jsx(CZt,{transform:e,elements:t,children:Ve.jsx(vZt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},jZt=Qc(QA(400,300),P1(40,-40)),JZt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:o,onEditEventsChanged:a,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=Tce(),[f,p]=nt.useState(jZt),{ref:C,setTransform:v,cancelDrag:_}=eZt({transform:f,onSetTransform:p,enabled:c});let[x,b]=nt.useState([]);x=o??x;const T=nt.useRef(!1),F=nt.useRef(null),U=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,H=()=>{const te=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:ie,width:pe,height:de}=j.some(ge=>ge.type.startsWith("pcb_"))?Yqt(j.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},Ae=Math.min((te.width??0)/pe,(te.height??0)/de,100)*.75,Ie=Qc(QA((te.width??0)/2,(te.height??0)/2),P1(Ae,-Ae,0,0),QA(-ie.x,-ie.y));v(Ie)};nt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(T.current||(H(),T.current=!0))},[r,d]);const G=nt.useMemo(()=>(r==null?void 0:r.filter(te=>te.type.startsWith("pcb_")||te.type.startsWith("source_")))??[],[U]),j=nt.useMemo(()=>ujt({circuitJson:G,editEvents:x}),[G,x]),O=te=>{b([...x,te]),a==null||a([...x,te])},ne=te=>{const ie=x.map(pe=>pe.edit_event_id===te.edit_event_id?{...pe,...te}:pe);b(ie),a==null||a(ie)};return Ve.jsxs("div",{ref:C,style:{position:"relative"},children:[Ve.jsx("div",{ref:A,children:Ve.jsxs(Kqt,{initialState:n,children:[Ve.jsx(KZt,{transform:f,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:O,onModifyEditEvent:ne,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:j,debugGraphics:e},d.width),Ve.jsx(Jqt,{})]})}),l&&!c&&Ve.jsx("div",{onClick:()=>{u(!0),H()},onTouchStart:te=>{const ie=te.touches[0];F.current={x:ie.clientX,y:ie.clientY}},onTouchEnd:te=>{const ie=te.changedTouches[0],pe=F.current;if(!pe)return;const de=Math.abs(ie.clientX-pe.x),Ae=Math.abs(ie.clientY-pe.y);de<10&&Ae<10&&(te.preventDefault(),u(!0),H()),F.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:fx.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ve.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 WZt=({containerClassName:r,...e})=>{const t=nt.useRef(null),[n,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const o=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};o();const a=new ResizeObserver(o);return t.current&&a.observe(t.current),window.addEventListener("resize",o),()=>{a.disconnect(),window.removeEventListener("resize",o)}},[]),Ve.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:Ve.jsx(JZt,{...e,height:n})})},qZt='*,: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}',ZZt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=qZt,document.head.appendChild(e)},[])},x7e=r=>`hsl(${jx.indexOf(r)*137.5%360}, 70%, 50%)`,XZt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:jx.map(t=>{const n=r[t]||0,i=n/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:x7e(t)},children:Ve.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},$Zt=({renderLog:r})=>{const[e,t]=nt.useState("chronological");if(!r)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((o,a)=>jx.indexOf(o[0])-jx.indexOf(a[0])):n.sort((o,a)=>a[1]-o[1]);const i=n.reduce((o,[a,s])=>o+s,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx(XZt,{phaseTimings:r.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:n.map(([o,a])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:jx.indexOf(o)}),Ve.jsx("td",{className:"rf-p-2",children:o}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:x7e(o),width:`${a/i*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[a,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(a/i*100).toFixed(1),"%"]})]})})]},o))})]})]})},eXt="0.0.537",tXt=["assembly","bom","circuit_json","errors","render_log"],nXt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJson:n,autoroutingGraphics:i,showRightHeaderContent:o=!0,showCodeTab:a=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:A,showImportAndFormatButtons:d=!0,className:f,headerClassName:p,leftHeaderContent:C,readOnly:v,isStreaming:_,autoroutingLog:x,onReportAutoroutingLog:b,isRunningCode:T,hasCodeChangedSinceLastRun:F,onEditEvent:U,editEvents:H,defaultActiveTab:G,autoRotate3dViewerDisabled:j,showSchematicDebugGrid:O=!1,showToggleFullScreen:ne=!0,defaultToFullScreen:te=!1})=>{var Re;ZZt();const ie=nt.useMemo(()=>n?n.filter(Se=>Se&&"error_type"in Se||Se.type.includes("error")):null,[n]),[pe,de]=nt.useState(G??"pcb"),[Ae,Ie]=nt.useState(te),ge=nt.useCallback(Se=>{de(Se),u==null||u(Se)},[u]),Me=()=>{Ie(!Ae)};nt.useEffect(()=>{t&&ge("errors")},[t]),nt.useEffect(()=>{(pe==="code"||pe==="errors")&&n&&!t&&ge(G??"pcb")},[n]);const be=nt.useCallback(Se=>{window.TSCIRCUIT_3D_OBJECT_REF=Se===null?void 0:Se},[]);return Ve.jsx("div",{className:Mp("flex flex-col relative rf-overflow-x-hidden",f),children:Ve.jsx("div",{className:Mp("rf-md:sticky rf-md:top-2",Ae&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ve.jsxs(SIe,{value:pe,onValueChange:ge,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ve.jsxs("div",{className:Mp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",p),children:[C,C&&Ve.jsx("div",{className:"rf-flex-grow"}),!C&&T&&Ve.jsx($3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&Ve.jsx("div",{className:"rf-flex-grow"}),A&&A.progress!==1&&!t&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[A.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Re=A.lastRenderEvent)==null?void 0:Re.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ve.jsx($3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((A.progress??0)*100).toFixed(1),"%"]})]}),o&&Ve.jsxs(Lj,{children:[a&&Ve.jsx(sw,{value:"code",children:"Code"}),Ve.jsxs(sw,{value:"pcb",className:"rf-whitespace-nowrap",children:[n&&Ve.jsx("span",{className:Mp("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",F?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ve.jsxs(sw,{value:"schematic",className:"rf-whitespace-nowrap",children:[n&&Ve.jsx("span",{className:Mp("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",F?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ve.jsxs(sw,{value:"cad",children:[n&&Ve.jsx("span",{className:Mp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",F?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(pe)&&Ve.jsx(sw,{value:pe,children:BIe(pe)}),Ve.jsxs(Vse,{children:[Ve.jsx(Kse,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(T7t,{className:"rf-w-4 rf-h-4"}),(ie&&ie.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(pG,{className:"rf-*:text-xs",children:[tXt.map(Se=>Ve.jsxs(CB,{onSelect:()=>ge(Se),children:[pe!==Se&&Ve.jsx(cke,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),pe===Se&&Ve.jsx($ae,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:BIe(Se)}),Se==="errors"&&(ie&&ie.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:ie==null?void 0:ie.length})]},Se)),Ve.jsx(CB,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",eXt.split(".").map((Se,Ke)=>Ke===2?parseInt(Se)+1:Se).join(".")]})})]})]})]}),ne&&Ve.jsx(TE,{onClick:Me,variant:"ghost",children:Ae?Ve.jsx(F7t,{size:16}):Ve.jsx(k7t,{size:16})})]}),a&&Ve.jsx(WB,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:s})}),Ve.jsx(WB,{value:"pcb",children:Ve.jsx("div",{className:Mp("rf-overflow-hidden",Ae?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallbackRender:({error:Se})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Se==null?void 0:Se.message)||"An unknown error occurred"})]})}),children:n?Ve.jsx(WZt,{focusOnHover:!1,circuitJson:n,debugGraphics:i,containerClassName:Mp("rf-h-full rf-w-full",Ae?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Se=>{U&&Se.forEach(Ke=>U(Ke))}}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"assembly",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:n?Ve.jsx(uKt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"schematic",children:Ve.jsx("div",{className:Mp("rf-overflow-auto rf-bg-white",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallbackRender:({error:Se})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Se==null?void 0:Se.message)||"An unknown error occurred"})]})}),children:n?Ve.jsx(sKt,{circuitJson:n,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Se=>{U==null||U(Se)},debugGrid:O}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"cad",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{FallbackComponent:C7t,children:n?Ve.jsx(v7t,{ref:be,circuitJson:n,autoRotateDisabled:j}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"bom",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallbackRender:({error:Se})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Se==null?void 0:Se.message)||"An unknown error occurred"})]})}),children:n?Ve.jsx(pKt,{circuitJson:n}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"circuit_json",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(X3,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:n?Ve.jsx(fKt,{elements:n}):Ve.jsx(Q9,{onRunClicked:e})})})}),Ve.jsx(WB,{value:"errors",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ae?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||ie&&ie.length>0?Ve.jsx(RYt,{code:r,circuitJsonErrors:ie,errorMessage:t,autoroutingLog:x,onReportAutoroutingLog:b}):Ve.jsx(Q9,{onRunClicked:e})})}),c&&Ve.jsx(WB,{value:"render_log",children:Ve.jsx($Zt,{renderLog:A})})]})})})};var A7="Dialog",[b7e,B7e]=jS(A7),[rXt,bB]=b7e(A7),S7e=r=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=r,s=nt.useRef(null),l=nt.useRef(null),[c,u]=RM({prop:n,defaultProp:i??!1,onChange:o,caller:A7});return Ve.jsx(rXt,{scope:e,triggerRef:s,contentRef:l,contentId:JS(),titleId:JS(),descriptionId:JS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:a,children:t})};S7e.displayName=A7;var w7e="DialogTrigger",Q7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(w7e,t),o=c1(e,i.triggerRef);return Ve.jsx(wv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Lce(i.open),...n,ref:o,onClick:Oh(r.onClick,i.onOpenToggle)})});Q7e.displayName=w7e;var Uce="DialogPortal",[iXt,M7e]=b7e(Uce,{forceMount:void 0}),D7e=r=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=r,o=bB(Uce,e);return Ve.jsx(iXt,{scope:e,forceMount:t,children:nt.Children.map(n,a=>Ve.jsx(jB,{present:t||o.open,children:Ve.jsx(Qse,{asChild:!0,container:i,children:a})}))})};D7e.displayName=Uce;var d7="DialogOverlay",R7e=nt.forwardRef((r,e)=>{const t=M7e(d7,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,o=bB(d7,r.__scopeDialog);return o.modal?Ve.jsx(jB,{present:n||o.open,children:Ve.jsx(aXt,{...i,ref:e})}):null});R7e.displayName=d7;var oXt=DM("DialogOverlay.RemoveScroll"),aXt=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(d7,t);return Ve.jsx(Pse,{as:oXt,allowPinchZoom:!0,shards:[i.contentRef],children:Ve.jsx(wv.div,{"data-state":Lce(i.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),F9="DialogContent",N7e=nt.forwardRef((r,e)=>{const t=M7e(F9,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,o=bB(F9,r.__scopeDialog);return Ve.jsx(jB,{present:n||o.open,children:o.modal?Ve.jsx(sXt,{...i,ref:e}):Ve.jsx(lXt,{...i,ref:e})})});N7e.displayName=F9;var sXt=nt.forwardRef((r,e)=>{const t=bB(F9,r.__scopeDialog),n=nt.useRef(null),i=c1(e,t.contentRef,n);return nt.useEffect(()=>{const o=n.current;if(o)return hUe(o)},[]),Ve.jsx(T7e,{...r,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oh(r.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=t.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oh(r.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Oh(r.onFocusOutside,o=>o.preventDefault())})}),lXt=nt.forwardRef((r,e)=>{const t=bB(F9,r.__scopeDialog),n=nt.useRef(!1),i=nt.useRef(!1);return Ve.jsx(T7e,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=r.onCloseAutoFocus)==null||a.call(r,o),o.defaultPrevented||(n.current||(s=t.triggerRef.current)==null||s.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=r.onInteractOutside)==null||l.call(r,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((c=t.triggerRef.current)==null?void 0:c.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),T7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=r,s=bB(F9,t),l=nt.useRef(null),c=c1(e,l);return Qke(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(hse,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:Ve.jsx(use,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Lce(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(uXt,{titleId:s.titleId}),Ve.jsx(dXt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Fce="DialogTitle",P7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(Fce,t);return Ve.jsx(wv.h2,{id:i.titleId,...n,ref:e})});P7e.displayName=Fce;var k7e="DialogDescription",U7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(k7e,t);return Ve.jsx(wv.p,{id:i.descriptionId,...n,ref:e})});U7e.displayName=k7e;var F7e="DialogClose",L7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=bB(F7e,t);return Ve.jsx(wv.button,{type:"button",...n,ref:e,onClick:Oh(r.onClick,()=>i.onOpenChange(!1))})});L7e.displayName=F7e;function Lce(r){return r?"open":"closed"}var G7e="DialogTitleWarning",[cXt,O7e]=Dpt(G7e,{contentName:F9,titleName:Fce,docsSlug:"dialog"}),uXt=({titleId:r})=>{const e=O7e(G7e),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13498
13498
 
13499
13499
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
13500
13500
 
@@ -13678,7 +13678,7 @@ to {
13678
13678
  * @license
13679
13679
  * Copyright 2019 Google LLC
13680
13680
  * SPDX-License-Identifier: Apache-2.0
13681
- */const xOe=Symbol("Comlink.proxy"),fen=Symbol("Comlink.endpoint"),bOe=Symbol("Comlink.releaseProxy"),oue=Symbol("Comlink.finalizer"),Q7=Symbol("Comlink.thrown"),BOe=r=>typeof r=="object"&&r!==null||typeof r=="function",hen={canHandle:r=>BOe(r)&&r[xOe],serialize(r){const{port1:e,port2:t}=new MessageChannel;return wOe(r,e),[t,[t]]},deserialize(r){return r.start(),MOe(r)}},pen={canHandle:r=>BOe(r)&&Q7 in r,serialize({value:r}){let e;return r instanceof Error?e={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:e={isError:!1,value:r},[e,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},SOe=new Map([["proxy",hen],["throw",pen]]);function gen(r,e){for(const t of r)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function wOe(r,e=globalThis,t=["*"]){e.addEventListener("message",function n(i){if(!i||!i.data)return;if(!gen(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:o,type:a,path:s}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(z9);let c;try{const u=s.slice(0,-1).reduce((d,f)=>d[f],r),A=s.reduce((d,f)=>d[f],r);switch(a){case"GET":c=A;break;case"SET":u[s.slice(-1)[0]]=z9(i.data.value),c=!0;break;case"APPLY":c=A.apply(u,l);break;case"CONSTRUCT":{const d=new A(...l);c=TOe(d)}break;case"ENDPOINT":{const{port1:d,port2:f}=new MessageChannel;wOe(r,f),c=Cen(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[Q7]:0}}Promise.resolve(c).catch(u=>({value:u,[Q7]:0})).then(u=>{const[A,d]=N7(u);e.postMessage(Object.assign(Object.assign({},A),{id:o}),d),a==="RELEASE"&&(e.removeEventListener("message",n),QOe(e),oue in r&&typeof r[oue]=="function"&&r[oue]())}).catch(u=>{const[A,d]=N7({value:new TypeError("Unserializable return value"),[Q7]:0});e.postMessage(Object.assign(Object.assign({},A),{id:o}),d)})}),e.start&&e.start()}function men(r){return r.constructor.name==="MessagePort"}function QOe(r){men(r)&&r.close()}function MOe(r,e){const t=new Map;return r.addEventListener("message",function(i){const{data:o}=i;if(!o||!o.id)return;const a=t.get(o.id);if(a)try{a(o)}finally{t.delete(o.id)}}),aue(r,t,[],e)}function M7(r){if(r)throw new Error("Proxy has been released and is not useable")}function DOe(r){return BD(r,new Map,{type:"RELEASE"}).then(()=>{QOe(r)})}const D7=new WeakMap,R7="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const e=(D7.get(r)||0)-1;D7.set(r,e),e===0&&DOe(r)});function yen(r,e){const t=(D7.get(e)||0)+1;D7.set(e,t),R7&&R7.register(r,e,r)}function ven(r){R7&&R7.unregister(r)}function aue(r,e,t=[],n=function(){}){let i=!1;const o=new Proxy(n,{get(a,s){if(M7(i),s===bOe)return()=>{ven(o),DOe(r),e.clear(),i=!0};if(s==="then"){if(t.length===0)return{then:()=>o};const l=BD(r,e,{type:"GET",path:t.map(c=>c.toString())}).then(z9);return l.then.bind(l)}return aue(r,e,[...t,s])},set(a,s,l){M7(i);const[c,u]=N7(l);return BD(r,e,{type:"SET",path:[...t,s].map(A=>A.toString()),value:c},u).then(z9)},apply(a,s,l){M7(i);const c=t[t.length-1];if(c===fen)return BD(r,e,{type:"ENDPOINT"}).then(z9);if(c==="bind")return aue(r,e,t.slice(0,-1));const[u,A]=ROe(l);return BD(r,e,{type:"APPLY",path:t.map(d=>d.toString()),argumentList:u},A).then(z9)},construct(a,s){M7(i);const[l,c]=ROe(s);return BD(r,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(z9)}});return yen(o,r),o}function Ien(r){return Array.prototype.concat.apply([],r)}function ROe(r){const e=r.map(N7);return[e.map(t=>t[0]),Ien(e.map(t=>t[1]))]}const NOe=new WeakMap;function Cen(r,e){return NOe.set(r,e),r}function TOe(r){return Object.assign(r,{[xOe]:!0})}function N7(r){for(const[e,t]of SOe)if(t.canHandle(r)){const[n,i]=t.serialize(r);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:r},NOe.get(r)||[]]}function z9(r){switch(r.type){case"HANDLER":return SOe.get(r.name).deserialize(r.value);case"RAW":return r.value}}function BD(r,e,t,n){return new Promise(i=>{const o=_en();e.set(o,i),r.start&&r.start(),r.postMessage(Object.assign({id:o},t),n)})}function _en(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Een=async r=>{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(s){console.warn("[Worker] Error killing previous global worker instance:",s),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}console.log("[Worker] Creating circuit web worker with config:",r);let t=r.webWorkerBlobUrl??r.webWorkerUrl;if(!t){const s=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${r.evalVersion??"latest"}/dist/webworker/entrypoint.js`,l=await fetch(s).then(c=>c.blob());t=URL.createObjectURL(l)}const n=new Worker(t,{type:"module"}),i=MOe(n);r.snippetsApiBaseUrl&&await i.setSnippetsApiBaseUrl(r.snippetsApiBaseUrl);let o=!1;const a={clearEventListeners:i.clearEventListeners.bind(i),execute:async(...s)=>{if(o)throw new Error("CircuitWebWorker was terminated, can't execute");return i.execute.bind(i)(...s)},executeWithFsMap:async(...s)=>{if(o)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return i.executeWithFsMap.bind(i)(...s)},renderUntilSettled:i.renderUntilSettled.bind(i),getCircuitJson:i.getCircuitJson.bind(i),on:(s,l)=>{const c=TOe(l);i.on(s,c)},kill:async()=>{i[bOe](),n.terminate(),o=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===a&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=a,a};const POe=r=>{const e={};if(!r)return e;for(const n of jx)e[n]=0;const t=new Map;for(const n of r){const[,,i,o]=n.type.split(":");if(o==="start"){t.set(`${i}:${n.renderId}`,n);continue}if(o==="end"){const a=t.get(`${i}:${n.renderId}`);if(a){const s=n.createdAt-a.createdAt;e[i]=(e[i]||0)+s}}}return e},xen=(r,e)=>{const t={};for(const[n,i]of r.entries()){const o=e.get(n);o!==i&&(t[n]={old:i,new:o})}for(const[n,i]of e.entries())r.has(n)||(t[n]={old:void 0,new:i});return t},kOe=Yve()(Vve(r=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{r({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"}));function ben(){const r=nt.useRef(Promise.resolve()),e=nt.useRef(!1),t=nt.useRef(null),n=nt.useCallback(async a=>{await r.current;const s={cancelled:!1};t.current=s;let l;const c=new Promise(u=>{l=u});try{return r.current=c,e.current=!0,await a()}catch(u){if(!s.cancelled)throw u}finally{e.current=!1,t.current=null,l()}},[]),i=nt.useCallback(()=>{t.current&&(t.current.cancelled=!0),r.current=Promise.resolve(),e.current=!1},[]),o=nt.useCallback(()=>e.current,[]);return{runWithMutex:n,isLocked:o,cancel:i}}const Ben=26,jw=l0("run-frame:RunFrame"),Sen=r=>{const[e,t]=cB(te=>[te.circuitJson,te.setCircuitJson]),[n,i]=nt.useState(null),o=nt.useRef(null),[a,s]=nt.useState(null),[l,c]=nt.useReducer((te,ie)=>te+1,0),u=kOe(te=>te.setLastRunEvalVersion),A=nt.useRef(0),d=ben(),[f,p]=nt.useState(!1);nt.useEffect(()=>{const te=ie=>{(ie.ctrlKey||ie.metaKey)&&ie.key==="Enter"&&!f&&c(1)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[f]);const[C,v]=nt.useState(null),[_,x]=nt.useState({}),[b,T]=nt.useState(r.defaultActiveTab??"pcb");nt.useEffect(()=>{r.debug&&l0.enable("run-frame*")},[r.debug]);const F=r.fsMap instanceof Map?r.fsMap:Object.entries(r.fsMap??{}).reduce((te,[ie,pe])=>te.set(ie,pe),new Map),U=nt.useRef(null),H=nt.useRef(null);nt.useEffect(()=>{const te=F instanceof Map?Object.fromEntries(F.entries()):F;if(!te||Object.keys(te).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),p(!1);return}const ie=r.showRunButton&&l!==A.current;if(U.current&&e){const de=xen(U.current,F);if(Object.keys(de).length>0)jw("code changes detected");else if(H.current!==r.entrypoint)jw("render triggered by entrypoint change");else if(!ie){jw("render triggered without changes to fsMap, skipping");return}}if(r.showRunButton&&l===A.current)return;U.current=F,H.current=r.entrypoint??null,A.current=l,p(!0);const pe=async()=>{var Ze,lt,ft,Pt,Qt,$e;jw("running render worker"),i(null),v(null);const de={progress:0};let Ae=!1;o.current=()=>{Ae=!0};let Ie=r.evalVersion??"latest";if(!globalThis.runFrameWorker&&r.forceLatestEvalVersion)try{const It=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(It.ok){const Ct=await It.json();(Ze=Ct.tags)!=null&&Ze.latest&&(Ie=Ct.tags.latest,u(Ie))}}catch{}const ge=globalThis.runFrameWorker??await Een({evalVersion:Ie,webWorkerBlobUrl:r.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=ge,(lt=r.onRenderStarted)==null||lt.call(r);const Me=F instanceof Map?Object.fromEntries(F.entries()):F;let be=Date.now();if(ge.on("autorouting:start",It=>{x({..._,[It.componentDisplayName]:{simpleRouteJson:It.simpleRouteJson}})}),ge.on("board:renderPhaseStarted",It=>{de.lastRenderEvent=It,de.eventsProcessed=(de.eventsProcessed??0)+1;const Ct=jx.indexOf(It.phase)/Ben*.75+de.eventsProcessed/1e3*.25,Ft=1-Math.exp(-Ct*3);de.progress=Ft,Ae||v({...de})}),b==="render_log"&&ge.on("renderable:renderLifecycle:anyEvent",It=>{de.renderEvents=de.renderEvents??[],It.createdAt=Date.now(),de.renderEvents.push(It),Date.now()-be>500&&(de.phaseTimings=POe(de.renderEvents??[]),be=Date.now()),Ae||v({...de})}),ge.on("autorouting:progress",It=>{s(It.debugGraphics)}),!(await ge.executeWithFsMap({entrypoint:r.entrypoint,fsMap:Me,...r.mainComponentPath?{mainComponentPath:r.mainComponentPath}:{}}).then(()=>({success:!0})).catch(It=>{var Ft;const Ct=It.message.replace("Error: ","");return(Ft=r.onError)==null||Ft.call(r,It),i({error:Ct,stack:It.stack}),console.error(It),{success:!1}})).success){p(!1);return}const Se=ge.renderUntilSettled();jw("waiting for initial circuit json...");let Ke=await ge.getCircuitJson().catch(It=>{var Ct;return jw("error getting initial circuit json",It),(Ct=r.onError)==null||Ct.call(r,It),i({error:It.message,stack:It.stack}),p(!1),null});Ke&&(jw("got initial circuit json"),t(Ke),(ft=r.onCircuitJsonChange)==null||ft.call(r,Ke),(Pt=r.onInitialRender)==null||Pt.call(r,{circuitJson:Ke}),await Se,jw("getting final circuit json"),Ke=await ge.getCircuitJson(),(Qt=r.onCircuitJsonChange)==null||Qt.call(r,Ke),t(Ke),($e=r.onRenderFinished)==null||$e.call(r,{circuitJson:Ke}),s({}),b==="render_log"&&(de.phaseTimings=POe(de.renderEvents??[])),de.progress=1,Ae||v({...de}),p(!1),o.current=null)};d.runWithMutex(pe)},[r.fsMap,r.entrypoint,l,r.evalVersion]);const G=nt.useRef(null),j=nt.useRef(null),O=te=>{if(!te||te===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}te.in_progress?(G.current=te,j.current&&(clearTimeout(j.current),j.current=null)):(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{var pe;const ie=te||G.current;(pe=r.onEditEvent)==null||pe.call(r,ie),G.current=null,j.current=null},100))},ne=async(te,ie)=>{await iue.post("autorouting/bug_reports/create",{json:{title:te,simple_route_json:ie.simpleRouteJson}}).json().then(({autorouting_bug_report:pe})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${pe.autorouting_bug_report_id}`,"_blank")}).catch(pe=>{console.error("Failed to report autorouting bug",pe),pe.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${pe.message}`)})};return Ve.jsx(nXt,{code:F.get(r.entrypoint??r.mainComponentPath),defaultActiveTab:r.defaultActiveTab,showToggleFullScreen:r.showToggleFullScreen,autoroutingGraphics:a,autoroutingLog:_,onReportAutoroutingLog:r.onReportAutoroutingLog||ne,leftHeaderContent:Ve.jsxs(Ve.Fragment,{children:[r.showRunButton&&Ve.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ve.jsxs("button",{type:"button",onClick:()=>{c(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:f,children:["Run"," ",f?Ve.jsx($3,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ve.jsx(uke,{className:"rf-w-3 rf-h-3"})]}),f&&Ve.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ve.jsx(TE,{onClick:te=>{te.stopPropagation(),p(!1),v(null),i(null),o.current&&(o.current(),o.current=null),d.cancel(),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:Ve.jsx(O7t,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),r.leftHeaderContent]}),onActiveTabChange:T,circuitJson:e,renderLog:C,isRunningCode:f,errorMessage:n==null?void 0:n.error,onEditEvent:O,editEvents:r.editEvents,defaultToFullScreen:r.defaultToFullScreen})};function wen(r,e){const[t,n]=nt.useState(()=>{try{const i=window.localStorage.getItem(r);return i?JSON.parse(i):e}catch(i){return console.error("Error reading from localStorage:",i),e}});return nt.useEffect(()=>{try{window.localStorage.setItem(r,JSON.stringify(t))}catch(i){console.error("Error writing to localStorage:",i)}},[r,t]),[t,n]}const Qen=({snippetNames:r,onSelect:e,onCancel:t,isOpen:n})=>{const[i,o]=nt.useState(""),[a,s]=nt.useState("");if(!n)return null;const l=r.filter(A=>A.toLowerCase().includes(a.toLowerCase())),c=a&&!r.includes(a),u=A=>{A.key==="Enter"&&(l.length===1?o(l[0]):c&&o(a))};return Ve.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:Ve.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ve.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ve.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:a,onChange:A=>s(A.target.value),onKeyDown:u}),Ve.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[l.map(A=>Ve.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===A?"bg-blue-50":""}`,onClick:()=>o(A),children:A},A)),c&&Ve.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===a?"bg-blue-50":""}`,onClick:()=>o(a),children:['Create new "',a,'"']})]}),Ve.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>i&&e(i),disabled:!i,children:i===a?`Create "${i}"`:`Save to ${i}`})]})]})})},Men=r=>{const e=nt.useRef(null),t=cB(n=>n.recentEvents);nt.useEffect(()=>{if(t.length===0)return;const n=t[0];n.event_id!==e.current&&(r(n),e.current=n.event_id)},[t,r])};var UOe="AlertDialog",[Den,Lln]=jS(UOe,[B7e]),D2=B7e(),FOe=r=>{const{__scopeAlertDialog:e,...t}=r,n=D2(e);return Ve.jsx(z7e,{...n,...t,modal:!0})};FOe.displayName=UOe;var Ren="AlertDialogTrigger",Nen=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(fXt,{...i,...n,ref:e})});Nen.displayName=Ren;var Ten="AlertDialogPortal",LOe=r=>{const{__scopeAlertDialog:e,...t}=r,n=D2(e);return Ve.jsx(H7e,{...n,...t})};LOe.displayName=Ten;var Pen="AlertDialogOverlay",GOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(Gce,{...i,...n,ref:e})});GOe.displayName=Pen;var SD="AlertDialogContent",[ken,Uen]=Den(SD),Fen=Ppt("AlertDialogContent"),OOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,children:n,...i}=r,o=D2(t),a=nt.useRef(null),s=c1(e,a),l=nt.useRef(null);return Ve.jsx(cXt,{contentName:SD,titleName:zOe,docsSlug:"alert-dialog",children:Ve.jsx(ken,{scope:t,cancelRef:l,children:Ve.jsxs(Oce,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Oh(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[Ve.jsx(Fen,{children:n}),Ve.jsx(Gen,{contentRef:a})]})})})});OOe.displayName=SD;var zOe="AlertDialogTitle",HOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(zce,{...i,...n,ref:e})});HOe.displayName=zOe;var YOe="AlertDialogDescription",VOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(Hce,{...i,...n,ref:e})});VOe.displayName=YOe;var Len="AlertDialogAction",KOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(Y7e,{...i,...n,ref:e})});KOe.displayName=Len;var jOe="AlertDialogCancel",JOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,{cancelRef:i}=Uen(jOe,t),o=D2(t),a=c1(e,i);return Ve.jsx(Y7e,{...o,...n,ref:a})});JOe.displayName=jOe;var Gen=({contentRef:r})=>{const e=`\`${SD}\` requires a description for the component to be accessible for screen reader users.
13681
+ */const xOe=Symbol("Comlink.proxy"),fen=Symbol("Comlink.endpoint"),bOe=Symbol("Comlink.releaseProxy"),oue=Symbol("Comlink.finalizer"),Q7=Symbol("Comlink.thrown"),BOe=r=>typeof r=="object"&&r!==null||typeof r=="function",hen={canHandle:r=>BOe(r)&&r[xOe],serialize(r){const{port1:e,port2:t}=new MessageChannel;return wOe(r,e),[t,[t]]},deserialize(r){return r.start(),MOe(r)}},pen={canHandle:r=>BOe(r)&&Q7 in r,serialize({value:r}){let e;return r instanceof Error?e={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:e={isError:!1,value:r},[e,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},SOe=new Map([["proxy",hen],["throw",pen]]);function gen(r,e){for(const t of r)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function wOe(r,e=globalThis,t=["*"]){e.addEventListener("message",function n(i){if(!i||!i.data)return;if(!gen(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:o,type:a,path:s}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(z9);let c;try{const u=s.slice(0,-1).reduce((d,f)=>d[f],r),A=s.reduce((d,f)=>d[f],r);switch(a){case"GET":c=A;break;case"SET":u[s.slice(-1)[0]]=z9(i.data.value),c=!0;break;case"APPLY":c=A.apply(u,l);break;case"CONSTRUCT":{const d=new A(...l);c=TOe(d)}break;case"ENDPOINT":{const{port1:d,port2:f}=new MessageChannel;wOe(r,f),c=Cen(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[Q7]:0}}Promise.resolve(c).catch(u=>({value:u,[Q7]:0})).then(u=>{const[A,d]=N7(u);e.postMessage(Object.assign(Object.assign({},A),{id:o}),d),a==="RELEASE"&&(e.removeEventListener("message",n),QOe(e),oue in r&&typeof r[oue]=="function"&&r[oue]())}).catch(u=>{const[A,d]=N7({value:new TypeError("Unserializable return value"),[Q7]:0});e.postMessage(Object.assign(Object.assign({},A),{id:o}),d)})}),e.start&&e.start()}function men(r){return r.constructor.name==="MessagePort"}function QOe(r){men(r)&&r.close()}function MOe(r,e){const t=new Map;return r.addEventListener("message",function(i){const{data:o}=i;if(!o||!o.id)return;const a=t.get(o.id);if(a)try{a(o)}finally{t.delete(o.id)}}),aue(r,t,[],e)}function M7(r){if(r)throw new Error("Proxy has been released and is not useable")}function DOe(r){return BD(r,new Map,{type:"RELEASE"}).then(()=>{QOe(r)})}const D7=new WeakMap,R7="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const e=(D7.get(r)||0)-1;D7.set(r,e),e===0&&DOe(r)});function yen(r,e){const t=(D7.get(e)||0)+1;D7.set(e,t),R7&&R7.register(r,e,r)}function ven(r){R7&&R7.unregister(r)}function aue(r,e,t=[],n=function(){}){let i=!1;const o=new Proxy(n,{get(a,s){if(M7(i),s===bOe)return()=>{ven(o),DOe(r),e.clear(),i=!0};if(s==="then"){if(t.length===0)return{then:()=>o};const l=BD(r,e,{type:"GET",path:t.map(c=>c.toString())}).then(z9);return l.then.bind(l)}return aue(r,e,[...t,s])},set(a,s,l){M7(i);const[c,u]=N7(l);return BD(r,e,{type:"SET",path:[...t,s].map(A=>A.toString()),value:c},u).then(z9)},apply(a,s,l){M7(i);const c=t[t.length-1];if(c===fen)return BD(r,e,{type:"ENDPOINT"}).then(z9);if(c==="bind")return aue(r,e,t.slice(0,-1));const[u,A]=ROe(l);return BD(r,e,{type:"APPLY",path:t.map(d=>d.toString()),argumentList:u},A).then(z9)},construct(a,s){M7(i);const[l,c]=ROe(s);return BD(r,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(z9)}});return yen(o,r),o}function Ien(r){return Array.prototype.concat.apply([],r)}function ROe(r){const e=r.map(N7);return[e.map(t=>t[0]),Ien(e.map(t=>t[1]))]}const NOe=new WeakMap;function Cen(r,e){return NOe.set(r,e),r}function TOe(r){return Object.assign(r,{[xOe]:!0})}function N7(r){for(const[e,t]of SOe)if(t.canHandle(r)){const[n,i]=t.serialize(r);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:r},NOe.get(r)||[]]}function z9(r){switch(r.type){case"HANDLER":return SOe.get(r.name).deserialize(r.value);case"RAW":return r.value}}function BD(r,e,t,n){return new Promise(i=>{const o=_en();e.set(o,i),r.start&&r.start(),r.postMessage(Object.assign({id:o},t),n)})}function _en(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Een=async r=>{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(s){console.warn("[Worker] Error killing previous global worker instance:",s),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}console.log("[Worker] Creating circuit web worker with config:",r);let t=r.webWorkerBlobUrl??r.webWorkerUrl;if(!t){const s=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${r.evalVersion??"latest"}/dist/webworker/entrypoint.js`,l=await fetch(s).then(c=>c.blob());t=URL.createObjectURL(l)}const n=new Worker(t,{type:"module"}),i=MOe(n);r.snippetsApiBaseUrl&&await i.setSnippetsApiBaseUrl(r.snippetsApiBaseUrl);let o=!1;const a={clearEventListeners:i.clearEventListeners.bind(i),execute:async(...s)=>{if(o)throw new Error("CircuitWebWorker was terminated, can't execute");return i.execute.bind(i)(...s)},executeWithFsMap:async(...s)=>{if(o)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return i.executeWithFsMap.bind(i)(...s)},renderUntilSettled:i.renderUntilSettled.bind(i),getCircuitJson:i.getCircuitJson.bind(i),on:(s,l)=>{const c=TOe(l);i.on(s,c)},kill:async()=>{i[bOe](),n.terminate(),o=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===a&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=a,a};const POe=r=>{const e={};if(!r)return e;for(const n of jx)e[n]=0;const t=new Map;for(const n of r){const[,,i,o]=n.type.split(":");if(o==="start"){t.set(`${i}:${n.renderId}`,n);continue}if(o==="end"){const a=t.get(`${i}:${n.renderId}`);if(a){const s=n.createdAt-a.createdAt;e[i]=(e[i]||0)+s}}}return e},xen=(r,e)=>{const t={};for(const[n,i]of r.entries()){const o=e.get(n);o!==i&&(t[n]={old:i,new:o})}for(const[n,i]of e.entries())r.has(n)||(t[n]={old:void 0,new:i});return t},kOe=Yve()(Vve(r=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{r({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"}));function ben(){const r=nt.useRef(Promise.resolve()),e=nt.useRef(!1),t=nt.useRef(null),n=nt.useCallback(async a=>{await r.current;const s={cancelled:!1};t.current=s;let l;const c=new Promise(u=>{l=u});try{return r.current=c,e.current=!0,await a()}catch(u){if(!s.cancelled)throw u}finally{e.current=!1,t.current=null,l()}},[]),i=nt.useCallback(()=>{t.current&&(t.current.cancelled=!0),r.current=Promise.resolve(),e.current=!1},[]),o=nt.useCallback(()=>e.current,[]);return{runWithMutex:n,isLocked:o,cancel:i}}const Ben=26,jw=l0("run-frame:RunFrame"),Sen=r=>{const[e,t]=cB(te=>[te.circuitJson,te.setCircuitJson]),[n,i]=nt.useState(null),o=nt.useRef(null),[a,s]=nt.useState(null),[l,c]=nt.useReducer((te,ie)=>te+1,0),u=kOe(te=>te.setLastRunEvalVersion),A=nt.useRef(0),d=ben(),[f,p]=nt.useState(!1);nt.useEffect(()=>{const te=ie=>{(ie.ctrlKey||ie.metaKey)&&ie.key==="Enter"&&!f&&c(1)};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[f]);const[C,v]=nt.useState(null),[_,x]=nt.useState({}),[b,T]=nt.useState(r.defaultActiveTab??"pcb");nt.useEffect(()=>{r.debug&&l0.enable("run-frame*")},[r.debug]);const F=r.fsMap instanceof Map?r.fsMap:Object.entries(r.fsMap??{}).reduce((te,[ie,pe])=>te.set(ie,pe),new Map),U=nt.useRef(null),H=nt.useRef(null);nt.useEffect(()=>{const te=F instanceof Map?Object.fromEntries(F.entries()):F;if(!te||Object.keys(te).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),p(!1);return}const ie=r.showRunButton&&l!==A.current;if(U.current&&e){const de=xen(U.current,F);if(Object.keys(de).length>0)jw("code changes detected");else if(H.current!==r.entrypoint)jw("render triggered by entrypoint change");else if(!ie){jw("render triggered without changes to fsMap, skipping");return}}if(r.showRunButton&&l===A.current)return;U.current=F,H.current=r.entrypoint??null,A.current=l,p(!0);const pe=async()=>{var Ze,lt,ft,Pt,Qt,$e;jw("running render worker"),i(null),v(null);const de={progress:0};let Ae=!1;o.current=()=>{Ae=!0};let Ie=r.evalVersion??"latest";if(!globalThis.runFrameWorker&&r.forceLatestEvalVersion)try{const It=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(It.ok){const Ct=await It.json();(Ze=Ct.tags)!=null&&Ze.latest&&(Ie=Ct.tags.latest,u(Ie))}}catch{}const ge=globalThis.runFrameWorker??await Een({evalVersion:Ie,webWorkerBlobUrl:r.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=ge,(lt=r.onRenderStarted)==null||lt.call(r);const Me=F instanceof Map?Object.fromEntries(F.entries()):F;let be=Date.now();if(ge.on("autorouting:start",It=>{x({..._,[It.componentDisplayName]:{simpleRouteJson:It.simpleRouteJson}})}),ge.on("board:renderPhaseStarted",It=>{de.lastRenderEvent=It,de.eventsProcessed=(de.eventsProcessed??0)+1;const Ct=jx.indexOf(It.phase)/Ben*.75+de.eventsProcessed/1e3*.25,Ft=1-Math.exp(-Ct*3);de.progress=Ft,Ae||v({...de})}),b==="render_log"&&ge.on("renderable:renderLifecycle:anyEvent",It=>{de.renderEvents=de.renderEvents??[],It.createdAt=Date.now(),de.renderEvents.push(It),Date.now()-be>500&&(de.phaseTimings=POe(de.renderEvents??[]),be=Date.now()),Ae||v({...de})}),ge.on("autorouting:progress",It=>{s(It.debugGraphics)}),!(await ge.executeWithFsMap({entrypoint:r.entrypoint,fsMap:Me,...r.mainComponentPath?{mainComponentPath:r.mainComponentPath}:{}}).then(()=>({success:!0})).catch(It=>{var Ft;const Ct=It.message.replace("Error: ","");return(Ft=r.onError)==null||Ft.call(r,It),i({error:Ct,stack:It.stack}),v(null),console.error(It),{success:!1}})).success){p(!1);return}const Se=ge.renderUntilSettled();jw("waiting for initial circuit json...");let Ke=await ge.getCircuitJson().catch(It=>{var Ct;return jw("error getting initial circuit json",It),(Ct=r.onError)==null||Ct.call(r,It),i({error:It.message,stack:It.stack}),v(null),p(!1),null});Ke&&(jw("got initial circuit json"),t(Ke),(ft=r.onCircuitJsonChange)==null||ft.call(r,Ke),(Pt=r.onInitialRender)==null||Pt.call(r,{circuitJson:Ke}),await Se,jw("getting final circuit json"),Ke=await ge.getCircuitJson(),(Qt=r.onCircuitJsonChange)==null||Qt.call(r,Ke),t(Ke),($e=r.onRenderFinished)==null||$e.call(r,{circuitJson:Ke}),s({}),b==="render_log"&&(de.phaseTimings=POe(de.renderEvents??[])),de.progress=1,Ae||v({...de}),p(!1),o.current=null)};d.runWithMutex(pe)},[r.fsMap,r.entrypoint,l,r.evalVersion]);const G=nt.useRef(null),j=nt.useRef(null),O=te=>{if(!te||te===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}te.in_progress?(G.current=te,j.current&&(clearTimeout(j.current),j.current=null)):(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{var pe;const ie=te||G.current;(pe=r.onEditEvent)==null||pe.call(r,ie),G.current=null,j.current=null},100))},ne=async(te,ie)=>{await iue.post("autorouting/bug_reports/create",{json:{title:te,simple_route_json:ie.simpleRouteJson}}).json().then(({autorouting_bug_report:pe})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${pe.autorouting_bug_report_id}`,"_blank")}).catch(pe=>{console.error("Failed to report autorouting bug",pe),pe.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${pe.message}`)})};return Ve.jsx(nXt,{code:F.get(r.entrypoint??r.mainComponentPath),defaultActiveTab:r.defaultActiveTab,showToggleFullScreen:r.showToggleFullScreen,autoroutingGraphics:a,autoroutingLog:_,onReportAutoroutingLog:r.onReportAutoroutingLog||ne,leftHeaderContent:Ve.jsxs(Ve.Fragment,{children:[r.showRunButton&&Ve.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ve.jsxs("button",{type:"button",onClick:()=>{c(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:f,children:["Run"," ",f?Ve.jsx($3,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ve.jsx(uke,{className:"rf-w-3 rf-h-3"})]}),f&&Ve.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ve.jsx(TE,{onClick:te=>{te.stopPropagation(),p(!1),v(null),i(null),o.current&&(o.current(),o.current=null),d.cancel(),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:Ve.jsx(O7t,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),r.leftHeaderContent]}),onActiveTabChange:T,circuitJson:e,renderLog:C,isRunningCode:f,errorMessage:n==null?void 0:n.error,onEditEvent:O,editEvents:r.editEvents,defaultToFullScreen:r.defaultToFullScreen})};function wen(r,e){const[t,n]=nt.useState(()=>{try{const i=window.localStorage.getItem(r);return i?JSON.parse(i):e}catch(i){return console.error("Error reading from localStorage:",i),e}});return nt.useEffect(()=>{try{window.localStorage.setItem(r,JSON.stringify(t))}catch(i){console.error("Error writing to localStorage:",i)}},[r,t]),[t,n]}const Qen=({snippetNames:r,onSelect:e,onCancel:t,isOpen:n})=>{const[i,o]=nt.useState(""),[a,s]=nt.useState("");if(!n)return null;const l=r.filter(A=>A.toLowerCase().includes(a.toLowerCase())),c=a&&!r.includes(a),u=A=>{A.key==="Enter"&&(l.length===1?o(l[0]):c&&o(a))};return Ve.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:Ve.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ve.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ve.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:a,onChange:A=>s(A.target.value),onKeyDown:u}),Ve.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[l.map(A=>Ve.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===A?"bg-blue-50":""}`,onClick:()=>o(A),children:A},A)),c&&Ve.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===a?"bg-blue-50":""}`,onClick:()=>o(a),children:['Create new "',a,'"']})]}),Ve.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>i&&e(i),disabled:!i,children:i===a?`Create "${i}"`:`Save to ${i}`})]})]})})},Men=r=>{const e=nt.useRef(null),t=cB(n=>n.recentEvents);nt.useEffect(()=>{if(t.length===0)return;const n=t[0];n.event_id!==e.current&&(r(n),e.current=n.event_id)},[t,r])};var UOe="AlertDialog",[Den,Lln]=jS(UOe,[B7e]),D2=B7e(),FOe=r=>{const{__scopeAlertDialog:e,...t}=r,n=D2(e);return Ve.jsx(z7e,{...n,...t,modal:!0})};FOe.displayName=UOe;var Ren="AlertDialogTrigger",Nen=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(fXt,{...i,...n,ref:e})});Nen.displayName=Ren;var Ten="AlertDialogPortal",LOe=r=>{const{__scopeAlertDialog:e,...t}=r,n=D2(e);return Ve.jsx(H7e,{...n,...t})};LOe.displayName=Ten;var Pen="AlertDialogOverlay",GOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(Gce,{...i,...n,ref:e})});GOe.displayName=Pen;var SD="AlertDialogContent",[ken,Uen]=Den(SD),Fen=Ppt("AlertDialogContent"),OOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,children:n,...i}=r,o=D2(t),a=nt.useRef(null),s=c1(e,a),l=nt.useRef(null);return Ve.jsx(cXt,{contentName:SD,titleName:zOe,docsSlug:"alert-dialog",children:Ve.jsx(ken,{scope:t,cancelRef:l,children:Ve.jsxs(Oce,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Oh(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[Ve.jsx(Fen,{children:n}),Ve.jsx(Gen,{contentRef:a})]})})})});OOe.displayName=SD;var zOe="AlertDialogTitle",HOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(zce,{...i,...n,ref:e})});HOe.displayName=zOe;var YOe="AlertDialogDescription",VOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(Hce,{...i,...n,ref:e})});VOe.displayName=YOe;var Len="AlertDialogAction",KOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,i=D2(t);return Ve.jsx(Y7e,{...i,...n,ref:e})});KOe.displayName=Len;var jOe="AlertDialogCancel",JOe=nt.forwardRef((r,e)=>{const{__scopeAlertDialog:t,...n}=r,{cancelRef:i}=Uen(jOe,t),o=D2(t),a=c1(e,i);return Ve.jsx(Y7e,{...o,...n,ref:a})});JOe.displayName=jOe;var Gen=({contentRef:r})=>{const e=`\`${SD}\` requires a description for the component to be accessible for screen reader users.
13682
13682
 
13683
13683
  You can add a description to the \`${SD}\` by passing a \`${YOe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
13684
13684
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/runframe",
3
3
  "main": "dist/preview.js",
4
4
  "type": "module",
5
- "version": "0.0.537",
5
+ "version": "0.0.538",
6
6
  "exports": {
7
7
  ".": "./dist/preview.js",
8
8
  "./preview": "./dist/preview.js",