@tscircuit/runframe 0.0.387 → 0.0.388

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.
@@ -1036,7 +1036,7 @@ var RenderLogViewer = ({
1036
1036
  };
1037
1037
 
1038
1038
  // package.json
1039
- var version = "0.0.386";
1039
+ var version = "0.0.387";
1040
1040
 
1041
1041
  // lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
1042
1042
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -1680,7 +1680,7 @@ function VendorQuoteCard({
1680
1680
  /* @__PURE__ */ jsxs14("div", { className: "rf-flex rf-items-center rf-gap-2", children: [
1681
1681
  /* @__PURE__ */ jsxs14("span", { className: "rf-text-gray-400 rf-line-through rf-text-base rf-mr-2", children: [
1682
1682
  "$",
1683
- vendor.total_cost.toFixed(2)
1683
+ vendor.total_cost_without_shipping.toFixed(2)
1684
1684
  ] }),
1685
1685
  /* @__PURE__ */ jsx18("span", { className: "rf-font-bold rf-text-xl rf-text-blue-600", children: "$50.00" })
1686
1686
  ] })
@@ -1718,7 +1718,7 @@ function VendorQuoteCard({
1718
1718
  /* @__PURE__ */ jsx18("span", { className: "rf-text-gray-800 rf-font-medium", children: "Total (incl. shipping):" }),
1719
1719
  /* @__PURE__ */ jsxs14("span", { className: "rf-font-bold rf-text-lg rf-text-blue-700", children: [
1720
1720
  "$",
1721
- vendor.total_cost.toFixed(2)
1721
+ vendor.total_cost_without_shipping.toFixed(2)
1722
1722
  ] })
1723
1723
  ] }) })
1724
1724
  ]
package/dist/preview.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  linkify,
9
9
  useOrderDialog,
10
10
  useOrderDialogCli
11
- } from "./chunk-UK2RY7K2.js";
11
+ } from "./chunk-NW27EGDR.js";
12
12
  export {
13
13
  BomTable,
14
14
  CadViewer,
package/dist/runner.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  useOrderDialog,
27
27
  useOrderDialogCli,
28
28
  useRunFrameStore
29
- } from "./chunk-UK2RY7K2.js";
29
+ } from "./chunk-NW27EGDR.js";
30
30
 
31
31
  // lib/components/RunFrame/RunFrame.tsx
32
32
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";
@@ -13393,4 +13393,4 @@ ${r.slice(0,2e3)}
13393
13393
  50% { opacity: 0.2; }
13394
13394
  100% { opacity: 0.6; }
13395
13395
  }
13396
- `,i.appendChild(O)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[n,t,e,r])},lsn=Rg("schematic-viewer"),csn=()=>{Rg.enable("schematic-viewer*")},usn=lsn,fsn=n=>{const[e,t]=yt.useState(0),[r,i]=yt.useState(0);return yt.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}},dsn=usn.extend("useComponentDragging"),psn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:r,svgToScreenProjection:i,realToSvgProjection:a,enabled:o=!1})=>{const[s,l]=yt.useState(null),c=n0(a,i),u=yt.useRef(null),f=yt.useRef(null),h=yt.useRef(new Map);yt.useEffect(()=>{e.forEach(S=>{"edit_event_type"in S&&S.edit_event_type==="edit_schematic_component_location"&&!S.in_progress&&h.current.set(S.schematic_component_id,{...S.new_center})})},[e]);const y=yt.useCallback(S=>{if(!o)return;const A=S.target.closest('[data-circuit-json-type="schematic_component"]');if(!A)return;const O=A.getAttribute("data-schematic-component-id");if(!O)return;r&&r();const k=Tv(t).schematic_component.get(O);if(!k)return;u.current={x:S.clientX,y:S.clientY};let $;const Y=h.current.get(O);if(Y)$={...Y};else{const K=O$e({editEvents:e,schematic_component_id:O});$={x:k.center.x+K.x,y:k.center.y+K.y},h.current.set(O,{...$})}const Q={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:O,original_center:$,new_center:{...$},in_progress:!0,created_at:Date.now(),_element:A};f.current=Q,l(Q)},[r,o,t,e]),x=yt.useCallback(S=>{if(!f.current||!u.current)return;const E={x:S.clientX-u.current.x,y:S.clientY-u.current.y},A={x:E.x/c.a,y:E.y/c.d},O={...f.current,new_center:{x:f.current.original_center.x+A.x,y:f.current.original_center.y+A.y}};f.current=O,l(O)},[c]),M=yt.useCallback(()=>{if(!f.current)return;const S={...f.current,in_progress:!1};h.current.set(S.schematic_component_id,{...S.new_center}),dsn("handleMouseUp calling onEditEvent with new edit event",{newEditEvent:S}),n&&n(S),f.current=null,u.current=null,l(null)},[n]);return yt.useEffect(()=>(window.addEventListener("mousemove",x),window.addEventListener("mouseup",M),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",M)}),[x,M]),{handleMouseDown:y,isDragging:!!f.current,activeEditEvent:s}},hsn=({onClick:n,active:e})=>dt.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:1e3},children:dt.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[dt.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),dt.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),msn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:r,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1,clickToInteractEnabled:l=!1,colorOverrides:c})=>{s&&csn();const[u,f]=yt.useState(i),[h,y]=yt.useState(!l),x=yt.useRef(null),[M,S]=yt.useState([]),E=yt.useRef(n),A=Se=>`${(Se==null?void 0:Se.length)||0}_${(Se==null?void 0:Se.editCount)||0}`;yt.useEffect(()=>{const Se=A(n),Ce=A(E.current);Se!==Ce&&(S([]),E.current=n)},[n]);const{ref:O,cancelDrag:k,transform:$}=L$e({onSetTransform(Se){x.current&&(x.current.style.transform=c6(Se))},enabled:h}),{containerWidth:Y,containerHeight:Q}=fsn(O),K=yt.useMemo(()=>!Y||!Q?"":Oue(n,{width:Y,height:Q||720,grid:a?{cellSize:1,labelCells:!0}:void 0,colorOverrides:c}),[n,Y,Q]),ie=yt.useMemo(()=>{var Ce;if(!K)return Z9();const Se=(Ce=K.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Ce[1];try{return yH(Se)}catch(Ee){return console.error(Ee),Z9()}},[K]),ee=Se=>{S(Ce=>[...Ce,Se]),r&&r(Se)},de=yt.useMemo(()=>[...t,...M],[t,M]),{handleMouseDown:me,isDragging:_e,activeEditEvent:Me}=psn({onEditEvent:ee,cancelDrag:k,realToSvgProjection:ie,svgToScreenProjection:$,circuitJson:n,editEvents:de,enabled:u&&h});osn({svgDivRef:x,editEvents:de,realToSvgProjection:ie,svgToScreenProjection:$,activeEditEvent:Me}),ssn({svgDivRef:x,circuitJson:n,activeEditEvent:Me,editEvents:de});const Pe=yt.useMemo(()=>dt.jsx("div",{ref:x,style:{pointerEvents:l?h?"auto":"none":"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:K}}),[K,h,l]);return dt.jsxs("div",{ref:O,style:{position:"relative",backgroundColor:"transparent",overflow:"hidden",cursor:_e?"grabbing":l&&!h?"pointer":"grab",minHeight:"300px",...e},onMouseDown:Se=>{if(l&&!h){Se.preventDefault(),Se.stopPropagation();return}me(Se)},onMouseDownCapture:Se=>{if(l&&!h){Se.preventDefault(),Se.stopPropagation();return}},children:[!h&&l&&dt.jsx("div",{onClick:Se=>{Se.preventDefault(),Se.stopPropagation(),y(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})}),o&&dt.jsx(hsn,{active:u,onClick:()=>f(!u)}),Pe]})},vsn=n=>{const[e,t]=yt.useState(0),[r,i]=yt.useState(0);return yt.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}};Rg("assembly-viewer");var ysn=()=>{Rg.enable("assembly-viewer*")},gsn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:r=!1})=>{r&&ysn();const i=yt.useRef(null),{ref:a}=L$e({onSetTransform(u){i.current&&(i.current.style.transform=c6(u))}}),{containerWidth:o,containerHeight:s}=vsn(a),l=yt.useMemo(()=>!o||!s?"":M$e(n,{width:o,height:s||720}),[n,o,s]);yt.useMemo(()=>{var f;if(!l)return Z9();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return yH(u)}catch(h){return console.error(h),Z9()}},[l]);const c=yt.useMemo(()=>dt.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return dt.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const z$e=["Always initialize your project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export","Use units like mm or mils consistently across your designs.","Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/elements/circuitjsonpreview) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Refer to the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to request features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],_sn=(()=>{let n=z$e[Math.floor(Math.random()*z$e.length)];return n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(e,t)=>`<a class="rf-text-blue-500 rf-underline" href="${e}" target="_blank">${e}</a>`),n=n.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),n})(),k7=({onRunClicked:n})=>dt.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[dt.jsx(KZt,{className:"rf-size-14 rf-mb-4"}),dt.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",dt.jsx("span",{dangerouslySetInnerHTML:{__html:_sn}})]}),n&&dt.jsxs($8,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",dt.jsx(eQt,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),xB=({text:n,onClick:e})=>dt.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),bB=n=>{var e;return dt.jsxs("div",{className:"rf-leading-5",children:[dt.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),dt.jsx("div",{children:((e=n.field)==null?void 0:e.call(n))??dt.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var r;(r=n.onTextChange)==null||r.call(n,t.target.value)}})})]})},xsn=({open:n,children:e,title:t,onClose:r})=>n?dt.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:r,children:dt.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[dt.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),dt.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:r,children:"×"}),e]})}):null,bsn=({elements:n})=>{const[e,t]=yt.useState({open:!1}),[r,i]=yt.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(n.map(u=>u.type))],o=n.map(u=>{const f=u[`${u.type}_id`],h=Object.fromEntries(Object.entries(u).filter(([x])=>!(x===`${u.type}_id`||!x.endsWith("_id")))),y=Object.fromEntries(Object.entries(u).filter(([x])=>!x.endsWith("_id")));return{primary_id:f,other_ids:h,...y,_og_elm:u}}),s=o.map(u=>{let f="";const h=y=>{const x=Object.keys(y.other_ids).find(E=>E.startsWith("source_"));if(!x)return`.${y.name}`;const M=x.slice(0,-3),S=o.find(E=>E.type===M&&E.primary_id===y.other_ids[x]);return S?"name"in S?`${h(S)} > .${y.name}`:`#${S.primary_id} > .${y.name}`:`??? > .${y.name}`};return"name"in u&&(f=h(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>dt.jsxs("div",{className:"rf-flex rf-items-center",children:[dt.jsx(xB,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),dt.jsx("span",{className:"rf-flex-grow"}),dt.jsx(xB,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>dt.jsx(bB,{column:u,onTextChange:f=>i({id_search:f}),field:r.focused_id?()=>dt.jsxs("div",{children:["Focus:"," ",dt.jsx("span",{className:"rf-underline",children:r.focused_id}),dt.jsx(xB,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>dt.jsx(bB,{column:u,field:()=>dt.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[dt.jsx("option",{value:"any",children:"any"},"any"),dt.jsx("option",{value:"source",children:"source"},"source"),dt.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),dt.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>dt.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>dt.jsx(bB,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>dt.jsx(bB,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>dt.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,h])=>dt.jsx(xB,{text:h,onClick:()=>i({focused_id:h})},h))})}],c=s.filter(u=>{var f,h;return r.name_search?(h=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:h.includes(r.name_search.toLowerCase()):!0}).filter(u=>{var f;return!r.component_type_filter||r.component_type_filter==="any"?!0:r.component_type_filter==="source"?u.type.startsWith("source_"):r.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):r.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(r.component_type_filter)}).filter(u=>r.selector_search?r.selector_search.split(" ").filter(h=>h.length>0).every(h=>{var y;return(y=u.selector_path)==null?void 0:y.includes(h)}):!0).filter(u=>{var f;return r.id_search?(f=u.primary_id)==null?void 0:f.includes(r.id_search):!0}).filter(u=>!!(!r.focused_id||u.primary_id===r.focused_id||Object.values(u.other_ids).includes(r.focused_id)));return dt.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[dt.jsx("div",{className:"rf-overflow-x-auto",children:dt.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[dt.jsx("thead",{children:dt.jsx("tr",{children:l.map(u=>dt.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),dt.jsx("tbody",{children:c.map((u,f)=>dt.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(h=>dt.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:h.renderCell?h.renderCell(u):u[h.key]},h.key))},f))})]})}),dt.jsx(xsn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:dt.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:dt.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Ssn=(n,e)=>n==="jlcpcb"?dt.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,Esn=({circuitJson:n})=>{const e=n.filter(r=>r.type==="source_component"),t=new Set;for(const r of e)if(r.supplier_part_numbers)for(const i of Object.keys(r.supplier_part_numbers))t.add(i);return dt.jsx("div",{className:"rf-overflow-x-auto",children:dt.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[dt.jsx("thead",{children:dt.jsxs("tr",{className:"rf-border-b",children:[dt.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(r=>dt.jsx("th",{className:"rf-p-2 rf-capitalize",children:r},r))]})}),dt.jsx("tbody",{children:e.map(r=>dt.jsxs("tr",{className:"rf-border-b",children:[dt.jsx("td",{className:"rf-p-2",children:r.name}),Array.from(t).map(i=>{var a,o;return dt.jsx("td",{className:"rf-p-2",children:Ssn(i,((o=(a=r.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},r.source_component_id))})]})})},wsn=({containerClassName:n,...e})=>{const t=yt.useRef(null),[r,i]=yt.useState(620);return yt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:dt.jsx(zZt,{...e,height:r})})},Tsn='*,: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-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-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/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-pb-0{padding-bottom:0}.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-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-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}.hover\\:rf-shadow-lg:hover{--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);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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}',Msn=()=>{yt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Tsn,document.head.appendChild(e)},[])},U$e=n=>`hsl(${Tb.indexOf(n)*137.5%360}, 70%, 50%)`,Csn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Tb.map(t=>{const r=n[t]||0,i=r/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:U$e(t)},children:dt.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Rsn=({renderLog:n})=>{const[e,t]=yt.useState("chronological");if(!n)return dt.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>Tb.indexOf(a[0])-Tb.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(Csn,{phaseTimings:n.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:r.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:Tb.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:U$e(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Asn="0.0.386",Psn=["assembly","bom","circuit_json","errors","render_log"],Nsn=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:h=!0,className:y,headerClassName:x,leftHeaderContent:M,readOnly:S,isStreaming:E,autoroutingLog:A,onReportAutoroutingLog:O,isRunningCode:k,hasCodeChangedSinceLastRun:$,onEditEvent:Y,editEvents:Q,defaultActiveTab:K,autoRotate3dViewerDisabled:ie,showSchematicDebugGrid:ee=!1,showToggleFullScreen:de=!0,defaultToFullScreen:me=!1})=>{var Ue;Msn();const[_e,Me]=yt.useState(K??"pcb"),[Pe,Se]=yt.useState(me),Ce=yt.useCallback(ze=>{Me(ze),u==null||u(ze)},[u]),Ee=()=>{Se(!Pe)};return yt.useEffect(()=>{t&&Ce("errors")},[t]),yt.useEffect(()=>{(_e==="code"||_e==="errors")&&r&&!t&&Ce(K??"pcb")},[r]),dt.jsx("div",{className:Gy("flex flex-col relative rf-overflow-x-hidden",y),children:dt.jsx("div",{className:Gy("rf-md:sticky rf-md:top-2",Pe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(jZe,{value:_e,onValueChange:Ce,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:Gy("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",x),children:[M,M&&dt.jsx("div",{className:"rf-flex-grow"}),!M&&k&&dt.jsx(ije,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!M&&dt.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(Ue=f.lastRenderEvent)==null?void 0:Ue.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(ije,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&dt.jsxs(Gfe,{children:[o&&dt.jsx(K7,{value:"code",children:"Code"}),dt.jsxs(K7,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&dt.jsx("span",{className:Gy("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),dt.jsxs(K7,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&dt.jsx("span",{className:Gy("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),dt.jsxs(K7,{value:"cad",children:[r&&dt.jsx("span",{className:Gy("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(_e)&&dt.jsx(K7,{value:_e,children:Vfe(_e)}),dt.jsxs(hVe,{children:[dt.jsx(mVe,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(ZZt,{className:"rf-w-4 rf-h-4"}),t&&dt.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),dt.jsxs(yce,{className:"rf-*:text-xs",children:[Psn.map(ze=>dt.jsxs(mF,{onSelect:()=>Ce(ze),children:[_e!==ze&&dt.jsx(rje,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),_e===ze&&dt.jsx(nje,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Vfe(ze)}),ze==="errors"&&t&&dt.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:"1"})]},ze)),dt.jsx(mF,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Asn.split(".").map((ze,Fe)=>Fe===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),de&&dt.jsx($8,{onClick:Ee,variant:"ghost",children:Pe?dt.jsx(JZt,{size:16}):dt.jsx(QZt,{size:16})})]}),o&&dt.jsx(h4,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:s})}),dt.jsx(h4,{value:"pcb",children:dt.jsx("div",{className:Gy("rf-overflow-hidden",Pe?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallbackRender:({error:ze})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?dt.jsx(wsn,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:Gy("rf-h-full rf-w-full",Pe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{Y&&ze.forEach(Fe=>Y(Fe))}}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"assembly",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:r?dt.jsx(gsn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"schematic",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallbackRender:({error:ze})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?dt.jsx(msn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>{Y==null||Y(ze)},debugGrid:ee}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"cad",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{FallbackComponent:UZt,children:r?dt.jsx(TUt,{soup:r,autoRotateDisabled:ie}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"bom",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallbackRender:({error:ze})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?dt.jsx(Esn,{circuitJson:r}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"circuit_json",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:r?dt.jsx(bsn,{elements:r}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"errors",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r||t?dt.jsx(Zen,{code:n,errorMessage:t,autoroutingLog:A,onReportAutoroutingLog:O}):dt.jsx(k7,{onRunClicked:e})})}),c&&dt.jsx(h4,{value:"render_log",children:dt.jsx(Rsn,{renderLog:f})})]})})})};ufe.createRoot(document.getElementById("root")).render(dt.jsx(Nsn,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}))});
13396
+ `,i.appendChild(O)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[n,t,e,r])},lsn=Rg("schematic-viewer"),csn=()=>{Rg.enable("schematic-viewer*")},usn=lsn,fsn=n=>{const[e,t]=yt.useState(0),[r,i]=yt.useState(0);return yt.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}},dsn=usn.extend("useComponentDragging"),psn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:r,svgToScreenProjection:i,realToSvgProjection:a,enabled:o=!1})=>{const[s,l]=yt.useState(null),c=n0(a,i),u=yt.useRef(null),f=yt.useRef(null),h=yt.useRef(new Map);yt.useEffect(()=>{e.forEach(S=>{"edit_event_type"in S&&S.edit_event_type==="edit_schematic_component_location"&&!S.in_progress&&h.current.set(S.schematic_component_id,{...S.new_center})})},[e]);const y=yt.useCallback(S=>{if(!o)return;const A=S.target.closest('[data-circuit-json-type="schematic_component"]');if(!A)return;const O=A.getAttribute("data-schematic-component-id");if(!O)return;r&&r();const k=Tv(t).schematic_component.get(O);if(!k)return;u.current={x:S.clientX,y:S.clientY};let $;const Y=h.current.get(O);if(Y)$={...Y};else{const K=O$e({editEvents:e,schematic_component_id:O});$={x:k.center.x+K.x,y:k.center.y+K.y},h.current.set(O,{...$})}const Q={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:O,original_center:$,new_center:{...$},in_progress:!0,created_at:Date.now(),_element:A};f.current=Q,l(Q)},[r,o,t,e]),x=yt.useCallback(S=>{if(!f.current||!u.current)return;const E={x:S.clientX-u.current.x,y:S.clientY-u.current.y},A={x:E.x/c.a,y:E.y/c.d},O={...f.current,new_center:{x:f.current.original_center.x+A.x,y:f.current.original_center.y+A.y}};f.current=O,l(O)},[c]),M=yt.useCallback(()=>{if(!f.current)return;const S={...f.current,in_progress:!1};h.current.set(S.schematic_component_id,{...S.new_center}),dsn("handleMouseUp calling onEditEvent with new edit event",{newEditEvent:S}),n&&n(S),f.current=null,u.current=null,l(null)},[n]);return yt.useEffect(()=>(window.addEventListener("mousemove",x),window.addEventListener("mouseup",M),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",M)}),[x,M]),{handleMouseDown:y,isDragging:!!f.current,activeEditEvent:s}},hsn=({onClick:n,active:e})=>dt.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:1e3},children:dt.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[dt.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),dt.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),msn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:r,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1,clickToInteractEnabled:l=!1,colorOverrides:c})=>{s&&csn();const[u,f]=yt.useState(i),[h,y]=yt.useState(!l),x=yt.useRef(null),[M,S]=yt.useState([]),E=yt.useRef(n),A=Se=>`${(Se==null?void 0:Se.length)||0}_${(Se==null?void 0:Se.editCount)||0}`;yt.useEffect(()=>{const Se=A(n),Ce=A(E.current);Se!==Ce&&(S([]),E.current=n)},[n]);const{ref:O,cancelDrag:k,transform:$}=L$e({onSetTransform(Se){x.current&&(x.current.style.transform=c6(Se))},enabled:h}),{containerWidth:Y,containerHeight:Q}=fsn(O),K=yt.useMemo(()=>!Y||!Q?"":Oue(n,{width:Y,height:Q||720,grid:a?{cellSize:1,labelCells:!0}:void 0,colorOverrides:c}),[n,Y,Q]),ie=yt.useMemo(()=>{var Ce;if(!K)return Z9();const Se=(Ce=K.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Ce[1];try{return yH(Se)}catch(Ee){return console.error(Ee),Z9()}},[K]),ee=Se=>{S(Ce=>[...Ce,Se]),r&&r(Se)},de=yt.useMemo(()=>[...t,...M],[t,M]),{handleMouseDown:me,isDragging:_e,activeEditEvent:Me}=psn({onEditEvent:ee,cancelDrag:k,realToSvgProjection:ie,svgToScreenProjection:$,circuitJson:n,editEvents:de,enabled:u&&h});osn({svgDivRef:x,editEvents:de,realToSvgProjection:ie,svgToScreenProjection:$,activeEditEvent:Me}),ssn({svgDivRef:x,circuitJson:n,activeEditEvent:Me,editEvents:de});const Pe=yt.useMemo(()=>dt.jsx("div",{ref:x,style:{pointerEvents:l?h?"auto":"none":"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:K}}),[K,h,l]);return dt.jsxs("div",{ref:O,style:{position:"relative",backgroundColor:"transparent",overflow:"hidden",cursor:_e?"grabbing":l&&!h?"pointer":"grab",minHeight:"300px",...e},onMouseDown:Se=>{if(l&&!h){Se.preventDefault(),Se.stopPropagation();return}me(Se)},onMouseDownCapture:Se=>{if(l&&!h){Se.preventDefault(),Se.stopPropagation();return}},children:[!h&&l&&dt.jsx("div",{onClick:Se=>{Se.preventDefault(),Se.stopPropagation(),y(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})}),o&&dt.jsx(hsn,{active:u,onClick:()=>f(!u)}),Pe]})},vsn=n=>{const[e,t]=yt.useState(0),[r,i]=yt.useState(0);return yt.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}};Rg("assembly-viewer");var ysn=()=>{Rg.enable("assembly-viewer*")},gsn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:r=!1})=>{r&&ysn();const i=yt.useRef(null),{ref:a}=L$e({onSetTransform(u){i.current&&(i.current.style.transform=c6(u))}}),{containerWidth:o,containerHeight:s}=vsn(a),l=yt.useMemo(()=>!o||!s?"":M$e(n,{width:o,height:s||720}),[n,o,s]);yt.useMemo(()=>{var f;if(!l)return Z9();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return yH(u)}catch(h){return console.error(h),Z9()}},[l]);const c=yt.useMemo(()=>dt.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return dt.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const z$e=["Always initialize your project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export","Use units like mm or mils consistently across your designs.","Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/elements/circuitjsonpreview) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Refer to the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to request features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],_sn=(()=>{let n=z$e[Math.floor(Math.random()*z$e.length)];return n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(e,t)=>`<a class="rf-text-blue-500 rf-underline" href="${e}" target="_blank">${e}</a>`),n=n.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),n})(),k7=({onRunClicked:n})=>dt.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[dt.jsx(KZt,{className:"rf-size-14 rf-mb-4"}),dt.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",dt.jsx("span",{dangerouslySetInnerHTML:{__html:_sn}})]}),n&&dt.jsxs($8,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",dt.jsx(eQt,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),xB=({text:n,onClick:e})=>dt.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),bB=n=>{var e;return dt.jsxs("div",{className:"rf-leading-5",children:[dt.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),dt.jsx("div",{children:((e=n.field)==null?void 0:e.call(n))??dt.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var r;(r=n.onTextChange)==null||r.call(n,t.target.value)}})})]})},xsn=({open:n,children:e,title:t,onClose:r})=>n?dt.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:r,children:dt.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[dt.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),dt.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:r,children:"×"}),e]})}):null,bsn=({elements:n})=>{const[e,t]=yt.useState({open:!1}),[r,i]=yt.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(n.map(u=>u.type))],o=n.map(u=>{const f=u[`${u.type}_id`],h=Object.fromEntries(Object.entries(u).filter(([x])=>!(x===`${u.type}_id`||!x.endsWith("_id")))),y=Object.fromEntries(Object.entries(u).filter(([x])=>!x.endsWith("_id")));return{primary_id:f,other_ids:h,...y,_og_elm:u}}),s=o.map(u=>{let f="";const h=y=>{const x=Object.keys(y.other_ids).find(E=>E.startsWith("source_"));if(!x)return`.${y.name}`;const M=x.slice(0,-3),S=o.find(E=>E.type===M&&E.primary_id===y.other_ids[x]);return S?"name"in S?`${h(S)} > .${y.name}`:`#${S.primary_id} > .${y.name}`:`??? > .${y.name}`};return"name"in u&&(f=h(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>dt.jsxs("div",{className:"rf-flex rf-items-center",children:[dt.jsx(xB,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),dt.jsx("span",{className:"rf-flex-grow"}),dt.jsx(xB,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>dt.jsx(bB,{column:u,onTextChange:f=>i({id_search:f}),field:r.focused_id?()=>dt.jsxs("div",{children:["Focus:"," ",dt.jsx("span",{className:"rf-underline",children:r.focused_id}),dt.jsx(xB,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>dt.jsx(bB,{column:u,field:()=>dt.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[dt.jsx("option",{value:"any",children:"any"},"any"),dt.jsx("option",{value:"source",children:"source"},"source"),dt.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),dt.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>dt.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>dt.jsx(bB,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>dt.jsx(bB,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>dt.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,h])=>dt.jsx(xB,{text:h,onClick:()=>i({focused_id:h})},h))})}],c=s.filter(u=>{var f,h;return r.name_search?(h=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:h.includes(r.name_search.toLowerCase()):!0}).filter(u=>{var f;return!r.component_type_filter||r.component_type_filter==="any"?!0:r.component_type_filter==="source"?u.type.startsWith("source_"):r.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):r.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(r.component_type_filter)}).filter(u=>r.selector_search?r.selector_search.split(" ").filter(h=>h.length>0).every(h=>{var y;return(y=u.selector_path)==null?void 0:y.includes(h)}):!0).filter(u=>{var f;return r.id_search?(f=u.primary_id)==null?void 0:f.includes(r.id_search):!0}).filter(u=>!!(!r.focused_id||u.primary_id===r.focused_id||Object.values(u.other_ids).includes(r.focused_id)));return dt.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[dt.jsx("div",{className:"rf-overflow-x-auto",children:dt.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[dt.jsx("thead",{children:dt.jsx("tr",{children:l.map(u=>dt.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),dt.jsx("tbody",{children:c.map((u,f)=>dt.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(h=>dt.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:h.renderCell?h.renderCell(u):u[h.key]},h.key))},f))})]})}),dt.jsx(xsn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:dt.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:dt.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Ssn=(n,e)=>n==="jlcpcb"?dt.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,Esn=({circuitJson:n})=>{const e=n.filter(r=>r.type==="source_component"),t=new Set;for(const r of e)if(r.supplier_part_numbers)for(const i of Object.keys(r.supplier_part_numbers))t.add(i);return dt.jsx("div",{className:"rf-overflow-x-auto",children:dt.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[dt.jsx("thead",{children:dt.jsxs("tr",{className:"rf-border-b",children:[dt.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(r=>dt.jsx("th",{className:"rf-p-2 rf-capitalize",children:r},r))]})}),dt.jsx("tbody",{children:e.map(r=>dt.jsxs("tr",{className:"rf-border-b",children:[dt.jsx("td",{className:"rf-p-2",children:r.name}),Array.from(t).map(i=>{var a,o;return dt.jsx("td",{className:"rf-p-2",children:Ssn(i,((o=(a=r.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},r.source_component_id))})]})})},wsn=({containerClassName:n,...e})=>{const t=yt.useRef(null),[r,i]=yt.useState(620);return yt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:dt.jsx(zZt,{...e,height:r})})},Tsn='*,: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-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-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/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-pb-0{padding-bottom:0}.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-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-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}.hover\\:rf-shadow-lg:hover{--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);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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}',Msn=()=>{yt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Tsn,document.head.appendChild(e)},[])},U$e=n=>`hsl(${Tb.indexOf(n)*137.5%360}, 70%, 50%)`,Csn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Tb.map(t=>{const r=n[t]||0,i=r/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:U$e(t)},children:dt.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Rsn=({renderLog:n})=>{const[e,t]=yt.useState("chronological");if(!n)return dt.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>Tb.indexOf(a[0])-Tb.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(Csn,{phaseTimings:n.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:r.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:Tb.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:U$e(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Asn="0.0.387",Psn=["assembly","bom","circuit_json","errors","render_log"],Nsn=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:h=!0,className:y,headerClassName:x,leftHeaderContent:M,readOnly:S,isStreaming:E,autoroutingLog:A,onReportAutoroutingLog:O,isRunningCode:k,hasCodeChangedSinceLastRun:$,onEditEvent:Y,editEvents:Q,defaultActiveTab:K,autoRotate3dViewerDisabled:ie,showSchematicDebugGrid:ee=!1,showToggleFullScreen:de=!0,defaultToFullScreen:me=!1})=>{var Ue;Msn();const[_e,Me]=yt.useState(K??"pcb"),[Pe,Se]=yt.useState(me),Ce=yt.useCallback(ze=>{Me(ze),u==null||u(ze)},[u]),Ee=()=>{Se(!Pe)};return yt.useEffect(()=>{t&&Ce("errors")},[t]),yt.useEffect(()=>{(_e==="code"||_e==="errors")&&r&&!t&&Ce(K??"pcb")},[r]),dt.jsx("div",{className:Gy("flex flex-col relative rf-overflow-x-hidden",y),children:dt.jsx("div",{className:Gy("rf-md:sticky rf-md:top-2",Pe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(jZe,{value:_e,onValueChange:Ce,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:Gy("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",x),children:[M,M&&dt.jsx("div",{className:"rf-flex-grow"}),!M&&k&&dt.jsx(ije,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!M&&dt.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(Ue=f.lastRenderEvent)==null?void 0:Ue.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(ije,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&dt.jsxs(Gfe,{children:[o&&dt.jsx(K7,{value:"code",children:"Code"}),dt.jsxs(K7,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&dt.jsx("span",{className:Gy("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),dt.jsxs(K7,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&dt.jsx("span",{className:Gy("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),dt.jsxs(K7,{value:"cad",children:[r&&dt.jsx("span",{className:Gy("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(_e)&&dt.jsx(K7,{value:_e,children:Vfe(_e)}),dt.jsxs(hVe,{children:[dt.jsx(mVe,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(ZZt,{className:"rf-w-4 rf-h-4"}),t&&dt.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),dt.jsxs(yce,{className:"rf-*:text-xs",children:[Psn.map(ze=>dt.jsxs(mF,{onSelect:()=>Ce(ze),children:[_e!==ze&&dt.jsx(rje,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),_e===ze&&dt.jsx(nje,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Vfe(ze)}),ze==="errors"&&t&&dt.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:"1"})]},ze)),dt.jsx(mF,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Asn.split(".").map((ze,Fe)=>Fe===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),de&&dt.jsx($8,{onClick:Ee,variant:"ghost",children:Pe?dt.jsx(JZt,{size:16}):dt.jsx(QZt,{size:16})})]}),o&&dt.jsx(h4,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:s})}),dt.jsx(h4,{value:"pcb",children:dt.jsx("div",{className:Gy("rf-overflow-hidden",Pe?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallbackRender:({error:ze})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?dt.jsx(wsn,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:Gy("rf-h-full rf-w-full",Pe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{Y&&ze.forEach(Fe=>Y(Fe))}}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"assembly",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:r?dt.jsx(gsn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"schematic",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallbackRender:({error:ze})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?dt.jsx(msn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>{Y==null||Y(ze)},debugGrid:ee}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"cad",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{FallbackComponent:UZt,children:r?dt.jsx(TUt,{soup:r,autoRotateDisabled:ie}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"bom",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallbackRender:({error:ze})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?dt.jsx(Esn,{circuitJson:r}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"circuit_json",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(iT,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:r?dt.jsx(bsn,{elements:r}):dt.jsx(k7,{onRunClicked:e})})})}),dt.jsx(h4,{value:"errors",children:dt.jsx("div",{className:Gy("rf-overflow-auto",Pe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r||t?dt.jsx(Zen,{code:n,errorMessage:t,autoroutingLog:A,onReportAutoroutingLog:O}):dt.jsx(k7,{onRunClicked:e})})}),c&&dt.jsx(h4,{value:"render_log",children:dt.jsx(Rsn,{renderLog:f})})]})})})};ufe.createRoot(document.getElementById("root")).render(dt.jsx(Nsn,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}))});
@@ -13422,11 +13422,11 @@ ${r.slice(0,2e3)}
13422
13422
  50% { opacity: 0.2; }
