@tscircuit/runframe 0.0.414 → 0.0.415

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.
@@ -13451,11 +13451,11 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return Xhe}t8n();function ltt(n,e,t,r=
13451
13451
  &:hover {
13452
13452
  background-color: rgba(255, 255, 255, 0.1);
13453
13453
  }
13454
- `,onClick:r=>{r.stopPropagation(),t()},children:[Ge.jsx("input",{type:"checkbox",checked:e}),Ge.jsx("span",{style:{color:"#eee"},children:n})]}),T7n=({children:n,elements:e})=>{const[t,r]=Xx(q=>[q.is_mouse_over_container,q.setIsMouseOverContainer]),[i,a]=rt.useState(!1),[o,s]=rt.useState(!1),[l,c]=rt.useState(!1),[u,f]=Xx(q=>[q.selected_layer,q.selectLayer]),[d,m,g,E,w,S]=Xx(q=>[q.in_move_footprint_mode,q.in_draw_trace_mode,q.is_showing_rats_nest,q.is_showing_multiple_traces_length,q.is_showing_autorouting,q.is_showing_drc_errors]),M=Xx(q=>q.setEditMode),N=Xx(q=>q.setIsShowingRatsNest),k=Xx(q=>q.setIsShowingMultipleTracesLength),V=Xx(q=>q.setIsShowingAutorouting),Y=Xx(q=>q.setIsShowingDrcErrors);JS("1",()=>f("top")),JS("2",()=>f("bottom")),JS("3",()=>f("inner1")),JS("4",()=>f("inner2")),JS("5",()=>f("inner3")),JS("6",()=>f("inner4")),JS("7",()=>f("inner5")),JS("8",()=>f("inner6"));const W=(e==null?void 0:e.filter(q=>q.type.includes("error")).length)??0;return Ge.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{r(!0)},onMouseLeave:q=>{r(!1),s(!1)},children:[n,Ge.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",w7n.version]}),Ge.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:L3.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ge.jsxs(CM,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ge.jsxs("div",{children:["layer:"," ",Ge.jsx("span",{style:{marginLeft:2,fontWeight:500,color:MM[u]},children:u})]}),o&&Ge.jsx("div",{style:{marginTop:4,minWidth:120},children:Ame.map(q=>q.replace(/-/g,"")).map(q=>Ge.jsx(E7n,{name:q,selected:q===u,onClick:()=>{f(q.replace(/-/,""))}},q))})]}),Ge.jsxs(CM,{style:W>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ge.jsxs("div",{children:[W," errors"]}),l&&Ge.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(q=>q.type.includes("error")).map((q,ee)=>Ge.jsxs(rt.Fragment,{children:[Ge.jsx("div",{children:q.error_type}),Ge.jsx("div",{children:q.message})]},ee))})]}),Ge.jsx(CM,{style:{},onClick:()=>{M(m?"off":"draw_trace")},children:Ge.jsxs("div",{children:[m?"✖ ":"","Edit Traces"]})}),Ge.jsx(CM,{style:{},onClick:()=>{M(d?"off":"move_footprint")},children:Ge.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ge.jsx(CM,{style:{},onClick:()=>{N(!g)},children:Ge.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ge.jsx(CM,{onClick:()=>{a(!i)},children:Ge.jsxs("div",{children:[Ge.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ge.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ge.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ge.jsx(Ome,{label:"Show All Trace Lengths",checked:E,onClick:()=>{k(!E)}}),Ge.jsx(Ome,{label:"Show Autorouting Animation",checked:w,onClick:()=>{V(!w)}}),Ge.jsx(Ome,{label:"Show DRC Errors",checked:S,onClick:()=>{Y(!S)}})]})]})})]})]})},M7n=n=>{const{transform:e,elements:t}=n,[r,i]=rt.useMemo(()=>{const c=n.elements.flatMap(f=>kSn(f,n.elements)),u=n8(n.elements);return[c,u]},[n.elements]),[a,o]=rt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=rt.useMemo(()=>OSn({primitivesWithoutInteractionMetadata:r,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[r,a]),l=rt.useCallback(c=>{var d,m;const u=[];for(const g of c)if(g._element){const E=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(m=g._element)==null?void 0:m.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(E))}const f=new Set(c.map(g=>g._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:f,primitiveIdsInMousedOverNet:u})},[i]);return Ge.jsx(b7n,{elements:t,transform:e,primitives:r,onMouseHoverOverPrimitives:l,children:Ge.jsx(i7n,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(l7n,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(n7n,{transform:e,focusOnHover:n.focusOnHover,children:Ge.jsx(T7n,{elements:t,children:Ge.jsx(f7n,{transform:e,elements:t,children:Ge.jsx(S7n,{transform:e,soup:t,children:Ge.jsx(e7n,{transform:e,debugGraphics:n.debugGraphics,children:Ge.jsx(t7n,{transform:e,elements:t,children:Ge.jsx(JSn,{transform:e,primitives:s,width:n.width,height:n.height,grid:n.grid})})})})})})})})})})},C7n=Mc(k0(400,300),f2(40,-40)),R7n=({circuitJson:n,debugGraphics:e,height:t=600,initialState:r,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=rt.useState(!l),[f,d]=Dme(),[m,g]=rt.useState(C7n),{ref:E,setTransform:w,cancelDrag:S}=LSn({transform:m,onSetTransform:g,enabled:c});let[M,N]=rt.useState([]);M=a??M;const k=rt.useRef(!1),V=`${(n==null?void 0:n.length)||0}_${(n==null?void 0:n.editCount)||0}`,Y=()=>{const ue=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:pe,width:ce,height:Se}=q.some(Te=>Te.type.startsWith("pcb_"))?wSn(q.filter(Te=>Te.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((ue.width??0)/ce,(ue.height??0)/Se,100)*.75,_e=Mc(k0((ue.width??0)/2,(ue.height??0)/2),f2(he,-he,0,0),k0(-pe.x,-pe.y));w(_e)};rt.useEffect(()=>{d!=null&&d.width&&n&&n.length!==0&&(k.current||(Y(),k.current=!0))},[n,d]);const W=rt.useMemo(()=>(n==null?void 0:n.filter(ue=>ue.type.startsWith("pcb_")||ue.type.startsWith("source_")))??[],[V]),q=rt.useMemo(()=>W4n({circuitJson:W,editEvents:M}),[W,M]),ee=ue=>{N([...M,ue]),o==null||o([...M,ue])},X=ue=>{const pe=M.map(ce=>ce.edit_event_id===ue.edit_event_id?{...ce,...ue}:ce);N(pe),o==null||o(pe)};return Ge.jsxs("div",{ref:E,style:{position:"relative"},children:[Ge.jsx("div",{ref:f,children:Ge.jsxs(TSn,{initialState:r,children:[Ge.jsx(M7n,{transform:m,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:S,onCreateEditEvent:ee,onModifyEditEvent:X,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:q,debugGraphics:e},d.width),Ge.jsx(CSn,{})]})}),l&&!c&&Ge.jsx("div",{onClick:()=>{u(!0),Y()},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:Ge.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:"Click to Interact"})})]})};const A7n=({containerClassName:n,...e})=>{const t=rt.useRef(null),[r,i]=rt.useState(620);return rt.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)}},[]),Ge.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ge.jsx(R7n,{...e,height:r})})},P7n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-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-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.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}',N7n=()=>{rt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=P7n,document.head.appendChild(e)},[])},hrt=n=>`hsl(${S4.indexOf(n)*137.5%360}, 70%, 50%)`,D7n=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ge.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ge.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:S4.map(t=>{const r=n[t]||0,i=r/e*100;return Ge.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:hrt(t)},children:Ge.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),Ge.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},L7n=({renderLog:n})=>{const[e,t]=rt.useState("chronological");if(!n)return Ge.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>S4.indexOf(a[0])-S4.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Ge.jsxs("div",{className:"rf-bg-white",children:[Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ge.jsx("div",{children:"Render Logs"}),Ge.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ge.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ge.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ge.jsx("option",{value:"chronological",children:"Phase Order"}),Ge.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ge.jsx(D7n,{phaseTimings:n.phaseTimings}),Ge.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ge.jsx("thead",{children:Ge.jsxs("tr",{children:[Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ge.jsx("tbody",{children:r.map(([a,o])=>Ge.jsxs("tr",{children:[Ge.jsx("td",{className:"rf-p-2",children:S4.indexOf(a)}),Ge.jsx("td",{className:"rf-p-2",children:a}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsx("div",{className:"rf-w-8",children:Ge.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:hrt(a),width:`${o/i*100}%`}})})}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsxs("div",{className:"rf-flex w-full",children:[Ge.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ge.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},O7n="0.0.413",z7n=["assembly","bom","circuit_json","errors","render_log"],U7n=({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:m,headerClassName:g,leftHeaderContent:E,readOnly:w,isStreaming:S,autoroutingLog:M,onReportAutoroutingLog:N,isRunningCode:k,hasCodeChangedSinceLastRun:V,onEditEvent:Y,editEvents:W,defaultActiveTab:q,autoRotate3dViewerDisabled:ee,showSchematicDebugGrid:X=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:pe=!1})=>{var De;N7n();const ce=rt.useMemo(()=>r?r.filter(ze=>ze&&"error_type"in ze):null,[r]),[Se,he]=rt.useState(q??"pcb"),[_e,Te]=rt.useState(pe),be=rt.useCallback(ze=>{he(ze),u==null||u(ze)},[u]),Pe=()=>{Te(!_e)};return rt.useEffect(()=>{t&&be("errors")},[t]),rt.useEffect(()=>{(Se==="code"||Se==="errors")&&r&&!t&&be(q??"pcb")},[r]),Ge.jsx("div",{className:sh("flex flex-col relative rf-overflow-x-hidden",m),children:Ge.jsx("div",{className:sh("rf-md:sticky rf-md:top-2",_e&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ge.jsxs(lbe,{value:Se,onValueChange:be,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ge.jsxs("div",{className:sh("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[E,E&&Ge.jsx("div",{className:"rf-flex-grow"}),!E&&k&&Ge.jsx(nM,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!E&&Ge.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(De=f.lastRenderEvent)==null?void 0:De.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),Ge.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ge.jsx(nM,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ge.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Ge.jsxs(GX,{children:[o&&Ge.jsx(hS,{value:"code",children:"Code"}),Ge.jsxs(hS,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:sh("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ge.jsxs(hS,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:sh("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ge.jsxs(hS,{value:"cad",children:[r&&Ge.jsx("span",{className:sh("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Se)&&Ge.jsx(hS,{value:Se,children:sbe(Se)}),Ge.jsxs(p0e,{children:[Ge.jsx(h0e,{asChild:!0,children:Ge.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ge.jsx(aln,{className:"rf-w-4 rf-h-4"}),(ce&&ce.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ge.jsxs(aB,{className:"rf-*:text-xs",children:[z7n.map(ze=>Ge.jsxs(zb,{onSelect:()=>be(ze),children:[Se!==ze&&Ge.jsx(g$e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Se===ze&&Ge.jsx(bue,{className:"rf-w-3 rf-h-3"}),Ge.jsx("div",{className:"rf-pr-2",children:sbe(ze)}),ze==="errors"&&(ce&&ce.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:ce==null?void 0:ce.length})]},ze)),Ge.jsx(zb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ge.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",O7n.split(".").map((ze,Re)=>Re===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),ue&&Ge.jsx(m3,{onClick:Pe,variant:"ghost",children:_e?Ge.jsx(cln,{size:16}):Ge.jsx(sln,{size:16})})]}),o&&Ge.jsx(c8,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ge.jsx("div",{className:"rf-h-full",children:s})}),Ge.jsx(c8,{value:"pcb",children:Ge.jsx("div",{className:sh("rf-overflow-hidden",_e?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallbackRender:({error:ze})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(A7n,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:sh("rf-h-full rf-w-full",_e?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{Y&&ze.forEach(Re=>Y(Re))}}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"assembly",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallback:Ge.jsx("div",{children:"Error loading Assembly"}),children:r?Ge.jsx(z1n,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"schematic",children:Ge.jsx("div",{className:sh("rf-overflow-auto rf-bg-white",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallbackRender:({error:ze})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(D1n,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>{Y==null||Y(ze)},debugGrid:X,colorOverrides:{schematic:{background:"transparent"}}}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"cad",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{FallbackComponent:Gsn,children:r?Ge.jsx(Vsn,{soup:r,autoRotateDisabled:ee}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"bom",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallbackRender:({error:ze})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(B1n,{circuitJson:r}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"circuit_json",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallback:Ge.jsx("div",{children:"Error loading JSON viewer"}),children:r?Ge.jsx(I1n,{elements:r}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"errors",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r?Ge.jsx(rfn,{code:n,circuitJsonErrors:ce,errorMessage:t,autoroutingLog:M,onReportAutoroutingLog:N}):Ge.jsx(kw,{onRunClicked:e})})}),c&&Ge.jsx(c8,{value:"render_log",children:Ge.jsx(L7n,{renderLog:f})})]})})})};var sV="Dialog",[mrt,yrt]=t6(sV),[k7n,Bb]=mrt(sV),vrt=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=rt.useRef(null),l=rt.useRef(null),[c,u]=IE({prop:r,defaultProp:i??!1,onChange:a,caller:sV});return Ge.jsx(k7n,{scope:e,triggerRef:s,contentRef:l,contentId:n6(),titleId:n6(),descriptionId:n6(),open:c,onOpenChange:u,onOpenToggle:rt.useCallback(()=>u(f=>!f),[u]),modal:o,children:t})};vrt.displayName=sV;var grt="DialogTrigger",_rt=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(grt,t),a=fx(e,i.triggerRef);return Ge.jsx(Uv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":kme(i.open),...r,ref:a,onClick:Lp(n.onClick,i.onOpenToggle)})});_rt.displayName=grt;var zme="DialogPortal",[I7n,xrt]=mrt(zme,{forceMount:void 0}),brt=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=Bb(zme,e);return Ge.jsx(I7n,{scope:e,forceMount:t,children:rt.Children.map(r,o=>Ge.jsx(s8,{present:t||a.open,children:Ge.jsx(Que,{asChild:!0,container:i,children:o})}))})};brt.displayName=zme;var lV="DialogOverlay",Srt=rt.forwardRef((n,e)=>{const t=xrt(lV,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=Bb(lV,n.__scopeDialog);return a.modal?Ge.jsx(s8,{present:r||a.open,children:Ge.jsx(B7n,{...i,ref:e})}):null});Srt.displayName=lV;var F7n=kE("DialogOverlay.RemoveScroll"),B7n=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(lV,t);return Ge.jsx(r0e,{as:F7n,allowPinchZoom:!0,shards:[i.contentRef],children:Ge.jsx(Uv.div,{"data-state":kme(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Yw="DialogContent",wrt=rt.forwardRef((n,e)=>{const t=xrt(Yw,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=Bb(Yw,n.__scopeDialog);return Ge.jsx(s8,{present:r||a.open,children:a.modal?Ge.jsx(j7n,{...i,ref:e}):Ge.jsx(H7n,{...i,ref:e})})});wrt.displayName=Yw;var j7n=rt.forwardRef((n,e)=>{const t=Bb(Yw,n.__scopeDialog),r=rt.useRef(null),i=fx(e,t.contentRef,r);return rt.useEffect(()=>{const a=r.current;if(a)return wGe(a)},[]),Ge.jsx(Ert,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Lp(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Lp(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Lp(n.onFocusOutside,a=>a.preventDefault())})}),H7n=rt.forwardRef((n,e)=>{const t=Bb(Yw,n.__scopeDialog),r=rt.useRef(!1),i=rt.useRef(!1);return Ge.jsx(Ert,{...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()}})}),Ert=rt.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=Bb(Yw,t),l=rt.useRef(null),c=fx(e,l);return I$e(),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(Uue,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ge.jsx(Due,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":kme(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx($7n,{titleId:s.titleId}),Ge.jsx(q7n,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ume="DialogTitle",Trt=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(Ume,t);return Ge.jsx(Uv.h2,{id:i.titleId,...r,ref:e})});Trt.displayName=Ume;var Mrt="DialogDescription",Crt=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(Mrt,t);return Ge.jsx(Uv.p,{id:i.descriptionId,...r,ref:e})});Crt.displayName=Mrt;var Rrt="DialogClose",Art=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(Rrt,t);return Ge.jsx(Uv.button,{type:"button",...r,ref:e,onClick:Lp(n.onClick,()=>i.onOpenChange(!1))})});Art.displayName=Rrt;function kme(n){return n?"open":"closed"}var Prt="DialogTitleWarning",[V7n,Nrt]=c8t(Prt,{contentName:Yw,titleName:Ume,docsSlug:"dialog"}),$7n=({titleId:n})=>{const e=Nrt(Prt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13454
+ `,onClick:r=>{r.stopPropagation(),t()},children:[Ge.jsx("input",{type:"checkbox",checked:e}),Ge.jsx("span",{style:{color:"#eee"},children:n})]}),T7n=({children:n,elements:e})=>{const[t,r]=Xx(q=>[q.is_mouse_over_container,q.setIsMouseOverContainer]),[i,a]=rt.useState(!1),[o,s]=rt.useState(!1),[l,c]=rt.useState(!1),[u,f]=Xx(q=>[q.selected_layer,q.selectLayer]),[d,m,g,E,w,S]=Xx(q=>[q.in_move_footprint_mode,q.in_draw_trace_mode,q.is_showing_rats_nest,q.is_showing_multiple_traces_length,q.is_showing_autorouting,q.is_showing_drc_errors]),M=Xx(q=>q.setEditMode),N=Xx(q=>q.setIsShowingRatsNest),k=Xx(q=>q.setIsShowingMultipleTracesLength),V=Xx(q=>q.setIsShowingAutorouting),Y=Xx(q=>q.setIsShowingDrcErrors);JS("1",()=>f("top")),JS("2",()=>f("bottom")),JS("3",()=>f("inner1")),JS("4",()=>f("inner2")),JS("5",()=>f("inner3")),JS("6",()=>f("inner4")),JS("7",()=>f("inner5")),JS("8",()=>f("inner6"));const W=(e==null?void 0:e.filter(q=>q.type.includes("error")).length)??0;return Ge.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{r(!0)},onMouseLeave:q=>{r(!1),s(!1)},children:[n,Ge.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",w7n.version]}),Ge.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:L3.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ge.jsxs(CM,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ge.jsxs("div",{children:["layer:"," ",Ge.jsx("span",{style:{marginLeft:2,fontWeight:500,color:MM[u]},children:u})]}),o&&Ge.jsx("div",{style:{marginTop:4,minWidth:120},children:Ame.map(q=>q.replace(/-/g,"")).map(q=>Ge.jsx(E7n,{name:q,selected:q===u,onClick:()=>{f(q.replace(/-/,""))}},q))})]}),Ge.jsxs(CM,{style:W>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ge.jsxs("div",{children:[W," errors"]}),l&&Ge.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(q=>q.type.includes("error")).map((q,ee)=>Ge.jsxs(rt.Fragment,{children:[Ge.jsx("div",{children:q.error_type}),Ge.jsx("div",{children:q.message})]},ee))})]}),Ge.jsx(CM,{style:{},onClick:()=>{M(m?"off":"draw_trace")},children:Ge.jsxs("div",{children:[m?"✖ ":"","Edit Traces"]})}),Ge.jsx(CM,{style:{},onClick:()=>{M(d?"off":"move_footprint")},children:Ge.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ge.jsx(CM,{style:{},onClick:()=>{N(!g)},children:Ge.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ge.jsx(CM,{onClick:()=>{a(!i)},children:Ge.jsxs("div",{children:[Ge.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ge.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ge.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ge.jsx(Ome,{label:"Show All Trace Lengths",checked:E,onClick:()=>{k(!E)}}),Ge.jsx(Ome,{label:"Show Autorouting Animation",checked:w,onClick:()=>{V(!w)}}),Ge.jsx(Ome,{label:"Show DRC Errors",checked:S,onClick:()=>{Y(!S)}})]})]})})]})]})},M7n=n=>{const{transform:e,elements:t}=n,[r,i]=rt.useMemo(()=>{const c=n.elements.flatMap(f=>kSn(f,n.elements)),u=n8(n.elements);return[c,u]},[n.elements]),[a,o]=rt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=rt.useMemo(()=>OSn({primitivesWithoutInteractionMetadata:r,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[r,a]),l=rt.useCallback(c=>{var d,m;const u=[];for(const g of c)if(g._element){const E=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(m=g._element)==null?void 0:m.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(E))}const f=new Set(c.map(g=>g._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:f,primitiveIdsInMousedOverNet:u})},[i]);return Ge.jsx(b7n,{elements:t,transform:e,primitives:r,onMouseHoverOverPrimitives:l,children:Ge.jsx(i7n,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(l7n,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ge.jsx(n7n,{transform:e,focusOnHover:n.focusOnHover,children:Ge.jsx(T7n,{elements:t,children:Ge.jsx(f7n,{transform:e,elements:t,children:Ge.jsx(S7n,{transform:e,soup:t,children:Ge.jsx(e7n,{transform:e,debugGraphics:n.debugGraphics,children:Ge.jsx(t7n,{transform:e,elements:t,children:Ge.jsx(JSn,{transform:e,primitives:s,width:n.width,height:n.height,grid:n.grid})})})})})})})})})})},C7n=Mc(k0(400,300),f2(40,-40)),R7n=({circuitJson:n,debugGraphics:e,height:t=600,initialState:r,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=rt.useState(!l),[f,d]=Dme(),[m,g]=rt.useState(C7n),{ref:E,setTransform:w,cancelDrag:S}=LSn({transform:m,onSetTransform:g,enabled:c});let[M,N]=rt.useState([]);M=a??M;const k=rt.useRef(!1),V=`${(n==null?void 0:n.length)||0}_${(n==null?void 0:n.editCount)||0}`,Y=()=>{const ue=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:pe,width:ce,height:Se}=q.some(Te=>Te.type.startsWith("pcb_"))?wSn(q.filter(Te=>Te.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((ue.width??0)/ce,(ue.height??0)/Se,100)*.75,_e=Mc(k0((ue.width??0)/2,(ue.height??0)/2),f2(he,-he,0,0),k0(-pe.x,-pe.y));w(_e)};rt.useEffect(()=>{d!=null&&d.width&&n&&n.length!==0&&(k.current||(Y(),k.current=!0))},[n,d]);const W=rt.useMemo(()=>(n==null?void 0:n.filter(ue=>ue.type.startsWith("pcb_")||ue.type.startsWith("source_")))??[],[V]),q=rt.useMemo(()=>W4n({circuitJson:W,editEvents:M}),[W,M]),ee=ue=>{N([...M,ue]),o==null||o([...M,ue])},X=ue=>{const pe=M.map(ce=>ce.edit_event_id===ue.edit_event_id?{...ce,...ue}:ce);N(pe),o==null||o(pe)};return Ge.jsxs("div",{ref:E,style:{position:"relative"},children:[Ge.jsx("div",{ref:f,children:Ge.jsxs(TSn,{initialState:r,children:[Ge.jsx(M7n,{transform:m,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:S,onCreateEditEvent:ee,onModifyEditEvent:X,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:q,debugGraphics:e},d.width),Ge.jsx(CSn,{})]})}),l&&!c&&Ge.jsx("div",{onClick:()=>{u(!0),Y()},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:Ge.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:"Click to Interact"})})]})};const A7n=({containerClassName:n,...e})=>{const t=rt.useRef(null),[r,i]=rt.useState(620);return rt.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)}},[]),Ge.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ge.jsx(R7n,{...e,height:r})})},P7n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-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-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.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}',N7n=()=>{rt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=P7n,document.head.appendChild(e)},[])},hrt=n=>`hsl(${S4.indexOf(n)*137.5%360}, 70%, 50%)`,D7n=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ge.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ge.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:S4.map(t=>{const r=n[t]||0,i=r/e*100;return Ge.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:hrt(t)},children:Ge.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),Ge.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},L7n=({renderLog:n})=>{const[e,t]=rt.useState("chronological");if(!n)return Ge.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>S4.indexOf(a[0])-S4.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Ge.jsxs("div",{className:"rf-bg-white",children:[Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ge.jsx("div",{children:"Render Logs"}),Ge.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ge.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ge.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ge.jsx("option",{value:"chronological",children:"Phase Order"}),Ge.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ge.jsx(D7n,{phaseTimings:n.phaseTimings}),Ge.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ge.jsx("thead",{children:Ge.jsxs("tr",{children:[Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ge.jsx("tbody",{children:r.map(([a,o])=>Ge.jsxs("tr",{children:[Ge.jsx("td",{className:"rf-p-2",children:S4.indexOf(a)}),Ge.jsx("td",{className:"rf-p-2",children:a}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsx("div",{className:"rf-w-8",children:Ge.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:hrt(a),width:`${o/i*100}%`}})})}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsxs("div",{className:"rf-flex w-full",children:[Ge.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ge.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},O7n="0.0.414",z7n=["assembly","bom","circuit_json","errors","render_log"],U7n=({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:m,headerClassName:g,leftHeaderContent:E,readOnly:w,isStreaming:S,autoroutingLog:M,onReportAutoroutingLog:N,isRunningCode:k,hasCodeChangedSinceLastRun:V,onEditEvent:Y,editEvents:W,defaultActiveTab:q,autoRotate3dViewerDisabled:ee,showSchematicDebugGrid:X=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:pe=!1})=>{var De;N7n();const ce=rt.useMemo(()=>r?r.filter(ze=>ze&&"error_type"in ze):null,[r]),[Se,he]=rt.useState(q??"pcb"),[_e,Te]=rt.useState(pe),be=rt.useCallback(ze=>{he(ze),u==null||u(ze)},[u]),Pe=()=>{Te(!_e)};return rt.useEffect(()=>{t&&be("errors")},[t]),rt.useEffect(()=>{(Se==="code"||Se==="errors")&&r&&!t&&be(q??"pcb")},[r]),Ge.jsx("div",{className:sh("flex flex-col relative rf-overflow-x-hidden",m),children:Ge.jsx("div",{className:sh("rf-md:sticky rf-md:top-2",_e&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ge.jsxs(lbe,{value:Se,onValueChange:be,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ge.jsxs("div",{className:sh("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[E,E&&Ge.jsx("div",{className:"rf-flex-grow"}),!E&&k&&Ge.jsx(nM,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!E&&Ge.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(De=f.lastRenderEvent)==null?void 0:De.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),Ge.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ge.jsx(nM,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ge.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Ge.jsxs(GX,{children:[o&&Ge.jsx(hS,{value:"code",children:"Code"}),Ge.jsxs(hS,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:sh("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ge.jsxs(hS,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Ge.jsx("span",{className:sh("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ge.jsxs(hS,{value:"cad",children:[r&&Ge.jsx("span",{className:sh("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",V?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Se)&&Ge.jsx(hS,{value:Se,children:sbe(Se)}),Ge.jsxs(p0e,{children:[Ge.jsx(h0e,{asChild:!0,children:Ge.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ge.jsx(aln,{className:"rf-w-4 rf-h-4"}),(ce&&ce.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ge.jsxs(aB,{className:"rf-*:text-xs",children:[z7n.map(ze=>Ge.jsxs(zb,{onSelect:()=>be(ze),children:[Se!==ze&&Ge.jsx(g$e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Se===ze&&Ge.jsx(bue,{className:"rf-w-3 rf-h-3"}),Ge.jsx("div",{className:"rf-pr-2",children:sbe(ze)}),ze==="errors"&&(ce&&ce.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:ce==null?void 0:ce.length})]},ze)),Ge.jsx(zb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ge.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",O7n.split(".").map((ze,Re)=>Re===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),ue&&Ge.jsx(m3,{onClick:Pe,variant:"ghost",children:_e?Ge.jsx(cln,{size:16}):Ge.jsx(sln,{size:16})})]}),o&&Ge.jsx(c8,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ge.jsx("div",{className:"rf-h-full",children:s})}),Ge.jsx(c8,{value:"pcb",children:Ge.jsx("div",{className:sh("rf-overflow-hidden",_e?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallbackRender:({error:ze})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(A7n,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:sh("rf-h-full rf-w-full",_e?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{Y&&ze.forEach(Re=>Y(Re))}}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"assembly",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallback:Ge.jsx("div",{children:"Error loading Assembly"}),children:r?Ge.jsx(z1n,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"schematic",children:Ge.jsx("div",{className:sh("rf-overflow-auto rf-bg-white",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallbackRender:({error:ze})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(D1n,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>{Y==null||Y(ze)},debugGrid:X,colorOverrides:{schematic:{background:"transparent"}}}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"cad",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{FallbackComponent:Gsn,children:r?Ge.jsx(Vsn,{soup:r,autoRotateDisabled:ee}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"bom",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallbackRender:({error:ze})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:r?Ge.jsx(B1n,{circuitJson:r}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"circuit_json",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(tM,{fallback:Ge.jsx("div",{children:"Error loading JSON viewer"}),children:r?Ge.jsx(I1n,{elements:r}):Ge.jsx(kw,{onRunClicked:e})})})}),Ge.jsx(c8,{value:"errors",children:Ge.jsx("div",{className:sh("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r?Ge.jsx(rfn,{code:n,circuitJsonErrors:ce,errorMessage:t,autoroutingLog:M,onReportAutoroutingLog:N}):Ge.jsx(kw,{onRunClicked:e})})}),c&&Ge.jsx(c8,{value:"render_log",children:Ge.jsx(L7n,{renderLog:f})})]})})})};var sV="Dialog",[mrt,yrt]=t6(sV),[k7n,Bb]=mrt(sV),vrt=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=rt.useRef(null),l=rt.useRef(null),[c,u]=IE({prop:r,defaultProp:i??!1,onChange:a,caller:sV});return Ge.jsx(k7n,{scope:e,triggerRef:s,contentRef:l,contentId:n6(),titleId:n6(),descriptionId:n6(),open:c,onOpenChange:u,onOpenToggle:rt.useCallback(()=>u(f=>!f),[u]),modal:o,children:t})};vrt.displayName=sV;var grt="DialogTrigger",_rt=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(grt,t),a=fx(e,i.triggerRef);return Ge.jsx(Uv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":kme(i.open),...r,ref:a,onClick:Lp(n.onClick,i.onOpenToggle)})});_rt.displayName=grt;var zme="DialogPortal",[I7n,xrt]=mrt(zme,{forceMount:void 0}),brt=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=Bb(zme,e);return Ge.jsx(I7n,{scope:e,forceMount:t,children:rt.Children.map(r,o=>Ge.jsx(s8,{present:t||a.open,children:Ge.jsx(Que,{asChild:!0,container:i,children:o})}))})};brt.displayName=zme;var lV="DialogOverlay",Srt=rt.forwardRef((n,e)=>{const t=xrt(lV,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=Bb(lV,n.__scopeDialog);return a.modal?Ge.jsx(s8,{present:r||a.open,children:Ge.jsx(B7n,{...i,ref:e})}):null});Srt.displayName=lV;var F7n=kE("DialogOverlay.RemoveScroll"),B7n=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(lV,t);return Ge.jsx(r0e,{as:F7n,allowPinchZoom:!0,shards:[i.contentRef],children:Ge.jsx(Uv.div,{"data-state":kme(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Yw="DialogContent",wrt=rt.forwardRef((n,e)=>{const t=xrt(Yw,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=Bb(Yw,n.__scopeDialog);return Ge.jsx(s8,{present:r||a.open,children:a.modal?Ge.jsx(j7n,{...i,ref:e}):Ge.jsx(H7n,{...i,ref:e})})});wrt.displayName=Yw;var j7n=rt.forwardRef((n,e)=>{const t=Bb(Yw,n.__scopeDialog),r=rt.useRef(null),i=fx(e,t.contentRef,r);return rt.useEffect(()=>{const a=r.current;if(a)return wGe(a)},[]),Ge.jsx(Ert,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Lp(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Lp(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Lp(n.onFocusOutside,a=>a.preventDefault())})}),H7n=rt.forwardRef((n,e)=>{const t=Bb(Yw,n.__scopeDialog),r=rt.useRef(!1),i=rt.useRef(!1);return Ge.jsx(Ert,{...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()}})}),Ert=rt.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=Bb(Yw,t),l=rt.useRef(null),c=fx(e,l);return I$e(),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(Uue,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ge.jsx(Due,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":kme(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx($7n,{titleId:s.titleId}),Ge.jsx(q7n,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ume="DialogTitle",Trt=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(Ume,t);return Ge.jsx(Uv.h2,{id:i.titleId,...r,ref:e})});Trt.displayName=Ume;var Mrt="DialogDescription",Crt=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(Mrt,t);return Ge.jsx(Uv.p,{id:i.descriptionId,...r,ref:e})});Crt.displayName=Mrt;var Rrt="DialogClose",Art=rt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=Bb(Rrt,t);return Ge.jsx(Uv.button,{type:"button",...r,ref:e,onClick:Lp(n.onClick,()=>i.onOpenChange(!1))})});Art.displayName=Rrt;function kme(n){return n?"open":"closed"}var Prt="DialogTitleWarning",[V7n,Nrt]=c8t(Prt,{contentName:Yw,titleName:Ume,docsSlug:"dialog"}),$7n=({titleId:n})=>{const e=Nrt(Prt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13455
13455
 
13456
13456
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
13457
13457
 
13458
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return rt.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},G7n="DialogDescriptionWarning",q7n=({contentRef:n,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nrt(G7n).contentName}}.`;return rt.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},Drt=vrt,Y7n=_rt,Lrt=brt,Ime=Srt,Fme=wrt,Bme=Trt,jme=Crt,Ort=Art;const X7n=Drt,W7n=Lrt,zrt=rt.forwardRef(({className:n,...e},t)=>Ge.jsx(Ime,{className:sh("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}));zrt.displayName=Ime.displayName;const Urt=rt.forwardRef(({className:n,children:e,...t},r)=>Ge.jsxs(W7n,{children:[Ge.jsx(zrt,{}),Ge.jsx(Fme,{ref:r,className:sh("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})]}));Urt.displayName=Fme.displayName;const Z7n=rt.forwardRef(({className:n,...e},t)=>Ge.jsx(Bme,{ref:t,className:sh("rf-text-lg rf-font-semibold",n),...e}));Z7n.displayName=Bme.displayName;const Q7n=rt.forwardRef(({className:n,...e},t)=>Ge.jsx(jme,{ref:t,className:sh("rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",n),...e}));Q7n.displayName=jme.displayName;function Hme(n,e){return Hme=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Hme(n,e)}function RM(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,Hme(n,e)}var AM=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}(),cV=typeof window>"u";function H5(){}function K7n(n,e){return typeof n=="function"?n(e):n}function Vme(n){return typeof n=="number"&&n>=0&&n!==1/0}function uV(n){return Array.isArray(n)?n:[n]}function krt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function fV(n,e,t){return gN(n)?typeof e=="function"?Mh({},t,{queryKey:n,queryFn:e}):Mh({},e,{queryKey:n}):n}function J7n(n,e,t){return gN(n)?Mh({},e,{mutationKey:n}):typeof n=="function"?Mh({},e,{mutationFn:n}):Mh({},n)}function e7(n,e,t){return gN(n)?[Mh({},e,{queryKey:n}),t]:[n||{},e]}function ewn(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 Irt(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(gN(s)){if(r){if(e.queryHash!==$me(s,e.options))return!1}else if(!dV(e.queryKey,s))return!1}var c=ewn(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 Frt(n,e){var t=n.exact,r=n.fetching,i=n.predicate,a=n.mutationKey;if(gN(a)){if(!e.options.mutationKey)return!1;if(t){if(Xw(e.options.mutationKey)!==Xw(a))return!1}else if(!dV(e.options.mutationKey,a))return!1}return!(typeof r=="boolean"&&e.state.status==="loading"!==r||i&&!i(e))}function $me(n,e){var t=(e==null?void 0:e.queryKeyHashFn)||Xw;return t(n)}function Xw(n){var e=uV(n);return twn(e)}function twn(n){return JSON.stringify(n,function(e,t){return Gme(t)?Object.keys(t).sort().reduce(function(r,i){return r[i]=t[i],r},{}):t})}function dV(n,e){return Brt(uV(n),uV(e))}function Brt(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!Brt(n[t],e[t])}):!1}function pV(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||Gme(n)&&Gme(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]=pV(n[c],e[c]),o[c]===n[c]&&s++}return r===a&&s===r?n:o}return e}function nwn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function Gme(n){if(!jrt(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!jrt(t)||!t.hasOwnProperty("isPrototypeOf"))}function jrt(n){return Object.prototype.toString.call(n)==="[object Object]"}function gN(n){return typeof n=="string"||Array.isArray(n)}function rwn(n){return new Promise(function(e){setTimeout(e,n)})}function Hrt(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function Vrt(){if(typeof AbortController=="function")return new AbortController}var iwn=function(n){RM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!cV&&((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}(AM),_N=new iwn,awn=function(n){RM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!cV&&((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}(AM),hV=new awn;function own(n){return Math.min(1e3*Math.pow(2,n),3e4)}function mV(n){return typeof(n==null?void 0:n.cancel)=="function"}var $rt=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function yV(n){return n instanceof $rt}var Grt=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,m){o=d,s=m});var l=function(m){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(m),a==null||a(),o(m))},c=function(m){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(m),a==null||a(),s(m))},u=function(){return new Promise(function(m){a=m,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 m;try{m=e.fn()}catch(g){m=Promise.reject(g)}i=function(E){if(!t.isResolved&&(c(new $rt(E)),t.abort==null||t.abort(),mV(m)))try{m.cancel()}catch{}},t.isTransportCancelable=mV(m),Promise.resolve(m).then(l).catch(function(g){var E,w;if(!t.isResolved){var S=(E=e.retry)!=null?E:3,M=(w=e.retryDelay)!=null?w:own,N=typeof M=="function"?M(t.failureCount,g):M,k=S===!0||typeof S=="number"&&t.failureCount<S||typeof S=="function"&&S(t.failureCount,g);if(r||!k){c(g);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,g),rwn(N).then(function(){if(!_N.isFocused()||!hV.isOnline())return u()}).then(function(){r?c(g):d()})}})}};f()},swn=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):Hrt(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&&Hrt(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}(),Yg=new swn,qrt=console;function vV(){return qrt}function lwn(n){qrt=n}var cwn=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=Mh({},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(),Vme(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=K7n(r,s);return(a=(o=this.options).isDataEqual)!=null&&a.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=pV(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(H5).catch(H5):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||!krt(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(M){return M.options.queryFn});u&&this.setOptions(u.options)}var f=uV(this.queryKey),d=Vrt(),m={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(m,"signal",{enumerable:!0,get:function(){if(d)return a.abortSignalConsumed=!0,d.signal}});var g=function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(m)):Promise.reject("Missing queryFn")},E={fetchOptions:i,options:this.options,queryKey:f,state:this.state,fetchFn:g,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var w;(w=this.options.behavior)==null||w.onFetch(E)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=E.fetchOptions)==null?void 0:s.meta)){var S;this.dispatch({type:"fetch",meta:(S=E.fetchOptions)==null?void 0:S.meta})}return this.retryer=new Grt({fn:E.fetchFn,abort:d==null||(l=d.abort)==null?void 0:l.bind(d),onSuccess:function(N){a.setData(N),a.cache.config.onSuccess==null||a.cache.config.onSuccess(N,a),a.cacheTime===0&&a.optionalRemove()},onError:function(N){yV(N)&&N.silent||a.dispatch({type:"error",error:N}),yV(N)||(a.cache.config.onError==null||a.cache.config.onError(N,a),vV().error(N)),a.cacheTime===0&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(r){var i=this;this.state=this.reducer(this.state,r),Yg.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 Mh({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return Mh({},r,{isPaused:!0});case"continue":return Mh({},r,{isPaused:!1});case"fetch":return Mh({},r,{fetchFailureCount:0,fetchMeta:(a=i.meta)!=null?a:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Mh({},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 yV(s)&&s.revert&&this.revertState?Mh({},this.revertState):Mh({},r,{error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Mh({},r,{isInvalidated:!0});case"setState":return Mh({},r,i.state);default:return r}},n}(),uwn=function(n){RM(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:$me(l,a),u=this.get(c);return u||(u=new cwn({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;Yg.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=e7(i,a),s=o[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(l){return Irt(s,l)})},t.findAll=function(i,a){var o=e7(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return Irt(s,l)}):this.queries},t.notify=function(i){var a=this;Yg.batch(function(){a.listeners.forEach(function(o){o(i)})})},t.onFocus=function(){var i=this;Yg.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},t.onOnline=function(){var i=this;Yg.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},e}(AM),fwn=function(){function n(t){this.options=Mh({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Yrt(),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(H5).catch(H5)):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),vV().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 Grt({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=dwn(this.state,r),Yg.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(r)}),i.mutationCache.notify(i)})},n}();function Yrt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function dwn(n,e){switch(e.type){case"failed":return Mh({},n,{failureCount:n.failureCount+1});case"pause":return Mh({},n,{isPaused:!0});case"continue":return Mh({},n,{isPaused:!1});case"loading":return Mh({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Mh({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Mh({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Mh({},n,e.state);default:return n}}var pwn=function(n){RM(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 fwn({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;Yg.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 Frt(i,a)})},t.findAll=function(i){return this.mutations.filter(function(a){return Frt(i,a)})},t.notify=function(i){var a=this;Yg.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 Yg.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(H5)})},Promise.resolve())})},e}(AM);function hwn(){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",m=((o=e.state.data)==null?void 0:o.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[],E=Vrt(),w=E==null?void 0:E.signal,S=g,M=!1,N=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},k=function(Se,he,_e,Te){return S=Te?[he].concat(S):[].concat(S,[he]),Te?[_e].concat(Se):[].concat(Se,[_e])},V=function(Se,he,_e,Te){if(M)return Promise.reject("Cancelled");if(typeof _e>"u"&&!he&&Se.length)return Promise.resolve(Se);var be={queryKey:e.queryKey,signal:w,pageParam:_e,meta:e.meta},Pe=N(be),De=Promise.resolve(Pe).then(function(Re){return k(Se,_e,Re,Te)});if(mV(Pe)){var ze=De;ze.cancel=Pe.cancel}return De},Y;if(!m.length)Y=V([]);else if(f){var W=typeof u<"u",q=W?u:Xrt(e.options,m);Y=V(m,W,q)}else if(d){var ee=typeof u<"u",X=ee?u:mwn(e.options,m);Y=V(m,ee,X,!0)}else(function(){S=[];var ce=typeof e.options.getNextPageParam>"u",Se=l&&m[0]?l(m[0],0,m):!0;Y=Se?V([],ce,g[0]):Promise.resolve(k([],g[0],m[0]));for(var he=function(be){Y=Y.then(function(Pe){var De=l&&m[be]?l(m[be],be,m):!0;if(De){var ze=ce?g[be]:Xrt(e.options,Pe);return V(Pe,ce,ze)}return Promise.resolve(k(Pe,g[be],m[be]))})},_e=1;_e<m.length;_e++)he(_e)})();var ue=Y.then(function(ce){return{pages:ce,pageParams:S}}),pe=ue;return pe.cancel=function(){M=!0,E==null||E.abort(),mV(Y)&&Y.cancel()},ue}}}}function Xrt(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function mwn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var ywn=function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new uwn,this.mutationCache=t.mutationCache||new pwn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var r=this;this.unsubscribeFocus=_N.subscribe(function(){_N.isFocused()&&hV.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=hV.subscribe(function(){_N.isFocused()&&hV.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=e7(r,i),o=a[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(r){return this.mutationCache.findAll(Mh({},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=fV(r),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(i,a)},e.setQueriesData=function(r,i,a){var o=this;return Yg.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=e7(r,i),o=a[0],s=this.queryCache;Yg.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(r,i,a){var o=this,s=e7(r,i,a),l=s[0],c=s[1],u=this.queryCache,f=Mh({},l,{active:!0});return Yg.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=e7(r,i,a),l=s[0],c=s[1],u=c===void 0?{}:c;typeof u.revert>"u"&&(u.revert=!0);var f=Yg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.cancel(u)})});return Promise.all(f).then(H5).catch(H5)},e.invalidateQueries=function(r,i,a){var o,s,l,c=this,u=e7(r,i,a),f=u[0],d=u[1],m=Mh({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Yg.batch(function(){return c.queryCache.findAll(f).forEach(function(g){g.invalidate()}),c.refetchQueries(m,d)})},e.refetchQueries=function(r,i,a){var o=this,s=e7(r,i,a),l=s[0],c=s[1],u=Yg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.fetch(void 0,Mh({},c,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(u).then(H5);return c!=null&&c.throwOnError||(f=f.catch(H5)),f},e.fetchQuery=function(r,i,a){var o=fV(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(H5).catch(H5)},e.fetchInfiniteQuery=function(r,i,a){var o=fV(r,i,a);return o.behavior=hwn(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(r,i,a){return this.fetchInfiniteQuery(r,i,a).then(H5).catch(H5)},e.cancelMutations=function(){var r=this,i=Yg.batch(function(){return r.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(H5).catch(H5)},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 Xw(r)===Xw(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 dV(r,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(r,i){var a=this.mutationDefaults.find(function(o){return Xw(r)===Xw(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 dV(r,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=Mh({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=$me(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},e.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:Mh({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),vwn=function(n){RM(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),Wrt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return qme(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return qme(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&&Zrt(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(Mh({},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(H5)),a},t.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(cV||this.currentResult.isStale||!Vme(this.options.staleTime))){var a=krt(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,!(cV||this.options.enabled===!1||!Vme(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||_N.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,m=f?this.currentResult:this.previousQueryResult,g=i.state,E=g.dataUpdatedAt,w=g.error,S=g.errorUpdatedAt,M=g.isFetching,N=g.status,k=!1,V=!1,Y;if(a.optimisticResults){var W=this.hasListeners(),q=!W&&Wrt(i,a),ee=W&&Zrt(i,o,a,s);(q||ee)&&(M=!0,E||(N="loading"))}if(a.keepPreviousData&&!g.dataUpdateCount&&(m!=null&&m.isSuccess)&&N!=="error")Y=m.data,E=m.dataUpdatedAt,N=m.status,k=!0;else if(a.select&&typeof g.data<"u")if(l&&g.data===(c==null?void 0:c.data)&&a.select===this.selectFn)Y=this.selectResult;else try{this.selectFn=a.select,Y=a.select(g.data),a.structuralSharing!==!1&&(Y=pV(l==null?void 0:l.data,Y)),this.selectResult=Y,this.selectError=null}catch(pe){vV().error(pe),this.selectError=pe}else Y=g.data;if(typeof a.placeholderData<"u"&&typeof Y>"u"&&(N==="loading"||N==="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=pV(l==null?void 0:l.data,X)),this.selectError=null}catch(pe){vV().error(pe),this.selectError=pe}typeof X<"u"&&(N="success",Y=X,V=!0)}this.selectError&&(w=this.selectError,Y=this.selectResult,S=Date.now(),N="error");var ue={status:N,isLoading:N==="loading",isSuccess:N==="success",isError:N==="error",isIdle:N==="idle",data:Y,dataUpdatedAt:E,error:w,errorUpdatedAt:S,failureCount:g.fetchFailureCount,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:M,isRefetching:M&&N!=="loading",isLoadingError:N==="error"&&g.dataUpdatedAt===0,isPlaceholderData:V,isPreviousData:k,isRefetchError:N==="error"&&g.dataUpdatedAt!==0,isStale:Yme(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],m=c==null?void 0:c.some(function(E){return E===u}),g=l==null?void 0:l.some(function(E){return E===u});return d&&!g&&(!c||m)})},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,!nwn(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(Mh({},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"&&!yV(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},t.notify=function(i){var a=this;Yg.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}(AM);function gwn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Wrt(n,e){return gwn(n,e)||n.state.dataUpdatedAt>0&&qme(n,e,e.refetchOnMount)}function qme(n,e,t){if(e.enabled!==!1){var r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&Yme(n,e)}return!1}function Zrt(n,e,t,r){return t.enabled!==!1&&(n!==e||r.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&Yme(n,t)}function Yme(n,e){return n.isStaleByTime(e.staleTime)}var _wn=function(n){RM(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,Mh({},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:Yrt(),a=Mh({},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;Yg.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}(AM),xwn=N4e.unstable_batchedUpdates;Yg.setBatchNotifyFunction(xwn);var bwn=console;lwn(bwn);var Qrt=Jc.createContext(void 0),Krt=Jc.createContext(!1);function Jrt(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Qrt),window.ReactQueryClientContext):Qrt}var eit=function(){var e=Jc.useContext(Jrt(Jc.useContext(Krt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Swn=function(e){var t=e.client,r=e.contextSharing,i=r===void 0?!1:r,a=e.children;Jc.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=Jrt(i);return Jc.createElement(Krt.Provider,{value:i},Jc.createElement(o.Provider,{value:t},a))};function wwn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var Ewn=Jc.createContext(wwn()),Twn=function(){return Jc.useContext(Ewn)};function tit(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function Mwn(n,e,t){var r=Jc.useRef(!1),i=Jc.useState(0),a=i[1],o=J7n(n,e),s=eit(),l=Jc.useRef();l.current?l.current.setOptions(o):l.current=new _wn(s,o);var c=l.current.getCurrentResult();Jc.useEffect(function(){r.current=!0;var f=l.current.subscribe(Yg.batchCalls(function(){r.current&&a(function(d){return d+1})}));return function(){r.current=!1,f()}},[]);var u=Jc.useCallback(function(f,d){l.current.mutate(f,d).catch(H5)},[]);if(c.error&&tit(void 0,l.current.options.useErrorBoundary,[c.error]))throw c.error;return Mh({},c,{mutate:u,mutateAsync:c.mutate})}function Cwn(n,e){var t=Jc.useRef(!1),r=Jc.useState(0),i=r[1],a=eit(),o=Twn(),s=a.defaultQueryObserverOptions(n);s.optimisticResults=!0,s.onError&&(s.onError=Yg.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Yg.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Yg.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=Jc.useState(function(){return new e(a,s)}),c=l[0],u=c.getOptimisticResult(s);if(Jc.useEffect(function(){t.current=!0,o.clearReset();var f=c.subscribe(Yg.batchCalls(function(){t.current&&i(function(d){return d+1})}));return c.updateResult(),function(){t.current=!1,f()}},[o,c]),Jc.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&&tit(s.suspense,s.useErrorBoundary,[u.error,c.getCurrentQuery()]))throw u.error;return s.notifyOnChangeProps==="tracked"&&(u=c.trackResult(u,s)),u}function Rwn(n,e,t){var r=fV(n,e,t);return Cwn(r,vwn)}function Awn({vendor:n,isActive:e,onSelect:t,selectedShippingIdx:r,onSelectShipping:i}){return Ge.jsxs("div",{className:sh("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:[Ge.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-py-4",children:[Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ge.jsx(uln,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),Ge.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[Ge.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),Ge.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Ge.jsxs("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:["$",n.total_cost_without_shipping.toFixed(2)]})})]})]}),e&&Ge.jsxs(Ge.Fragment,{children:[Ge.jsx("hr",{className:"rf-border-gray-200"}),Ge.jsxs("div",{className:"rf-px-6 rf-py-2",children:[Ge.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-medium rf-text-gray-700",children:"Shipping Options:"}),Ge.jsx("div",{className:"rf-flex rf-gap-4 rf-flex-wrap rf-mb-2",children:n.shipping_options.map((a,o)=>Ge.jsxs("button",{type:"button",className:sh("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:[Ge.jsx(pln,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),Ge.jsxs("div",{className:"rf-text-left rf-flex-1",children:[Ge.jsx("div",{className:"rf-leading-tight rf-font-medium",children:a.carrier}),Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:a.service})]})]},a.carrier+o))})]})]}),e&&r!==null&&Ge.jsx("div",{className:"rf-px-6 rf-pb-3",children:Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-2",children:[Ge.jsx("span",{className:"rf-text-gray-800 rf-font-medium rf-text-sm",children:"Total (incl. shipping):"}),Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ge.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm rf-mr-2",children:["($",n.total_cost_without_shipping.toFixed(2)," + $",n.shipping_options[r].cost.toFixed(2),")"]}),Ge.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})})]})}let Pwn={data:""},Nwn=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||Pwn,Dwn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Lwn=/\/\*[^]*?\*\/| +/g,nit=/\n+/g,t7=(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"?t7(o,a):a+"{"+t7(o,a[1]=="k"?"":e)+"}":typeof o=="object"?r+=t7(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+=t7.p?t7.p(a,o):a+":"+o+";")}return t+(e&&i?e+"{"+i+"}":i)+r},B6={},rit=n=>{if(typeof n=="object"){let e="";for(let t in n)e+=t+rit(n[t]);return e}return n},Own=(n,e,t,r,i)=>{let a=rit(n),o=B6[a]||(B6[a]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(a));if(!B6[o]){let l=a!==n?n:(c=>{let u,f,d=[{}];for(;u=Dwn.exec(c.replace(Lwn,""));)u[4]?d.shift():u[3]?(f=u[3].replace(nit," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(nit," ").trim();return d[0]})(n);B6[o]=t7(i?{["@keyframes "+o]:l}:l,t?"":"."+o)}let s=t&&B6.g?B6.g:null;return t&&(B6.g=B6[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)})(B6[o],e,r,s),o},zwn=(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?"":t7(s,""):s===!1?"":s}return r+i+(o??"")},"");function gV(n){let e=this||{},t=n.call?n(e.p):n;return Own(t.unshift?t.raw?zwn(t,[].slice.call(arguments,1),e.p):t.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):t,Nwn(e.target),e.g,e.o,e.k)}let iit,Xme,Wme;gV.bind({g:1});let j6=gV.bind({k:1});function Uwn(n,e,t,r){t7.p=e,iit=n,Xme=t,Wme=r}function n7(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:Xme&&Xme()},s),t.o=/ *go\d+/.test(l),s.className=gV.apply(t,r)+(l?" "+l:"");let c=n;return n[0]&&(c=s.as||n,delete s.as),Wme&&c[0]&&Wme(s),iit(c,s)}return i}}var kwn=n=>typeof n=="function",_V=(n,e)=>kwn(n)?n(e):n,Iwn=(()=>{let n=0;return()=>(++n).toString()})(),ait=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");n=!e||e.matches}return n}})(),Fwn=20,oit=(n,e)=>{switch(e.type){case 0:return{...n,toasts:[e.toast,...n.toasts].slice(0,Fwn)};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 oit(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}))}}},xV=[],Ww={toasts:[],pausedAt:void 0},Zw=n=>{Ww=oit(Ww,n),xV.forEach(e=>{e(Ww)})},Bwn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},jwn=(n={})=>{let[e,t]=rt.useState(Ww),r=rt.useRef(Ww);rt.useEffect(()=>(r.current!==Ww&&t(Ww),xV.push(t),()=>{let a=xV.indexOf(t);a>-1&&xV.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)||Bwn[a.type],style:{...n.style,...(l=n[a.type])==null?void 0:l.style,...a.style}}});return{...e,toasts:i}},Hwn=(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)||Iwn()}),xN=n=>(e,t)=>{let r=Hwn(e,n,t);return Zw({type:2,toast:r}),r.id},V5=(n,e)=>xN("blank")(n,e);V5.error=xN("error"),V5.success=xN("success"),V5.loading=xN("loading"),V5.custom=xN("custom"),V5.dismiss=n=>{Zw({type:3,toastId:n})},V5.remove=n=>Zw({type:4,toastId:n}),V5.promise=(n,e,t)=>{let r=V5.loading(e.loading,{...t,...t==null?void 0:t.loading});return typeof n=="function"&&(n=n()),n.then(i=>{let a=e.success?_V(e.success,i):void 0;return a?V5.success(a,{id:r,...t,...t==null?void 0:t.success}):V5.dismiss(r),i}).catch(i=>{let a=e.error?_V(e.error,i):void 0;a?V5.error(a,{id:r,...t,...t==null?void 0:t.error}):V5.dismiss(r)}),n};var Vwn=(n,e)=>{Zw({type:1,toast:{id:n,height:e}})},$wn=()=>{Zw({type:5,time:Date.now()})},bN=new Map,Gwn=1e3,qwn=(n,e=Gwn)=>{if(bN.has(n))return;let t=setTimeout(()=>{bN.delete(n),Zw({type:4,toastId:n})},e);bN.set(n,t)},Ywn=n=>{let{toasts:e,pausedAt:t}=jwn(n);rt.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&&V5.dismiss(s.id);return}return setTimeout(()=>V5.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[e,t]);let r=rt.useCallback(()=>{t&&Zw({type:6,time:Date.now()})},[t]),i=rt.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=o||{},u=e.filter(m=>(m.position||c)===(a.position||c)&&m.height),f=u.findIndex(m=>m.id===a.id),d=u.filter((m,g)=>g<f&&m.visible).length;return u.filter(m=>m.visible).slice(...s?[d+1]:[0,d]).reduce((m,g)=>m+(g.height||0)+l,0)},[e]);return rt.useEffect(()=>{e.forEach(a=>{if(a.dismissed)qwn(a.id,a.removeDelay);else{let o=bN.get(a.id);o&&(clearTimeout(o),bN.delete(a.id))}})},[e]),{toasts:e,handlers:{updateHeight:Vwn,startPause:$wn,endPause:r,calculateOffset:i}}},Xwn=j6`
13458
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return rt.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},G7n="DialogDescriptionWarning",q7n=({contentRef:n,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nrt(G7n).contentName}}.`;return rt.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},Drt=vrt,Y7n=_rt,Lrt=brt,Ime=Srt,Fme=wrt,Bme=Trt,jme=Crt,Ort=Art;const X7n=Drt,W7n=Lrt,zrt=rt.forwardRef(({className:n,...e},t)=>Ge.jsx(Ime,{className:sh("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}));zrt.displayName=Ime.displayName;const Urt=rt.forwardRef(({className:n,children:e,...t},r)=>Ge.jsxs(W7n,{children:[Ge.jsx(zrt,{}),Ge.jsx(Fme,{ref:r,className:sh("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})]}));Urt.displayName=Fme.displayName;const Z7n=rt.forwardRef(({className:n,...e},t)=>Ge.jsx(Bme,{ref:t,className:sh("rf-text-lg rf-font-semibold",n),...e}));Z7n.displayName=Bme.displayName;const Q7n=rt.forwardRef(({className:n,...e},t)=>Ge.jsx(jme,{ref:t,className:sh("rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",n),...e}));Q7n.displayName=jme.displayName;function Hme(n,e){return Hme=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Hme(n,e)}function RM(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,Hme(n,e)}var AM=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}(),cV=typeof window>"u";function H5(){}function K7n(n,e){return typeof n=="function"?n(e):n}function Vme(n){return typeof n=="number"&&n>=0&&n!==1/0}function uV(n){return Array.isArray(n)?n:[n]}function krt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function fV(n,e,t){return gN(n)?typeof e=="function"?Mh({},t,{queryKey:n,queryFn:e}):Mh({},e,{queryKey:n}):n}function J7n(n,e,t){return gN(n)?Mh({},e,{mutationKey:n}):typeof n=="function"?Mh({},e,{mutationFn:n}):Mh({},n)}function e7(n,e,t){return gN(n)?[Mh({},e,{queryKey:n}),t]:[n||{},e]}function ewn(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 Irt(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(gN(s)){if(r){if(e.queryHash!==$me(s,e.options))return!1}else if(!dV(e.queryKey,s))return!1}var c=ewn(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 Frt(n,e){var t=n.exact,r=n.fetching,i=n.predicate,a=n.mutationKey;if(gN(a)){if(!e.options.mutationKey)return!1;if(t){if(Xw(e.options.mutationKey)!==Xw(a))return!1}else if(!dV(e.options.mutationKey,a))return!1}return!(typeof r=="boolean"&&e.state.status==="loading"!==r||i&&!i(e))}function $me(n,e){var t=(e==null?void 0:e.queryKeyHashFn)||Xw;return t(n)}function Xw(n){var e=uV(n);return twn(e)}function twn(n){return JSON.stringify(n,function(e,t){return Gme(t)?Object.keys(t).sort().reduce(function(r,i){return r[i]=t[i],r},{}):t})}function dV(n,e){return Brt(uV(n),uV(e))}function Brt(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!Brt(n[t],e[t])}):!1}function pV(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||Gme(n)&&Gme(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]=pV(n[c],e[c]),o[c]===n[c]&&s++}return r===a&&s===r?n:o}return e}function nwn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function Gme(n){if(!jrt(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!jrt(t)||!t.hasOwnProperty("isPrototypeOf"))}function jrt(n){return Object.prototype.toString.call(n)==="[object Object]"}function gN(n){return typeof n=="string"||Array.isArray(n)}function rwn(n){return new Promise(function(e){setTimeout(e,n)})}function Hrt(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function Vrt(){if(typeof AbortController=="function")return new AbortController}var iwn=function(n){RM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!cV&&((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}(AM),_N=new iwn,awn=function(n){RM(e,n);function e(){var r;return r=n.call(this)||this,r.setup=function(i){var a;if(!cV&&((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}(AM),hV=new awn;function own(n){return Math.min(1e3*Math.pow(2,n),3e4)}function mV(n){return typeof(n==null?void 0:n.cancel)=="function"}var $rt=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function yV(n){return n instanceof $rt}var Grt=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,m){o=d,s=m});var l=function(m){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(m),a==null||a(),o(m))},c=function(m){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(m),a==null||a(),s(m))},u=function(){return new Promise(function(m){a=m,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 m;try{m=e.fn()}catch(g){m=Promise.reject(g)}i=function(E){if(!t.isResolved&&(c(new $rt(E)),t.abort==null||t.abort(),mV(m)))try{m.cancel()}catch{}},t.isTransportCancelable=mV(m),Promise.resolve(m).then(l).catch(function(g){var E,w;if(!t.isResolved){var S=(E=e.retry)!=null?E:3,M=(w=e.retryDelay)!=null?w:own,N=typeof M=="function"?M(t.failureCount,g):M,k=S===!0||typeof S=="number"&&t.failureCount<S||typeof S=="function"&&S(t.failureCount,g);if(r||!k){c(g);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,g),rwn(N).then(function(){if(!_N.isFocused()||!hV.isOnline())return u()}).then(function(){r?c(g):d()})}})}};f()},swn=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):Hrt(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&&Hrt(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}(),Yg=new swn,qrt=console;function vV(){return qrt}function lwn(n){qrt=n}var cwn=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=Mh({},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(),Vme(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=K7n(r,s);return(a=(o=this.options).isDataEqual)!=null&&a.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=pV(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(H5).catch(H5):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||!krt(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(M){return M.options.queryFn});u&&this.setOptions(u.options)}var f=uV(this.queryKey),d=Vrt(),m={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(m,"signal",{enumerable:!0,get:function(){if(d)return a.abortSignalConsumed=!0,d.signal}});var g=function(){return a.options.queryFn?(a.abortSignalConsumed=!1,a.options.queryFn(m)):Promise.reject("Missing queryFn")},E={fetchOptions:i,options:this.options,queryKey:f,state:this.state,fetchFn:g,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var w;(w=this.options.behavior)==null||w.onFetch(E)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=E.fetchOptions)==null?void 0:s.meta)){var S;this.dispatch({type:"fetch",meta:(S=E.fetchOptions)==null?void 0:S.meta})}return this.retryer=new Grt({fn:E.fetchFn,abort:d==null||(l=d.abort)==null?void 0:l.bind(d),onSuccess:function(N){a.setData(N),a.cache.config.onSuccess==null||a.cache.config.onSuccess(N,a),a.cacheTime===0&&a.optionalRemove()},onError:function(N){yV(N)&&N.silent||a.dispatch({type:"error",error:N}),yV(N)||(a.cache.config.onError==null||a.cache.config.onError(N,a),vV().error(N)),a.cacheTime===0&&a.optionalRemove()},onFail:function(){a.dispatch({type:"failed"})},onPause:function(){a.dispatch({type:"pause"})},onContinue:function(){a.dispatch({type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(r){var i=this;this.state=this.reducer(this.state,r),Yg.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 Mh({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return Mh({},r,{isPaused:!0});case"continue":return Mh({},r,{isPaused:!1});case"fetch":return Mh({},r,{fetchFailureCount:0,fetchMeta:(a=i.meta)!=null?a:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Mh({},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 yV(s)&&s.revert&&this.revertState?Mh({},this.revertState):Mh({},r,{error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Mh({},r,{isInvalidated:!0});case"setState":return Mh({},r,i.state);default:return r}},n}(),uwn=function(n){RM(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:$me(l,a),u=this.get(c);return u||(u=new cwn({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;Yg.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=e7(i,a),s=o[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(l){return Irt(s,l)})},t.findAll=function(i,a){var o=e7(i,a),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return Irt(s,l)}):this.queries},t.notify=function(i){var a=this;Yg.batch(function(){a.listeners.forEach(function(o){o(i)})})},t.onFocus=function(){var i=this;Yg.batch(function(){i.queries.forEach(function(a){a.onFocus()})})},t.onOnline=function(){var i=this;Yg.batch(function(){i.queries.forEach(function(a){a.onOnline()})})},e}(AM),fwn=function(){function n(t){this.options=Mh({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Yrt(),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(H5).catch(H5)):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),vV().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 Grt({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=dwn(this.state,r),Yg.batch(function(){i.observers.forEach(function(a){a.onMutationUpdate(r)}),i.mutationCache.notify(i)})},n}();function Yrt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function dwn(n,e){switch(e.type){case"failed":return Mh({},n,{failureCount:n.failureCount+1});case"pause":return Mh({},n,{isPaused:!0});case"continue":return Mh({},n,{isPaused:!1});case"loading":return Mh({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Mh({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Mh({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Mh({},n,e.state);default:return n}}var pwn=function(n){RM(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 fwn({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;Yg.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 Frt(i,a)})},t.findAll=function(i){return this.mutations.filter(function(a){return Frt(i,a)})},t.notify=function(i){var a=this;Yg.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 Yg.batch(function(){return i.reduce(function(a,o){return a.then(function(){return o.continue().catch(H5)})},Promise.resolve())})},e}(AM);function hwn(){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",m=((o=e.state.data)==null?void 0:o.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[],E=Vrt(),w=E==null?void 0:E.signal,S=g,M=!1,N=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},k=function(Se,he,_e,Te){return S=Te?[he].concat(S):[].concat(S,[he]),Te?[_e].concat(Se):[].concat(Se,[_e])},V=function(Se,he,_e,Te){if(M)return Promise.reject("Cancelled");if(typeof _e>"u"&&!he&&Se.length)return Promise.resolve(Se);var be={queryKey:e.queryKey,signal:w,pageParam:_e,meta:e.meta},Pe=N(be),De=Promise.resolve(Pe).then(function(Re){return k(Se,_e,Re,Te)});if(mV(Pe)){var ze=De;ze.cancel=Pe.cancel}return De},Y;if(!m.length)Y=V([]);else if(f){var W=typeof u<"u",q=W?u:Xrt(e.options,m);Y=V(m,W,q)}else if(d){var ee=typeof u<"u",X=ee?u:mwn(e.options,m);Y=V(m,ee,X,!0)}else(function(){S=[];var ce=typeof e.options.getNextPageParam>"u",Se=l&&m[0]?l(m[0],0,m):!0;Y=Se?V([],ce,g[0]):Promise.resolve(k([],g[0],m[0]));for(var he=function(be){Y=Y.then(function(Pe){var De=l&&m[be]?l(m[be],be,m):!0;if(De){var ze=ce?g[be]:Xrt(e.options,Pe);return V(Pe,ce,ze)}return Promise.resolve(k(Pe,g[be],m[be]))})},_e=1;_e<m.length;_e++)he(_e)})();var ue=Y.then(function(ce){return{pages:ce,pageParams:S}}),pe=ue;return pe.cancel=function(){M=!0,E==null||E.abort(),mV(Y)&&Y.cancel()},ue}}}}function Xrt(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function mwn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var ywn=function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new uwn,this.mutationCache=t.mutationCache||new pwn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var r=this;this.unsubscribeFocus=_N.subscribe(function(){_N.isFocused()&&hV.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=hV.subscribe(function(){_N.isFocused()&&hV.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=e7(r,i),o=a[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(r){return this.mutationCache.findAll(Mh({},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=fV(r),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(i,a)},e.setQueriesData=function(r,i,a){var o=this;return Yg.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=e7(r,i),o=a[0],s=this.queryCache;Yg.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(r,i,a){var o=this,s=e7(r,i,a),l=s[0],c=s[1],u=this.queryCache,f=Mh({},l,{active:!0});return Yg.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=e7(r,i,a),l=s[0],c=s[1],u=c===void 0?{}:c;typeof u.revert>"u"&&(u.revert=!0);var f=Yg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.cancel(u)})});return Promise.all(f).then(H5).catch(H5)},e.invalidateQueries=function(r,i,a){var o,s,l,c=this,u=e7(r,i,a),f=u[0],d=u[1],m=Mh({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Yg.batch(function(){return c.queryCache.findAll(f).forEach(function(g){g.invalidate()}),c.refetchQueries(m,d)})},e.refetchQueries=function(r,i,a){var o=this,s=e7(r,i,a),l=s[0],c=s[1],u=Yg.batch(function(){return o.queryCache.findAll(l).map(function(d){return d.fetch(void 0,Mh({},c,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(u).then(H5);return c!=null&&c.throwOnError||(f=f.catch(H5)),f},e.fetchQuery=function(r,i,a){var o=fV(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(H5).catch(H5)},e.fetchInfiniteQuery=function(r,i,a){var o=fV(r,i,a);return o.behavior=hwn(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(r,i,a){return this.fetchInfiniteQuery(r,i,a).then(H5).catch(H5)},e.cancelMutations=function(){var r=this,i=Yg.batch(function(){return r.mutationCache.getAll().map(function(a){return a.cancel()})});return Promise.all(i).then(H5).catch(H5)},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 Xw(r)===Xw(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 dV(r,a.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(r,i){var a=this.mutationDefaults.find(function(o){return Xw(r)===Xw(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 dV(r,a.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=Mh({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=$me(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},e.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:Mh({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),vwn=function(n){RM(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),Wrt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return qme(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return qme(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&&Zrt(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(Mh({},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(H5)),a},t.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(cV||this.currentResult.isStale||!Vme(this.options.staleTime))){var a=krt(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,!(cV||this.options.enabled===!1||!Vme(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||_N.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,m=f?this.currentResult:this.previousQueryResult,g=i.state,E=g.dataUpdatedAt,w=g.error,S=g.errorUpdatedAt,M=g.isFetching,N=g.status,k=!1,V=!1,Y;if(a.optimisticResults){var W=this.hasListeners(),q=!W&&Wrt(i,a),ee=W&&Zrt(i,o,a,s);(q||ee)&&(M=!0,E||(N="loading"))}if(a.keepPreviousData&&!g.dataUpdateCount&&(m!=null&&m.isSuccess)&&N!=="error")Y=m.data,E=m.dataUpdatedAt,N=m.status,k=!0;else if(a.select&&typeof g.data<"u")if(l&&g.data===(c==null?void 0:c.data)&&a.select===this.selectFn)Y=this.selectResult;else try{this.selectFn=a.select,Y=a.select(g.data),a.structuralSharing!==!1&&(Y=pV(l==null?void 0:l.data,Y)),this.selectResult=Y,this.selectError=null}catch(pe){vV().error(pe),this.selectError=pe}else Y=g.data;if(typeof a.placeholderData<"u"&&typeof Y>"u"&&(N==="loading"||N==="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=pV(l==null?void 0:l.data,X)),this.selectError=null}catch(pe){vV().error(pe),this.selectError=pe}typeof X<"u"&&(N="success",Y=X,V=!0)}this.selectError&&(w=this.selectError,Y=this.selectResult,S=Date.now(),N="error");var ue={status:N,isLoading:N==="loading",isSuccess:N==="success",isError:N==="error",isIdle:N==="idle",data:Y,dataUpdatedAt:E,error:w,errorUpdatedAt:S,failureCount:g.fetchFailureCount,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:M,isRefetching:M&&N!=="loading",isLoadingError:N==="error"&&g.dataUpdatedAt===0,isPlaceholderData:V,isPreviousData:k,isRefetchError:N==="error"&&g.dataUpdatedAt!==0,isStale:Yme(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],m=c==null?void 0:c.some(function(E){return E===u}),g=l==null?void 0:l.some(function(E){return E===u});return d&&!g&&(!c||m)})},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,!nwn(this.currentResult,a)){var o={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(o.listeners=!0),this.notify(Mh({},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"&&!yV(i.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},t.notify=function(i){var a=this;Yg.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}(AM);function gwn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Wrt(n,e){return gwn(n,e)||n.state.dataUpdatedAt>0&&qme(n,e,e.refetchOnMount)}function qme(n,e,t){if(e.enabled!==!1){var r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&Yme(n,e)}return!1}function Zrt(n,e,t,r){return t.enabled!==!1&&(n!==e||r.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&Yme(n,t)}function Yme(n,e){return n.isStaleByTime(e.staleTime)}var _wn=function(n){RM(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,Mh({},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:Yrt(),a=Mh({},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;Yg.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}(AM),xwn=N4e.unstable_batchedUpdates;Yg.setBatchNotifyFunction(xwn);var bwn=console;lwn(bwn);var Qrt=Jc.createContext(void 0),Krt=Jc.createContext(!1);function Jrt(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Qrt),window.ReactQueryClientContext):Qrt}var eit=function(){var e=Jc.useContext(Jrt(Jc.useContext(Krt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Swn=function(e){var t=e.client,r=e.contextSharing,i=r===void 0?!1:r,a=e.children;Jc.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=Jrt(i);return Jc.createElement(Krt.Provider,{value:i},Jc.createElement(o.Provider,{value:t},a))};function wwn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var Ewn=Jc.createContext(wwn()),Twn=function(){return Jc.useContext(Ewn)};function tit(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function Mwn(n,e,t){var r=Jc.useRef(!1),i=Jc.useState(0),a=i[1],o=J7n(n,e),s=eit(),l=Jc.useRef();l.current?l.current.setOptions(o):l.current=new _wn(s,o);var c=l.current.getCurrentResult();Jc.useEffect(function(){r.current=!0;var f=l.current.subscribe(Yg.batchCalls(function(){r.current&&a(function(d){return d+1})}));return function(){r.current=!1,f()}},[]);var u=Jc.useCallback(function(f,d){l.current.mutate(f,d).catch(H5)},[]);if(c.error&&tit(void 0,l.current.options.useErrorBoundary,[c.error]))throw c.error;return Mh({},c,{mutate:u,mutateAsync:c.mutate})}function Cwn(n,e){var t=Jc.useRef(!1),r=Jc.useState(0),i=r[1],a=eit(),o=Twn(),s=a.defaultQueryObserverOptions(n);s.optimisticResults=!0,s.onError&&(s.onError=Yg.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Yg.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Yg.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=Jc.useState(function(){return new e(a,s)}),c=l[0],u=c.getOptimisticResult(s);if(Jc.useEffect(function(){t.current=!0,o.clearReset();var f=c.subscribe(Yg.batchCalls(function(){t.current&&i(function(d){return d+1})}));return c.updateResult(),function(){t.current=!1,f()}},[o,c]),Jc.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&&tit(s.suspense,s.useErrorBoundary,[u.error,c.getCurrentQuery()]))throw u.error;return s.notifyOnChangeProps==="tracked"&&(u=c.trackResult(u,s)),u}function Rwn(n,e,t){var r=fV(n,e,t);return Cwn(r,vwn)}function Awn({vendor:n,isActive:e,onSelect:t,selectedShippingCarrier:r,onSelectShippingCarrier:i}){var a;return Ge.jsxs("div",{className:sh("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:[Ge.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-py-4",children:[Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ge.jsx(uln,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),Ge.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[Ge.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),Ge.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Ge.jsxs("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:["$",n.total_cost_without_shipping.toFixed(2)]})})]})]}),e&&Ge.jsxs(Ge.Fragment,{children:[Ge.jsx("hr",{className:"rf-border-gray-200"}),Ge.jsxs("div",{className:"rf-px-6 rf-py-2",children:[Ge.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-medium rf-text-gray-700",children:"Shipping Options:"}),Ge.jsx("div",{className:"rf-flex rf-gap-4 rf-flex-wrap rf-mb-2",children:n.shipping_options.map((o,s)=>Ge.jsxs("button",{type:"button",className:sh("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.carrier?"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:l=>{l.stopPropagation(),i(o.carrier)},children:[Ge.jsx(pln,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),Ge.jsxs("div",{className:"rf-text-left rf-flex-1",children:[Ge.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:o.service})]})]},o.carrier+s))})]})]}),e&&r!==null&&Ge.jsx("div",{className:"rf-px-6 rf-pb-3",children:Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-2",children:[Ge.jsx("span",{className:"rf-text-gray-800 rf-font-medium rf-text-sm",children:"Total (incl. shipping):"}),Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ge.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm rf-mr-2",children:["($",n.total_cost_without_shipping.toFixed(2)," + $",(a=n.shipping_options.find(o=>o.carrier===r))==null?void 0:a.cost.toFixed(2),")"]}),Ge.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})})]})}let Pwn={data:""},Nwn=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||Pwn,Dwn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Lwn=/\/\*[^]*?\*\/| +/g,nit=/\n+/g,t7=(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"?t7(o,a):a+"{"+t7(o,a[1]=="k"?"":e)+"}":typeof o=="object"?r+=t7(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+=t7.p?t7.p(a,o):a+":"+o+";")}return t+(e&&i?e+"{"+i+"}":i)+r},B6={},rit=n=>{if(typeof n=="object"){let e="";for(let t in n)e+=t+rit(n[t]);return e}return n},Own=(n,e,t,r,i)=>{let a=rit(n),o=B6[a]||(B6[a]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(a));if(!B6[o]){let l=a!==n?n:(c=>{let u,f,d=[{}];for(;u=Dwn.exec(c.replace(Lwn,""));)u[4]?d.shift():u[3]?(f=u[3].replace(nit," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(nit," ").trim();return d[0]})(n);B6[o]=t7(i?{["@keyframes "+o]:l}:l,t?"":"."+o)}let s=t&&B6.g?B6.g:null;return t&&(B6.g=B6[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)})(B6[o],e,r,s),o},zwn=(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?"":t7(s,""):s===!1?"":s}return r+i+(o??"")},"");function gV(n){let e=this||{},t=n.call?n(e.p):n;return Own(t.unshift?t.raw?zwn(t,[].slice.call(arguments,1),e.p):t.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):t,Nwn(e.target),e.g,e.o,e.k)}let iit,Xme,Wme;gV.bind({g:1});let j6=gV.bind({k:1});function Uwn(n,e,t,r){t7.p=e,iit=n,Xme=t,Wme=r}function n7(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:Xme&&Xme()},s),t.o=/ *go\d+/.test(l),s.className=gV.apply(t,r)+(l?" "+l:"");let c=n;return n[0]&&(c=s.as||n,delete s.as),Wme&&c[0]&&Wme(s),iit(c,s)}return i}}var kwn=n=>typeof n=="function",_V=(n,e)=>kwn(n)?n(e):n,Iwn=(()=>{let n=0;return()=>(++n).toString()})(),ait=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");n=!e||e.matches}return n}})(),Fwn=20,oit=(n,e)=>{switch(e.type){case 0:return{...n,toasts:[e.toast,...n.toasts].slice(0,Fwn)};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 oit(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}))}}},xV=[],Ww={toasts:[],pausedAt:void 0},Zw=n=>{Ww=oit(Ww,n),xV.forEach(e=>{e(Ww)})},Bwn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},jwn=(n={})=>{let[e,t]=rt.useState(Ww),r=rt.useRef(Ww);rt.useEffect(()=>(r.current!==Ww&&t(Ww),xV.push(t),()=>{let a=xV.indexOf(t);a>-1&&xV.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)||Bwn[a.type],style:{...n.style,...(l=n[a.type])==null?void 0:l.style,...a.style}}});return{...e,toasts:i}},Hwn=(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)||Iwn()}),xN=n=>(e,t)=>{let r=Hwn(e,n,t);return Zw({type:2,toast:r}),r.id},V5=(n,e)=>xN("blank")(n,e);V5.error=xN("error"),V5.success=xN("success"),V5.loading=xN("loading"),V5.custom=xN("custom"),V5.dismiss=n=>{Zw({type:3,toastId:n})},V5.remove=n=>Zw({type:4,toastId:n}),V5.promise=(n,e,t)=>{let r=V5.loading(e.loading,{...t,...t==null?void 0:t.loading});return typeof n=="function"&&(n=n()),n.then(i=>{let a=e.success?_V(e.success,i):void 0;return a?V5.success(a,{id:r,...t,...t==null?void 0:t.success}):V5.dismiss(r),i}).catch(i=>{let a=e.error?_V(e.error,i):void 0;a?V5.error(a,{id:r,...t,...t==null?void 0:t.error}):V5.dismiss(r)}),n};var Vwn=(n,e)=>{Zw({type:1,toast:{id:n,height:e}})},$wn=()=>{Zw({type:5,time:Date.now()})},bN=new Map,Gwn=1e3,qwn=(n,e=Gwn)=>{if(bN.has(n))return;let t=setTimeout(()=>{bN.delete(n),Zw({type:4,toastId:n})},e);bN.set(n,t)},Ywn=n=>{let{toasts:e,pausedAt:t}=jwn(n);rt.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&&V5.dismiss(s.id);return}return setTimeout(()=>V5.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[e,t]);let r=rt.useCallback(()=>{t&&Zw({type:6,time:Date.now()})},[t]),i=rt.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=o||{},u=e.filter(m=>(m.position||c)===(a.position||c)&&m.height),f=u.findIndex(m=>m.id===a.id),d=u.filter((m,g)=>g<f&&m.visible).length;return u.filter(m=>m.visible).slice(...s?[d+1]:[0,d]).reduce((m,g)=>m+(g.height||0)+l,0)},[e]);return rt.useEffect(()=>{e.forEach(a=>{if(a.dismissed)qwn(a.id,a.removeDelay);else{let o=bN.get(a.id);o&&(clearTimeout(o),bN.delete(a.id))}})},[e]),{toasts:e,handlers:{updateHeight:Vwn,startPause:$wn,endPause:r,calculateOffset:i}}},Xwn=j6`
13459
13459
  from {
13460
13460
  transform: scale(0) rotate(45deg);
13461
13461
  opacity: 0;
@@ -13631,7 +13631,7 @@ to {
13631
13631
  > * {
13632
13632
  pointer-events: auto;
13633
13633
  }
13634
- `,bV=16,_En=({reverseOrder:n,position:e="top-center",toastOptions:t,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=Ywn(t);return rt.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:bV,left:bV,right:bV,bottom:bV,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||e,f=l.calculateOffset(c,{reverseOrder:n,gutter:r,defaultPosition:e}),d=vEn(u,f);return rt.createElement(yEn,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?gEn:"",style:d},c.type==="custom"?_V(c.message,c):i?i(c):rt.createElement(mEn,{toast:c,position:u}))}))};class Zme extends Error{constructor(t,r,i){const a=t.status||t.status===0?t.status:"",o=t.statusText||"",s=`${a} ${o}`.trim(),l=s?`status code ${s}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`);nt(this,"response");nt(this,"request");nt(this,"options");this.name="HTTPError",this.response=t,this.request=r,this.options=i}}class sit extends Error{constructor(t){super(`Request timed out: ${t.method} ${t.url}`);nt(this,"request");this.name="TimeoutError",this.request=t}}const lit=(()=>{let n=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(t&&r)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return n&&!e})(),xEn=typeof globalThis.AbortController=="function",bEn=typeof globalThis.ReadableStream=="function",SEn=typeof globalThis.FormData=="function",cit=["get","post","put","patch","head","delete"],wEn={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Qme=2147483647,EEn=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,uit=Symbol("stop"),TEn={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},MEn={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},CEn=n=>{if(!n)return 0;if(n instanceof FormData){let e=0;for(const[t,r]of n)e+=EEn,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return e}if(n instanceof Blob)return n.size;if(n instanceof ArrayBuffer)return n.byteLength;if(typeof n=="string")return new TextEncoder().encode(n).length;if(n instanceof URLSearchParams)return new TextEncoder().encode(n.toString()).length;if("byteLength"in n)return n.byteLength;if(typeof n=="object"&&n!==null)try{const e=JSON.stringify(n);return new TextEncoder().encode(e).length}catch{return 0}return 0},REn=(n,e)=>{const t=Number(n.headers.get("content-length"))||0;let r=0;return n.status===204?(e&&e({percent:1,totalBytes:t,transferredBytes:r},new Uint8Array),new Response(null,{status:n.status,statusText:n.statusText,headers:n.headers})):new Response(new ReadableStream({async start(i){const a=n.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:t},new Uint8Array);async function o(){const{done:s,value:l}=await a.read();if(s){i.close();return}if(e){r+=l.byteLength;const c=t===0?0:r/t;e({percent:c,transferredBytes:r,totalBytes:t},l)}i.enqueue(l),await o()}await o()}}),{status:n.status,statusText:n.statusText,headers:n.headers})},AEn=(n,e)=>{const t=CEn(n.body);let r=0;return new Request(n,{duplex:"half",body:new ReadableStream({async start(i){const a=n.body instanceof ReadableStream?n.body.getReader():new Response("").body.getReader();async function o(){const{done:s,value:l}=await a.read();if(s){e&&e({percent:1,transferredBytes:r,totalBytes:Math.max(t,r)},new Uint8Array),i.close();return}r+=l.byteLength;let c=t===0?0:r/t;(t<r||c===1)&&(c=.99),e&&e({percent:Number(c.toFixed(2)),transferredBytes:r,totalBytes:t},l),i.enqueue(l),await o()}await o()}})})},SN=n=>n!==null&&typeof n=="object",SV=(...n)=>{for(const e of n)if((!SN(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Kme({},...n)},fit=(n={},e={})=>{const t=new globalThis.Headers(n),r=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[a,o]of i.entries())r&&o==="undefined"||o===void 0?t.delete(a):t.set(a,o);return t};function wV(n,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:Kme(n[t]??[],e[t]??[])}const dit=(n={},e={})=>({beforeRequest:wV(n,e,"beforeRequest"),beforeRetry:wV(n,e,"beforeRetry"),afterResponse:wV(n,e,"afterResponse"),beforeError:wV(n,e,"beforeError")}),Kme=(...n)=>{let e={},t={},r={};for(const i of n)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(SN(i)){for(let[a,o]of Object.entries(i))SN(o)&&a in e&&(o=Kme(e[a],o)),e={...e,[a]:o};SN(i.hooks)&&(r=dit(r,i.hooks),e.hooks=r),SN(i.headers)&&(t=fit(t,i.headers),e.headers=t)}return e},PEn=n=>cit.includes(n)?n.toUpperCase():n,pit={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:n=>.3*2**(n-1)*1e3},NEn=(n={})=>{if(typeof n=="number")return{...pit,limit:n};if(n.methods&&!Array.isArray(n.methods))throw new Error("retry.methods must be an array");if(n.statusCodes&&!Array.isArray(n.statusCodes))throw new Error("retry.statusCodes must be an array");return{...pit,...n}};async function DEn(n,e,t,r){return new Promise((i,a)=>{const o=setTimeout(()=>{t&&t.abort(),a(new sit(n))},r.timeout);r.fetch(n,e).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function LEn(n,{signal:e}){return new Promise((t,r)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(e.reason)}const a=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},n)})}const OEn=(n,e)=>{const t={};for(const r in e)!(r in MEn)&&!(r in TEn)&&!(r in n)&&(t[r]=e[r]);return t};class EV{constructor(e,t={}){nt(this,"request");nt(this,"abortController");nt(this,"_retryCount",0);nt(this,"_input");nt(this,"_options");var r,i;if(this._input=e,this._options={...t,headers:fit(this._input.headers,t.headers),hooks:dit({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:PEn(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:NEn(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(xEn){const a=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=a?AbortSignal.any([a,this.abortController.signal]):this.abortController.signal}if(lit&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(r=this._options).stringifyJson)==null?void 0:i.call(r,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(SEn&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!lit)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=AEn(this.request,this._options.onUploadProgress))}}static create(e,t){const r=new EV(e,t),i=async()=>{if(typeof r._options.timeout=="number"&&r._options.timeout>Qme)throw new RangeError(`The \`timeout\` option cannot be greater than ${Qme}`);await Promise.resolve();let s=await r._fetch();for(const l of r._options.hooks.afterResponse){const c=await l(r.request,r._options,r._decorateResponse(s.clone()));c instanceof globalThis.Response&&(s=c)}if(r._decorateResponse(s),!s.ok&&r._options.throwHttpErrors){let l=new Zme(s,r.request,r._options);for(const c of r._options.hooks.beforeError)l=await c(l);throw l}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!bEn)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return REn(s.clone(),r._options.onDownloadProgress)}return s},o=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{var s;r.request.bodyUsed||await((s=r.request.body)==null?void 0:s.cancel())});for(const[s,l]of Object.entries(wEn))o[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||l);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(t.parseJson)return t.parseJson(await c.text())}return c[s]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof sit)throw e;if(e instanceof Zme){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const r=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(r&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(e.response.status===413)throw e}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),Qme);if(this._retryCount<1)throw t;await LEn(r,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===uit)return;return this._retry(e)}}async _fetch(){for(const r of this._options.hooks.beforeRequest){const i=await r(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=OEn(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):DEn(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const Jme=n=>{const e=(t,r)=>EV.create(t,SV(n,r));for(const t of cit)e[t]=(r,i)=>EV.create(r,SV(n,i,{method:t}));return e.create=t=>Jme(SV(t)),e.extend=t=>(typeof t=="function"&&(t=t(n??{})),Jme(SV(n,t))),e.stop=uit,e},hit=Jme();function e9e(n){return typeof window<"u"?window[n]:null}function wN(){const n=e9e("TSCIRCUIT_REGISTRY_API_BASE_URL")||void 0||"https://registry-api.tscircuit.com",e=e9e("TSCIRCUIT_REGISTRY_TOKEN");return hit.create({prefixUrl:n,headers:{Authorization:`Bearer ${e}`},timeout:3e4})}const mit={get:(n,e)=>wN().get(n,e),post:(n,e)=>wN().post(n,e),put:(n,e)=>wN().put(n,e),delete:(n,e)=>wN().delete(n,e),patch:(n,e)=>wN().patch(n,e)},zEn=async n=>{try{const{order_quote_id:e}=await mit.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return e}catch(e){if(e instanceof Zme){const t=await e.response.json();throw new Error(t.message||e.message)}throw e}},UEn=async n=>{const{order_quote:e}=await mit.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},kEn=n=>Mwn({mutationFn:async()=>{try{return await zEn(n)}catch(e){throw console.error("Error creating order quote:",e),e instanceof Error?e:new Error("Failed to create order quote")}}}),IEn=n=>{const{data:e,error:t,status:r}=Rwn(["getOrderQuote",n],()=>UEn(n),{enabled:!!n,refetchInterval:i=>i!=null&&i.is_completed||i!=null&&i.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:r==="loading"?"loading":r==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},FEn=({onCancel:n,packageReleaseId:e})=>{var d;const[t,r]=rt.useState(null),[i,a]=rt.useState(null),{mutate:o,data:s,error:l,isError:c}=kEn(e),{data:u}=IEn(s),f=async m=>{const g=e9e("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${m}`};return rt.useEffect(()=>{a(null)},[t]),rt.useEffect(()=>{o()},[e,o]),Ge.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-p-8 rf-flex rf-flex-col rf-gap-3",children:[Ge.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center rf-mb-8",children:"Order PCB"}),Ge.jsx("div",{className:"rf-mb-4 rf-text-gray-700 rf-text-center",children:"Select a quote from below, then pick a shipping method."}),(!s||!u||!(u!=null&&u.is_completed))&&!c&&Ge.jsx(BEn,{message:"Fetching quotes..."}),(l||(u==null?void 0:u.error)||c)&&Ge.jsx(jEn,{message:(l==null?void 0:l.message)||((d=u==null?void 0:u.error)==null?void 0:d.message)||"Failed to fetch quotes"}),(u==null?void 0:u.is_completed)&&!l&&!(u!=null&&u.error)&&Ge.jsx(Awn,{vendor:u,isActive:t===0,onSelect:()=>r(0),selectedShippingIdx:t===0?i:null,onSelectShipping:a},u==null?void 0:u.order_quote_id),Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[Ge.jsx(m3,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:n,children:"Cancel"}),Ge.jsx(m3,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:t===null||status==="loading",onClick:()=>{if(t===null||status==="loading"){V5.error("Please select a vendor and shipping option.");return}u&&f(u.order_quote_id)},children:"Continue"})]}),Ge.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},BEn=({message:n})=>Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[Ge.jsx(nM,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),Ge.jsx("p",{className:"rf-text-gray-600",children:n})]}),jEn=({message:n})=>Ge.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),HEn=new ywn,VEn=({isOpen:n,onClose:e,stage:t,setStage:r,circuitJson:i,packageReleaseId:a})=>Ge.jsx(Swn,{client:HEn,children:Ge.jsx(X7n,{open:n,onOpenChange:o=>{o||e()},children:Ge.jsx(Urt,{className:"!rf-max-w-[660px] !rf-p-0",children:Ge.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&Ge.jsx(FEn,{onCancel:e,packageReleaseId:a??""})})})})}),$En=({isOpen:n,onClose:e,stage:t,setStage:r})=>{const i=xb(a=>a.circuitJson);return Ge.jsx(VEn,{isOpen:n,onClose:e,stage:t,setStage:r,circuitJson:i})},GEn=()=>{const[n,e]=rt.useState(!1),[t,r]=rt.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),r("initial")},setStage:r,OrderDialog:$En}};/**
13634
+ `,bV=16,_En=({reverseOrder:n,position:e="top-center",toastOptions:t,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=Ywn(t);return rt.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:bV,left:bV,right:bV,bottom:bV,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||e,f=l.calculateOffset(c,{reverseOrder:n,gutter:r,defaultPosition:e}),d=vEn(u,f);return rt.createElement(yEn,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?gEn:"",style:d},c.type==="custom"?_V(c.message,c):i?i(c):rt.createElement(mEn,{toast:c,position:u}))}))};class Zme extends Error{constructor(t,r,i){const a=t.status||t.status===0?t.status:"",o=t.statusText||"",s=`${a} ${o}`.trim(),l=s?`status code ${s}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`);nt(this,"response");nt(this,"request");nt(this,"options");this.name="HTTPError",this.response=t,this.request=r,this.options=i}}class sit extends Error{constructor(t){super(`Request timed out: ${t.method} ${t.url}`);nt(this,"request");this.name="TimeoutError",this.request=t}}const lit=(()=>{let n=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(t&&r)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return n&&!e})(),xEn=typeof globalThis.AbortController=="function",bEn=typeof globalThis.ReadableStream=="function",SEn=typeof globalThis.FormData=="function",cit=["get","post","put","patch","head","delete"],wEn={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Qme=2147483647,EEn=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,uit=Symbol("stop"),TEn={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},MEn={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},CEn=n=>{if(!n)return 0;if(n instanceof FormData){let e=0;for(const[t,r]of n)e+=EEn,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return e}if(n instanceof Blob)return n.size;if(n instanceof ArrayBuffer)return n.byteLength;if(typeof n=="string")return new TextEncoder().encode(n).length;if(n instanceof URLSearchParams)return new TextEncoder().encode(n.toString()).length;if("byteLength"in n)return n.byteLength;if(typeof n=="object"&&n!==null)try{const e=JSON.stringify(n);return new TextEncoder().encode(e).length}catch{return 0}return 0},REn=(n,e)=>{const t=Number(n.headers.get("content-length"))||0;let r=0;return n.status===204?(e&&e({percent:1,totalBytes:t,transferredBytes:r},new Uint8Array),new Response(null,{status:n.status,statusText:n.statusText,headers:n.headers})):new Response(new ReadableStream({async start(i){const a=n.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:t},new Uint8Array);async function o(){const{done:s,value:l}=await a.read();if(s){i.close();return}if(e){r+=l.byteLength;const c=t===0?0:r/t;e({percent:c,transferredBytes:r,totalBytes:t},l)}i.enqueue(l),await o()}await o()}}),{status:n.status,statusText:n.statusText,headers:n.headers})},AEn=(n,e)=>{const t=CEn(n.body);let r=0;return new Request(n,{duplex:"half",body:new ReadableStream({async start(i){const a=n.body instanceof ReadableStream?n.body.getReader():new Response("").body.getReader();async function o(){const{done:s,value:l}=await a.read();if(s){e&&e({percent:1,transferredBytes:r,totalBytes:Math.max(t,r)},new Uint8Array),i.close();return}r+=l.byteLength;let c=t===0?0:r/t;(t<r||c===1)&&(c=.99),e&&e({percent:Number(c.toFixed(2)),transferredBytes:r,totalBytes:t},l),i.enqueue(l),await o()}await o()}})})},SN=n=>n!==null&&typeof n=="object",SV=(...n)=>{for(const e of n)if((!SN(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Kme({},...n)},fit=(n={},e={})=>{const t=new globalThis.Headers(n),r=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[a,o]of i.entries())r&&o==="undefined"||o===void 0?t.delete(a):t.set(a,o);return t};function wV(n,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:Kme(n[t]??[],e[t]??[])}const dit=(n={},e={})=>({beforeRequest:wV(n,e,"beforeRequest"),beforeRetry:wV(n,e,"beforeRetry"),afterResponse:wV(n,e,"afterResponse"),beforeError:wV(n,e,"beforeError")}),Kme=(...n)=>{let e={},t={},r={};for(const i of n)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(SN(i)){for(let[a,o]of Object.entries(i))SN(o)&&a in e&&(o=Kme(e[a],o)),e={...e,[a]:o};SN(i.hooks)&&(r=dit(r,i.hooks),e.hooks=r),SN(i.headers)&&(t=fit(t,i.headers),e.headers=t)}return e},PEn=n=>cit.includes(n)?n.toUpperCase():n,pit={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:n=>.3*2**(n-1)*1e3},NEn=(n={})=>{if(typeof n=="number")return{...pit,limit:n};if(n.methods&&!Array.isArray(n.methods))throw new Error("retry.methods must be an array");if(n.statusCodes&&!Array.isArray(n.statusCodes))throw new Error("retry.statusCodes must be an array");return{...pit,...n}};async function DEn(n,e,t,r){return new Promise((i,a)=>{const o=setTimeout(()=>{t&&t.abort(),a(new sit(n))},r.timeout);r.fetch(n,e).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function LEn(n,{signal:e}){return new Promise((t,r)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(e.reason)}const a=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},n)})}const OEn=(n,e)=>{const t={};for(const r in e)!(r in MEn)&&!(r in TEn)&&!(r in n)&&(t[r]=e[r]);return t};class EV{constructor(e,t={}){nt(this,"request");nt(this,"abortController");nt(this,"_retryCount",0);nt(this,"_input");nt(this,"_options");var r,i;if(this._input=e,this._options={...t,headers:fit(this._input.headers,t.headers),hooks:dit({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:PEn(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:NEn(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(xEn){const a=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=a?AbortSignal.any([a,this.abortController.signal]):this.abortController.signal}if(lit&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(r=this._options).stringifyJson)==null?void 0:i.call(r,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(SEn&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!lit)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=AEn(this.request,this._options.onUploadProgress))}}static create(e,t){const r=new EV(e,t),i=async()=>{if(typeof r._options.timeout=="number"&&r._options.timeout>Qme)throw new RangeError(`The \`timeout\` option cannot be greater than ${Qme}`);await Promise.resolve();let s=await r._fetch();for(const l of r._options.hooks.afterResponse){const c=await l(r.request,r._options,r._decorateResponse(s.clone()));c instanceof globalThis.Response&&(s=c)}if(r._decorateResponse(s),!s.ok&&r._options.throwHttpErrors){let l=new Zme(s,r.request,r._options);for(const c of r._options.hooks.beforeError)l=await c(l);throw l}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!bEn)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return REn(s.clone(),r._options.onDownloadProgress)}return s},o=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{var s;r.request.bodyUsed||await((s=r.request.body)==null?void 0:s.cancel())});for(const[s,l]of Object.entries(wEn))o[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||l);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(t.parseJson)return t.parseJson(await c.text())}return c[s]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof sit)throw e;if(e instanceof Zme){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const r=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(r&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(e.response.status===413)throw e}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),Qme);if(this._retryCount<1)throw t;await LEn(r,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===uit)return;return this._retry(e)}}async _fetch(){for(const r of this._options.hooks.beforeRequest){const i=await r(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=OEn(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):DEn(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const Jme=n=>{const e=(t,r)=>EV.create(t,SV(n,r));for(const t of cit)e[t]=(r,i)=>EV.create(r,SV(n,i,{method:t}));return e.create=t=>Jme(SV(t)),e.extend=t=>(typeof t=="function"&&(t=t(n??{})),Jme(SV(n,t))),e.stop=uit,e},hit=Jme();function e9e(n){return typeof window<"u"?window[n]:null}function wN(){const n=e9e("TSCIRCUIT_REGISTRY_API_BASE_URL")||void 0||"https://registry-api.tscircuit.com",e=e9e("TSCIRCUIT_REGISTRY_TOKEN");return hit.create({prefixUrl:n,headers:{Authorization:`Bearer ${e}`},timeout:3e4})}const mit={get:(n,e)=>wN().get(n,e),post:(n,e)=>wN().post(n,e),put:(n,e)=>wN().put(n,e),delete:(n,e)=>wN().delete(n,e),patch:(n,e)=>wN().patch(n,e)},zEn=async n=>{try{const{order_quote_id:e}=await mit.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return e}catch(e){if(e instanceof Zme){const t=await e.response.json();throw new Error(t.message||e.message)}throw e}},UEn=async n=>{const{order_quote:e}=await mit.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},kEn=n=>Mwn({mutationFn:async()=>{try{return await zEn(n)}catch(e){throw console.error("Error creating order quote:",e),e instanceof Error?e:new Error("Failed to create order quote")}}}),IEn=n=>{const{data:e,error:t,status:r}=Rwn(["getOrderQuote",n],()=>UEn(n),{enabled:!!n,refetchInterval:i=>i!=null&&i.is_completed||i!=null&&i.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:r==="loading"?"loading":r==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},FEn=({onCancel:n,packageReleaseId:e})=>{var d;const[t,r]=rt.useState(null),[i,a]=rt.useState(null),{mutate:o,data:s,error:l,isError:c}=kEn(e),{data:u}=IEn(s),f=async m=>{const g=e9e("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${m}&shipping_option=${i}`};return rt.useEffect(()=>{a(null)},[t]),rt.useEffect(()=>{o()},[e,o]),Ge.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-p-8 rf-flex rf-flex-col rf-gap-3",children:[Ge.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center rf-mb-8",children:"Order PCB"}),Ge.jsx("div",{className:"rf-mb-4 rf-text-gray-700 rf-text-center",children:"Select a quote from below, then pick a shipping method."}),(!s||!u||!(u!=null&&u.is_completed))&&!c&&Ge.jsx(BEn,{message:"Fetching quotes..."}),(l||(u==null?void 0:u.error)||c)&&Ge.jsx(jEn,{message:(l==null?void 0:l.message)||((d=u==null?void 0:u.error)==null?void 0:d.message)||"Failed to fetch quotes"}),(u==null?void 0:u.is_completed)&&!l&&!(u!=null&&u.error)&&Ge.jsx(Awn,{vendor:u,isActive:t===0,onSelect:()=>r(0),selectedShippingCarrier:t===0?i:null,onSelectShippingCarrier:a},u==null?void 0:u.order_quote_id),Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[Ge.jsx(m3,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:n,children:"Cancel"}),Ge.jsx(m3,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:t===null||status==="loading",onClick:()=>{if(t===null||status==="loading"){V5.error("Please select a vendor and shipping option.");return}u&&f(u.order_quote_id)},children:"Continue"})]}),Ge.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},BEn=({message:n})=>Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[Ge.jsx(nM,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),Ge.jsx("p",{className:"rf-text-gray-600",children:n})]}),jEn=({message:n})=>Ge.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),HEn=new ywn,VEn=({isOpen:n,onClose:e,stage:t,setStage:r,circuitJson:i,packageReleaseId:a})=>Ge.jsx(Swn,{client:HEn,children:Ge.jsx(X7n,{open:n,onOpenChange:o=>{o||e()},children:Ge.jsx(Urt,{className:"!rf-max-w-[660px] !rf-p-0",children:Ge.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&Ge.jsx(FEn,{onCancel:e,packageReleaseId:a??""})})})})}),$En=({isOpen:n,onClose:e,stage:t,setStage:r})=>{const i=xb(a=>a.circuitJson);return Ge.jsx(VEn,{isOpen:n,onClose:e,stage:t,setStage:r,circuitJson:i})},GEn=()=>{const[n,e]=rt.useState(!1),[t,r]=rt.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),r("initial")},setStage:r,OrderDialog:$En}};/**
13635
13635
  * @license
13636
13636
  * Copyright 2019 Google LLC
13637
13637
  * SPDX-License-Identifier: Apache-2.0