13423
13423
  100% { opacity: 0.6; }
13424
13424
  }
13425
- `,i.appendChild(D)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[n,t,e,r])},gpn=Ay("schematic-viewer"),_pn=()=>{Ay.enable("schematic-viewer*")},xpn=gpn,bpn=n=>{const[e,t]=it.useState(0),[r,i]=it.useState(0);return it.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}},Spn=xpn.extend("useComponentDragging"),wpn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:r,svgToScreenProjection:i,realToSvgProjection:a,enabled:o=!1})=>{const[s,l]=it.useState(null),c=Wu(a,i),u=it.useRef(null),f=it.useRef(null),d=it.useRef(new Map);it.useEffect(()=>{e.forEach(b=>{"edit_event_type"in b&&b.edit_event_type==="edit_schematic_component_location"&&!b.in_progress&&d.current.set(b.schematic_component_id,{...b.new_center})})},[e]);const v=it.useCallback(b=>{if(!o)return;const R=b.target.closest('[data-circuit-json-type="schematic_component"]');if(!R)return;const D=R.getAttribute("data-schematic-component-id");if(!D)return;r&&r();const k=n1(t).schematic_component.get(D);if(!k)return;u.current={x:b.clientX,y:b.clientY};let G;const q=d.current.get(D);if(q)G={...q};else{const Y=KWe({editEvents:e,schematic_component_id:D});G={x:k.center.x+Y.x,y:k.center.y+Y.y},d.current.set(D,{...G})}const Z={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:D,original_center:G,new_center:{...G},in_progress:!0,created_at:Date.now(),_element:R};f.current=Z,l(Z)},[r,o,t,e]),y=it.useCallback(b=>{if(!f.current||!u.current)return;const S={x:b.clientX-u.current.x,y:b.clientY-u.current.y},R={x:S.x/c.a,y:S.y/c.d},D={...f.current,new_center:{x:f.current.original_center.x+R.x,y:f.current.original_center.y+R.y}};f.current=D,l(D)},[c]),w=it.useCallback(()=>{if(!f.current)return;const b={...f.current,in_progress:!1};d.current.set(b.schematic_component_id,{...b.new_center}),Spn("handleMouseUp calling onEditEvent with new edit event",{newEditEvent:b}),n&&n(b),f.current=null,u.current=null,l(null)},[n]);return it.useEffect(()=>(window.addEventListener("mousemove",y),window.addEventListener("mouseup",w),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",w)}),[y,w]),{handleMouseDown:v,isDragging:!!f.current,activeEditEvent:s}},Epn=({onClick:n,active:e})=>Ye.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:1e3},children:Ye.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[Ye.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),Ye.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),Tpn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:r,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1,clickToInteractEnabled:l=!1,colorOverrides:c})=>{s&&_pn();const[u,f]=it.useState(i),[d,v]=it.useState(!l),y=it.useRef(null),[w,b]=it.useState([]),S=it.useRef(n),R=ge=>`${(ge==null?void 0:ge.length)||0}_${(ge==null?void 0:ge.editCount)||0}`;it.useEffect(()=>{const ge=R(n),Te=R(S.current);ge!==Te&&(b([]),S.current=n)},[n]);const{ref:D,cancelDrag:k,transform:G}=QWe({onSetTransform(ge){y.current&&(y.current.style.transform=Y6(ge))},enabled:d}),{containerWidth:q,containerHeight:Z}=bpn(D),Y=it.useMemo(()=>!q||!Z?"":Lde(n,{width:q,height:Z||720,grid:a?{cellSize:1,labelCells:!0}:void 0,colorOverrides:c}),[n,q,Z]),ee=it.useMemo(()=>{var Te;if(!Y)return r9();const ge=(Te=Y.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Te[1];try{return CV(ge)}catch(be){return console.error(be),r9()}},[Y]),X=ge=>{b(Te=>[...Te,ge]),r&&r(ge)},ue=it.useMemo(()=>[...t,...w],[t,w]),{handleMouseDown:pe,isDragging:de,activeEditEvent:we}=wpn({onEditEvent:X,cancelDrag:k,realToSvgProjection:ee,svgToScreenProjection:G,circuitJson:n,editEvents:ue,enabled:u&&d});vpn({svgDivRef:y,editEvents:ue,realToSvgProjection:ee,svgToScreenProjection:G,activeEditEvent:we}),ypn({svgDivRef:y,circuitJson:n,activeEditEvent:we,editEvents:ue});const he=it.useMemo(()=>Ye.jsx("div",{ref:y,style:{pointerEvents:l?d?"auto":"none":"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:Y}}),[Y,d,l]);return Ye.jsxs("div",{ref:D,style:{position:"relative",backgroundColor:"transparent",overflow:"hidden",cursor:de?"grabbing":l&&!d?"pointer":"grab",minHeight:"300px",...e},onMouseDown:ge=>{if(l&&!d){ge.preventDefault(),ge.stopPropagation();return}pe(ge)},onMouseDownCapture:ge=>{if(l&&!d){ge.preventDefault(),ge.stopPropagation();return}},children:[!d&&l&&Ye.jsx("div",{onClick:ge=>{ge.preventDefault(),ge.stopPropagation(),v(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all"},children:Ye.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})}),o&&Ye.jsx(Epn,{active:u,onClick:()=>f(!u)}),he]})},Mpn=n=>{const[e,t]=it.useState(0),[r,i]=it.useState(0);return it.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}};Ay("assembly-viewer");var Cpn=()=>{Ay.enable("assembly-viewer*")},Rpn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:r=!1})=>{r&&Cpn();const i=it.useRef(null),{ref:a}=QWe({onSetTransform(u){i.current&&(i.current.style.transform=Y6(u))}}),{containerWidth:o,containerHeight:s}=Mpn(a),l=it.useMemo(()=>!o||!s?"":$We(n,{width:o,height:s||720}),[n,o,s]);it.useMemo(()=>{var f;if(!l)return r9();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return CV(u)}catch(d){return console.error(d),r9()}},[l]);const c=it.useMemo(()=>Ye.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return Ye.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const JWe=["Always initialize your project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export","Use units like mm or mils consistently across your designs.","Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/elements/circuitjsonpreview) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Refer to the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to request features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],Apn=(()=>{let n=JWe[Math.floor(Math.random()*JWe.length)];return n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(e,t)=>`<a class="rf-text-blue-500 rf-underline" href="${e}" target="_blank">${e}</a>`),n=n.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),n})(),xw=({onRunClicked:n})=>Ye.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[Ye.jsx(fin,{className:"rf-size-14 rf-mb-4"}),Ye.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",Ye.jsx("span",{dangerouslySetInnerHTML:{__html:Apn}})]}),n&&Ye.jsxs(rb,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",Ye.jsx(g$e,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),wj=({text:n,onClick:e})=>Ye.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),Ej=n=>{var e;return Ye.jsxs("div",{className:"rf-leading-5",children:[Ye.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),Ye.jsx("div",{children:((e=n.field)==null?void 0:e.call(n))??Ye.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var r;(r=n.onTextChange)==null||r.call(n,t.target.value)}})})]})},Ppn=({open:n,children:e,title:t,onClose:r})=>n?Ye.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:r,children:Ye.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[Ye.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),Ye.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:r,children:"×"}),e]})}):null,Npn=({elements:n})=>{const[e,t]=it.useState({open:!1}),[r,i]=it.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(n.map(u=>u.type))],o=n.map(u=>{const f=u[`${u.type}_id`],d=Object.fromEntries(Object.entries(u).filter(([y])=>!(y===`${u.type}_id`||!y.endsWith("_id")))),v=Object.fromEntries(Object.entries(u).filter(([y])=>!y.endsWith("_id")));return{primary_id:f,other_ids:d,...v,_og_elm:u}}),s=o.map(u=>{let f="";const d=v=>{const y=Object.keys(v.other_ids).find(S=>S.startsWith("source_"));if(!y)return`.${v.name}`;const w=y.slice(0,-3),b=o.find(S=>S.type===w&&S.primary_id===v.other_ids[y]);return b?"name"in b?`${d(b)} > .${v.name}`:`#${b.primary_id} > .${v.name}`:`??? > .${v.name}`};return"name"in u&&(f=d(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>Ye.jsxs("div",{className:"rf-flex rf-items-center",children:[Ye.jsx(wj,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),Ye.jsx("span",{className:"rf-flex-grow"}),Ye.jsx(wj,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>Ye.jsx(Ej,{column:u,onTextChange:f=>i({id_search:f}),field:r.focused_id?()=>Ye.jsxs("div",{children:["Focus:"," ",Ye.jsx("span",{className:"rf-underline",children:r.focused_id}),Ye.jsx(wj,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>Ye.jsx(Ej,{column:u,field:()=>Ye.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[Ye.jsx("option",{value:"any",children:"any"},"any"),Ye.jsx("option",{value:"source",children:"source"},"source"),Ye.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),Ye.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>Ye.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>Ye.jsx(Ej,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>Ye.jsx(Ej,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>Ye.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,d])=>Ye.jsx(wj,{text:d,onClick:()=>i({focused_id:d})},d))})}],c=s.filter(u=>{var f,d;return r.name_search?(d=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:d.includes(r.name_search.toLowerCase()):!0}).filter(u=>{var f;return!r.component_type_filter||r.component_type_filter==="any"?!0:r.component_type_filter==="source"?u.type.startsWith("source_"):r.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):r.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(r.component_type_filter)}).filter(u=>r.selector_search?r.selector_search.split(" ").filter(d=>d.length>0).every(d=>{var v;return(v=u.selector_path)==null?void 0:v.includes(d)}):!0).filter(u=>{var f;return r.id_search?(f=u.primary_id)==null?void 0:f.includes(r.id_search):!0}).filter(u=>!!(!r.focused_id||u.primary_id===r.focused_id||Object.values(u.other_ids).includes(r.focused_id)));return Ye.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[Ye.jsx("div",{className:"rf-overflow-x-auto",children:Ye.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[Ye.jsx("thead",{children:Ye.jsx("tr",{children:l.map(u=>Ye.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),Ye.jsx("tbody",{children:c.map((u,f)=>Ye.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(d=>Ye.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:d.renderCell?d.renderCell(u):u[d.key]},d.key))},f))})]})}),Ye.jsx(Ppn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:Ye.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:Ye.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Dpn=(n,e)=>n==="jlcpcb"?Ye.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,Lpn=({circuitJson:n})=>{const e=n.filter(r=>r.type==="source_component"),t=new Set;for(const r of e)if(r.supplier_part_numbers)for(const i of Object.keys(r.supplier_part_numbers))t.add(i);return Ye.jsx("div",{className:"rf-overflow-x-auto",children:Ye.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[Ye.jsx("thead",{children:Ye.jsxs("tr",{className:"rf-border-b",children:[Ye.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(r=>Ye.jsx("th",{className:"rf-p-2 rf-capitalize",children:r},r))]})}),Ye.jsx("tbody",{children:e.map(r=>Ye.jsxs("tr",{className:"rf-border-b",children:[Ye.jsx("td",{className:"rf-p-2",children:r.name}),Array.from(t).map(i=>{var a,o;return Ye.jsx("td",{className:"rf-p-2",children:Dpn(i,((o=(a=r.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},r.source_component_id))})]})})},Opn=({containerClassName:n,...e})=>{const t=it.useRef(null),[r,i]=it.useState(620);return it.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ye.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ye.jsx(Yrn,{...e,height:r})})},zpn='*,: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-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-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/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-pb-0{padding-bottom:0}.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-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-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}.hover\\:rf-shadow-lg:hover{--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);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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}',Upn=()=>{it.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=zpn,document.head.appendChild(e)},[])},eZe=n=>`hsl(${s3.indexOf(n)*137.5%360}, 70%, 50%)`,kpn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ye.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ye.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:s3.map(t=>{const r=n[t]||0,i=r/e*100;return Ye.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:eZe(t)},children:Ye.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),Ye.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Ipn=({renderLog:n})=>{const[e,t]=it.useState("chronological");if(!n)return Ye.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>s3.indexOf(a[0])-s3.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Ye.jsxs("div",{className:"rf-bg-white",children:[Ye.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ye.jsx("div",{children:"Render Logs"}),Ye.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ye.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ye.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ye.jsx("option",{value:"chronological",children:"Phase Order"}),Ye.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ye.jsx(kpn,{phaseTimings:n.phaseTimings}),Ye.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ye.jsx("thead",{children:Ye.jsxs("tr",{children:[Ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ye.jsx("tbody",{children:r.map(([a,o])=>Ye.jsxs("tr",{children:[Ye.jsx("td",{className:"rf-p-2",children:s3.indexOf(a)}),Ye.jsx("td",{className:"rf-p-2",children:a}),Ye.jsx("td",{className:"rf-p-2",children:Ye.jsx("div",{className:"rf-w-8",children:Ye.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:eZe(a),width:`${o/i*100}%`}})})}),Ye.jsx("td",{className:"rf-p-2",children:Ye.jsxs("div",{className:"rf-flex w-full",children:[Ye.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ye.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Fpn="0.0.386",Bpn=["assembly","bom","circuit_json","errors","render_log"],jpn=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:d=!0,className:v,headerClassName:y,leftHeaderContent:w,readOnly:b,isStreaming:S,autoroutingLog:R,onReportAutoroutingLog:D,isRunningCode:k,hasCodeChangedSinceLastRun:G,onEditEvent:q,editEvents:Z,defaultActiveTab:Y,autoRotate3dViewerDisabled:ee,showSchematicDebugGrid:X=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:pe=!1})=>{var Oe;Upn();const[de,we]=it.useState(Y??"pcb"),[he,ge]=it.useState(pe),Te=it.useCallback(Ne=>{we(Ne),u==null||u(Ne)},[u]),be=()=>{ge(!he)};return it.useEffect(()=>{t&&Te("errors")},[t]),it.useEffect(()=>{(de==="code"||de==="errors")&&r&&!t&&Te(Y??"pcb")},[r]),Ye.jsx("div",{className:ih("flex flex-col relative rf-overflow-x-hidden",v),children:Ye.jsx("div",{className:ih("rf-md:sticky rf-md:top-2",he&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ye.jsxs(Nxe,{value:de,onValueChange:Te,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ye.jsxs("div",{className:ih("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",y),children:[w,w&&Ye.jsx("div",{className:"rf-flex-grow"}),!w&&k&&Ye.jsx(WT,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&Ye.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Ye.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Ye.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(Oe=f.lastRenderEvent)==null?void 0:Oe.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),Ye.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ye.jsx(WT,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ye.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Ye.jsxs(kq,{children:[o&&Ye.jsx(W8,{value:"code",children:"Code"}),Ye.jsxs(W8,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Ye.jsx("span",{className:ih("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",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ye.jsxs(W8,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Ye.jsx("span",{className:ih("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",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ye.jsxs(W8,{value:"cad",children:[r&&Ye.jsx("span",{className:ih("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(de)&&Ye.jsx(W8,{value:de,children:Pxe(de)}),Ye.jsxs(pfe,{children:[Ye.jsx(hfe,{asChild:!0,children:Ye.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ye.jsx(lin,{className:"rf-w-4 rf-h-4"}),t&&Ye.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"})]})}),Ye.jsxs(gB,{className:"rf-*:text-xs",children:[Bpn.map(Ne=>Ye.jsxs(w4,{onSelect:()=>Te(Ne),children:[de!==Ne&&Ye.jsx(y$e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),de===Ne&&Ye.jsx(bue,{className:"rf-w-3 rf-h-3"}),Ye.jsx("div",{className:"rf-pr-2",children:Pxe(Ne)}),Ne==="errors"&&t&&Ye.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:"1"})]},Ne)),Ye.jsx(w4,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ye.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Fpn.split(".").map((Ne,Ie)=>Ie===2?parseInt(Ne)+1:Ne).join(".")]})})]})]})]}),ue&&Ye.jsx(rb,{onClick:be,variant:"ghost",children:he?Ye.jsx(din,{size:16}):Ye.jsx(uin,{size:16})})]}),o&&Ye.jsx(q4,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ye.jsx("div",{className:"rf-h-full",children:s})}),Ye.jsx(q4,{value:"pcb",children:Ye.jsx("div",{className:ih("rf-overflow-hidden",he?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallbackRender:({error:Ne})=>Ye.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ye.jsxs("div",{className:"rf-p-4",children:[Ye.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ye.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Ye.jsx(Opn,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:ih("rf-h-full rf-w-full",he?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ne=>{q&&Ne.forEach(Ie=>q(Ie))}}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"assembly",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallback:Ye.jsx("div",{children:"Error loading Assembly"}),children:r?Ye.jsx(Rpn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"schematic",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallbackRender:({error:Ne})=>Ye.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ye.jsxs("div",{className:"rf-p-4",children:[Ye.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ye.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Ye.jsx(Tpn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ne=>{q==null||q(Ne)},debugGrid:X}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"cad",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{FallbackComponent:Xrn,children:r?Ye.jsx(kJt,{soup:r,autoRotateDisabled:ee}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"bom",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallbackRender:({error:Ne})=>Ye.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ye.jsxs("div",{className:"rf-p-4",children:[Ye.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ye.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Ye.jsx(Lpn,{circuitJson:r}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"circuit_json",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallback:Ye.jsx("div",{children:"Error loading JSON viewer"}),children:r?Ye.jsx(Npn,{elements:r}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"errors",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r||t?Ye.jsx(oln,{code:n,errorMessage:t,autoroutingLog:R,onReportAutoroutingLog:D}):Ye.jsx(xw,{onRunClicked:e})})}),c&&Ye.jsx(q4,{value:"render_log",children:Ye.jsx(Ipn,{renderLog:f})})]})})})};var Tj="Dialog",[tZe,nZe]=BS(Tj),[Hpn,E4]=tZe(Tj),rZe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=it.useRef(null),l=it.useRef(null),[c,u]=cE({prop:r,defaultProp:i??!1,onChange:a,caller:Tj});return Ye.jsx(Hpn,{scope:e,triggerRef:s,contentRef:l,contentId:jS(),titleId:jS(),descriptionId:jS(),open:c,onOpenChange:u,onOpenToggle:it.useCallback(()=>u(f=>!f),[u]),modal:o,children:t})};rZe.displayName=Tj;var iZe="DialogTrigger",aZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(iZe,t),a=nx(e,i.triggerRef);return Ye.jsx(w9.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Fde(i.open),...r,ref:a,onClick:Pp(n.onClick,i.onOpenToggle)})});aZe.displayName=iZe;var kde="DialogPortal",[Vpn,oZe]=tZe(kde,{forceMount:void 0}),sZe=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=E4(kde,e);return Ye.jsx(Vpn,{scope:e,forceMount:t,children:it.Children.map(r,o=>Ye.jsx($4,{present:t||a.open,children:Ye.jsx(Que,{asChild:!0,container:i,children:o})}))})};sZe.displayName=kde;var Mj="DialogOverlay",lZe=it.forwardRef((n,e)=>{const t=oZe(Mj,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=E4(Mj,n.__scopeDialog);return a.modal?Ye.jsx($4,{present:r||a.open,children:Ye.jsx(Gpn,{...i,ref:e})}):null});lZe.displayName=Mj;var $pn=lE("DialogOverlay.RemoveScroll"),Gpn=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(Mj,t);return Ye.jsx(rfe,{as:$pn,allowPinchZoom:!0,shards:[i.contentRef],children:Ye.jsx(w9.div,{"data-state":Fde(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),bw="DialogContent",cZe=it.forwardRef((n,e)=>{const t=oZe(bw,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=E4(bw,n.__scopeDialog);return Ye.jsx($4,{present:r||a.open,children:a.modal?Ye.jsx(qpn,{...i,ref:e}):Ye.jsx(Ypn,{...i,ref:e})})});cZe.displayName=bw;var qpn=it.forwardRef((n,e)=>{const t=E4(bw,n.__scopeDialog),r=it.useRef(null),i=nx(e,t.contentRef,r);return it.useEffect(()=>{const a=r.current;if(a)return SGe(a)},[]),Ye.jsx(uZe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pp(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Pp(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Pp(n.onFocusOutside,a=>a.preventDefault())})}),Ypn=it.forwardRef((n,e)=>{const t=E4(bw,n.__scopeDialog),r=it.useRef(!1),i=it.useRef(!1);return Ye.jsx(uZe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=n.onCloseAutoFocus)==null||o.call(n,a),a.defaultPrevented||(r.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),uZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=E4(bw,t),l=it.useRef(null),c=nx(e,l);return k$e(),Ye.jsxs(Ye.Fragment,{children:[Ye.jsx(Uue,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ye.jsx(Due,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Fde(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ye.jsxs(Ye.Fragment,{children:[Ye.jsx(Wpn,{titleId:s.titleId}),Ye.jsx(Qpn,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ide="DialogTitle",fZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(Ide,t);return Ye.jsx(w9.h2,{id:i.titleId,...r,ref:e})});fZe.displayName=Ide;var dZe="DialogDescription",pZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(dZe,t);return Ye.jsx(w9.p,{id:i.descriptionId,...r,ref:e})});pZe.displayName=dZe;var hZe="DialogClose",mZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(hZe,t);return Ye.jsx(w9.button,{type:"button",...r,ref:e,onClick:Pp(n.onClick,()=>i.onOpenChange(!1))})});mZe.displayName=hZe;function Fde(n){return n?"open":"closed"}var vZe="DialogTitleWarning",[Xpn,yZe]=d9t(vZe,{contentName:bw,titleName:Ide,docsSlug:"dialog"}),Wpn=({titleId:n})=>{const e=yZe(vZe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13425
+ `,i.appendChild(D)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[n,t,e,r])},gpn=Ay("schematic-viewer"),_pn=()=>{Ay.enable("schematic-viewer*")},xpn=gpn,bpn=n=>{const[e,t]=it.useState(0),[r,i]=it.useState(0);return it.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}},Spn=xpn.extend("useComponentDragging"),wpn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:r,svgToScreenProjection:i,realToSvgProjection:a,enabled:o=!1})=>{const[s,l]=it.useState(null),c=Wu(a,i),u=it.useRef(null),f=it.useRef(null),d=it.useRef(new Map);it.useEffect(()=>{e.forEach(b=>{"edit_event_type"in b&&b.edit_event_type==="edit_schematic_component_location"&&!b.in_progress&&d.current.set(b.schematic_component_id,{...b.new_center})})},[e]);const v=it.useCallback(b=>{if(!o)return;const R=b.target.closest('[data-circuit-json-type="schematic_component"]');if(!R)return;const D=R.getAttribute("data-schematic-component-id");if(!D)return;r&&r();const k=n1(t).schematic_component.get(D);if(!k)return;u.current={x:b.clientX,y:b.clientY};let G;const q=d.current.get(D);if(q)G={...q};else{const Y=KWe({editEvents:e,schematic_component_id:D});G={x:k.center.x+Y.x,y:k.center.y+Y.y},d.current.set(D,{...G})}const Z={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:D,original_center:G,new_center:{...G},in_progress:!0,created_at:Date.now(),_element:R};f.current=Z,l(Z)},[r,o,t,e]),y=it.useCallback(b=>{if(!f.current||!u.current)return;const S={x:b.clientX-u.current.x,y:b.clientY-u.current.y},R={x:S.x/c.a,y:S.y/c.d},D={...f.current,new_center:{x:f.current.original_center.x+R.x,y:f.current.original_center.y+R.y}};f.current=D,l(D)},[c]),w=it.useCallback(()=>{if(!f.current)return;const b={...f.current,in_progress:!1};d.current.set(b.schematic_component_id,{...b.new_center}),Spn("handleMouseUp calling onEditEvent with new edit event",{newEditEvent:b}),n&&n(b),f.current=null,u.current=null,l(null)},[n]);return it.useEffect(()=>(window.addEventListener("mousemove",y),window.addEventListener("mouseup",w),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",w)}),[y,w]),{handleMouseDown:v,isDragging:!!f.current,activeEditEvent:s}},Epn=({onClick:n,active:e})=>Ye.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:1e3},children:Ye.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[Ye.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),Ye.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),Tpn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:r,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1,clickToInteractEnabled:l=!1,colorOverrides:c})=>{s&&_pn();const[u,f]=it.useState(i),[d,v]=it.useState(!l),y=it.useRef(null),[w,b]=it.useState([]),S=it.useRef(n),R=ge=>`${(ge==null?void 0:ge.length)||0}_${(ge==null?void 0:ge.editCount)||0}`;it.useEffect(()=>{const ge=R(n),Te=R(S.current);ge!==Te&&(b([]),S.current=n)},[n]);const{ref:D,cancelDrag:k,transform:G}=QWe({onSetTransform(ge){y.current&&(y.current.style.transform=Y6(ge))},enabled:d}),{containerWidth:q,containerHeight:Z}=bpn(D),Y=it.useMemo(()=>!q||!Z?"":Lde(n,{width:q,height:Z||720,grid:a?{cellSize:1,labelCells:!0}:void 0,colorOverrides:c}),[n,q,Z]),ee=it.useMemo(()=>{var Te;if(!Y)return r9();const ge=(Te=Y.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Te[1];try{return CV(ge)}catch(be){return console.error(be),r9()}},[Y]),X=ge=>{b(Te=>[...Te,ge]),r&&r(ge)},ue=it.useMemo(()=>[...t,...w],[t,w]),{handleMouseDown:pe,isDragging:de,activeEditEvent:we}=wpn({onEditEvent:X,cancelDrag:k,realToSvgProjection:ee,svgToScreenProjection:G,circuitJson:n,editEvents:ue,enabled:u&&d});vpn({svgDivRef:y,editEvents:ue,realToSvgProjection:ee,svgToScreenProjection:G,activeEditEvent:we}),ypn({svgDivRef:y,circuitJson:n,activeEditEvent:we,editEvents:ue});const he=it.useMemo(()=>Ye.jsx("div",{ref:y,style:{pointerEvents:l?d?"auto":"none":"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:Y}}),[Y,d,l]);return Ye.jsxs("div",{ref:D,style:{position:"relative",backgroundColor:"transparent",overflow:"hidden",cursor:de?"grabbing":l&&!d?"pointer":"grab",minHeight:"300px",...e},onMouseDown:ge=>{if(l&&!d){ge.preventDefault(),ge.stopPropagation();return}pe(ge)},onMouseDownCapture:ge=>{if(l&&!d){ge.preventDefault(),ge.stopPropagation();return}},children:[!d&&l&&Ye.jsx("div",{onClick:ge=>{ge.preventDefault(),ge.stopPropagation(),v(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all"},children:Ye.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})}),o&&Ye.jsx(Epn,{active:u,onClick:()=>f(!u)}),he]})},Mpn=n=>{const[e,t]=it.useState(0),[r,i]=it.useState(0);return it.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}};Ay("assembly-viewer");var Cpn=()=>{Ay.enable("assembly-viewer*")},Rpn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:r=!1})=>{r&&Cpn();const i=it.useRef(null),{ref:a}=QWe({onSetTransform(u){i.current&&(i.current.style.transform=Y6(u))}}),{containerWidth:o,containerHeight:s}=Mpn(a),l=it.useMemo(()=>!o||!s?"":$We(n,{width:o,height:s||720}),[n,o,s]);it.useMemo(()=>{var f;if(!l)return r9();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return CV(u)}catch(d){return console.error(d),r9()}},[l]);const c=it.useMemo(()=>Ye.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return Ye.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const JWe=["Always initialize your project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export","Use units like mm or mils consistently across your designs.","Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/elements/circuitjsonpreview) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Refer to the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to request features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],Apn=(()=>{let n=JWe[Math.floor(Math.random()*JWe.length)];return n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(e,t)=>`<a class="rf-text-blue-500 rf-underline" href="${e}" target="_blank">${e}</a>`),n=n.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),n})(),xw=({onRunClicked:n})=>Ye.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[Ye.jsx(fin,{className:"rf-size-14 rf-mb-4"}),Ye.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",Ye.jsx("span",{dangerouslySetInnerHTML:{__html:Apn}})]}),n&&Ye.jsxs(rb,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",Ye.jsx(g$e,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),wj=({text:n,onClick:e})=>Ye.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),Ej=n=>{var e;return Ye.jsxs("div",{className:"rf-leading-5",children:[Ye.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),Ye.jsx("div",{children:((e=n.field)==null?void 0:e.call(n))??Ye.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var r;(r=n.onTextChange)==null||r.call(n,t.target.value)}})})]})},Ppn=({open:n,children:e,title:t,onClose:r})=>n?Ye.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:r,children:Ye.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[Ye.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),Ye.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:r,children:"×"}),e]})}):null,Npn=({elements:n})=>{const[e,t]=it.useState({open:!1}),[r,i]=it.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(n.map(u=>u.type))],o=n.map(u=>{const f=u[`${u.type}_id`],d=Object.fromEntries(Object.entries(u).filter(([y])=>!(y===`${u.type}_id`||!y.endsWith("_id")))),v=Object.fromEntries(Object.entries(u).filter(([y])=>!y.endsWith("_id")));return{primary_id:f,other_ids:d,...v,_og_elm:u}}),s=o.map(u=>{let f="";const d=v=>{const y=Object.keys(v.other_ids).find(S=>S.startsWith("source_"));if(!y)return`.${v.name}`;const w=y.slice(0,-3),b=o.find(S=>S.type===w&&S.primary_id===v.other_ids[y]);return b?"name"in b?`${d(b)} > .${v.name}`:`#${b.primary_id} > .${v.name}`:`??? > .${v.name}`};return"name"in u&&(f=d(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>Ye.jsxs("div",{className:"rf-flex rf-items-center",children:[Ye.jsx(wj,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),Ye.jsx("span",{className:"rf-flex-grow"}),Ye.jsx(wj,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>Ye.jsx(Ej,{column:u,onTextChange:f=>i({id_search:f}),field:r.focused_id?()=>Ye.jsxs("div",{children:["Focus:"," ",Ye.jsx("span",{className:"rf-underline",children:r.focused_id}),Ye.jsx(wj,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>Ye.jsx(Ej,{column:u,field:()=>Ye.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[Ye.jsx("option",{value:"any",children:"any"},"any"),Ye.jsx("option",{value:"source",children:"source"},"source"),Ye.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),Ye.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>Ye.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>Ye.jsx(Ej,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>Ye.jsx(Ej,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>Ye.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,d])=>Ye.jsx(wj,{text:d,onClick:()=>i({focused_id:d})},d))})}],c=s.filter(u=>{var f,d;return r.name_search?(d=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:d.includes(r.name_search.toLowerCase()):!0}).filter(u=>{var f;return!r.component_type_filter||r.component_type_filter==="any"?!0:r.component_type_filter==="source"?u.type.startsWith("source_"):r.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):r.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(r.component_type_filter)}).filter(u=>r.selector_search?r.selector_search.split(" ").filter(d=>d.length>0).every(d=>{var v;return(v=u.selector_path)==null?void 0:v.includes(d)}):!0).filter(u=>{var f;return r.id_search?(f=u.primary_id)==null?void 0:f.includes(r.id_search):!0}).filter(u=>!!(!r.focused_id||u.primary_id===r.focused_id||Object.values(u.other_ids).includes(r.focused_id)));return Ye.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[Ye.jsx("div",{className:"rf-overflow-x-auto",children:Ye.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[Ye.jsx("thead",{children:Ye.jsx("tr",{children:l.map(u=>Ye.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),Ye.jsx("tbody",{children:c.map((u,f)=>Ye.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(d=>Ye.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:d.renderCell?d.renderCell(u):u[d.key]},d.key))},f))})]})}),Ye.jsx(Ppn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:Ye.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:Ye.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Dpn=(n,e)=>n==="jlcpcb"?Ye.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,Lpn=({circuitJson:n})=>{const e=n.filter(r=>r.type==="source_component"),t=new Set;for(const r of e)if(r.supplier_part_numbers)for(const i of Object.keys(r.supplier_part_numbers))t.add(i);return Ye.jsx("div",{className:"rf-overflow-x-auto",children:Ye.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[Ye.jsx("thead",{children:Ye.jsxs("tr",{className:"rf-border-b",children:[Ye.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(r=>Ye.jsx("th",{className:"rf-p-2 rf-capitalize",children:r},r))]})}),Ye.jsx("tbody",{children:e.map(r=>Ye.jsxs("tr",{className:"rf-border-b",children:[Ye.jsx("td",{className:"rf-p-2",children:r.name}),Array.from(t).map(i=>{var a,o;return Ye.jsx("td",{className:"rf-p-2",children:Dpn(i,((o=(a=r.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},r.source_component_id))})]})})},Opn=({containerClassName:n,...e})=>{const t=it.useRef(null),[r,i]=it.useState(620);return it.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ye.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ye.jsx(Yrn,{...e,height:r})})},zpn='*,: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-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-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/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-pb-0{padding-bottom:0}.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-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-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}.hover\\:rf-shadow-lg:hover{--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);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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}',Upn=()=>{it.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=zpn,document.head.appendChild(e)},[])},eZe=n=>`hsl(${s3.indexOf(n)*137.5%360}, 70%, 50%)`,kpn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ye.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ye.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:s3.map(t=>{const r=n[t]||0,i=r/e*100;return Ye.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:eZe(t)},children:Ye.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),Ye.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Ipn=({renderLog:n})=>{const[e,t]=it.useState("chronological");if(!n)return Ye.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>s3.indexOf(a[0])-s3.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Ye.jsxs("div",{className:"rf-bg-white",children:[Ye.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ye.jsx("div",{children:"Render Logs"}),Ye.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ye.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ye.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ye.jsx("option",{value:"chronological",children:"Phase Order"}),Ye.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ye.jsx(kpn,{phaseTimings:n.phaseTimings}),Ye.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ye.jsx("thead",{children:Ye.jsxs("tr",{children:[Ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ye.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ye.jsx("tbody",{children:r.map(([a,o])=>Ye.jsxs("tr",{children:[Ye.jsx("td",{className:"rf-p-2",children:s3.indexOf(a)}),Ye.jsx("td",{className:"rf-p-2",children:a}),Ye.jsx("td",{className:"rf-p-2",children:Ye.jsx("div",{className:"rf-w-8",children:Ye.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:eZe(a),width:`${o/i*100}%`}})})}),Ye.jsx("td",{className:"rf-p-2",children:Ye.jsxs("div",{className:"rf-flex w-full",children:[Ye.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ye.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Fpn="0.0.387",Bpn=["assembly","bom","circuit_json","errors","render_log"],jpn=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:d=!0,className:v,headerClassName:y,leftHeaderContent:w,readOnly:b,isStreaming:S,autoroutingLog:R,onReportAutoroutingLog:D,isRunningCode:k,hasCodeChangedSinceLastRun:G,onEditEvent:q,editEvents:Z,defaultActiveTab:Y,autoRotate3dViewerDisabled:ee,showSchematicDebugGrid:X=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:pe=!1})=>{var Oe;Upn();const[de,we]=it.useState(Y??"pcb"),[he,ge]=it.useState(pe),Te=it.useCallback(Ne=>{we(Ne),u==null||u(Ne)},[u]),be=()=>{ge(!he)};return it.useEffect(()=>{t&&Te("errors")},[t]),it.useEffect(()=>{(de==="code"||de==="errors")&&r&&!t&&Te(Y??"pcb")},[r]),Ye.jsx("div",{className:ih("flex flex-col relative rf-overflow-x-hidden",v),children:Ye.jsx("div",{className:ih("rf-md:sticky rf-md:top-2",he&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ye.jsxs(Nxe,{value:de,onValueChange:Te,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ye.jsxs("div",{className:ih("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",y),children:[w,w&&Ye.jsx("div",{className:"rf-flex-grow"}),!w&&k&&Ye.jsx(WT,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&Ye.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Ye.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Ye.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(Oe=f.lastRenderEvent)==null?void 0:Oe.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),Ye.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ye.jsx(WT,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ye.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Ye.jsxs(kq,{children:[o&&Ye.jsx(W8,{value:"code",children:"Code"}),Ye.jsxs(W8,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Ye.jsx("span",{className:ih("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",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ye.jsxs(W8,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Ye.jsx("span",{className:ih("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",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ye.jsxs(W8,{value:"cad",children:[r&&Ye.jsx("span",{className:ih("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(de)&&Ye.jsx(W8,{value:de,children:Pxe(de)}),Ye.jsxs(pfe,{children:[Ye.jsx(hfe,{asChild:!0,children:Ye.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ye.jsx(lin,{className:"rf-w-4 rf-h-4"}),t&&Ye.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"})]})}),Ye.jsxs(gB,{className:"rf-*:text-xs",children:[Bpn.map(Ne=>Ye.jsxs(w4,{onSelect:()=>Te(Ne),children:[de!==Ne&&Ye.jsx(y$e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),de===Ne&&Ye.jsx(bue,{className:"rf-w-3 rf-h-3"}),Ye.jsx("div",{className:"rf-pr-2",children:Pxe(Ne)}),Ne==="errors"&&t&&Ye.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:"1"})]},Ne)),Ye.jsx(w4,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ye.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Fpn.split(".").map((Ne,Ie)=>Ie===2?parseInt(Ne)+1:Ne).join(".")]})})]})]})]}),ue&&Ye.jsx(rb,{onClick:be,variant:"ghost",children:he?Ye.jsx(din,{size:16}):Ye.jsx(uin,{size:16})})]}),o&&Ye.jsx(q4,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ye.jsx("div",{className:"rf-h-full",children:s})}),Ye.jsx(q4,{value:"pcb",children:Ye.jsx("div",{className:ih("rf-overflow-hidden",he?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallbackRender:({error:Ne})=>Ye.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ye.jsxs("div",{className:"rf-p-4",children:[Ye.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ye.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Ye.jsx(Opn,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:ih("rf-h-full rf-w-full",he?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ne=>{q&&Ne.forEach(Ie=>q(Ie))}}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"assembly",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallback:Ye.jsx("div",{children:"Error loading Assembly"}),children:r?Ye.jsx(Rpn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"schematic",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallbackRender:({error:Ne})=>Ye.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ye.jsxs("div",{className:"rf-p-4",children:[Ye.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ye.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Ye.jsx(Tpn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ne=>{q==null||q(Ne)},debugGrid:X}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"cad",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{FallbackComponent:Xrn,children:r?Ye.jsx(kJt,{soup:r,autoRotateDisabled:ee}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"bom",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallbackRender:({error:Ne})=>Ye.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ye.jsxs("div",{className:"rf-p-4",children:[Ye.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ye.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Ye.jsx(Lpn,{circuitJson:r}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"circuit_json",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ye.jsx(XT,{fallback:Ye.jsx("div",{children:"Error loading JSON viewer"}),children:r?Ye.jsx(Npn,{elements:r}):Ye.jsx(xw,{onRunClicked:e})})})}),Ye.jsx(q4,{value:"errors",children:Ye.jsx("div",{className:ih("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r||t?Ye.jsx(oln,{code:n,errorMessage:t,autoroutingLog:R,onReportAutoroutingLog:D}):Ye.jsx(xw,{onRunClicked:e})})}),c&&Ye.jsx(q4,{value:"render_log",children:Ye.jsx(Ipn,{renderLog:f})})]})})})};var Tj="Dialog",[tZe,nZe]=BS(Tj),[Hpn,E4]=tZe(Tj),rZe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=it.useRef(null),l=it.useRef(null),[c,u]=cE({prop:r,defaultProp:i??!1,onChange:a,caller:Tj});return Ye.jsx(Hpn,{scope:e,triggerRef:s,contentRef:l,contentId:jS(),titleId:jS(),descriptionId:jS(),open:c,onOpenChange:u,onOpenToggle:it.useCallback(()=>u(f=>!f),[u]),modal:o,children:t})};rZe.displayName=Tj;var iZe="DialogTrigger",aZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(iZe,t),a=nx(e,i.triggerRef);return Ye.jsx(w9.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Fde(i.open),...r,ref:a,onClick:Pp(n.onClick,i.onOpenToggle)})});aZe.displayName=iZe;var kde="DialogPortal",[Vpn,oZe]=tZe(kde,{forceMount:void 0}),sZe=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=E4(kde,e);return Ye.jsx(Vpn,{scope:e,forceMount:t,children:it.Children.map(r,o=>Ye.jsx($4,{present:t||a.open,children:Ye.jsx(Que,{asChild:!0,container:i,children:o})}))})};sZe.displayName=kde;var Mj="DialogOverlay",lZe=it.forwardRef((n,e)=>{const t=oZe(Mj,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=E4(Mj,n.__scopeDialog);return a.modal?Ye.jsx($4,{present:r||a.open,children:Ye.jsx(Gpn,{...i,ref:e})}):null});lZe.displayName=Mj;var $pn=lE("DialogOverlay.RemoveScroll"),Gpn=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(Mj,t);return Ye.jsx(rfe,{as:$pn,allowPinchZoom:!0,shards:[i.contentRef],children:Ye.jsx(w9.div,{"data-state":Fde(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),bw="DialogContent",cZe=it.forwardRef((n,e)=>{const t=oZe(bw,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=E4(bw,n.__scopeDialog);return Ye.jsx($4,{present:r||a.open,children:a.modal?Ye.jsx(qpn,{...i,ref:e}):Ye.jsx(Ypn,{...i,ref:e})})});cZe.displayName=bw;var qpn=it.forwardRef((n,e)=>{const t=E4(bw,n.__scopeDialog),r=it.useRef(null),i=nx(e,t.contentRef,r);return it.useEffect(()=>{const a=r.current;if(a)return SGe(a)},[]),Ye.jsx(uZe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pp(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Pp(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Pp(n.onFocusOutside,a=>a.preventDefault())})}),Ypn=it.forwardRef((n,e)=>{const t=E4(bw,n.__scopeDialog),r=it.useRef(!1),i=it.useRef(!1);return Ye.jsx(uZe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=n.onCloseAutoFocus)==null||o.call(n,a),a.defaultPrevented||(r.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),uZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=E4(bw,t),l=it.useRef(null),c=nx(e,l);return k$e(),Ye.jsxs(Ye.Fragment,{children:[Ye.jsx(Uue,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ye.jsx(Due,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Fde(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ye.jsxs(Ye.Fragment,{children:[Ye.jsx(Wpn,{titleId:s.titleId}),Ye.jsx(Qpn,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ide="DialogTitle",fZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(Ide,t);return Ye.jsx(w9.h2,{id:i.titleId,...r,ref:e})});fZe.displayName=Ide;var dZe="DialogDescription",pZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(dZe,t);return Ye.jsx(w9.p,{id:i.descriptionId,...r,ref:e})});pZe.displayName=dZe;var hZe="DialogClose",mZe=it.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=E4(hZe,t);return Ye.jsx(w9.button,{type:"button",...r,ref:e,onClick:Pp(n.onClick,()=>i.onOpenChange(!1))})});mZe.displayName=hZe;function Fde(n){return n?"open":"closed"}var vZe="DialogTitleWarning",[Xpn,yZe]=d9t(vZe,{contentName:bw,titleName:Ide,docsSlug:"dialog"}),Wpn=({titleId:n})=>{const e=yZe(vZe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13426
13426
 
13427
13427
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
13428
13428
 
13429
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return it.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},Zpn="DialogDescriptionWarning",Qpn=({contentRef:n,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yZe(Zpn).contentName}}.`;return it.useEffect(()=>{var a;const i=(a=n.current)==null?void 0:a.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,n,e]),null},gZe=rZe,Kpn=aZe,_Ze=sZe,Bde=lZe,jde=cZe,Hde=fZe,Vde=pZe,xZe=mZe;const Jpn=gZe,ehn=_Ze,bZe=it.forwardRef(({className:n,...e},t)=>Ye.jsx(Bde,{className:ih("rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0",n),...e,ref:t}));bZe.displayName=Bde.displayName;const SZe=it.forwardRef(({className:n,children:e,...t},r)=>Ye.jsxs(ehn,{children:[Ye.jsx(bZe,{}),Ye.jsx(jde,{ref:r,className:ih("rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950",n),...t,children:e})]}));SZe.displayName=jde.displayName;const thn=it.forwardRef(({className:n,...e},t)=>Ye.jsx(Hde,{ref:t,className:ih("rf-text-lg rf-font-semibold",n),...e}));thn.displayName=Hde.displayName;const nhn=it.forwardRef(({className:n,...e},t)=>Ye.jsx(Vde,{ref:t,className:ih("rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",n),...e}));nhn.displayName=Vde.displayName;function $de(n,e){return $de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},$de(n,e)}function oM(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,$de(n,e)}var sM=function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(r){var i=this,a=r||function(){};return this.listeners.push(a),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(o){return o!==a}),i.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n}(),Cj=typeof window>"u";function R5(){}function rhn(n,e){return typeof n=="function"?n(e):n}function Gde(n){return typeof n=="number"&&n>=0&&n!==1/0}function Rj(n){return Array.isArray(n)?n:[n]}function wZe(n,e){return Math.max(n+(e||0)-Date.now(),0)}function Aj(n,e,t){return jP(n)?typeof e=="function"?wh({},t,{queryKey:n,queryFn:e}):wh({},e,{queryKey:n}):n}function ihn(n,e,t){return jP(n)?wh({},e,{mutationKey:n}):typeof n=="function"?wh({},e,{mutationFn:n}):wh({},n)}function D6(n,e,t){return jP(n)?[wh({},e,{queryKey:n}),t]:[n||{},e]}function ahn(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function EZe(n,e){var t=n.active,r=n.exact,i=n.fetching,a=n.inactive,o=n.predicate,s=n.queryKey,l=n.stale;if(jP(s)){if(r){if(e.queryHash!==qde(s,e.options))return!1}else if(!Pj(e.queryKey,s))return!1}var c=ahn(t,a);if(c==="none")return!1;if(c!=="all"){var u=e.isActive();if(c==="active"&&!u||c==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof i=="boolean"&&e.isFetching()!==i||o&&!o(e))}function TZe(n,e){var t=n.exact,r=n.fetching,i=n.predicate,a=n.mutationKey;if(jP(a)){if(!e.options.mutationKey)return!1;if(t){if(Sw(e.options.mutationKey)!==Sw(a))return!1}else if(!Pj(e.options.mutationKey,a))return!1}return!(typeof r=="boolean"&&e.state.status==="loading"!==r||i&&!i(e))}function qde(n,e){var t=(e==null?void 0:e.queryKeyHashFn)||Sw;return t(n)}function Sw(n){var e=Rj(n);return ohn(e)}function ohn(n){return JSON.stringify(n,function(e,t){return Yde(t)?Object.keys(t).sort().reduce(function(r,i){return r[i]=t[i],r},{}):t})}function Pj(n,e){return MZe(Rj(n),Rj(e))}function MZe(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!MZe(n[t],e[t])}):!1}function Nj(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||Yde(n)&&Yde(e)){for(var r=t?n.length:Object.keys(n).length,i=t?e:Object.keys(e),a=i.length,o=t?[]:{},s=0,l=0;l<a;l++){var c=t?l:i[l];o[c]=Nj(n[c],e[c]),o[c]===n[c]&&s++}return r===a&&s===r?n:o}return e}function shn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function Yde(n){if(!CZe(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!CZe(t)||!t.hasOwnProperty("isPrototypeOf"))}function CZe(n){return Object.prototype.toString.call(n)==="[object Object]"}function jP(n){return typeof n=="string"||Array.isArray(n)}function lhn(n){return new Promise(function(e){setTimeout(e,n)})}function RZe(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function AZe(){if(typeof AbortController=="function")return new AbortController}var chn=function(n){oM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!Cj&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},r}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},t.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},t.setFocused=function(i){this.focused=i,i&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(i){i()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e}(sM),HP=new chn,uhn=function(n){oM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!Cj&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},r}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},t.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},t.setOnline=function(i){this.online=i,i&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(i){i()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e}(sM),Dj=new uhn;function fhn(n){return Math.min(1e3*Math.pow(2,n),3e4)}function Lj(n){return typeof(n==null?void 0:n.cancel)=="function"}var PZe=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function Oj(n){return n instanceof PZe}var NZe=function(e){var t=this,r=!1,i,a,o,s;this.abort=e.abort,this.cancel=function(d){return i==null?void 0:i(d)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return a==null?void 0:a()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(d,v){o=d,s=v});var l=function(v){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(v),a==null||a(),o(v))},c=function(v){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(v),a==null||a(),s(v))},u=function(){return new Promise(function(v){a=v,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){a=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},f=function d(){if(!t.isResolved){var v;try{v=e.fn()}catch(y){v=Promise.reject(y)}i=function(w){if(!t.isResolved&&(c(new PZe(w)),t.abort==null||t.abort(),Lj(v)))try{v.cancel()}catch{}},t.isTransportCancelable=Lj(v),Promise.resolve(v).then(l).catch(function(y){var w,b;if(!t.isResolved){var S=(w=e.retry)!=null?w:3,R=(b=e.retryDelay)!=null?b:fhn,D=typeof R=="function"?R(t.failureCount,y):R,k=S===!0||typeof S=="number"&&t.failureCount<S||typeof S=="function"&&S(t.failureCount,y);if(r||!k){c(y);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,y),lhn(D).then(function(){if(!HP.isFocused()||!Dj.isOnline())return u()}).then(function(){r?c(y):d()})}})}};f()},dhn=function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(r){var i;this.transactions++;try{i=r()}finally{this.transactions--,this.transactions||this.flush()}return i},e.schedule=function(r){var i=this;this.transactions?this.queue.push(r):RZe(function(){i.notifyFn(r)})},e.batchCalls=function(r){var i=this;return function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];i.schedule(function(){r.apply(void 0,o)})}},e.flush=function(){var r=this,i=this.queue;this.queue=[],i.length&&RZe(function(){r.batchNotifyFn(function(){i.forEach(function(a){r.notifyFn(a)})})})},e.setNotifyFunction=function(r){this.notifyFn=r},e.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},n}(),kg=new dhn,DZe=console;function zj(){return DZe}function phn(n){DZe=n}var hhn=function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(r){var i;this.options=wh({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:5*60*1e3)},e.setDefaultOptions=function(r){this.defaultOptions=r},e.scheduleGc=function(){var r=this;this.clearGcTimeout(),Gde(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(r,i){var a,o,s=this.state.data,l=rhn(r,s);return(a=(o=this.options).isDataEqual)!=null&&a.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=Nj(s,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt}),l},e.setState=function(r,i){this.dispatch({type:"setState",state:r,setStateOptions:i})},e.cancel=function(r){var i,a=this.promise;return(i=this.retryer)==null||i.cancel(r),a?a.then(R5).catch(R5):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},e.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!wZe(this.state.dataUpdatedAt,r)},e.onFocus=function(){var r,i=this.observers.find(function(a){return a.shouldFetchOnWindowFocus()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},e.onOnline=function(){var r,i=this.observers.find(function(a){return a.shouldFetchOnReconnect()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},e.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},e.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(i){return i!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(r,i){var a=this,o,s,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var u=this.observers.find(function(R){return R.options.queryFn});u&&this.setOptions(u.options)}var f=Rj(this.queryKey),d=AZe(),v={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(v,"signal",{enumerable:!0,get:function(){if(d)return a.abortSignalConsumed=!0,d.signal}});var y=function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(v)):Promise.reject("Missing queryFn")},w={fetchOptions:i,options:this.options,queryKey:f,state:this.state,fetchFn:y,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var b;(b=this.options.behavior)==null||b.onFetch(w)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=w.fetchOptions)==null?void 0:s.meta)){var S;this.dispatch({type:"fetch",meta:(S=w.fetchOptions)==null?void 0:S.meta})}return this.retryer=new NZe({fn:w.fetchFn,abort:d==null||(l=d.abort)==null?void 0:l.bind(d),onSuccess:function(D){a.setData(D),a.cache.config.onSuccess==null||a.cache.config.onSuccess(D,a),a.cacheTime===0&&a.optionalRemove()},onError:function(D){Oj(D)&&D.silent||a.dispatch({type:"error",error:D}),Oj(D)||(a.cache.config.onError==null||a.cache.config.onError(D,a),zj().error(D)),a.cacheTime===0&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:w.options.retry,retryDelay:w.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(r){var i=this;this.state=this.reducer(this.state,r),kg.batch(function(){i.observers.forEach(function(a){a.onQueryUpdate(r)}),i.cache.notify({query:i,type:"queryUpdated",action:r})})},e.getDefaultState=function(r){var i=typeof r.initialData=="function"?r.initialData():r.initialData,a=typeof r.initialData<"u",o=a?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,s=typeof i<"u";return{data:i,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:s?"success":"idle"}},e.reducer=function(r,i){var a,o;switch(i.type){case"failed":return wh({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return wh({},r,{isPaused:!0});case"continue":return wh({},r,{isPaused:!1});case"fetch":return wh({},r,{fetchFailureCount:0,fetchMeta:(a=i.meta)!=null?a:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return wh({},r,{data:i.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=i.dataUpdatedAt)!=null?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=i.error;return Oj(s)&&s.revert&&this.revertState?wh({},this.revertState):wh({},r,{error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return wh({},r,{isInvalidated:!0});case"setState":return wh({},r,i.state);default:return r}},n}(),mhn=function(n){oM(e,n);function e(r){var i;return i=n.call(this)||this,i.config=r||{},i.queries=[],i.queriesMap={},i}var t=e.prototype;return t.build=function(i,a,o){var s,l=a.queryKey,c=(s=a.queryHash)!=null?s:qde(l,a),u=this.get(c);return u||(u=new hhn({cache:this,queryKey:l,queryHash:c,options:i.defaultQueryOptions(a),state:o,defaultOptions:i.getQueryDefaults(l),meta:a.meta}),this.add(u)),u},t.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},t.remove=function(i){var a=this.queriesMap[i.queryHash];a&&(i.destroy(),this.queries=this.queries.filter(function(o){return o!==i}),a===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},t.clear=function(){var i=this;kg.batch(function(){i.queries.forEach(function(a){i.remove(a)})})},t.get=function(i){return this.queriesMap[i]},t.getAll=function(){return this.queries},t.find=function(i,a){var o=D6(i,a),s=o[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(l){return EZe(s,l)})},t.findAll=function(i,a){var o=D6(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return EZe(s,l)}):this.queries},t.notify=function(i){var a=this;kg.batch(function(){a.listeners.forEach(function(o){o(i)})})},t.onFocus=function(){var i=this;kg.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},t.onOnline=function(){var i=this;kg.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},e}(sM),vhn=function(){function n(t){this.options=wh({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||LZe(),this.meta=t.meta}var e=n.prototype;return e.setState=function(r){this.dispatch({type:"setState",state:r})},e.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},e.removeObserver=function(r){this.observers=this.observers.filter(function(i){return i!==r})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(R5).catch(R5)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var r=this,i,a=this.state.status==="loading",o=Promise.resolve();return a||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(s){s!==r.state.context&&r.dispatch({type:"loading",context:s,variables:r.state.variables})})),o.then(function(){return r.executeMutation()}).then(function(s){i=s,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(i,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(i,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(i,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:i}),i}).catch(function(s){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(s,r.state.variables,r.state.context,r),zj().error(s),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(s,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,s,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var r=this,i;return this.retryer=new NZe({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(r){var i=this;this.state=yhn(this.state,r),kg.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(r)}),i.mutationCache.notify(i)})},n}();function LZe(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function yhn(n,e){switch(e.type){case"failed":return wh({},n,{failureCount:n.failureCount+1});case"pause":return wh({},n,{isPaused:!0});case"continue":return wh({},n,{isPaused:!1});case"loading":return wh({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return wh({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return wh({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return wh({},n,e.state);default:return n}}var ghn=function(n){oM(e,n);function e(r){var i;return i=n.call(this)||this,i.config=r||{},i.mutations=[],i.mutationId=0,i}var t=e.prototype;return t.build=function(i,a,o){var s=new vhn({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(a),state:o,defaultOptions:a.mutationKey?i.getMutationDefaults(a.mutationKey):void 0,meta:a.meta});return this.add(s),s},t.add=function(i){this.mutations.push(i),this.notify(i)},t.remove=function(i){this.mutations=this.mutations.filter(function(a){return a!==i}),i.cancel(),this.notify(i)},t.clear=function(){var i=this;kg.batch(function(){i.mutations.forEach(function(a){i.remove(a)})})},t.getAll=function(){return this.mutations},t.find=function(i){return typeof i.exact>"u"&&(i.exact=!0),this.mutations.find(function(a){return TZe(i,a)})},t.findAll=function(i){return this.mutations.filter(function(a){return TZe(i,a)})},t.notify=function(i){var a=this;kg.batch(function(){a.listeners.forEach(function(o){o(i)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var i=this.mutations.filter(function(a){return a.state.isPaused});return kg.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(R5)})},Promise.resolve())})},e}(sM);function _hn(){return{onFetch:function(e){e.fetchFn=function(){var t,r,i,a,o,s,l=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,c=(i=e.fetchOptions)==null||(a=i.meta)==null?void 0:a.fetchMore,u=c==null?void 0:c.pageParam,f=(c==null?void 0:c.direction)==="forward",d=(c==null?void 0:c.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],y=((s=e.state.data)==null?void 0:s.pageParams)||[],w=AZe(),b=w==null?void 0:w.signal,S=y,R=!1,D=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},k=function(we,he,ge,Te){return S=Te?[he].concat(S):[].concat(S,[he]),Te?[ge].concat(we):[].concat(we,[ge])},G=function(we,he,ge,Te){if(R)return Promise.reject("Cancelled");if(typeof ge>"u"&&!he&&we.length)return Promise.resolve(we);var be={queryKey:e.queryKey,signal:b,pageParam:ge,meta:e.meta},Oe=D(be),Ne=Promise.resolve(Oe).then(function(Ae){return k(we,ge,Ae,Te)});if(Lj(Oe)){var Ie=Ne;Ie.cancel=Oe.cancel}return Ne},q;if(!v.length)q=G([]);else if(f){var Z=typeof u<"u",Y=Z?u:OZe(e.options,v);q=G(v,Z,Y)}else if(d){var ee=typeof u<"u",X=ee?u:xhn(e.options,v);q=G(v,ee,X,!0)}else(function(){S=[];var de=typeof e.options.getNextPageParam>"u",we=l&&v[0]?l(v[0],0,v):!0;q=we?G([],de,y[0]):Promise.resolve(k([],y[0],v[0]));for(var he=function(be){q=q.then(function(Oe){var Ne=l&&v[be]?l(v[be],be,v):!0;if(Ne){var Ie=de?y[be]:OZe(e.options,Oe);return G(Oe,de,Ie)}return Promise.resolve(k(Oe,y[be],v[be]))})},ge=1;ge<v.length;ge++)he(ge)})();var ue=q.then(function(de){return{pages:de,pageParams:S}}),pe=ue;return pe.cancel=function(){R=!0,w==null||w.abort(),Lj(q)&&q.cancel()},ue}}}}function OZe(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function xhn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var bhn=function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new mhn,this.mutationCache=t.mutationCache||new ghn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var r=this;this.unsubscribeFocus=HP.subscribe(function(){HP.isFocused()&&Dj.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=Dj.subscribe(function(){HP.isFocused()&&Dj.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},e.unmount=function(){var r,i;(r=this.unsubscribeFocus)==null||r.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},e.isFetching=function(r,i){var a=D6(r,i),o=a[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(r){return this.mutationCache.findAll(wh({},r,{fetching:!0})).length},e.getQueryData=function(r,i){var a;return(a=this.queryCache.find(r,i))==null?void 0:a.state.data},e.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(i){var a=i.queryKey,o=i.state,s=o.data;return[a,s]})},e.setQueryData=function(r,i,a){var o=Aj(r),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(i,a)},e.setQueriesData=function(r,i,a){var o=this;return kg.batch(function(){return o.getQueryCache().findAll(r).map(function(s){var l=s.queryKey;return[l,o.setQueryData(l,i,a)]})})},e.getQueryState=function(r,i){var a;return(a=this.queryCache.find(r,i))==null?void 0:a.state},e.removeQueries=function(r,i){var a=D6(r,i),o=a[0],s=this.queryCache;kg.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(r,i,a){var o=this,s=D6(r,i,a),l=s[0],c=s[1],u=this.queryCache,f=wh({},l,{active:!0});return kg.batch(function(){return u.findAll(l).forEach(function(d){d.reset()}),o.refetchQueries(f,c)})},e.cancelQueries=function(r,i,a){var o=this,s=D6(r,i,a),l=s[0],c=s[1],u=c===void 0?{}:c;typeof u.revert>"u"&&(u.revert=!0);var f=kg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.cancel(u)})});return Promise.all(f).then(R5).catch(R5)},e.invalidateQueries=function(r,i,a){var o,s,l,c=this,u=D6(r,i,a),f=u[0],d=u[1],v=wh({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return kg.batch(function(){return c.queryCache.findAll(f).forEach(function(y){y.invalidate()}),c.refetchQueries(v,d)})},e.refetchQueries=function(r,i,a){var o=this,s=D6(r,i,a),l=s[0],c=s[1],u=kg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.fetch(void 0,wh({},c,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(u).then(R5);return c!=null&&c.throwOnError||(f=f.catch(R5)),f},e.fetchQuery=function(r,i,a){var o=Aj(r,i,a),s=this.defaultQueryOptions(o);typeof s.retry>"u"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},e.prefetchQuery=function(r,i,a){return this.fetchQuery(r,i,a).then(R5).catch(R5)},e.fetchInfiniteQuery=function(r,i,a){var o=Aj(r,i,a);return o.behavior=_hn(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(r,i,a){return this.fetchInfiniteQuery(r,i,a).then(R5).catch(R5)},e.cancelMutations=function(){var r=this,i=kg.batch(function(){return r.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(R5).catch(R5)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(r){this.defaultOptions=r},e.setQueryDefaults=function(r,i){var a=this.queryDefaults.find(function(o){return Sw(r)===Sw(o.queryKey)});a?a.defaultOptions=i:this.queryDefaults.push({queryKey:r,defaultOptions:i})},e.getQueryDefaults=function(r){var i;return r?(i=this.queryDefaults.find(function(a){return Pj(r,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(r,i){var a=this.mutationDefaults.find(function(o){return Sw(r)===Sw(o.mutationKey)});a?a.defaultOptions=i:this.mutationDefaults.push({mutationKey:r,defaultOptions:i})},e.getMutationDefaults=function(r){var i;return r?(i=this.mutationDefaults.find(function(a){return Pj(r,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=wh({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=qde(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},e.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:wh({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),Shn=function(n){oM(e,n);function e(r,i){var a;return a=n.call(this)||this,a.client=r,a.options=i,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(i),a}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),zZe(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return Xde(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return Xde(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(i,a){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var l=this.hasListeners();l&&UZe(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(a),l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var c=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)},t.getOptimisticResult=function(i){var a=this.client.defaultQueryObserverOptions(i),o=this.client.getQueryCache().build(this.client,a);return this.createResult(o,a)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(i,a){var o=this,s={},l=function(u){o.trackedProps.includes(u)||o.trackedProps.push(u)};return Object.keys(i).forEach(function(c){Object.defineProperty(s,c,{configurable:!1,enumerable:!0,get:function(){return l(c),i[c]}})}),(a.useErrorBoundary||a.suspense)&&l("error"),s},t.getNextResult=function(i){var a=this;return new Promise(function(o,s){var l=a.subscribe(function(c){c.isFetching||(l(),c.isError&&(i!=null&&i.throwOnError)?s(c.error):o(c))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(i){return this.fetch(wh({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},t.fetchOptimistic=function(i){var a=this,o=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return a.createResult(s,o)})},t.fetch=function(i){var a=this;return this.executeFetch(i).then(function(){return a.updateResult(),a.currentResult})},t.executeFetch=function(i){this.updateQuery();var a=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(R5)),a},t.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Cj||this.currentResult.isStale||!Gde(this.options.staleTime))){var a=wZe(this.currentResult.dataUpdatedAt,this.options.staleTime),o=a+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},o)}},t.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},t.updateRefetchInterval=function(i){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Cj||this.options.enabled===!1||!Gde(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||HP.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(i,a){var o=this.currentQuery,s=this.options,l=this.currentResult,c=this.currentResultState,u=this.currentResultOptions,f=i!==o,d=f?i.state:this.currentQueryInitialState,v=f?this.currentResult:this.previousQueryResult,y=i.state,w=y.dataUpdatedAt,b=y.error,S=y.errorUpdatedAt,R=y.isFetching,D=y.status,k=!1,G=!1,q;if(a.optimisticResults){var Z=this.hasListeners(),Y=!Z&&zZe(i,a),ee=Z&&UZe(i,o,a,s);(Y||ee)&&(R=!0,w||(D="loading"))}if(a.keepPreviousData&&!y.dataUpdateCount&&(v!=null&&v.isSuccess)&&D!=="error")q=v.data,w=v.dataUpdatedAt,D=v.status,k=!0;else if(a.select&&typeof y.data<"u")if(l&&y.data===(c==null?void 0:c.data)&&a.select===this.selectFn)q=this.selectResult;else try{this.selectFn=a.select,q=a.select(y.data),a.structuralSharing!==!1&&(q=Nj(l==null?void 0:l.data,q)),this.selectResult=q,this.selectError=null}catch(pe){zj().error(pe),this.selectError=pe}else q=y.data;if(typeof a.placeholderData<"u"&&typeof q>"u"&&(D==="loading"||D==="idle")){var X;if(l!=null&&l.isPlaceholderData&&a.placeholderData===(u==null?void 0:u.placeholderData))X=l.data;else if(X=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof X<"u")try{X=a.select(X),a.structuralSharing!==!1&&(X=Nj(l==null?void 0:l.data,X)),this.selectError=null}catch(pe){zj().error(pe),this.selectError=pe}typeof X<"u"&&(D="success",q=X,G=!0)}this.selectError&&(b=this.selectError,q=this.selectResult,S=Date.now(),D="error");var ue={status:D,isLoading:D==="loading",isSuccess:D==="success",isError:D==="error",isIdle:D==="idle",data:q,dataUpdatedAt:w,error:b,errorUpdatedAt:S,failureCount:y.fetchFailureCount,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>d.dataUpdateCount||y.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&D!=="loading",isLoadingError:D==="error"&&y.dataUpdatedAt===0,isPlaceholderData:G,isPreviousData:k,isRefetchError:D==="error"&&y.dataUpdatedAt!==0,isStale:Wde(i,a),refetch:this.refetch,remove:this.remove};return ue},t.shouldNotifyListeners=function(i,a){if(!a)return!0;var o=this.options,s=o.notifyOnChangeProps,l=o.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var c=s==="tracked"?this.trackedProps:s;return Object.keys(i).some(function(u){var f=u,d=i[f]!==a[f],v=c==null?void 0:c.some(function(w){return w===u}),y=l==null?void 0:l.some(function(w){return w===u});return d&&!y&&(!c||v)})},t.updateResult=function(i){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!shn(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(wh({},o,i))}},t.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var a=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))}},t.onQueryUpdate=function(i){var a={};i.type==="success"?a.onSuccess=!0:i.type==="error"&&!Oj(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},t.notify=function(i){var a=this;kg.batch(function(){i.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):i.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)}),i.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},e}(sM);function whn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function zZe(n,e){return whn(n,e)||n.state.dataUpdatedAt>0&&Xde(n,e,e.refetchOnMount)}function Xde(n,e,t){if(e.enabled!==!1){var r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&Wde(n,e)}return!1}function UZe(n,e,t,r){return t.enabled!==!1&&(n!==e||r.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&Wde(n,t)}function Wde(n,e){return n.isStaleByTime(e.staleTime)}var Ehn=function(n){oM(e,n);function e(r,i){var a;return a=n.call(this)||this,a.client=r,a.setOptions(i),a.bindMethods(),a.updateResult(),a}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},t.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},t.onMutationUpdate=function(i){this.updateResult();var a={listeners:!0};i.type==="success"?a.onSuccess=!0:i.type==="error"&&(a.onError=!0),this.notify(a)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(i,a){return this.mutateOptions=a,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,wh({},this.options,{variables:typeof i<"u"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:LZe(),a=wh({},i,{isLoading:i.status==="loading",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=a},t.notify=function(i){var a=this;kg.batch(function(){a.mutateOptions&&(i.onSuccess?(a.mutateOptions.onSuccess==null||a.mutateOptions.onSuccess(a.currentResult.data,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(a.currentResult.data,null,a.currentResult.variables,a.currentResult.context)):i.onError&&(a.mutateOptions.onError==null||a.mutateOptions.onError(a.currentResult.error,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(void 0,a.currentResult.error,a.currentResult.variables,a.currentResult.context))),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)})})},e}(sM),Thn=exe.unstable_batchedUpdates;kg.setBatchNotifyFunction(Thn);var Mhn=console;phn(Mhn);var kZe=gu.createContext(void 0),IZe=gu.createContext(!1);function FZe(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=kZe),window.ReactQueryClientContext):kZe}var BZe=function(){var e=gu.useContext(FZe(gu.useContext(IZe)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Chn=function(e){var t=e.client,r=e.contextSharing,i=r===void 0?!1:r,a=e.children;gu.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=FZe(i);return gu.createElement(IZe.Provider,{value:i},gu.createElement(o.Provider,{value:t},a))};function Rhn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var Ahn=gu.createContext(Rhn()),Phn=function(){return gu.useContext(Ahn)};function jZe(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function Nhn(n,e,t){var r=gu.useRef(!1),i=gu.useState(0),a=i[1],o=ihn(n,e),s=BZe(),l=gu.useRef();l.current?l.current.setOptions(o):l.current=new Ehn(s,o);var c=l.current.getCurrentResult();gu.useEffect(function(){r.current=!0;var f=l.current.subscribe(kg.batchCalls(function(){r.current&&a(function(d){return d+1})}));return function(){r.current=!1,f()}},[]);var u=gu.useCallback(function(f,d){l.current.mutate(f,d).catch(R5)},[]);if(c.error&&jZe(void 0,l.current.options.useErrorBoundary,[c.error]))throw c.error;return wh({},c,{mutate:u,mutateAsync:c.mutate})}function Dhn(n,e){var t=gu.useRef(!1),r=gu.useState(0),i=r[1],a=BZe(),o=Phn(),s=a.defaultQueryObserverOptions(n);s.optimisticResults=!0,s.onError&&(s.onError=kg.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=kg.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=kg.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=gu.useState(function(){return new e(a,s)}),c=l[0],u=c.getOptimisticResult(s);if(gu.useEffect(function(){t.current=!0,o.clearReset();var f=c.subscribe(kg.batchCalls(function(){t.current&&i(function(d){return d+1})}));return c.updateResult(),function(){t.current=!1,f()}},[o,c]),gu.useEffect(function(){c.setOptions(s,{listeners:!1})},[s,c]),s.suspense&&u.isLoading)throw c.fetchOptimistic(s).then(function(f){var d=f.data;s.onSuccess==null||s.onSuccess(d),s.onSettled==null||s.onSettled(d,null)}).catch(function(f){o.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(u.isError&&!o.isReset()&&!u.isFetching&&jZe(s.suspense,s.useErrorBoundary,[u.error,c.getCurrentQuery()]))throw u.error;return s.notifyOnChangeProps==="tracked"&&(u=c.trackResult(u,s)),u}function Lhn(n,e,t){var r=Aj(n,e,t);return Dhn(r,Shn)}function Ohn({vendor:n,isActive:e,onSelect:t,selectedShippingIdx:r,onSelectShipping:i}){return Ye.jsxs("div",{className:ih("rf-rounded-xl rf-border rf-transition-all rf-cursor-pointer rf-mb-6 rf-bg-white rf-shadow-sm hover:rf-shadow-lg",e?"rf-ring-2 rf-ring-primary rf-border-primary":"rf-border-gray-200"),onClick:t,children:[Ye.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-py-4",children:[Ye.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ye.jsx(pin,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),Ye.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name})]}),Ye.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[Ye.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"PCB + Components"}),Ye.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ye.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base rf-mr-2",children:["$",n.total_cost.toFixed(2)]}),Ye.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),e&&Ye.jsxs(Ye.Fragment,{children:[Ye.jsx("hr",{className:"rf-border-gray-200"}),Ye.jsxs("div",{className:"rf-px-6 rf-py-2",children:[Ye.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-medium rf-text-gray-700",children:"Shipping Options:"}),Ye.jsx("div",{className:"rf-flex rf-gap-4 rf-flex-wrap rf-mb-2",children:n.shipping_options.map((a,o)=>Ye.jsxs("button",{type:"button",className:ih("rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-rounded-lg rf-border rf-shadow rf-min-w-[148px] rf-transition-colors",r===o?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:s=>{s.stopPropagation(),i(o)},children:[Ye.jsx(vin,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),Ye.jsxs("div",{className:"rf-text-left rf-flex-1",children:[Ye.jsx("div",{className:"rf-leading-tight rf-font-medium",children:a.carrier}),Ye.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:a.service})]})]},a.carrier+o))})]})]}),e&&r!==null&&Ye.jsx("div",{className:"rf-px-6 rf-pb-3",children:Ye.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-2",children:[Ye.jsx("span",{className:"rf-text-gray-800 rf-font-medium",children:"Total (incl. shipping):"}),Ye.jsxs("span",{className:"rf-font-bold rf-text-lg rf-text-blue-700",children:["$",n.total_cost.toFixed(2)]})]})})]})}let zhn={data:""},Uhn=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||zhn,khn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ihn=/\/\*[^]*?\*\/| +/g,HZe=/\n+/g,L6=(n,e)=>{let t="",r="",i="";for(let a in n){let o=n[a];a[0]=="@"?a[1]=="i"?t=a+" "+o+";":r+=a[1]=="f"?L6(o,a):a+"{"+L6(o,a[1]=="k"?"":e)+"}":typeof o=="object"?r+=L6(o,e?e.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=L6.p?L6.p(a,o):a+":"+o+";")}return t+(e&&i?e+"{"+i+"}":i)+r},S8={},VZe=n=>{if(typeof n=="object"){let e="";for(let t in n)e+=t+VZe(n[t]);return e}return n},Fhn=(n,e,t,r,i)=>{let a=VZe(n),o=S8[a]||(S8[a]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(a));if(!S8[o]){let l=a!==n?n:(c=>{let u,f,d=[{}];for(;u=khn.exec(c.replace(Ihn,""));)u[4]?d.shift():u[3]?(f=u[3].replace(HZe," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(HZe," ").trim();return d[0]})(n);S8[o]=L6(i?{["@keyframes "+o]:l}:l,t?"":"."+o)}let s=t&&S8.g?S8.g:null;return t&&(S8.g=S8[o]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(S8[o],e,r,s),o},Bhn=(n,e,t)=>n.reduce((r,i,a)=>{let o=e[a];if(o&&o.call){let s=o(t),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":L6(s,""):s===!1?"":s}return r+i+(o??"")},"");function Uj(n){let e=this||{},t=n.call?n(e.p):n;return Fhn(t.unshift?t.raw?Bhn(t,[].slice.call(arguments,1),e.p):t.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):t,Uhn(e.target),e.g,e.o,e.k)}let $Ze,Zde,Qde;Uj.bind({g:1});let w8=Uj.bind({k:1});function jhn(n,e,t,r){L6.p=e,$Ze=n,Zde=t,Qde=r}function O6(n,e){let t=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;t.p=Object.assign({theme:Zde&&Zde()},s),t.o=/ *go\d+/.test(l),s.className=Uj.apply(t,r)+(l?" "+l:"");let c=n;return n[0]&&(c=s.as||n,delete s.as),Qde&&c[0]&&Qde(s),$Ze(c,s)}return i}}var Hhn=n=>typeof n=="function",kj=(n,e)=>Hhn(n)?n(e):n,Vhn=(()=>{let n=0;return()=>(++n).toString()})(),GZe=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");n=!e||e.matches}return n}})(),$hn=20,qZe=(n,e)=>{switch(e.type){case 0:return{...n,toasts:[e.toast,...n.toasts].slice(0,$hn)};case 1:return{...n,toasts:n.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:t}=e;return qZe(n,{type:n.toasts.find(a=>a.id===t.id)?1:0,toast:t});case 3:let{toastId:r}=e;return{...n,toasts:n.toasts.map(a=>a.id===r||r===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...n,pausedAt:e.time};case 6:let i=e.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Ij=[],ww={toasts:[],pausedAt:void 0},Ew=n=>{ww=qZe(ww,n),Ij.forEach(e=>{e(ww)})},Ghn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},qhn=(n={})=>{let[e,t]=it.useState(ww),r=it.useRef(ww);it.useEffect(()=>(r.current!==ww&&t(ww),Ij.push(t),()=>{let a=Ij.indexOf(t);a>-1&&Ij.splice(a,1)}),[]);let i=e.toasts.map(a=>{var o,s,l;return{...n,...n[a.type],...a,removeDelay:a.removeDelay||((o=n[a.type])==null?void 0:o.removeDelay)||(n==null?void 0:n.removeDelay),duration:a.duration||((s=n[a.type])==null?void 0:s.duration)||(n==null?void 0:n.duration)||Ghn[a.type],style:{...n.style,...(l=n[a.type])==null?void 0:l.style,...a.style}}});return{...e,toasts:i}},Yhn=(n,e="blank",t)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...t,id:(t==null?void 0:t.id)||Vhn()}),VP=n=>(e,t)=>{let r=Yhn(e,n,t);return Ew({type:2,toast:r}),r.id},A5=(n,e)=>VP("blank")(n,e);A5.error=VP("error"),A5.success=VP("success"),A5.loading=VP("loading"),A5.custom=VP("custom"),A5.dismiss=n=>{Ew({type:3,toastId:n})},A5.remove=n=>Ew({type:4,toastId:n}),A5.promise=(n,e,t)=>{let r=A5.loading(e.loading,{...t,...t==null?void 0:t.loading});return typeof n=="function"&&(n=n()),n.then(i=>{let a=e.success?kj(e.success,i):void 0;return a?A5.success(a,{id:r,...t,...t==null?void 0:t.success}):A5.dismiss(r),i}).catch(i=>{let a=e.error?kj(e.error,i):void 0;a?A5.error(a,{id:r,...t,...t==null?void 0:t.error}):A5.dismiss(r)}),n};var Xhn=(n,e)=>{Ew({type:1,toast:{id:n,height:e}})},Whn=()=>{Ew({type:5,time:Date.now()})},$P=new Map,Zhn=1e3,Qhn=(n,e=Zhn)=>{if($P.has(n))return;let t=setTimeout(()=>{$P.delete(n),Ew({type:4,toastId:n})},e);$P.set(n,t)},Khn=n=>{let{toasts:e,pausedAt:t}=qhn(n);it.useEffect(()=>{if(t)return;let a=Date.now(),o=e.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&A5.dismiss(s.id);return}return setTimeout(()=>A5.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[e,t]);let r=it.useCallback(()=>{t&&Ew({type:6,time:Date.now()})},[t]),i=it.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=o||{},u=e.filter(v=>(v.position||c)===(a.position||c)&&v.height),f=u.findIndex(v=>v.id===a.id),d=u.filter((v,y)=>y<f&&v.visible).length;return u.filter(v=>v.visible).slice(...s?[d+1]:[0,d]).reduce((v,y)=>v+(y.height||0)+l,0)},[e]);return it.useEffect(()=>{e.forEach(a=>{if(a.dismissed)Qhn(a.id,a.removeDelay);else{let o=$P.get(a.id);o&&(clearTimeout(o),$P.delete(a.id))}})},[e]),{toasts:e,handlers:{updateHeight:Xhn,startPause:Whn,endPause:r,calculateOffset:i}}},Jhn=w8`
13429
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return it.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},Zpn="DialogDescriptionWarning",Qpn=({contentRef:n,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yZe(Zpn).contentName}}.`;return it.useEffect(()=>{var a;const i=(a=n.current)==null?void 0:a.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,n,e]),null},gZe=rZe,Kpn=aZe,_Ze=sZe,Bde=lZe,jde=cZe,Hde=fZe,Vde=pZe,xZe=mZe;const Jpn=gZe,ehn=_Ze,bZe=it.forwardRef(({className:n,...e},t)=>Ye.jsx(Bde,{className:ih("rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0",n),...e,ref:t}));bZe.displayName=Bde.displayName;const SZe=it.forwardRef(({className:n,children:e,...t},r)=>Ye.jsxs(ehn,{children:[Ye.jsx(bZe,{}),Ye.jsx(jde,{ref:r,className:ih("rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950",n),...t,children:e})]}));SZe.displayName=jde.displayName;const thn=it.forwardRef(({className:n,...e},t)=>Ye.jsx(Hde,{ref:t,className:ih("rf-text-lg rf-font-semibold",n),...e}));thn.displayName=Hde.displayName;const nhn=it.forwardRef(({className:n,...e},t)=>Ye.jsx(Vde,{ref:t,className:ih("rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",n),...e}));nhn.displayName=Vde.displayName;function $de(n,e){return $de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},$de(n,e)}function oM(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,$de(n,e)}var sM=function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(r){var i=this,a=r||function(){};return this.listeners.push(a),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(o){return o!==a}),i.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n}(),Cj=typeof window>"u";function R5(){}function rhn(n,e){return typeof n=="function"?n(e):n}function Gde(n){return typeof n=="number"&&n>=0&&n!==1/0}function Rj(n){return Array.isArray(n)?n:[n]}function wZe(n,e){return Math.max(n+(e||0)-Date.now(),0)}function Aj(n,e,t){return jP(n)?typeof e=="function"?wh({},t,{queryKey:n,queryFn:e}):wh({},e,{queryKey:n}):n}function ihn(n,e,t){return jP(n)?wh({},e,{mutationKey:n}):typeof n=="function"?wh({},e,{mutationFn:n}):wh({},n)}function D6(n,e,t){return jP(n)?[wh({},e,{queryKey:n}),t]:[n||{},e]}function ahn(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function EZe(n,e){var t=n.active,r=n.exact,i=n.fetching,a=n.inactive,o=n.predicate,s=n.queryKey,l=n.stale;if(jP(s)){if(r){if(e.queryHash!==qde(s,e.options))return!1}else if(!Pj(e.queryKey,s))return!1}var c=ahn(t,a);if(c==="none")return!1;if(c!=="all"){var u=e.isActive();if(c==="active"&&!u||c==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof i=="boolean"&&e.isFetching()!==i||o&&!o(e))}function TZe(n,e){var t=n.exact,r=n.fetching,i=n.predicate,a=n.mutationKey;if(jP(a)){if(!e.options.mutationKey)return!1;if(t){if(Sw(e.options.mutationKey)!==Sw(a))return!1}else if(!Pj(e.options.mutationKey,a))return!1}return!(typeof r=="boolean"&&e.state.status==="loading"!==r||i&&!i(e))}function qde(n,e){var t=(e==null?void 0:e.queryKeyHashFn)||Sw;return t(n)}function Sw(n){var e=Rj(n);return ohn(e)}function ohn(n){return JSON.stringify(n,function(e,t){return Yde(t)?Object.keys(t).sort().reduce(function(r,i){return r[i]=t[i],r},{}):t})}function Pj(n,e){return MZe(Rj(n),Rj(e))}function MZe(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!MZe(n[t],e[t])}):!1}function Nj(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||Yde(n)&&Yde(e)){for(var r=t?n.length:Object.keys(n).length,i=t?e:Object.keys(e),a=i.length,o=t?[]:{},s=0,l=0;l<a;l++){var c=t?l:i[l];o[c]=Nj(n[c],e[c]),o[c]===n[c]&&s++}return r===a&&s===r?n:o}return e}function shn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function Yde(n){if(!CZe(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!CZe(t)||!t.hasOwnProperty("isPrototypeOf"))}function CZe(n){return Object.prototype.toString.call(n)==="[object Object]"}function jP(n){return typeof n=="string"||Array.isArray(n)}function lhn(n){return new Promise(function(e){setTimeout(e,n)})}function RZe(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function AZe(){if(typeof AbortController=="function")return new AbortController}var chn=function(n){oM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!Cj&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},r}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},t.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},t.setFocused=function(i){this.focused=i,i&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(i){i()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e}(sM),HP=new chn,uhn=function(n){oM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!Cj&&((a=window)!=null&&a.addEventListener)){var o=function(){return i()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},r}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},t.setEventListener=function(i){var a,o=this;this.setup=i,(a=this.cleanup)==null||a.call(this),this.cleanup=i(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},t.setOnline=function(i){this.online=i,i&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(i){i()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e}(sM),Dj=new uhn;function fhn(n){return Math.min(1e3*Math.pow(2,n),3e4)}function Lj(n){return typeof(n==null?void 0:n.cancel)=="function"}var PZe=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function Oj(n){return n instanceof PZe}var NZe=function(e){var t=this,r=!1,i,a,o,s;this.abort=e.abort,this.cancel=function(d){return i==null?void 0:i(d)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return a==null?void 0:a()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(d,v){o=d,s=v});var l=function(v){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(v),a==null||a(),o(v))},c=function(v){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(v),a==null||a(),s(v))},u=function(){return new Promise(function(v){a=v,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){a=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},f=function d(){if(!t.isResolved){var v;try{v=e.fn()}catch(y){v=Promise.reject(y)}i=function(w){if(!t.isResolved&&(c(new PZe(w)),t.abort==null||t.abort(),Lj(v)))try{v.cancel()}catch{}},t.isTransportCancelable=Lj(v),Promise.resolve(v).then(l).catch(function(y){var w,b;if(!t.isResolved){var S=(w=e.retry)!=null?w:3,R=(b=e.retryDelay)!=null?b:fhn,D=typeof R=="function"?R(t.failureCount,y):R,k=S===!0||typeof S=="number"&&t.failureCount<S||typeof S=="function"&&S(t.failureCount,y);if(r||!k){c(y);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,y),lhn(D).then(function(){if(!HP.isFocused()||!Dj.isOnline())return u()}).then(function(){r?c(y):d()})}})}};f()},dhn=function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(r){var i;this.transactions++;try{i=r()}finally{this.transactions--,this.transactions||this.flush()}return i},e.schedule=function(r){var i=this;this.transactions?this.queue.push(r):RZe(function(){i.notifyFn(r)})},e.batchCalls=function(r){var i=this;return function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];i.schedule(function(){r.apply(void 0,o)})}},e.flush=function(){var r=this,i=this.queue;this.queue=[],i.length&&RZe(function(){r.batchNotifyFn(function(){i.forEach(function(a){r.notifyFn(a)})})})},e.setNotifyFunction=function(r){this.notifyFn=r},e.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},n}(),kg=new dhn,DZe=console;function zj(){return DZe}function phn(n){DZe=n}var hhn=function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(r){var i;this.options=wh({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:5*60*1e3)},e.setDefaultOptions=function(r){this.defaultOptions=r},e.scheduleGc=function(){var r=this;this.clearGcTimeout(),Gde(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(r,i){var a,o,s=this.state.data,l=rhn(r,s);return(a=(o=this.options).isDataEqual)!=null&&a.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=Nj(s,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt}),l},e.setState=function(r,i){this.dispatch({type:"setState",state:r,setStateOptions:i})},e.cancel=function(r){var i,a=this.promise;return(i=this.retryer)==null||i.cancel(r),a?a.then(R5).catch(R5):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},e.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!wZe(this.state.dataUpdatedAt,r)},e.onFocus=function(){var r,i=this.observers.find(function(a){return a.shouldFetchOnWindowFocus()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},e.onOnline=function(){var r,i=this.observers.find(function(a){return a.shouldFetchOnReconnect()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},e.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},e.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(i){return i!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(r,i){var a=this,o,s,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var u=this.observers.find(function(R){return R.options.queryFn});u&&this.setOptions(u.options)}var f=Rj(this.queryKey),d=AZe(),v={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(v,"signal",{enumerable:!0,get:function(){if(d)return a.abortSignalConsumed=!0,d.signal}});var y=function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(v)):Promise.reject("Missing queryFn")},w={fetchOptions:i,options:this.options,queryKey:f,state:this.state,fetchFn:y,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var b;(b=this.options.behavior)==null||b.onFetch(w)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=w.fetchOptions)==null?void 0:s.meta)){var S;this.dispatch({type:"fetch",meta:(S=w.fetchOptions)==null?void 0:S.meta})}return this.retryer=new NZe({fn:w.fetchFn,abort:d==null||(l=d.abort)==null?void 0:l.bind(d),onSuccess:function(D){a.setData(D),a.cache.config.onSuccess==null||a.cache.config.onSuccess(D,a),a.cacheTime===0&&a.optionalRemove()},onError:function(D){Oj(D)&&D.silent||a.dispatch({type:"error",error:D}),Oj(D)||(a.cache.config.onError==null||a.cache.config.onError(D,a),zj().error(D)),a.cacheTime===0&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:w.options.retry,retryDelay:w.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(r){var i=this;this.state=this.reducer(this.state,r),kg.batch(function(){i.observers.forEach(function(a){a.onQueryUpdate(r)}),i.cache.notify({query:i,type:"queryUpdated",action:r})})},e.getDefaultState=function(r){var i=typeof r.initialData=="function"?r.initialData():r.initialData,a=typeof r.initialData<"u",o=a?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,s=typeof i<"u";return{data:i,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:s?"success":"idle"}},e.reducer=function(r,i){var a,o;switch(i.type){case"failed":return wh({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return wh({},r,{isPaused:!0});case"continue":return wh({},r,{isPaused:!1});case"fetch":return wh({},r,{fetchFailureCount:0,fetchMeta:(a=i.meta)!=null?a:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return wh({},r,{data:i.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=i.dataUpdatedAt)!=null?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=i.error;return Oj(s)&&s.revert&&this.revertState?wh({},this.revertState):wh({},r,{error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return wh({},r,{isInvalidated:!0});case"setState":return wh({},r,i.state);default:return r}},n}(),mhn=function(n){oM(e,n);function e(r){var i;return i=n.call(this)||this,i.config=r||{},i.queries=[],i.queriesMap={},i}var t=e.prototype;return t.build=function(i,a,o){var s,l=a.queryKey,c=(s=a.queryHash)!=null?s:qde(l,a),u=this.get(c);return u||(u=new hhn({cache:this,queryKey:l,queryHash:c,options:i.defaultQueryOptions(a),state:o,defaultOptions:i.getQueryDefaults(l),meta:a.meta}),this.add(u)),u},t.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},t.remove=function(i){var a=this.queriesMap[i.queryHash];a&&(i.destroy(),this.queries=this.queries.filter(function(o){return o!==i}),a===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},t.clear=function(){var i=this;kg.batch(function(){i.queries.forEach(function(a){i.remove(a)})})},t.get=function(i){return this.queriesMap[i]},t.getAll=function(){return this.queries},t.find=function(i,a){var o=D6(i,a),s=o[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(l){return EZe(s,l)})},t.findAll=function(i,a){var o=D6(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return EZe(s,l)}):this.queries},t.notify=function(i){var a=this;kg.batch(function(){a.listeners.forEach(function(o){o(i)})})},t.onFocus=function(){var i=this;kg.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},t.onOnline=function(){var i=this;kg.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},e}(sM),vhn=function(){function n(t){this.options=wh({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||LZe(),this.meta=t.meta}var e=n.prototype;return e.setState=function(r){this.dispatch({type:"setState",state:r})},e.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},e.removeObserver=function(r){this.observers=this.observers.filter(function(i){return i!==r})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(R5).catch(R5)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var r=this,i,a=this.state.status==="loading",o=Promise.resolve();return a||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(s){s!==r.state.context&&r.dispatch({type:"loading",context:s,variables:r.state.variables})})),o.then(function(){return r.executeMutation()}).then(function(s){i=s,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(i,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(i,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(i,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:i}),i}).catch(function(s){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(s,r.state.variables,r.state.context,r),zj().error(s),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(s,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,s,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var r=this,i;return this.retryer=new NZe({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(r){var i=this;this.state=yhn(this.state,r),kg.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(r)}),i.mutationCache.notify(i)})},n}();function LZe(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function yhn(n,e){switch(e.type){case"failed":return wh({},n,{failureCount:n.failureCount+1});case"pause":return wh({},n,{isPaused:!0});case"continue":return wh({},n,{isPaused:!1});case"loading":return wh({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return wh({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return wh({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return wh({},n,e.state);default:return n}}var ghn=function(n){oM(e,n);function e(r){var i;return i=n.call(this)||this,i.config=r||{},i.mutations=[],i.mutationId=0,i}var t=e.prototype;return t.build=function(i,a,o){var s=new vhn({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(a),state:o,defaultOptions:a.mutationKey?i.getMutationDefaults(a.mutationKey):void 0,meta:a.meta});return this.add(s),s},t.add=function(i){this.mutations.push(i),this.notify(i)},t.remove=function(i){this.mutations=this.mutations.filter(function(a){return a!==i}),i.cancel(),this.notify(i)},t.clear=function(){var i=this;kg.batch(function(){i.mutations.forEach(function(a){i.remove(a)})})},t.getAll=function(){return this.mutations},t.find=function(i){return typeof i.exact>"u"&&(i.exact=!0),this.mutations.find(function(a){return TZe(i,a)})},t.findAll=function(i){return this.mutations.filter(function(a){return TZe(i,a)})},t.notify=function(i){var a=this;kg.batch(function(){a.listeners.forEach(function(o){o(i)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var i=this.mutations.filter(function(a){return a.state.isPaused});return kg.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(R5)})},Promise.resolve())})},e}(sM);function _hn(){return{onFetch:function(e){e.fetchFn=function(){var t,r,i,a,o,s,l=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,c=(i=e.fetchOptions)==null||(a=i.meta)==null?void 0:a.fetchMore,u=c==null?void 0:c.pageParam,f=(c==null?void 0:c.direction)==="forward",d=(c==null?void 0:c.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],y=((s=e.state.data)==null?void 0:s.pageParams)||[],w=AZe(),b=w==null?void 0:w.signal,S=y,R=!1,D=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},k=function(we,he,ge,Te){return S=Te?[he].concat(S):[].concat(S,[he]),Te?[ge].concat(we):[].concat(we,[ge])},G=function(we,he,ge,Te){if(R)return Promise.reject("Cancelled");if(typeof ge>"u"&&!he&&we.length)return Promise.resolve(we);var be={queryKey:e.queryKey,signal:b,pageParam:ge,meta:e.meta},Oe=D(be),Ne=Promise.resolve(Oe).then(function(Ae){return k(we,ge,Ae,Te)});if(Lj(Oe)){var Ie=Ne;Ie.cancel=Oe.cancel}return Ne},q;if(!v.length)q=G([]);else if(f){var Z=typeof u<"u",Y=Z?u:OZe(e.options,v);q=G(v,Z,Y)}else if(d){var ee=typeof u<"u",X=ee?u:xhn(e.options,v);q=G(v,ee,X,!0)}else(function(){S=[];var de=typeof e.options.getNextPageParam>"u",we=l&&v[0]?l(v[0],0,v):!0;q=we?G([],de,y[0]):Promise.resolve(k([],y[0],v[0]));for(var he=function(be){q=q.then(function(Oe){var Ne=l&&v[be]?l(v[be],be,v):!0;if(Ne){var Ie=de?y[be]:OZe(e.options,Oe);return G(Oe,de,Ie)}return Promise.resolve(k(Oe,y[be],v[be]))})},ge=1;ge<v.length;ge++)he(ge)})();var ue=q.then(function(de){return{pages:de,pageParams:S}}),pe=ue;return pe.cancel=function(){R=!0,w==null||w.abort(),Lj(q)&&q.cancel()},ue}}}}function OZe(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function xhn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var bhn=function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new mhn,this.mutationCache=t.mutationCache||new ghn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var r=this;this.unsubscribeFocus=HP.subscribe(function(){HP.isFocused()&&Dj.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=Dj.subscribe(function(){HP.isFocused()&&Dj.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},e.unmount=function(){var r,i;(r=this.unsubscribeFocus)==null||r.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},e.isFetching=function(r,i){var a=D6(r,i),o=a[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(r){return this.mutationCache.findAll(wh({},r,{fetching:!0})).length},e.getQueryData=function(r,i){var a;return(a=this.queryCache.find(r,i))==null?void 0:a.state.data},e.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(i){var a=i.queryKey,o=i.state,s=o.data;return[a,s]})},e.setQueryData=function(r,i,a){var o=Aj(r),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(i,a)},e.setQueriesData=function(r,i,a){var o=this;return kg.batch(function(){return o.getQueryCache().findAll(r).map(function(s){var l=s.queryKey;return[l,o.setQueryData(l,i,a)]})})},e.getQueryState=function(r,i){var a;return(a=this.queryCache.find(r,i))==null?void 0:a.state},e.removeQueries=function(r,i){var a=D6(r,i),o=a[0],s=this.queryCache;kg.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(r,i,a){var o=this,s=D6(r,i,a),l=s[0],c=s[1],u=this.queryCache,f=wh({},l,{active:!0});return kg.batch(function(){return u.findAll(l).forEach(function(d){d.reset()}),o.refetchQueries(f,c)})},e.cancelQueries=function(r,i,a){var o=this,s=D6(r,i,a),l=s[0],c=s[1],u=c===void 0?{}:c;typeof u.revert>"u"&&(u.revert=!0);var f=kg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.cancel(u)})});return Promise.all(f).then(R5).catch(R5)},e.invalidateQueries=function(r,i,a){var o,s,l,c=this,u=D6(r,i,a),f=u[0],d=u[1],v=wh({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return kg.batch(function(){return c.queryCache.findAll(f).forEach(function(y){y.invalidate()}),c.refetchQueries(v,d)})},e.refetchQueries=function(r,i,a){var o=this,s=D6(r,i,a),l=s[0],c=s[1],u=kg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.fetch(void 0,wh({},c,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(u).then(R5);return c!=null&&c.throwOnError||(f=f.catch(R5)),f},e.fetchQuery=function(r,i,a){var o=Aj(r,i,a),s=this.defaultQueryOptions(o);typeof s.retry>"u"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},e.prefetchQuery=function(r,i,a){return this.fetchQuery(r,i,a).then(R5).catch(R5)},e.fetchInfiniteQuery=function(r,i,a){var o=Aj(r,i,a);return o.behavior=_hn(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(r,i,a){return this.fetchInfiniteQuery(r,i,a).then(R5).catch(R5)},e.cancelMutations=function(){var r=this,i=kg.batch(function(){return r.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(R5).catch(R5)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(r){this.defaultOptions=r},e.setQueryDefaults=function(r,i){var a=this.queryDefaults.find(function(o){return Sw(r)===Sw(o.queryKey)});a?a.defaultOptions=i:this.queryDefaults.push({queryKey:r,defaultOptions:i})},e.getQueryDefaults=function(r){var i;return r?(i=this.queryDefaults.find(function(a){return Pj(r,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(r,i){var a=this.mutationDefaults.find(function(o){return Sw(r)===Sw(o.mutationKey)});a?a.defaultOptions=i:this.mutationDefaults.push({mutationKey:r,defaultOptions:i})},e.getMutationDefaults=function(r){var i;return r?(i=this.mutationDefaults.find(function(a){return Pj(r,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=wh({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=qde(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},e.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:wh({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),Shn=function(n){oM(e,n);function e(r,i){var a;return a=n.call(this)||this,a.client=r,a.options=i,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(i),a}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),zZe(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return Xde(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return Xde(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(i,a){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var l=this.hasListeners();l&&UZe(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(a),l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var c=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)},t.getOptimisticResult=function(i){var a=this.client.defaultQueryObserverOptions(i),o=this.client.getQueryCache().build(this.client,a);return this.createResult(o,a)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(i,a){var o=this,s={},l=function(u){o.trackedProps.includes(u)||o.trackedProps.push(u)};return Object.keys(i).forEach(function(c){Object.defineProperty(s,c,{configurable:!1,enumerable:!0,get:function(){return l(c),i[c]}})}),(a.useErrorBoundary||a.suspense)&&l("error"),s},t.getNextResult=function(i){var a=this;return new Promise(function(o,s){var l=a.subscribe(function(c){c.isFetching||(l(),c.isError&&(i!=null&&i.throwOnError)?s(c.error):o(c))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(i){return this.fetch(wh({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},t.fetchOptimistic=function(i){var a=this,o=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return a.createResult(s,o)})},t.fetch=function(i){var a=this;return this.executeFetch(i).then(function(){return a.updateResult(),a.currentResult})},t.executeFetch=function(i){this.updateQuery();var a=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(R5)),a},t.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Cj||this.currentResult.isStale||!Gde(this.options.staleTime))){var a=wZe(this.currentResult.dataUpdatedAt,this.options.staleTime),o=a+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},o)}},t.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},t.updateRefetchInterval=function(i){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Cj||this.options.enabled===!1||!Gde(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||HP.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(i,a){var o=this.currentQuery,s=this.options,l=this.currentResult,c=this.currentResultState,u=this.currentResultOptions,f=i!==o,d=f?i.state:this.currentQueryInitialState,v=f?this.currentResult:this.previousQueryResult,y=i.state,w=y.dataUpdatedAt,b=y.error,S=y.errorUpdatedAt,R=y.isFetching,D=y.status,k=!1,G=!1,q;if(a.optimisticResults){var Z=this.hasListeners(),Y=!Z&&zZe(i,a),ee=Z&&UZe(i,o,a,s);(Y||ee)&&(R=!0,w||(D="loading"))}if(a.keepPreviousData&&!y.dataUpdateCount&&(v!=null&&v.isSuccess)&&D!=="error")q=v.data,w=v.dataUpdatedAt,D=v.status,k=!0;else if(a.select&&typeof y.data<"u")if(l&&y.data===(c==null?void 0:c.data)&&a.select===this.selectFn)q=this.selectResult;else try{this.selectFn=a.select,q=a.select(y.data),a.structuralSharing!==!1&&(q=Nj(l==null?void 0:l.data,q)),this.selectResult=q,this.selectError=null}catch(pe){zj().error(pe),this.selectError=pe}else q=y.data;if(typeof a.placeholderData<"u"&&typeof q>"u"&&(D==="loading"||D==="idle")){var X;if(l!=null&&l.isPlaceholderData&&a.placeholderData===(u==null?void 0:u.placeholderData))X=l.data;else if(X=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof X<"u")try{X=a.select(X),a.structuralSharing!==!1&&(X=Nj(l==null?void 0:l.data,X)),this.selectError=null}catch(pe){zj().error(pe),this.selectError=pe}typeof X<"u"&&(D="success",q=X,G=!0)}this.selectError&&(b=this.selectError,q=this.selectResult,S=Date.now(),D="error");var ue={status:D,isLoading:D==="loading",isSuccess:D==="success",isError:D==="error",isIdle:D==="idle",data:q,dataUpdatedAt:w,error:b,errorUpdatedAt:S,failureCount:y.fetchFailureCount,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>d.dataUpdateCount||y.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&D!=="loading",isLoadingError:D==="error"&&y.dataUpdatedAt===0,isPlaceholderData:G,isPreviousData:k,isRefetchError:D==="error"&&y.dataUpdatedAt!==0,isStale:Wde(i,a),refetch:this.refetch,remove:this.remove};return ue},t.shouldNotifyListeners=function(i,a){if(!a)return!0;var o=this.options,s=o.notifyOnChangeProps,l=o.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var c=s==="tracked"?this.trackedProps:s;return Object.keys(i).some(function(u){var f=u,d=i[f]!==a[f],v=c==null?void 0:c.some(function(w){return w===u}),y=l==null?void 0:l.some(function(w){return w===u});return d&&!y&&(!c||v)})},t.updateResult=function(i){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!shn(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(wh({},o,i))}},t.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var a=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))}},t.onQueryUpdate=function(i){var a={};i.type==="success"?a.onSuccess=!0:i.type==="error"&&!Oj(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},t.notify=function(i){var a=this;kg.batch(function(){i.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):i.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)}),i.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},e}(sM);function whn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function zZe(n,e){return whn(n,e)||n.state.dataUpdatedAt>0&&Xde(n,e,e.refetchOnMount)}function Xde(n,e,t){if(e.enabled!==!1){var r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&Wde(n,e)}return!1}function UZe(n,e,t,r){return t.enabled!==!1&&(n!==e||r.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&Wde(n,t)}function Wde(n,e){return n.isStaleByTime(e.staleTime)}var Ehn=function(n){oM(e,n);function e(r,i){var a;return a=n.call(this)||this,a.client=r,a.setOptions(i),a.bindMethods(),a.updateResult(),a}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},t.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},t.onMutationUpdate=function(i){this.updateResult();var a={listeners:!0};i.type==="success"?a.onSuccess=!0:i.type==="error"&&(a.onError=!0),this.notify(a)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(i,a){return this.mutateOptions=a,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,wh({},this.options,{variables:typeof i<"u"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:LZe(),a=wh({},i,{isLoading:i.status==="loading",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=a},t.notify=function(i){var a=this;kg.batch(function(){a.mutateOptions&&(i.onSuccess?(a.mutateOptions.onSuccess==null||a.mutateOptions.onSuccess(a.currentResult.data,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(a.currentResult.data,null,a.currentResult.variables,a.currentResult.context)):i.onError&&(a.mutateOptions.onError==null||a.mutateOptions.onError(a.currentResult.error,a.currentResult.variables,a.currentResult.context),a.mutateOptions.onSettled==null||a.mutateOptions.onSettled(void 0,a.currentResult.error,a.currentResult.variables,a.currentResult.context))),i.listeners&&a.listeners.forEach(function(o){o(a.currentResult)})})},e}(sM),Thn=exe.unstable_batchedUpdates;kg.setBatchNotifyFunction(Thn);var Mhn=console;phn(Mhn);var kZe=gu.createContext(void 0),IZe=gu.createContext(!1);function FZe(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=kZe),window.ReactQueryClientContext):kZe}var BZe=function(){var e=gu.useContext(FZe(gu.useContext(IZe)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Chn=function(e){var t=e.client,r=e.contextSharing,i=r===void 0?!1:r,a=e.children;gu.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=FZe(i);return gu.createElement(IZe.Provider,{value:i},gu.createElement(o.Provider,{value:t},a))};function Rhn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var Ahn=gu.createContext(Rhn()),Phn=function(){return gu.useContext(Ahn)};function jZe(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function Nhn(n,e,t){var r=gu.useRef(!1),i=gu.useState(0),a=i[1],o=ihn(n,e),s=BZe(),l=gu.useRef();l.current?l.current.setOptions(o):l.current=new Ehn(s,o);var c=l.current.getCurrentResult();gu.useEffect(function(){r.current=!0;var f=l.current.subscribe(kg.batchCalls(function(){r.current&&a(function(d){return d+1})}));return function(){r.current=!1,f()}},[]);var u=gu.useCallback(function(f,d){l.current.mutate(f,d).catch(R5)},[]);if(c.error&&jZe(void 0,l.current.options.useErrorBoundary,[c.error]))throw c.error;return wh({},c,{mutate:u,mutateAsync:c.mutate})}function Dhn(n,e){var t=gu.useRef(!1),r=gu.useState(0),i=r[1],a=BZe(),o=Phn(),s=a.defaultQueryObserverOptions(n);s.optimisticResults=!0,s.onError&&(s.onError=kg.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=kg.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=kg.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=gu.useState(function(){return new e(a,s)}),c=l[0],u=c.getOptimisticResult(s);if(gu.useEffect(function(){t.current=!0,o.clearReset();var f=c.subscribe(kg.batchCalls(function(){t.current&&i(function(d){return d+1})}));return c.updateResult(),function(){t.current=!1,f()}},[o,c]),gu.useEffect(function(){c.setOptions(s,{listeners:!1})},[s,c]),s.suspense&&u.isLoading)throw c.fetchOptimistic(s).then(function(f){var d=f.data;s.onSuccess==null||s.onSuccess(d),s.onSettled==null||s.onSettled(d,null)}).catch(function(f){o.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(u.isError&&!o.isReset()&&!u.isFetching&&jZe(s.suspense,s.useErrorBoundary,[u.error,c.getCurrentQuery()]))throw u.error;return s.notifyOnChangeProps==="tracked"&&(u=c.trackResult(u,s)),u}function Lhn(n,e,t){var r=Aj(n,e,t);return Dhn(r,Shn)}function Ohn({vendor:n,isActive:e,onSelect:t,selectedShippingIdx:r,onSelectShipping:i}){return Ye.jsxs("div",{className:ih("rf-rounded-xl rf-border rf-transition-all rf-cursor-pointer rf-mb-6 rf-bg-white rf-shadow-sm hover:rf-shadow-lg",e?"rf-ring-2 rf-ring-primary rf-border-primary":"rf-border-gray-200"),onClick:t,children:[Ye.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-py-4",children:[Ye.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ye.jsx(pin,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),Ye.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name})]}),Ye.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[Ye.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"PCB + Components"}),Ye.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ye.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base rf-mr-2",children:["$",n.total_cost_without_shipping.toFixed(2)]}),Ye.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),e&&Ye.jsxs(Ye.Fragment,{children:[Ye.jsx("hr",{className:"rf-border-gray-200"}),Ye.jsxs("div",{className:"rf-px-6 rf-py-2",children:[Ye.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-medium rf-text-gray-700",children:"Shipping Options:"}),Ye.jsx("div",{className:"rf-flex rf-gap-4 rf-flex-wrap rf-mb-2",children:n.shipping_options.map((a,o)=>Ye.jsxs("button",{type:"button",className:ih("rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-rounded-lg rf-border rf-shadow rf-min-w-[148px] rf-transition-colors",r===o?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:s=>{s.stopPropagation(),i(o)},children:[Ye.jsx(vin,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),Ye.jsxs("div",{className:"rf-text-left rf-flex-1",children:[Ye.jsx("div",{className:"rf-leading-tight rf-font-medium",children:a.carrier}),Ye.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:a.service})]})]},a.carrier+o))})]})]}),e&&r!==null&&Ye.jsx("div",{className:"rf-px-6 rf-pb-3",children:Ye.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-2",children:[Ye.jsx("span",{className:"rf-text-gray-800 rf-font-medium",children:"Total (incl. shipping):"}),Ye.jsxs("span",{className:"rf-font-bold rf-text-lg rf-text-blue-700",children:["$",n.total_cost_without_shipping.toFixed(2)]})]})})]})}let zhn={data:""},Uhn=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||zhn,khn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ihn=/\/\*[^]*?\*\/| +/g,HZe=/\n+/g,L6=(n,e)=>{let t="",r="",i="";for(let a in n){let o=n[a];a[0]=="@"?a[1]=="i"?t=a+" "+o+";":r+=a[1]=="f"?L6(o,a):a+"{"+L6(o,a[1]=="k"?"":e)+"}":typeof o=="object"?r+=L6(o,e?e.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=L6.p?L6.p(a,o):a+":"+o+";")}return t+(e&&i?e+"{"+i+"}":i)+r},S8={},VZe=n=>{if(typeof n=="object"){let e="";for(let t in n)e+=t+VZe(n[t]);return e}return n},Fhn=(n,e,t,r,i)=>{let a=VZe(n),o=S8[a]||(S8[a]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(a));if(!S8[o]){let l=a!==n?n:(c=>{let u,f,d=[{}];for(;u=khn.exec(c.replace(Ihn,""));)u[4]?d.shift():u[3]?(f=u[3].replace(HZe," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(HZe," ").trim();return d[0]})(n);S8[o]=L6(i?{["@keyframes "+o]:l}:l,t?"":"."+o)}let s=t&&S8.g?S8.g:null;return t&&(S8.g=S8[o]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(S8[o],e,r,s),o},Bhn=(n,e,t)=>n.reduce((r,i,a)=>{let o=e[a];if(o&&o.call){let s=o(t),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":L6(s,""):s===!1?"":s}return r+i+(o??"")},"");function Uj(n){let e=this||{},t=n.call?n(e.p):n;return Fhn(t.unshift?t.raw?Bhn(t,[].slice.call(arguments,1),e.p):t.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):t,Uhn(e.target),e.g,e.o,e.k)}let $Ze,Zde,Qde;Uj.bind({g:1});let w8=Uj.bind({k:1});function jhn(n,e,t,r){L6.p=e,$Ze=n,Zde=t,Qde=r}function O6(n,e){let t=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;t.p=Object.assign({theme:Zde&&Zde()},s),t.o=/ *go\d+/.test(l),s.className=Uj.apply(t,r)+(l?" "+l:"");let c=n;return n[0]&&(c=s.as||n,delete s.as),Qde&&c[0]&&Qde(s),$Ze(c,s)}return i}}var Hhn=n=>typeof n=="function",kj=(n,e)=>Hhn(n)?n(e):n,Vhn=(()=>{let n=0;return()=>(++n).toString()})(),GZe=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");n=!e||e.matches}return n}})(),$hn=20,qZe=(n,e)=>{switch(e.type){case 0:return{...n,toasts:[e.toast,...n.toasts].slice(0,$hn)};case 1:return{...n,toasts:n.toasts.map(a=>a.id===e.toast.id?{...a,...e.toast}:a)};case 2:let{toast:t}=e;return qZe(n,{type:n.toasts.find(a=>a.id===t.id)?1:0,toast:t});case 3:let{toastId:r}=e;return{...n,toasts:n.toasts.map(a=>a.id===r||r===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(a=>a.id!==e.toastId)};case 5:return{...n,pausedAt:e.time};case 6:let i=e.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Ij=[],ww={toasts:[],pausedAt:void 0},Ew=n=>{ww=qZe(ww,n),Ij.forEach(e=>{e(ww)})},Ghn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},qhn=(n={})=>{let[e,t]=it.useState(ww),r=it.useRef(ww);it.useEffect(()=>(r.current!==ww&&t(ww),Ij.push(t),()=>{let a=Ij.indexOf(t);a>-1&&Ij.splice(a,1)}),[]);let i=e.toasts.map(a=>{var o,s,l;return{...n,...n[a.type],...a,removeDelay:a.removeDelay||((o=n[a.type])==null?void 0:o.removeDelay)||(n==null?void 0:n.removeDelay),duration:a.duration||((s=n[a.type])==null?void 0:s.duration)||(n==null?void 0:n.duration)||Ghn[a.type],style:{...n.style,...(l=n[a.type])==null?void 0:l.style,...a.style}}});return{...e,toasts:i}},Yhn=(n,e="blank",t)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...t,id:(t==null?void 0:t.id)||Vhn()}),VP=n=>(e,t)=>{let r=Yhn(e,n,t);return Ew({type:2,toast:r}),r.id},A5=(n,e)=>VP("blank")(n,e);A5.error=VP("error"),A5.success=VP("success"),A5.loading=VP("loading"),A5.custom=VP("custom"),A5.dismiss=n=>{Ew({type:3,toastId:n})},A5.remove=n=>Ew({type:4,toastId:n}),A5.promise=(n,e,t)=>{let r=A5.loading(e.loading,{...t,...t==null?void 0:t.loading});return typeof n=="function"&&(n=n()),n.then(i=>{let a=e.success?kj(e.success,i):void 0;return a?A5.success(a,{id:r,...t,...t==null?void 0:t.success}):A5.dismiss(r),i}).catch(i=>{let a=e.error?kj(e.error,i):void 0;a?A5.error(a,{id:r,...t,...t==null?void 0:t.error}):A5.dismiss(r)}),n};var Xhn=(n,e)=>{Ew({type:1,toast:{id:n,height:e}})},Whn=()=>{Ew({type:5,time:Date.now()})},$P=new Map,Zhn=1e3,Qhn=(n,e=Zhn)=>{if($P.has(n))return;let t=setTimeout(()=>{$P.delete(n),Ew({type:4,toastId:n})},e);$P.set(n,t)},Khn=n=>{let{toasts:e,pausedAt:t}=qhn(n);it.useEffect(()=>{if(t)return;let a=Date.now(),o=e.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&A5.dismiss(s.id);return}return setTimeout(()=>A5.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[e,t]);let r=it.useCallback(()=>{t&&Ew({type:6,time:Date.now()})},[t]),i=it.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=o||{},u=e.filter(v=>(v.position||c)===(a.position||c)&&v.height),f=u.findIndex(v=>v.id===a.id),d=u.filter((v,y)=>y<f&&v.visible).length;return u.filter(v=>v.visible).slice(...s?[d+1]:[0,d]).reduce((v,y)=>v+(y.height||0)+l,0)},[e]);return it.useEffect(()=>{e.forEach(a=>{if(a.dismissed)Qhn(a.id,a.removeDelay);else{let o=$P.get(a.id);o&&(clearTimeout(o),$P.delete(a.id))}})},[e]),{toasts:e,handlers:{updateHeight:Xhn,startPause:Whn,endPause:r,calculateOffset:i}}},Jhn=w8`
13430
13430
  from {
13431
13431
  transform: scale(0) rotate(45deg);
13432
13432
  opacity: 0;
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.387",
5
+ "version": "0.0.388",
6
6
  "exports": {
7
7
  ".": "./dist/preview.js",
8
8
  "./preview": "./dist/preview.js",
@@ -32,7 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@babel/standalone": "^7.26.10",
34
34
  "@biomejs/biome": "^1.9.4",
35
- "@tscircuit/fake-snippets": "^0.0.56",
35
+ "@tscircuit/fake-snippets": "^0.0.57",
36
36
  "@types/bun": "latest",
37
37
  "@types/debug": "^4.1.12",
38
38
  "@types/react": "18",