@tscircuit/runframe 0.0.841 → 0.0.842

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.
@@ -13645,7 +13645,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}}),Rft={};kNn(Rft,{all_layers:()=>rxe
13645
13645
  * Copyright (c) 2013-2015, 2017, Jon Schlinkert.
13646
13646
  * Released under the MIT License.
13647
13647
  *)
13648
- */const J7n=({containerClassName:i,...e})=>{const t=st.useRef(null),[n,r]=st.useState(620);return st.useLayoutEffect(()=>{const o=()=>{if(t.current){const s=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(s,620),c))}};o();const a=new ResizeObserver(o);return t.current&&a.observe(t.current),window.addEventListener("resize",o),()=>{a.disconnect(),window.removeEventListener("resize",o)}},[]),He.jsx("div",{ref:t,className:i||"rf-w-full rf-h-full",children:He.jsx(W7n,{...e,height:n})})},X7n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',Z7n=()=>{st.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=X7n,document.head.appendChild(e)},[])},$7n=i=>{st.useEffect(()=>(i?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[i])},D0t=i=>`hsl(${Y2.indexOf(i)*137.5%360}, 70%, 50%)`,ekn=({phaseTimings:i})=>{if(!i)return null;const e=Object.values(i).reduce((t,n)=>t+n,0);return He.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[He.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Y2.map(t=>{const n=i[t]||0,r=n/e*100;return He.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:D0t(t)},children:He.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),He.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},tkn=({renderLog:i})=>{const[e,t]=st.useState("chronological");if(!i)return He.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((i==null?void 0:i.phaseTimings)??{});e==="chronological"?n.sort((o,a)=>Y2.indexOf(o[0])-Y2.indexOf(a[0])):n.sort((o,a)=>a[1]-o[1]);const r=n.reduce((o,[a,s])=>o+s,0);return He.jsxs("div",{className:"rf-bg-white",children:[He.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[He.jsx("div",{children:"Render Logs"}),He.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[He.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),He.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[He.jsx("option",{value:"chronological",children:"Phase Order"}),He.jsx("option",{value:"longest",children:"Duration"})]})]})]}),He.jsx(ekn,{phaseTimings:i.phaseTimings}),He.jsxs("table",{className:"rf-w-full rf-text-xs",children:[He.jsx("thead",{children:He.jsxs("tr",{children:[He.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),He.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),He.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),He.jsx("tbody",{children:n.map(([o,a])=>He.jsxs("tr",{children:[He.jsx("td",{className:"rf-p-2",children:Y2.indexOf(o)}),He.jsx("td",{className:"rf-p-2",children:o}),He.jsx("td",{className:"rf-p-2",children:He.jsx("div",{className:"rf-w-8",children:He.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:D0t(o),width:`${a/r*100}%`}})})}),He.jsx("td",{className:"rf-p-2",children:He.jsxs("div",{className:"rf-flex w-full",children:[He.jsxs("span",{className:"rf-flex-grow",children:[a,"ms"]}),He.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(a/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},N0t=({errorMessage:i,errorStack:e,circuitJsonErrors:t})=>{st.useEffect(()=>{if(i){const n=new Error(i);e&&(n.stack=e);try{JU.captureException(n)}catch{}}},[i,e]),st.useEffect(()=>{if(t&&t.length>0)for(const n of t){const r=new Error(n.message||"Circuit JSON Error");n.stack&&(r.stack=n.stack);try{JU.captureException(r,{error_type:n.type})}catch{}}},[t])},nkn="0.0.840";function ikn(i,e){const[t,n]=st.useState(()=>{try{const r=window.localStorage.getItem(i);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return st.useEffect(()=>{try{window.localStorage.setItem(i,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[i,t]),[t,n]}const lxe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},uxe=new Map,mJ=i=>{const e=uxe.get(i);return e?Object.fromEntries(Object.entries(e.stores).map(([t,n])=>[t,n.getState()])):{}},rkn=(i,e,t)=>{if(i===void 0)return{type:"untracked",connection:e.connect(t)};const n=uxe.get(t.name);if(n)return{type:"tracked",store:i,...n};const r={connection:e.connect(t),stores:{}};return uxe.set(t.name,r),{type:"tracked",store:i,...r}},T0t=(i,e={})=>(t,n,r)=>{const{enabled:o,anonymousActionType:a,store:s,...c}=e;let l;try{l=(o??(lxe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(lxe?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),i(t,n,r);const{connection:u,...f}=rkn(s,l,c);let h=!0;r.setState=(y,v,I)=>{const x=t(y,v);if(!h)return x;const w=I===void 0?{type:a||"anonymous"}:typeof I=="string"?{type:I}:I;return s===void 0?(u==null||u.send(w,n()),x):(u==null||u.send({...w,type:`${s}/${w.type}`},{...mJ(c.name),[s]:r.getState()}),x)};const p=(...y)=>{const v=h;h=!1,t(...y),h=v},m=i(r.setState,n,r);if(f.type==="untracked"?u==null||u.init(m):(f.stores[f.store]=r,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([y,v])=>[y,y===f.store?m:v.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let y=!1;const v=r.dispatch;r.dispatch=(...I)=>{(lxe?"production":void 0)!=="production"&&I[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),v(...I)}}return u.subscribe(y=>{var v;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return dxe(y.payload,I=>{if(I.type==="__setState"){if(s===void 0){p(I.state);return}Object.keys(I.state).length!==1&&console.error(`
13648
+ */const J7n=({containerClassName:i,...e})=>{const t=st.useRef(null),[n,r]=st.useState(620);return st.useLayoutEffect(()=>{const o=()=>{if(t.current){const s=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(s,620),c))}};o();const a=new ResizeObserver(o);return t.current&&a.observe(t.current),window.addEventListener("resize",o),()=>{a.disconnect(),window.removeEventListener("resize",o)}},[]),He.jsx("div",{ref:t,className:i||"rf-w-full rf-h-full",children:He.jsx(W7n,{...e,height:n})})},X7n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',Z7n=()=>{st.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=X7n,document.head.appendChild(e)},[])},$7n=i=>{st.useEffect(()=>(i?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[i])},D0t=i=>`hsl(${Y2.indexOf(i)*137.5%360}, 70%, 50%)`,ekn=({phaseTimings:i})=>{if(!i)return null;const e=Object.values(i).reduce((t,n)=>t+n,0);return He.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[He.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Y2.map(t=>{const n=i[t]||0,r=n/e*100;return He.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:D0t(t)},children:He.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),He.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},tkn=({renderLog:i})=>{const[e,t]=st.useState("chronological");if(!i)return He.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((i==null?void 0:i.phaseTimings)??{});e==="chronological"?n.sort((o,a)=>Y2.indexOf(o[0])-Y2.indexOf(a[0])):n.sort((o,a)=>a[1]-o[1]);const r=n.reduce((o,[a,s])=>o+s,0);return He.jsxs("div",{className:"rf-bg-white",children:[He.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[He.jsx("div",{children:"Render Logs"}),He.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[He.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),He.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[He.jsx("option",{value:"chronological",children:"Phase Order"}),He.jsx("option",{value:"longest",children:"Duration"})]})]})]}),He.jsx(ekn,{phaseTimings:i.phaseTimings}),He.jsxs("table",{className:"rf-w-full rf-text-xs",children:[He.jsx("thead",{children:He.jsxs("tr",{children:[He.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),He.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),He.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),He.jsx("tbody",{children:n.map(([o,a])=>He.jsxs("tr",{children:[He.jsx("td",{className:"rf-p-2",children:Y2.indexOf(o)}),He.jsx("td",{className:"rf-p-2",children:o}),He.jsx("td",{className:"rf-p-2",children:He.jsx("div",{className:"rf-w-8",children:He.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:D0t(o),width:`${a/r*100}%`}})})}),He.jsx("td",{className:"rf-p-2",children:He.jsxs("div",{className:"rf-flex w-full",children:[He.jsxs("span",{className:"rf-flex-grow",children:[a,"ms"]}),He.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(a/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},N0t=({errorMessage:i,errorStack:e,circuitJsonErrors:t})=>{st.useEffect(()=>{if(i){const n=new Error(i);e&&(n.stack=e);try{JU.captureException(n)}catch{}}},[i,e]),st.useEffect(()=>{if(t&&t.length>0)for(const n of t){const r=new Error(n.message||"Circuit JSON Error");n.stack&&(r.stack=n.stack);try{JU.captureException(r,{error_type:n.type})}catch{}}},[t])},nkn="0.0.841";function ikn(i,e){const[t,n]=st.useState(()=>{try{const r=window.localStorage.getItem(i);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return st.useEffect(()=>{try{window.localStorage.setItem(i,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[i,t]),[t,n]}const lxe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},uxe=new Map,mJ=i=>{const e=uxe.get(i);return e?Object.fromEntries(Object.entries(e.stores).map(([t,n])=>[t,n.getState()])):{}},rkn=(i,e,t)=>{if(i===void 0)return{type:"untracked",connection:e.connect(t)};const n=uxe.get(t.name);if(n)return{type:"tracked",store:i,...n};const r={connection:e.connect(t),stores:{}};return uxe.set(t.name,r),{type:"tracked",store:i,...r}},T0t=(i,e={})=>(t,n,r)=>{const{enabled:o,anonymousActionType:a,store:s,...c}=e;let l;try{l=(o??(lxe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(lxe?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),i(t,n,r);const{connection:u,...f}=rkn(s,l,c);let h=!0;r.setState=(y,v,I)=>{const x=t(y,v);if(!h)return x;const w=I===void 0?{type:a||"anonymous"}:typeof I=="string"?{type:I}:I;return s===void 0?(u==null||u.send(w,n()),x):(u==null||u.send({...w,type:`${s}/${w.type}`},{...mJ(c.name),[s]:r.getState()}),x)};const p=(...y)=>{const v=h;h=!1,t(...y),h=v},m=i(r.setState,n,r);if(f.type==="untracked"?u==null||u.init(m):(f.stores[f.store]=r,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([y,v])=>[y,y===f.store?m:v.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let y=!1;const v=r.dispatch;r.dispatch=(...I)=>{(lxe?"production":void 0)!=="production"&&I[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),v(...I)}}return u.subscribe(y=>{var v;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return dxe(y.payload,I=>{if(I.type==="__setState"){if(s===void 0){p(I.state);return}Object.keys(I.state).length!==1&&console.error(`
13649
13649
  [zustand devtools middleware] Unsupported __setState action format.
13650
13650
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
13651
13651
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
@@ -14743,4 +14743,4 @@ ${i}</tr>
14743
14743
  `}tablecell(i){const e=this.parser.parseInline(i.tokens),t=i.header?"th":"td";return(i.align?`<${t} align="${i.align}">`:`<${t}>`)+e+`</${t}>
14744
14744
  `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${u3(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:t}){const n=this.parser.parseInline(t),r=Sxt(i);if(r===null)return n;i=r;let o='<a href="'+i+'"';return e&&(o+=' title="'+u3(e)+'"'),o+=">"+n+"</a>",o}image({href:i,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));const r=Sxt(i);if(r===null)return u3(t);i=r;let o=`<img src="${i}" alt="${t}"`;return e&&(o+=` title="${u3(e)}"`),o+=">",o}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:u3(i.text)}},tSe=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},TS=class BBe{constructor(e){Ee(this,"options");Ee(this,"renderer");Ee(this,"textRenderer");this.options=e||uR,this.options.renderer=this.options.renderer||new Wee,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tSe}static parse(e,t){return new BBe(t).parse(e)}static parseInline(e,t){return new BBe(t).parseInline(e)}parse(e,t=!0){var r,o;let n="";for(let a=0;a<e.length;a++){const s=e[a];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[s.type]){const l=s,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=u||"";continue}}const c=s;switch(c.type){case"space":{n+=this.renderer.space(c);continue}case"hr":{n+=this.renderer.hr(c);continue}case"heading":{n+=this.renderer.heading(c);continue}case"code":{n+=this.renderer.code(c);continue}case"table":{n+=this.renderer.table(c);continue}case"blockquote":{n+=this.renderer.blockquote(c);continue}case"list":{n+=this.renderer.list(c);continue}case"html":{n+=this.renderer.html(c);continue}case"paragraph":{n+=this.renderer.paragraph(c);continue}case"text":{let l=c,u=this.renderer.text(l);for(;a+1<e.length&&e[a+1].type==="text";)l=e[++a],u+=`
14745
14745
  `+this.renderer.text(l);t?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,t=this.renderer){var r,o;let n="";for(let a=0;a<e.length;a++){const s=e[a];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[s.type]){const l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=l||"";continue}}const c=s;switch(c.type){case"escape":{n+=t.text(c);break}case"html":{n+=t.html(c);break}case"link":{n+=t.link(c);break}case"image":{n+=t.image(c);break}case"strong":{n+=t.strong(c);break}case"em":{n+=t.em(c);break}case"codespan":{n+=t.codespan(c);break}case"br":{n+=t.br(c);break}case"del":{n+=t.del(c);break}case"text":{n+=t.text(c);break}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},Jee=(lSe=class{constructor(i){Ee(this,"options");Ee(this,"block");this.options=i||uR}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?NS.lex:NS.lexInline}provideParser(){return this.block?TS.parse:TS.parseInline}},Ee(lSe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),lSe),Bhi=class{constructor(...i){Ee(this,"defaults",j3e());Ee(this,"options",this.setOptions);Ee(this,"parse",this.parseMarkdown(!0));Ee(this,"parseInline",this.parseMarkdown(!1));Ee(this,"Parser",TS);Ee(this,"Renderer",Wee);Ee(this,"TextRenderer",tSe);Ee(this,"Lexer",NS);Ee(this,"Tokenizer",qee);Ee(this,"Hooks",Jee);this.use(...i)}walkTokens(i,e){var n,r;let t=[];for(const o of i)switch(t=t.concat(e.call(this,o)),o.type){case"table":{const a=o;for(const s of a.header)t=t.concat(this.walkTokens(s.tokens,e));for(const s of a.rows)for(const c of s)t=t.concat(this.walkTokens(c.tokens,e));break}case"list":{const a=o;t=t.concat(this.walkTokens(a.items,e));break}default:{const a=o;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{const c=a[s].flat(1/0);t=t.concat(this.walkTokens(c,e))}):a.tokens&&(t=t.concat(this.walkTokens(a.tokens,e)))}}return t}use(...i){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=e.renderers[r.name];o?e.renderers[r.name]=function(...a){let s=r.renderer.apply(this,a);return s===!1&&(s=o.apply(this,a)),s}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){const r=this.defaults.renderer||new Wee(this.defaults);for(const o in t.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,s=t.renderer[a],c=r[a];r[a]=(...l)=>{let u=s.apply(r,l);return u===!1&&(u=c.apply(r,l)),u||""}}n.renderer=r}if(t.tokenizer){const r=this.defaults.tokenizer||new qee(this.defaults);for(const o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,s=t.tokenizer[a],c=r[a];r[a]=(...l)=>{let u=s.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}n.tokenizer=r}if(t.hooks){const r=this.defaults.hooks||new Jee;for(const o in t.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,s=t.hooks[a],c=r[a];Jee.passThroughHooks.has(o)?r[a]=l=>{if(this.defaults.async)return Promise.resolve(s.call(r,l)).then(f=>c.call(r,f));const u=s.call(r,l);return c.call(r,u)}:r[a]=(...l)=>{let u=s.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}n.hooks=r}if(t.walkTokens){const r=this.defaults.walkTokens,o=t.walkTokens;n.walkTokens=function(a){let s=[];return s.push(o.call(this,a)),r&&(s=s.concat(r.call(this,a))),s}}this.defaults={...this.defaults,...n}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,e){return NS.lex(i,e??this.defaults)}parser(i,e){return TS.parse(i,e??this.defaults)}parseMarkdown(i){return(t,n)=>{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=i);const s=o.hooks?o.hooks.provideLexer():i?NS.lex:NS.lexInline,c=o.hooks?o.hooks.provideParser():i?TS.parse:TS.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(l=>s(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>c(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let l=s(t,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let u=c(l,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(l){return a(l)}}}onError(i,e){return t=>{if(t.message+=`
14746
- Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+u3(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},dR=new Bhi;function a1(i,e){return dR.parse(i,e)}a1.options=a1.setOptions=function(i){return dR.setOptions(i),a1.defaults=dR.defaults,Axt(a1.defaults),a1},a1.getDefaults=j3e,a1.defaults=uR,a1.use=function(...i){return dR.use(...i),a1.defaults=dR.defaults,Axt(a1.defaults),a1},a1.walkTokens=function(i,e){return dR.walkTokens(i,e)},a1.parseInline=dR.parseInline,a1.Parser=TS,a1.parser=TS.parse,a1.Renderer=Wee,a1.TextRenderer=tSe,a1.Lexer=NS,a1.lexer=NS.lex,a1.Tokenizer=qee,a1.Hooks=Jee,a1.parse=a1,a1.options,a1.setOptions,a1.use,a1.walkTokens,a1.parseInline,TS.parse,NS.lex;const Mhi=({review:i,onBack:e})=>{const[t,n]=st.useState(i.ai_review_text??null),r=uT(),o=i.ai_review_id;st.useEffect(()=>{if(!o)return;let s;async function c(){try{const l=await r.get("ai_reviews/get",{searchParams:{ai_review_id:o}}),{ai_review:u}=await l.json();if(u.ai_review_text){n(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}s=setTimeout(c,1e3)}return s=setTimeout(c,1e3),()=>clearTimeout(s)},[o]);const a=st.useMemo(()=>a1.parse(i.ai_review_text||""),[i.ai_review_text]);return He.jsxs(He.Fragment,{children:[He.jsxs(RL,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[He.jsx(hC,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),He.jsx(DL,{children:"AI Review"})]}),t?He.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:a}}):He.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:He.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[He.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[He.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),He.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),He.jsx("span",{children:"Loading..."})]})})]})},Qhi=({isOpen:i,onClose:e,packageName:t})=>{const[n,r]=st.useState("list_reviews"),[o,a]=st.useState(null),s=c=>{a(c),r("view_review")};return He.jsx(IJ,{open:i,onOpenChange:c=>{c||(r("list_reviews"),a(null),e())},children:He.jsxs(QL,{className:"rf-max-w-2xl",children:[n==="list_reviews"&&He.jsx(jfi,{packageName:t,onSelectReview:s}),n==="view_review"&&o&&He.jsx(Mhi,{review:o,onBack:()=>r("list_reviews")})]})})};function nSe(i,e){return nSe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},nSe(i,e)}function dT(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,nSe(i,e)}var fT=function(){function i(){this.listeners=[]}var e=i.prototype;return e.subscribe=function(n){var r=this,o=n||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(a){return a!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},i}(),Xee=typeof window>"u";function Ab(){}function Rhi(i,e){return typeof i=="function"?i(e):i}function iSe(i){return typeof i=="number"&&i>=0&&i!==1/0}function Zee(i){return Array.isArray(i)?i:[i]}function Qxt(i,e){return Math.max(i+(e||0)-Date.now(),0)}function $ee(i,e,t){return DF(i)?typeof e=="function"?Wg({},t,{queryKey:i,queryFn:e}):Wg({},e,{queryKey:i}):i}function Dhi(i,e,t){return DF(i)?Wg({},e,{mutationKey:i}):typeof i=="function"?Wg({},e,{mutationFn:i}):Wg({},i)}function M4(i,e,t){return DF(i)?[Wg({},e,{queryKey:i}),t]:[i||{},e]}function Nhi(i,e){if(i===!0&&e===!0||i==null&&e==null)return"all";if(i===!1&&e===!1)return"none";var t=i??!e;return t?"active":"inactive"}function Rxt(i,e){var t=i.active,n=i.exact,r=i.fetching,o=i.inactive,a=i.predicate,s=i.queryKey,c=i.stale;if(DF(s)){if(n){if(e.queryHash!==rSe(s,e.options))return!1}else if(!ete(e.queryKey,s))return!1}var l=Nhi(t,o);if(l==="none")return!1;if(l!=="all"){var u=e.isActive();if(l==="active"&&!u||l==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||typeof r=="boolean"&&e.isFetching()!==r||a&&!a(e))}function Dxt(i,e){var t=i.exact,n=i.fetching,r=i.predicate,o=i.mutationKey;if(DF(o)){if(!e.options.mutationKey)return!1;if(t){if(fR(e.options.mutationKey)!==fR(o))return!1}else if(!ete(e.options.mutationKey,o))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||r&&!r(e))}function rSe(i,e){var t=(e==null?void 0:e.queryKeyHashFn)||fR;return t(i)}function fR(i){var e=Zee(i);return Thi(e)}function Thi(i){return JSON.stringify(i,function(e,t){return oSe(t)?Object.keys(t).sort().reduce(function(n,r){return n[r]=t[r],n},{}):t})}function ete(i,e){return Nxt(Zee(i),Zee(e))}function Nxt(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!Nxt(i[t],e[t])}):!1}function tte(i,e){if(i===e)return i;var t=Array.isArray(i)&&Array.isArray(e);if(t||oSe(i)&&oSe(e)){for(var n=t?i.length:Object.keys(i).length,r=t?e:Object.keys(e),o=r.length,a=t?[]:{},s=0,c=0;c<o;c++){var l=t?c:r[c];a[l]=tte(i[l],e[l]),a[l]===i[l]&&s++}return n===o&&s===n?i:a}return e}function khi(i,e){if(i&&!e||e&&!i)return!1;for(var t in i)if(i[t]!==e[t])return!1;return!0}function oSe(i){if(!Txt(i))return!1;var e=i.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!Txt(t)||!t.hasOwnProperty("isPrototypeOf"))}function Txt(i){return Object.prototype.toString.call(i)==="[object Object]"}function DF(i){return typeof i=="string"||Array.isArray(i)}function Phi(i){return new Promise(function(e){setTimeout(e,i)})}function kxt(i){Promise.resolve().then(i).catch(function(e){return setTimeout(function(){throw e})})}function Pxt(){if(typeof AbortController=="function")return new AbortController}var Lhi=function(i){dT(e,i);function e(){var n;return n=i.call(this)||this,n.setup=function(r){var o;if(!Xee&&((o=window)!=null&&o.addEventListener)){var a=function(){return r()};return window.addEventListener("visibilitychange",a,!1),window.addEventListener("focus",a,!1),function(){window.removeEventListener("visibilitychange",a),window.removeEventListener("focus",a)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,a=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(s){typeof s=="boolean"?a.setFocused(s):a.onFocus()})},t.setFocused=function(r){this.focused=r,r&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(r){r()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e}(fT),NF=new Lhi,Fhi=function(i){dT(e,i);function e(){var n;return n=i.call(this)||this,n.setup=function(r){var o;if(!Xee&&((o=window)!=null&&o.addEventListener)){var a=function(){return r()};return window.addEventListener("online",a,!1),window.addEventListener("offline",a,!1),function(){window.removeEventListener("online",a),window.removeEventListener("offline",a)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,a=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(s){typeof s=="boolean"?a.setOnline(s):a.onOnline()})},t.setOnline=function(r){this.online=r,r&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(r){r()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e}(fT),nte=new Fhi;function Uhi(i){return Math.min(1e3*Math.pow(2,i),3e4)}function ite(i){return typeof(i==null?void 0:i.cancel)=="function"}var Lxt=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function rte(i){return i instanceof Lxt}var Fxt=function(e){var t=this,n=!1,r,o,a,s;this.abort=e.abort,this.cancel=function(h){return r==null?void 0:r(h)},this.cancelRetry=function(){n=!0},this.continueRetry=function(){n=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,p){a=h,s=p});var c=function(p){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(p),o==null||o(),a(p))},l=function(p){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(p),o==null||o(),s(p))},u=function(){return new Promise(function(p){o=p,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){o=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},f=function h(){if(!t.isResolved){var p;try{p=e.fn()}catch(m){p=Promise.reject(m)}r=function(y){if(!t.isResolved&&(l(new Lxt(y)),t.abort==null||t.abort(),ite(p)))try{p.cancel()}catch{}},t.isTransportCancelable=ite(p),Promise.resolve(p).then(c).catch(function(m){var y,v;if(!t.isResolved){var I=(y=e.retry)!=null?y:3,x=(v=e.retryDelay)!=null?v:Uhi,w=typeof x=="function"?x(t.failureCount,m):x,M=I===!0||typeof I=="number"&&t.failureCount<I||typeof I=="function"&&I(t.failureCount,m);if(n||!M){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),Phi(w).then(function(){if(!NF.isFocused()||!nte.isOnline())return u()}).then(function(){n?l(m):h()})}})}};f()},Ohi=function(){function i(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=i.prototype;return e.batch=function(n){var r;this.transactions++;try{r=n()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(n){var r=this;this.transactions?this.queue.push(n):kxt(function(){r.notifyFn(n)})},e.batchCalls=function(n){var r=this;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];r.schedule(function(){n.apply(void 0,a)})}},e.flush=function(){var n=this,r=this.queue;this.queue=[],r.length&&kxt(function(){n.batchNotifyFn(function(){r.forEach(function(o){n.notifyFn(o)})})})},e.setNotifyFunction=function(n){this.notifyFn=n},e.setBatchNotifyFunction=function(n){this.batchNotifyFn=n},i}(),o9=new Ohi,Uxt=console;function ote(){return Uxt}function Ghi(i){Uxt=i}var zhi=function(){function i(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=i.prototype;return e.setOptions=function(n){var r;this.options=Wg({},this.defaultOptions,n),this.meta=n==null?void 0:n.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(n){this.defaultOptions=n},e.scheduleGc=function(){var n=this;this.clearGcTimeout(),iSe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){n.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(n,r){var o,a,s=this.state.data,c=Rhi(n,s);return(o=(a=this.options).isDataEqual)!=null&&o.call(a,s,c)?c=s:this.options.structuralSharing!==!1&&(c=tte(s,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt}),c},e.setState=function(n,r){this.dispatch({type:"setState",state:n,setStateOptions:r})},e.cancel=function(n){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(n),o?o.then(Ab).catch(Ab):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(n){return n.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(n){return n.getCurrentResult().isStale})},e.isStaleByTime=function(n){return n===void 0&&(n=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Qxt(this.state.dataUpdatedAt,n)},e.onFocus=function(){var n,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(n=this.retryer)==null||n.continue()},e.onOnline=function(){var n,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(n=this.retryer)==null||n.continue()},e.addObserver=function(n){this.observers.indexOf(n)===-1&&(this.observers.push(n),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))},e.removeObserver=function(n){this.observers.indexOf(n)!==-1&&(this.observers=this.observers.filter(function(r){return r!==n}),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:n}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(n,r){var o=this,a,s,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){var u=this.observers.find(function(x){return x.options.queryFn});u&&this.setOptions(u.options)}var f=Zee(this.queryKey),h=Pxt(),p={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(h)return o.abortSignalConsumed=!0,h.signal}});var m=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},y={fetchOptions:r,options:this.options,queryKey:f,state:this.state,fetchFn:m,meta:this.meta};if((a=this.options.behavior)!=null&&a.onFetch){var v;(v=this.options.behavior)==null||v.onFetch(y)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=y.fetchOptions)==null?void 0:s.meta)){var I;this.dispatch({type:"fetch",meta:(I=y.fetchOptions)==null?void 0:I.meta})}return this.retryer=new Fxt({fn:y.fetchFn,abort:h==null||(c=h.abort)==null?void 0:c.bind(h),onSuccess:function(w){o.setData(w),o.cache.config.onSuccess==null||o.cache.config.onSuccess(w,o),o.cacheTime===0&&o.optionalRemove()},onError:function(w){rte(w)&&w.silent||o.dispatch({type:"error",error:w}),rte(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),ote().error(w)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(n){var r=this;this.state=this.reducer(this.state,n),o9.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(n)}),r.cache.notify({query:r,type:"queryUpdated",action:n})})},e.getDefaultState=function(n){var r=typeof n.initialData=="function"?n.initialData():n.initialData,o=typeof n.initialData<"u",a=o?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0,s=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:s?a??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(n,r){var o,a;switch(r.type){case"failed":return Wg({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return Wg({},n,{isPaused:!0});case"continue":return Wg({},n,{isPaused:!1});case"fetch":return Wg({},n,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Wg({},n,{data:r.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(a=r.dataUpdatedAt)!=null?a:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=r.error;return rte(s)&&s.revert&&this.revertState?Wg({},this.revertState):Wg({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Wg({},n,{isInvalidated:!0});case"setState":return Wg({},n,r.state);default:return n}},i}(),Hhi=function(i){dT(e,i);function e(n){var r;return r=i.call(this)||this,r.config=n||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,a){var s,c=o.queryKey,l=(s=o.queryHash)!=null?s:rSe(c,o),u=this.get(l);return u||(u=new zhi({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:a,defaultOptions:r.getQueryDefaults(c),meta:o.meta}),this.add(u)),u},t.add=function(r){this.queriesMap[r.queryHash]||(this.queriesMap[r.queryHash]=r,this.queries.push(r),this.notify({type:"queryAdded",query:r}))},t.remove=function(r){var o=this.queriesMap[r.queryHash];o&&(r.destroy(),this.queries=this.queries.filter(function(a){return a!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;o9.batch(function(){r.queries.forEach(function(o){r.remove(o)})})},t.get=function(r){return this.queriesMap[r]},t.getAll=function(){return this.queries},t.find=function(r,o){var a=M4(r,o),s=a[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(c){return Rxt(s,c)})},t.findAll=function(r,o){var a=M4(r,o),s=a[0];return Object.keys(s).length>0?this.queries.filter(function(c){return Rxt(s,c)}):this.queries},t.notify=function(r){var o=this;o9.batch(function(){o.listeners.forEach(function(a){a(r)})})},t.onFocus=function(){var r=this;o9.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;o9.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e}(fT),Yhi=function(){function i(t){this.options=Wg({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Oxt(),this.meta=t.meta}var e=i.prototype;return e.setState=function(n){this.dispatch({type:"setState",state:n})},e.addObserver=function(n){this.observers.indexOf(n)===-1&&this.observers.push(n)},e.removeObserver=function(n){this.observers=this.observers.filter(function(r){return r!==n})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Ab).catch(Ab)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var n=this,r,o=this.state.status==="loading",a=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),a=a.then(function(){n.mutationCache.config.onMutate==null||n.mutationCache.config.onMutate(n.state.variables,n)}).then(function(){return n.options.onMutate==null?void 0:n.options.onMutate(n.state.variables)}).then(function(s){s!==n.state.context&&n.dispatch({type:"loading",context:s,variables:n.state.variables})})),a.then(function(){return n.executeMutation()}).then(function(s){r=s,n.mutationCache.config.onSuccess==null||n.mutationCache.config.onSuccess(r,n.state.variables,n.state.context,n)}).then(function(){return n.options.onSuccess==null?void 0:n.options.onSuccess(r,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(r,null,n.state.variables,n.state.context)}).then(function(){return n.dispatch({type:"success",data:r}),r}).catch(function(s){return n.mutationCache.config.onError==null||n.mutationCache.config.onError(s,n.state.variables,n.state.context,n),ote().error(s),Promise.resolve().then(function(){return n.options.onError==null?void 0:n.options.onError(s,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(void 0,s,n.state.variables,n.state.context)}).then(function(){throw n.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var n=this,r;return this.retryer=new Fxt({fn:function(){return n.options.mutationFn?n.options.mutationFn(n.state.variables):Promise.reject("No mutationFn found")},onFail:function(){n.dispatch({type:"failed"})},onPause:function(){n.dispatch({type:"pause"})},onContinue:function(){n.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(n){var r=this;this.state=Vhi(this.state,n),o9.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(n)}),r.mutationCache.notify(r)})},i}();function Oxt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Vhi(i,e){switch(e.type){case"failed":return Wg({},i,{failureCount:i.failureCount+1});case"pause":return Wg({},i,{isPaused:!0});case"continue":return Wg({},i,{isPaused:!1});case"loading":return Wg({},i,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Wg({},i,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Wg({},i,{data:void 0,error:e.error,failureCount:i.failureCount+1,isPaused:!1,status:"error"});case"setState":return Wg({},i,e.state);default:return i}}var jhi=function(i){dT(e,i);function e(n){var r;return r=i.call(this)||this,r.config=n||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,a){var s=new Yhi({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:a,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(s),s},t.add=function(r){this.mutations.push(r),this.notify(r)},t.remove=function(r){this.mutations=this.mutations.filter(function(o){return o!==r}),r.cancel(),this.notify(r)},t.clear=function(){var r=this;o9.batch(function(){r.mutations.forEach(function(o){r.remove(o)})})},t.getAll=function(){return this.mutations},t.find=function(r){return typeof r.exact>"u"&&(r.exact=!0),this.mutations.find(function(o){return Dxt(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return Dxt(r,o)})},t.notify=function(r){var o=this;o9.batch(function(){o.listeners.forEach(function(a){a(r)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var r=this.mutations.filter(function(o){return o.state.isPaused});return o9.batch(function(){return r.reduce(function(o,a){return o.then(function(){return a.continue().catch(Ab)})},Promise.resolve())})},e}(fT);function Khi(){return{onFetch:function(e){e.fetchFn=function(){var t,n,r,o,a,s,c=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",h=(l==null?void 0:l.direction)==="backward",p=((a=e.state.data)==null?void 0:a.pages)||[],m=((s=e.state.data)==null?void 0:s.pageParams)||[],y=Pxt(),v=y==null?void 0:y.signal,I=m,x=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},M=function(oe,ue,de,ge){return I=ge?[ue].concat(I):[].concat(I,[ue]),ge?[de].concat(oe):[].concat(oe,[de])},Y=function(oe,ue,de,ge){if(x)return Promise.reject("Cancelled");if(typeof de>"u"&&!ue&&oe.length)return Promise.resolve(oe);var ye={queryKey:e.queryKey,signal:v,pageParam:de,meta:e.meta},we=w(ye),Re=Promise.resolve(we).then(function(xe){return M(oe,de,xe,ge)});if(ite(we)){var be=Re;be.cancel=we.cancel}return Re},F;if(!p.length)F=Y([]);else if(f){var P=typeof u<"u",T=P?u:Gxt(e.options,p);F=Y(p,P,T)}else if(h){var V=typeof u<"u",O=V?u:qhi(e.options,p);F=Y(p,V,O,!0)}else(function(){I=[];var ne=typeof e.options.getNextPageParam>"u",oe=c&&p[0]?c(p[0],0,p):!0;F=oe?Y([],ne,m[0]):Promise.resolve(M([],m[0],p[0]));for(var ue=function(ye){F=F.then(function(we){var Re=c&&p[ye]?c(p[ye],ye,p):!0;if(Re){var be=ne?m[ye]:Gxt(e.options,we);return Y(we,ne,be)}return Promise.resolve(M(we,m[ye],p[ye]))})},de=1;de<p.length;de++)ue(de)})();var J=F.then(function(ne){return{pages:ne,pageParams:I}}),j=J;return j.cancel=function(){x=!0,y==null||y.abort(),ite(F)&&F.cancel()},J}}}}function Gxt(i,e){return i.getNextPageParam==null?void 0:i.getNextPageParam(e[e.length-1],e)}function qhi(i,e){return i.getPreviousPageParam==null?void 0:i.getPreviousPageParam(e[0],e)}var Whi=function(){function i(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new Hhi,this.mutationCache=t.mutationCache||new jhi,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=i.prototype;return e.mount=function(){var n=this;this.unsubscribeFocus=NF.subscribe(function(){NF.isFocused()&&nte.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=nte.subscribe(function(){NF.isFocused()&&nte.isOnline()&&(n.mutationCache.onOnline(),n.queryCache.onOnline())})},e.unmount=function(){var n,r;(n=this.unsubscribeFocus)==null||n.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(n,r){var o=M4(n,r),a=o[0];return a.fetching=!0,this.queryCache.findAll(a).length},e.isMutating=function(n){return this.mutationCache.findAll(Wg({},n,{fetching:!0})).length},e.getQueryData=function(n,r){var o;return(o=this.queryCache.find(n,r))==null?void 0:o.state.data},e.getQueriesData=function(n){return this.getQueryCache().findAll(n).map(function(r){var o=r.queryKey,a=r.state,s=a.data;return[o,s]})},e.setQueryData=function(n,r,o){var a=$ee(n),s=this.defaultQueryOptions(a);return this.queryCache.build(this,s).setData(r,o)},e.setQueriesData=function(n,r,o){var a=this;return o9.batch(function(){return a.getQueryCache().findAll(n).map(function(s){var c=s.queryKey;return[c,a.setQueryData(c,r,o)]})})},e.getQueryState=function(n,r){var o;return(o=this.queryCache.find(n,r))==null?void 0:o.state},e.removeQueries=function(n,r){var o=M4(n,r),a=o[0],s=this.queryCache;o9.batch(function(){s.findAll(a).forEach(function(c){s.remove(c)})})},e.resetQueries=function(n,r,o){var a=this,s=M4(n,r,o),c=s[0],l=s[1],u=this.queryCache,f=Wg({},c,{active:!0});return o9.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),a.refetchQueries(f,l)})},e.cancelQueries=function(n,r,o){var a=this,s=M4(n,r,o),c=s[0],l=s[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var f=o9.batch(function(){return a.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(f).then(Ab).catch(Ab)},e.invalidateQueries=function(n,r,o){var a,s,c,l=this,u=M4(n,r,o),f=u[0],h=u[1],p=Wg({},f,{active:(a=(s=f.refetchActive)!=null?s:f.active)!=null?a:!0,inactive:(c=f.refetchInactive)!=null?c:!1});return o9.batch(function(){return l.queryCache.findAll(f).forEach(function(m){m.invalidate()}),l.refetchQueries(p,h)})},e.refetchQueries=function(n,r,o){var a=this,s=M4(n,r,o),c=s[0],l=s[1],u=o9.batch(function(){return a.queryCache.findAll(c).map(function(h){return h.fetch(void 0,Wg({},l,{meta:{refetchPage:c==null?void 0:c.refetchPage}}))})}),f=Promise.all(u).then(Ab);return l!=null&&l.throwOnError||(f=f.catch(Ab)),f},e.fetchQuery=function(n,r,o){var a=$ee(n,r,o),s=this.defaultQueryOptions(a);typeof s.retry>"u"&&(s.retry=!1);var c=this.queryCache.build(this,s);return c.isStaleByTime(s.staleTime)?c.fetch(s):Promise.resolve(c.state.data)},e.prefetchQuery=function(n,r,o){return this.fetchQuery(n,r,o).then(Ab).catch(Ab)},e.fetchInfiniteQuery=function(n,r,o){var a=$ee(n,r,o);return a.behavior=Khi(),this.fetchQuery(a)},e.prefetchInfiniteQuery=function(n,r,o){return this.fetchInfiniteQuery(n,r,o).then(Ab).catch(Ab)},e.cancelMutations=function(){var n=this,r=o9.batch(function(){return n.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(Ab).catch(Ab)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(n){return this.mutationCache.build(this,n).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(n){this.defaultOptions=n},e.setQueryDefaults=function(n,r){var o=this.queryDefaults.find(function(a){return fR(n)===fR(a.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:n,defaultOptions:r})},e.getQueryDefaults=function(n){var r;return n?(r=this.queryDefaults.find(function(o){return ete(n,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(n,r){var o=this.mutationDefaults.find(function(a){return fR(n)===fR(a.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:n,defaultOptions:r})},e.getMutationDefaults=function(n){var r;return n?(r=this.mutationDefaults.find(function(o){return ete(n,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var r=Wg({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=rSe(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},e.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:Wg({},this.defaultOptions.mutations,this.getMutationDefaults(n==null?void 0:n.mutationKey),n,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},i}(),Jhi=function(i){dT(e,i);function e(n,r){var o;return o=i.call(this)||this,o.client=n,o.options=r,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(r),o}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),zxt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return aSe(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return aSe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var a=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),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=a.queryKey),this.updateQuery();var c=this.hasListeners();c&&Hxt(this.currentQuery,s,this.options,a)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==s||this.options.enabled!==a.enabled||this.options.staleTime!==a.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==s||this.options.enabled!==a.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,o);return this.createResult(a,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var a=this,s={},c=function(u){a.trackedProps.includes(u)||a.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),s},t.getNextResult=function(r){var o=this;return new Promise(function(a,s){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&(r!=null&&r.throwOnError)?s(l.error):a(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(Wg({},r,{meta:{refetchPage:r==null?void 0:r.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,a=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,a);return s.fetch().then(function(){return o.createResult(s,a)})},t.fetch=function(r){var o=this;return this.executeFetch(r).then(function(){return o.updateResult(),o.currentResult})},t.executeFetch=function(r){this.updateQuery();var o=this.currentQuery.fetch(this.options,r);return r!=null&&r.throwOnError||(o=o.catch(Ab)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(Xee||this.currentResult.isStale||!iSe(this.options.staleTime))){var o=Qxt(this.currentResult.dataUpdatedAt,this.options.staleTime),a=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},a)}},t.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},t.updateRefetchInterval=function(r){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(Xee||this.options.enabled===!1||!iSe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||NF.isFocused())&&o.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(r,o){var a=this.currentQuery,s=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,f=r!==a,h=f?r.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,m=r.state,y=m.dataUpdatedAt,v=m.error,I=m.errorUpdatedAt,x=m.isFetching,w=m.status,M=!1,Y=!1,F;if(o.optimisticResults){var P=this.hasListeners(),T=!P&&zxt(r,o),V=P&&Hxt(r,a,o,s);(T||V)&&(x=!0,y||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&(p!=null&&p.isSuccess)&&w!=="error")F=p.data,y=p.dataUpdatedAt,w=p.status,M=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===(l==null?void 0:l.data)&&o.select===this.selectFn)F=this.selectResult;else try{this.selectFn=o.select,F=o.select(m.data),o.structuralSharing!==!1&&(F=tte(c==null?void 0:c.data,F)),this.selectResult=F,this.selectError=null}catch(j){ote().error(j),this.selectError=j}else F=m.data;if(typeof o.placeholderData<"u"&&typeof F>"u"&&(w==="loading"||w==="idle")){var O;if(c!=null&&c.isPlaceholderData&&o.placeholderData===(u==null?void 0:u.placeholderData))O=c.data;else if(O=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof O<"u")try{O=o.select(O),o.structuralSharing!==!1&&(O=tte(c==null?void 0:c.data,O)),this.selectError=null}catch(j){ote().error(j),this.selectError=j}typeof O<"u"&&(w="success",F=O,Y=!0)}this.selectError&&(v=this.selectError,F=this.selectResult,I=Date.now(),w="error");var J={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:F,dataUpdatedAt:y,error:v,errorUpdatedAt:I,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:x,isRefetching:x&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:Y,isPreviousData:M,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:sSe(r,o),refetch:this.refetch,remove:this.remove};return J},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var a=this.options,s=a.notifyOnChangeProps,c=a.notifyOnChangePropsExclusions;if(!s&&!c||s==="tracked"&&!this.trackedProps.length)return!0;var l=s==="tracked"?this.trackedProps:s;return Object.keys(r).some(function(u){var f=u,h=r[f]!==o[f],p=l==null?void 0:l.some(function(y){return y===u}),m=c==null?void 0:c.some(function(y){return y===u});return h&&!m&&(!l||p)})},t.updateResult=function(r){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!khi(this.currentResult,o)){var a={cache:!0};(r==null?void 0:r.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(a.listeners=!0),this.notify(Wg({},a,r))}},t.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var o=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!rte(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;o9.batch(function(){r.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):r.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),r.listeners&&o.listeners.forEach(function(a){a(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e}(fT);function Xhi(i,e){return e.enabled!==!1&&!i.state.dataUpdatedAt&&!(i.state.status==="error"&&e.retryOnMount===!1)}function zxt(i,e){return Xhi(i,e)||i.state.dataUpdatedAt>0&&aSe(i,e,e.refetchOnMount)}function aSe(i,e,t){if(e.enabled!==!1){var n=typeof t=="function"?t(i):t;return n==="always"||n!==!1&&sSe(i,e)}return!1}function Hxt(i,e,t,n){return t.enabled!==!1&&(i!==e||n.enabled===!1)&&(!t.suspense||i.state.status!=="error")&&sSe(i,t)}function sSe(i,e){return i.isStaleByTime(e.staleTime)}var Zhi=function(i){dT(e,i);function e(n,r){var o;return o=i.call(this)||this,o.client=n,o.setOptions(r),o.bindMethods(),o.updateResult(),o}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(r){this.options=this.client.defaultMutationOptions(r)},t.onUnsubscribe=function(){if(!this.listeners.length){var r;(r=this.currentMutation)==null||r.removeObserver(this)}},t.onMutationUpdate=function(r){this.updateResult();var o={listeners:!0};r.type==="success"?o.onSuccess=!0:r.type==="error"&&(o.onError=!0),this.notify(o)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(r,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Wg({},this.options,{variables:typeof r<"u"?r:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var r=this.currentMutation?this.currentMutation.state:Oxt(),o=Wg({},r,{isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},t.notify=function(r){var o=this;o9.batch(function(){o.mutateOptions&&(r.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):r.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),r.listeners&&o.listeners.forEach(function(a){a(o.currentResult)})})},e}(fT),$hi=WBe.unstable_batchedUpdates;o9.setBatchNotifyFunction($hi);var e0i=console;Ghi(e0i);var Yxt=Cf.createContext(void 0),Vxt=Cf.createContext(!1);function jxt(i){return i&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Yxt),window.ReactQueryClientContext):Yxt}var cSe=function(){var e=Cf.useContext(jxt(Cf.useContext(Vxt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},t0i=function(e){var t=e.client,n=e.contextSharing,r=n===void 0?!1:n,o=e.children;Cf.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var a=jxt(r);return Cf.createElement(Vxt.Provider,{value:r},Cf.createElement(a.Provider,{value:t},o))};function n0i(){var i=!1;return{clearReset:function(){i=!1},reset:function(){i=!0},isReset:function(){return i}}}var i0i=Cf.createContext(n0i()),r0i=function(){return Cf.useContext(i0i)};function Kxt(i,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!i}function o0i(i,e,t){var n=Cf.useRef(!1),r=Cf.useState(0),o=r[1],a=Dhi(i,e),s=cSe(),c=Cf.useRef();c.current?c.current.setOptions(a):c.current=new Zhi(s,a);var l=c.current.getCurrentResult();Cf.useEffect(function(){n.current=!0;var f=c.current.subscribe(o9.batchCalls(function(){n.current&&o(function(h){return h+1})}));return function(){n.current=!1,f()}},[]);var u=Cf.useCallback(function(f,h){c.current.mutate(f,h).catch(Ab)},[]);if(l.error&&Kxt(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return Wg({},l,{mutate:u,mutateAsync:l.mutate})}function a0i(i,e){var t=Cf.useRef(!1),n=Cf.useState(0),r=n[1],o=cSe(),a=r0i(),s=o.defaultQueryObserverOptions(i);s.optimisticResults=!0,s.onError&&(s.onError=o9.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=o9.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=o9.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(a.isReset()||(s.retryOnMount=!1));var c=Cf.useState(function(){return new e(o,s)}),l=c[0],u=l.getOptimisticResult(s);if(Cf.useEffect(function(){t.current=!0,a.clearReset();var f=l.subscribe(o9.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,f()}},[a,l]),Cf.useEffect(function(){l.setOptions(s,{listeners:!1})},[s,l]),s.suspense&&u.isLoading)throw l.fetchOptimistic(s).then(function(f){var h=f.data;s.onSuccess==null||s.onSuccess(h),s.onSettled==null||s.onSettled(h,null)}).catch(function(f){a.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(u.isError&&!a.isReset()&&!u.isFetching&&Kxt(s.suspense,s.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return s.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,s)),u}function s0i(i,e,t){var n=$ee(i,e,t);return a0i(n,Jhi)}function c0i({orderQuote:i,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:n}){const r=e?i.shipping_options.find(o=>o.carrier===e):null;return He.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[He.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[He.jsx(Q5n,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),He.jsx("span",{className:"rf-font-semibold rf-text-lg",children:i.vendor_name.toUpperCase()})]}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[He.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[He.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",n.toFixed(2)]}),He.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),He.jsx("hr",{className:"rf-border-gray-200"}),He.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[He.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),He.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:i.shipping_options.map((o,a)=>He.jsxs("button",{type:"button",className:dg("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===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:()=>t(o.carrier),children:[He.jsx(D5n,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),He.jsxs("div",{className:"rf-text-left rf-flex-1",children:[He.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),He.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[He.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),He.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+a))})]}),e!==null&&r&&He.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:He.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[He.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[He.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(i.total_cost_without_shipping+r.cost).toFixed(2)]}),He.jsx("div",{className:"rf-flex rf-items-center",children:He.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const l0i=async i=>{try{const{order_quote_id:e}=await Hee.post("order_quotes/create",{json:{package_release_id:i,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof D3e){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},u0i=async i=>{const{order_quote:e}=await Hee.get("order_quotes/get",{searchParams:{order_quote_id:i}}).json();return e},d0i=()=>{const i=cSe();return o0i({mutationKey:["createOrderQuote"],mutationFn:e=>l0i(e),onSuccess:e=>{i.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},f0i=i=>{const{data:e,error:t,status:n}=s0i(["getOrderQuote",i],()=>u0i(i||""),{enabled:!!i,refetchInterval:r=>r!=null&&r.is_completed||r!=null&&r.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:n==="loading"?"loading":n==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},h0i=({onCancel:i,packageReleaseId:e,signIn:t,isLoggedIn:n})=>{var y,v,I,x,w,M,Y,F;const[r,o]=st.useState(null),[a,s]=st.useState(null),{mutate:c,error:l}=d0i();st.useEffect(()=>{e&&c(e,{onSuccess:P=>{s(P.order_quote_id)}})},[e]);const{data:u}=f0i(a||void 0),f=l&&((y=l.error)==null?void 0:y.message)||((v=u==null?void 0:u.error)==null?void 0:v.message);N0t({errorMessage:f});const h=async P=>{const T=zee("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${T}?client_reference_id=${P}&shipping_option=${r}`};st.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const P=u.shipping_options.reduce((T,V)=>V.cost<T.cost?V:T,u.shipping_options[0]);o((P==null?void 0:P.carrier)||null)}},[u]);const p=st.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((P,T)=>T.cost<P.cost?T:P,u.shipping_options[0]).cost:0,[u]),m=l&&((x=(I=l.error)==null?void 0:I.error_code)==null?void 0:x.includes("no_token"))||((M=(w=u==null?void 0:u.error)==null?void 0:w.error_code)==null?void 0:M.includes("no_token"))&&t;return!n||m?He.jsx(g0i,{signIn:t}):He.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[He.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u!=null&&u.error)&&(!a||!u||(u==null?void 0:u.is_processing))&&He.jsx(A0i,{message:"Fetching quotes..."}),(l||(u==null?void 0:u.error))&&He.jsx(p0i,{message:l&&((Y=l.error)==null?void 0:Y.message)||((F=u==null?void 0:u.error)==null?void 0:F.message)||"Failed to fetch quotes"}),(u==null?void 0:u.is_completed)&&!l&&!(u!=null&&u.error)&&Array.isArray(u==null?void 0:u.shipping_options)&&u.shipping_options.length>0&&He.jsxs(He.Fragment,{children:[He.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),He.jsx(c0i,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:p+(u.total_cost_without_shipping||0)},u==null?void 0:u.order_quote_id)]}),He.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[He.jsx(hC,{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:i,children:"Cancel"}),He.jsx(hC,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:r===null,onClick:()=>{if(r===null){b9.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),He.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},A0i=({message:i})=>He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[He.jsx(V8,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),He.jsx("p",{className:"rf-text-gray-600",children:i})]}),p0i=({message:i})=>He.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:i}),g0i=({signIn:i})=>He.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[He.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[He.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),He.jsxs(hC,{onClick:i,className:"rf-flex rf-items-center rf-gap-2",children:[He.jsx(kIe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),m0i=new Whi,y0i=({isOpen:i,onClose:e,stage:t,setStage:n,circuitJson:r,packageReleaseId:o,signIn:a,isLoggedIn:s})=>He.jsx(t0i,{client:m0i,children:He.jsx(IJ,{open:i,onOpenChange:c=>{c||e()},children:He.jsx(QL,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:He.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&He.jsx(h0i,{onCancel:e,packageReleaseId:o??"",signIn:a??(()=>{}),isLoggedIn:s})})})})}),_0i=({isOpen:i,onClose:e,stage:t,setStage:n,signIn:r,isLoggedIn:o})=>{const a=a4(s=>s.circuitJson);return He.jsx(y0i,{signIn:r,isOpen:i,onClose:e,stage:t,setStage:n,circuitJson:a,isLoggedIn:o??!1})},v0i=()=>{const[i,e]=st.useState(!1),[t,n]=st.useState("initial");return{isOpen:i,stage:t,open:()=>e(!0),close:()=>{e(!1),n("initial")},setStage:n,OrderDialog:_0i}},I0i=i=>{const e=fxe(we=>we.lastRunEvalVersion),[t,n]=st.useState(null),[r,o]=st.useState(!1),[a,s]=st.useState(!0),[c,l]=st.useState(!1),[u,f]=st.useState(null),[h,p]=st.useState(null),[m,y]=st.useState(!1),[v,I]=st.useState(null),[x,w]=st.useState(null),[M,Y]=st.useState(!1),[F,P]=st.useState(!1),T=v0i(),V=a4(we=>we.pushEvent),O=a4(we=>we.recentEvents),J=st.useMemo(()=>Date.now(),[]);ukn(we=>{if(!(new Date(we.created_at).valueOf()<J+500)){if(we.event_type==="FILE_UPDATED"){o(!0);return}if(we.event_type==="SNIPPET_SAVED"){o(!1),s(!1),I("Snippet saved successfully."),Y(!1);return}we.event_type==="REQUEST_EXPORT"&&(P(!0),I("Export processing..."),Y(!1)),we.event_type==="EXPORT_CREATED"&&(I(`Export created: ${we.exportFilePath}`),Y(!1),P(!1))}}),st.useEffect(()=>{if(!c||u===null)return;const we=O.filter(xe=>new Date(xe.created_at).valueOf()>u),Re=we.find(xe=>xe.event_type==="FAILED_TO_SAVE_SNIPPET"),be=we.find(xe=>xe.event_type==="SNIPPET_SAVED");Re&&(l(!1),f(null),w(Re.message??"Failed to save snippet. See console for error."),console.error(Re.message),Y(!0),Re.error_code==="SNIPPET_UNSET"&&Re.available_snippet_names&&(p(Re.available_snippet_names),y(!0))),be&&(l(!1),f(null),I("Snippet saved successfully."),Y(!1))},[O,c]);const j=async()=>{l(!0),f(Date.now()),I(null),Y(!1),await V({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},ne=a4(we=>we.circuitJson),oe=i.circuitJson||ne,[ue,de]=st.useState(!1),[ge,ye]=st.useState(!1);return He.jsxs(He.Fragment,{children:[He.jsxs(I9e,{children:[He.jsx(C9e,{asChild:!0,children:He.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),He.jsxs($q,{children:[!i.isWebEmbedded&&He.jsxs(He.Fragment,{children:[He.jsx(oE,{className:"rf-text-xs",onSelect:j,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&He.jsx(oE,{className:"rf-text-xs",onSelect:()=>{T.open()},children:"Order"}),He.jsx(oE,{className:"rf-text-xs",onSelect:()=>de(!0),disabled:c,children:"Import"}),He.jsx(oE,{className:"rf-text-xs",onSelect:()=>{if(!V3e()){b9.error("Requires tscircuit token");return}ye(!0)},children:"AI Review"})]}),He.jsxs(b9e,{children:[He.jsx(Xq,{className:"rf-text-xs",disabled:F,children:F?"Exporting...":"Export"}),He.jsx(x9e,{children:He.jsx(Zq,{children:Yfi.map((we,Re)=>He.jsx(oE,{onSelect:()=>{if(!oe){b9.error("No Circuit JSON to export");return}Vfi({exportName:we.name,circuitJson:oe,projectName:t??"Untitled"})},disabled:F,children:He.jsx("span",{className:"rf-text-xs",children:we.name})},Re))})})]}),!i.isWebEmbedded&&He.jsxs(b9e,{children:[He.jsx(Xq,{className:"rf-text-xs",children:"Advanced"}),He.jsx(x9e,{children:He.jsxs(Zq,{children:[He.jsx(oE,{className:"rf-flex rf-items-center rf-gap-2",children:He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[He.jsx(TAt,{id:"load-latest-eval",checked:i.shouldLoadLatestEval,onCheckedChange:we=>{var Re;(Re=i.onChangeShouldLoadLatestEval)==null||Re.call(i,we===!0)}}),He.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&He.jsx(oE,{className:"rf-flex rf-items-center rf-gap-2",children:He.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:He.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),He.jsx(oE,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:He.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:He.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),He.jsx(Tkn,{open:M,onOpenChange:Y,children:He.jsxs(IAt,{children:[He.jsxs(CAt,{children:[He.jsx(bAt,{children:"Error Saving Snippet"}),He.jsx(EAt,{children:x})]}),He.jsx(xAt,{children:He.jsx(wAt,{onClick:()=>Y(!1),children:"Dismiss"})})]})}),He.jsx(lkn,{snippetNames:h??[],onSelect:async we=>{l(!0),f(Date.now()),n(we),await V({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:we}),y(!1)},onCancel:()=>y(!1),isOpen:m})]}),He.jsx(sdi,{isOpen:ue,onClose:()=>de(!1)}),He.jsx(Qhi,{isOpen:ge,onClose:()=>ye(!1),packageName:t}),He.jsx(adi,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),He.jsx(T.OrderDialog,{isOpen:T.isOpen,onClose:T.close,stage:T.stage,setStage:T.setStage})]})},C0i=["assembly","bom","circuit_json","errors","render_log"],x0i=({code:i,fsMap:e,onRunClicked:t=void 0,errorMessage:n,errorStack:r,circuitJson:o,autoroutingGraphics:a,showRightHeaderContent:s=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:f=!0,onActiveTabChange:h,renderLog:p,showImportAndFormatButtons:m=!0,className:y,headerClassName:v,leftHeaderContent:I,readOnly:x,isStreaming:w,autoroutingLog:M,onReportAutoroutingLog:Y,isRunningCode:F,hasCodeChangedSinceLastRun:P,onEditEvent:T,editEvents:V,defaultActiveTab:O,defaultTab:J,availableTabs:j,autoRotate3dViewerDisabled:ne,showSchematicDebugGrid:oe=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:de=!1,activeEffectName:ge,allowSelectingVersion:ye=!0,showFileMenu:we=!1,isWebEmbedded:Re=!1})=>{var _t,Kt;Z7n();const{versions:be,latestVersion:xe,lastRunEvalVersion:Pe,search:qe,setSearch:Je,selectVersion:rt}=okn(ye),St=st.useMemo(()=>o?o.filter(Yt=>Yt&&"error_type"in Yt||Yt.type.includes("error")):null,[o]),ot=st.useMemo(()=>o?o.filter(Yt=>Yt&&"warning_type"in Yt||Yt.type.includes("warning")):null,[o]);N0t({errorMessage:n,errorStack:r,circuitJsonErrors:St});const[ke,Ke]=st.useState(O??J??(j==null?void 0:j[0])??"pcb"),[et,dt]=st.useState(null),[At,ct]=st.useState(de);$7n(At);const je=st.useCallback(Yt=>{Ke(Yt),h==null||h(Yt)},[h]),Et=()=>{ct(!At)};st.useEffect(()=>{n&&(ke!=="errors"&&dt(ke),je("errors"))},[n]),st.useEffect(()=>{(ke==="code"||ke==="errors")&&o&&!n&&je(et??O??J??(j==null?void 0:j[0])??"pcb")},[o]);const vt=st.useCallback(Yt=>{window.TSCIRCUIT_3D_OBJECT_REF=Yt===null?void 0:Yt},[]);return He.jsx("div",{className:dg("flex flex-col relative rf-overflow-x-hidden rf-h-full",y),children:He.jsx("div",{className:dg("rf-md:sticky rf-md:top-2 rf-h-full",At&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:He.jsxs(fie,{value:ke,onValueChange:je,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[He.jsxs("div",{className:dg("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",v),children:[I,we&&!I&&He.jsx(I0i,{isWebEmbedded:Re,circuitJson:o}),(I||we)&&He.jsx("div",{className:"rf-flex-grow"}),!I&&!we&&F&&He.jsx(V8,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!I&&!we&&He.jsx("div",{className:"rf-flex-grow"}),p&&p.progress!==1&&!n&&He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[ge?He.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:ge,children:ge}):p.lastRenderEvent&&He.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:((_t=p.lastRenderEvent)==null?void 0:_t.phase)??"",children:((Kt=p.lastRenderEvent)==null?void 0:Kt.phase)??""}),He.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:He.jsx(V8,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),He.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((p.progress??0)*100).toFixed(1),"%"]})]}),s&&He.jsxs(ZU,{children:[c&&He.jsx(iw,{value:"code",children:"Code"}),!j||j.includes("pcb")?He.jsxs(iw,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&He.jsx("span",{className:dg("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",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!j||j.includes("schematic")?He.jsxs(iw,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&He.jsx("span",{className:dg("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",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!j||j.includes("cad")?He.jsxs(iw,{value:"cad",children:[o&&He.jsx("span",{className:dg("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(ke)&&He.jsx(iw,{value:ke,children:$Qe(ke)}),He.jsxs(I9e,{children:[He.jsx(C9e,{asChild:!0,children:He.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[He.jsx(E5n,{className:"rf-w-4 rf-h-4"}),(St&&St.length>0||n)&&He.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"})]})}),He.jsxs($q,{className:"rf-*:text-xs",children:[C0i.filter(Yt=>!j||j.includes(Yt)).map(Yt=>He.jsxs(oE,{onSelect:()=>je(Yt),children:[ke!==Yt&&He.jsx(Sst,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),ke===Yt&&He.jsx(PIe,{className:"rf-w-3 rf-h-3"}),He.jsx("div",{className:"rf-pr-2",children:$Qe(Yt)}),Yt==="errors"&&(St&&St.length>0||n)&&He.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:n?1:St==null?void 0:St.length})]},Yt)),He.jsx(oE,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:He.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",nkn.split(".").map((Yt,pt)=>pt===2?parseInt(Yt)+1:Yt).join(".")]})}),ye?He.jsxs(b9e,{onOpenChange:Yt=>!Yt&&Je(""),children:[He.jsx(Xq,{className:"rf-text-xs rf-opacity-60",children:He.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Pe??xe??"latest"]})}),He.jsx(x9e,{children:He.jsxs(Zq,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[He.jsx("div",{className:"rf-p-1",children:He.jsx(hCe,{value:qe,onChange:Yt=>Je(Yt.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),He.jsx(Nlt,{}),He.jsx(oE,{onSelect:()=>rt(null),children:xe?`${xe} (latest)`:"latest"}),be.map(Yt=>He.jsx(oE,{onSelect:()=>rt(Yt),children:Yt},Yt))]})})]}):Pe&&He.jsx(oE,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:He.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Pe]})})]})]})]}),ue&&He.jsx(hC,{onClick:Et,variant:"ghost",children:At?He.jsx(M5n,{size:16}):He.jsx(S5n,{size:16})})]}),c&&He.jsx(M2,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:He.jsx("div",{className:"rf-h-full",children:l})}),(!j||j.includes("pcb"))&&He.jsx(M2,{value:"pcb",children:He.jsx("div",{className:dg("rf-overflow-hidden",At?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:He.jsx(Y8,{fallbackRender:({error:Yt})=>He.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:He.jsxs("div",{className:"rf-p-4",children:[He.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),He.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Yt==null?void 0:Yt.message)||"An unknown error occurred"})]})}),children:o?He.jsx(J7n,{focusOnHover:!1,circuitJson:o,debugGraphics:a,containerClassName:dg("rf-h-full rf-w-full",At?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Yt=>{if(T)for(const pt of Yt)T(pt)}}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("assembly"))&&He.jsx(M2,{value:"assembly",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallback:He.jsx("div",{children:"Error loading Assembly"}),children:o?He.jsx(b8n,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("schematic"))&&He.jsx(M2,{value:"schematic",children:He.jsx("div",{className:dg("rf-overflow-auto rf-bg-white",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallbackRender:({error:Yt})=>He.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:He.jsxs("div",{className:"rf-p-4",children:[He.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),He.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Yt==null?void 0:Yt.message)||"An unknown error occurred"})]})}),children:o?He.jsx(I8n,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Yt=>{T==null||T(Yt)},debugGrid:oe}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("cad"))&&He.jsx(M2,{value:"cad",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{FallbackComponent:h5n,children:o?He.jsx(d5n,{ref:vt,circuitJson:o,autoRotateDisabled:ne}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("bom"))&&He.jsx(M2,{value:"bom",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallbackRender:({error:Yt})=>He.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:He.jsxs("div",{className:"rf-p-4",children:[He.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),He.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Yt==null?void 0:Yt.message)||"An unknown error occurred"})]})}),children:o?He.jsx(M8n,{circuitJson:o}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("circuit_json"))&&He.jsx(M2,{value:"circuit_json",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallback:He.jsx("div",{children:"Error loading JSON viewer"}),children:o?He.jsx(S8n,{elements:o}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("errors"))&&He.jsx(M2,{value:"errors",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:n||St&&St.length>0||o?He.jsx(_Bn,{code:i,fsMap:e,circuitJsonErrors:St,circuitJsonWarnings:ot,errorMessage:n,errorStack:r,circuitJson:o,evalVersion:Pe,autoroutingLog:M,onReportAutoroutingLog:Y}):He.jsx(TQ,{onRunClicked:t})})}),f&&(!j||j.includes("render_log"))&&He.jsx(M2,{value:"render_log",children:He.jsx(tkn,{renderLog:p})})]})})})};YBe.createRoot(document.getElementById("root")).render(He.jsx("div",{style:{height:"100vh"},children:He.jsx(x0i,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}})}));const b0i=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
14746
+ Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+u3(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},dR=new Bhi;function a1(i,e){return dR.parse(i,e)}a1.options=a1.setOptions=function(i){return dR.setOptions(i),a1.defaults=dR.defaults,Axt(a1.defaults),a1},a1.getDefaults=j3e,a1.defaults=uR,a1.use=function(...i){return dR.use(...i),a1.defaults=dR.defaults,Axt(a1.defaults),a1},a1.walkTokens=function(i,e){return dR.walkTokens(i,e)},a1.parseInline=dR.parseInline,a1.Parser=TS,a1.parser=TS.parse,a1.Renderer=Wee,a1.TextRenderer=tSe,a1.Lexer=NS,a1.lexer=NS.lex,a1.Tokenizer=qee,a1.Hooks=Jee,a1.parse=a1,a1.options,a1.setOptions,a1.use,a1.walkTokens,a1.parseInline,TS.parse,NS.lex;const Mhi=({review:i,onBack:e})=>{const[t,n]=st.useState(i.ai_review_text??null),r=uT(),o=i.ai_review_id;st.useEffect(()=>{if(!o)return;let s;async function c(){try{const l=await r.get("ai_reviews/get",{searchParams:{ai_review_id:o}}),{ai_review:u}=await l.json();if(u.ai_review_text){n(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}s=setTimeout(c,1e3)}return s=setTimeout(c,1e3),()=>clearTimeout(s)},[o]);const a=st.useMemo(()=>a1.parse(i.ai_review_text||""),[i.ai_review_text]);return He.jsxs(He.Fragment,{children:[He.jsxs(RL,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[He.jsx(hC,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),He.jsx(DL,{children:"AI Review"})]}),t?He.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:a}}):He.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:He.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[He.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[He.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),He.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),He.jsx("span",{children:"Loading..."})]})})]})},Qhi=({isOpen:i,onClose:e,packageName:t})=>{const[n,r]=st.useState("list_reviews"),[o,a]=st.useState(null),s=c=>{a(c),r("view_review")};return He.jsx(IJ,{open:i,onOpenChange:c=>{c||(r("list_reviews"),a(null),e())},children:He.jsxs(QL,{className:"rf-max-w-2xl",children:[n==="list_reviews"&&He.jsx(jfi,{packageName:t,onSelectReview:s}),n==="view_review"&&o&&He.jsx(Mhi,{review:o,onBack:()=>r("list_reviews")})]})})};function nSe(i,e){return nSe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},nSe(i,e)}function dT(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,nSe(i,e)}var fT=function(){function i(){this.listeners=[]}var e=i.prototype;return e.subscribe=function(n){var r=this,o=n||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(a){return a!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},i}(),Xee=typeof window>"u";function Ab(){}function Rhi(i,e){return typeof i=="function"?i(e):i}function iSe(i){return typeof i=="number"&&i>=0&&i!==1/0}function Zee(i){return Array.isArray(i)?i:[i]}function Qxt(i,e){return Math.max(i+(e||0)-Date.now(),0)}function $ee(i,e,t){return DF(i)?typeof e=="function"?Wg({},t,{queryKey:i,queryFn:e}):Wg({},e,{queryKey:i}):i}function Dhi(i,e,t){return DF(i)?Wg({},e,{mutationKey:i}):typeof i=="function"?Wg({},e,{mutationFn:i}):Wg({},i)}function M4(i,e,t){return DF(i)?[Wg({},e,{queryKey:i}),t]:[i||{},e]}function Nhi(i,e){if(i===!0&&e===!0||i==null&&e==null)return"all";if(i===!1&&e===!1)return"none";var t=i??!e;return t?"active":"inactive"}function Rxt(i,e){var t=i.active,n=i.exact,r=i.fetching,o=i.inactive,a=i.predicate,s=i.queryKey,c=i.stale;if(DF(s)){if(n){if(e.queryHash!==rSe(s,e.options))return!1}else if(!ete(e.queryKey,s))return!1}var l=Nhi(t,o);if(l==="none")return!1;if(l!=="all"){var u=e.isActive();if(l==="active"&&!u||l==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||typeof r=="boolean"&&e.isFetching()!==r||a&&!a(e))}function Dxt(i,e){var t=i.exact,n=i.fetching,r=i.predicate,o=i.mutationKey;if(DF(o)){if(!e.options.mutationKey)return!1;if(t){if(fR(e.options.mutationKey)!==fR(o))return!1}else if(!ete(e.options.mutationKey,o))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||r&&!r(e))}function rSe(i,e){var t=(e==null?void 0:e.queryKeyHashFn)||fR;return t(i)}function fR(i){var e=Zee(i);return Thi(e)}function Thi(i){return JSON.stringify(i,function(e,t){return oSe(t)?Object.keys(t).sort().reduce(function(n,r){return n[r]=t[r],n},{}):t})}function ete(i,e){return Nxt(Zee(i),Zee(e))}function Nxt(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!Nxt(i[t],e[t])}):!1}function tte(i,e){if(i===e)return i;var t=Array.isArray(i)&&Array.isArray(e);if(t||oSe(i)&&oSe(e)){for(var n=t?i.length:Object.keys(i).length,r=t?e:Object.keys(e),o=r.length,a=t?[]:{},s=0,c=0;c<o;c++){var l=t?c:r[c];a[l]=tte(i[l],e[l]),a[l]===i[l]&&s++}return n===o&&s===n?i:a}return e}function khi(i,e){if(i&&!e||e&&!i)return!1;for(var t in i)if(i[t]!==e[t])return!1;return!0}function oSe(i){if(!Txt(i))return!1;var e=i.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!Txt(t)||!t.hasOwnProperty("isPrototypeOf"))}function Txt(i){return Object.prototype.toString.call(i)==="[object Object]"}function DF(i){return typeof i=="string"||Array.isArray(i)}function Phi(i){return new Promise(function(e){setTimeout(e,i)})}function kxt(i){Promise.resolve().then(i).catch(function(e){return setTimeout(function(){throw e})})}function Pxt(){if(typeof AbortController=="function")return new AbortController}var Lhi=function(i){dT(e,i);function e(){var n;return n=i.call(this)||this,n.setup=function(r){var o;if(!Xee&&((o=window)!=null&&o.addEventListener)){var a=function(){return r()};return window.addEventListener("visibilitychange",a,!1),window.addEventListener("focus",a,!1),function(){window.removeEventListener("visibilitychange",a),window.removeEventListener("focus",a)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,a=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(s){typeof s=="boolean"?a.setFocused(s):a.onFocus()})},t.setFocused=function(r){this.focused=r,r&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(r){r()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e}(fT),NF=new Lhi,Fhi=function(i){dT(e,i);function e(){var n;return n=i.call(this)||this,n.setup=function(r){var o;if(!Xee&&((o=window)!=null&&o.addEventListener)){var a=function(){return r()};return window.addEventListener("online",a,!1),window.addEventListener("offline",a,!1),function(){window.removeEventListener("online",a),window.removeEventListener("offline",a)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,a=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(s){typeof s=="boolean"?a.setOnline(s):a.onOnline()})},t.setOnline=function(r){this.online=r,r&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(r){r()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e}(fT),nte=new Fhi;function Uhi(i){return Math.min(1e3*Math.pow(2,i),3e4)}function ite(i){return typeof(i==null?void 0:i.cancel)=="function"}var Lxt=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function rte(i){return i instanceof Lxt}var Fxt=function(e){var t=this,n=!1,r,o,a,s;this.abort=e.abort,this.cancel=function(h){return r==null?void 0:r(h)},this.cancelRetry=function(){n=!0},this.continueRetry=function(){n=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,p){a=h,s=p});var c=function(p){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(p),o==null||o(),a(p))},l=function(p){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(p),o==null||o(),s(p))},u=function(){return new Promise(function(p){o=p,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){o=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},f=function h(){if(!t.isResolved){var p;try{p=e.fn()}catch(m){p=Promise.reject(m)}r=function(y){if(!t.isResolved&&(l(new Lxt(y)),t.abort==null||t.abort(),ite(p)))try{p.cancel()}catch{}},t.isTransportCancelable=ite(p),Promise.resolve(p).then(c).catch(function(m){var y,v;if(!t.isResolved){var I=(y=e.retry)!=null?y:3,x=(v=e.retryDelay)!=null?v:Uhi,w=typeof x=="function"?x(t.failureCount,m):x,M=I===!0||typeof I=="number"&&t.failureCount<I||typeof I=="function"&&I(t.failureCount,m);if(n||!M){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),Phi(w).then(function(){if(!NF.isFocused()||!nte.isOnline())return u()}).then(function(){n?l(m):h()})}})}};f()},Ohi=function(){function i(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=i.prototype;return e.batch=function(n){var r;this.transactions++;try{r=n()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(n){var r=this;this.transactions?this.queue.push(n):kxt(function(){r.notifyFn(n)})},e.batchCalls=function(n){var r=this;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];r.schedule(function(){n.apply(void 0,a)})}},e.flush=function(){var n=this,r=this.queue;this.queue=[],r.length&&kxt(function(){n.batchNotifyFn(function(){r.forEach(function(o){n.notifyFn(o)})})})},e.setNotifyFunction=function(n){this.notifyFn=n},e.setBatchNotifyFunction=function(n){this.batchNotifyFn=n},i}(),o9=new Ohi,Uxt=console;function ote(){return Uxt}function Ghi(i){Uxt=i}var zhi=function(){function i(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=i.prototype;return e.setOptions=function(n){var r;this.options=Wg({},this.defaultOptions,n),this.meta=n==null?void 0:n.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(n){this.defaultOptions=n},e.scheduleGc=function(){var n=this;this.clearGcTimeout(),iSe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){n.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(n,r){var o,a,s=this.state.data,c=Rhi(n,s);return(o=(a=this.options).isDataEqual)!=null&&o.call(a,s,c)?c=s:this.options.structuralSharing!==!1&&(c=tte(s,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt}),c},e.setState=function(n,r){this.dispatch({type:"setState",state:n,setStateOptions:r})},e.cancel=function(n){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(n),o?o.then(Ab).catch(Ab):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(n){return n.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(n){return n.getCurrentResult().isStale})},e.isStaleByTime=function(n){return n===void 0&&(n=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Qxt(this.state.dataUpdatedAt,n)},e.onFocus=function(){var n,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(n=this.retryer)==null||n.continue()},e.onOnline=function(){var n,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(n=this.retryer)==null||n.continue()},e.addObserver=function(n){this.observers.indexOf(n)===-1&&(this.observers.push(n),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))},e.removeObserver=function(n){this.observers.indexOf(n)!==-1&&(this.observers=this.observers.filter(function(r){return r!==n}),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:n}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(n,r){var o=this,a,s,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){var u=this.observers.find(function(x){return x.options.queryFn});u&&this.setOptions(u.options)}var f=Zee(this.queryKey),h=Pxt(),p={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(h)return o.abortSignalConsumed=!0,h.signal}});var m=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},y={fetchOptions:r,options:this.options,queryKey:f,state:this.state,fetchFn:m,meta:this.meta};if((a=this.options.behavior)!=null&&a.onFetch){var v;(v=this.options.behavior)==null||v.onFetch(y)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=y.fetchOptions)==null?void 0:s.meta)){var I;this.dispatch({type:"fetch",meta:(I=y.fetchOptions)==null?void 0:I.meta})}return this.retryer=new Fxt({fn:y.fetchFn,abort:h==null||(c=h.abort)==null?void 0:c.bind(h),onSuccess:function(w){o.setData(w),o.cache.config.onSuccess==null||o.cache.config.onSuccess(w,o),o.cacheTime===0&&o.optionalRemove()},onError:function(w){rte(w)&&w.silent||o.dispatch({type:"error",error:w}),rte(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),ote().error(w)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(n){var r=this;this.state=this.reducer(this.state,n),o9.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(n)}),r.cache.notify({query:r,type:"queryUpdated",action:n})})},e.getDefaultState=function(n){var r=typeof n.initialData=="function"?n.initialData():n.initialData,o=typeof n.initialData<"u",a=o?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0,s=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:s?a??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(n,r){var o,a;switch(r.type){case"failed":return Wg({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return Wg({},n,{isPaused:!0});case"continue":return Wg({},n,{isPaused:!1});case"fetch":return Wg({},n,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Wg({},n,{data:r.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(a=r.dataUpdatedAt)!=null?a:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=r.error;return rte(s)&&s.revert&&this.revertState?Wg({},this.revertState):Wg({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Wg({},n,{isInvalidated:!0});case"setState":return Wg({},n,r.state);default:return n}},i}(),Hhi=function(i){dT(e,i);function e(n){var r;return r=i.call(this)||this,r.config=n||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,a){var s,c=o.queryKey,l=(s=o.queryHash)!=null?s:rSe(c,o),u=this.get(l);return u||(u=new zhi({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:a,defaultOptions:r.getQueryDefaults(c),meta:o.meta}),this.add(u)),u},t.add=function(r){this.queriesMap[r.queryHash]||(this.queriesMap[r.queryHash]=r,this.queries.push(r),this.notify({type:"queryAdded",query:r}))},t.remove=function(r){var o=this.queriesMap[r.queryHash];o&&(r.destroy(),this.queries=this.queries.filter(function(a){return a!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;o9.batch(function(){r.queries.forEach(function(o){r.remove(o)})})},t.get=function(r){return this.queriesMap[r]},t.getAll=function(){return this.queries},t.find=function(r,o){var a=M4(r,o),s=a[0];return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(function(c){return Rxt(s,c)})},t.findAll=function(r,o){var a=M4(r,o),s=a[0];return Object.keys(s).length>0?this.queries.filter(function(c){return Rxt(s,c)}):this.queries},t.notify=function(r){var o=this;o9.batch(function(){o.listeners.forEach(function(a){a(r)})})},t.onFocus=function(){var r=this;o9.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;o9.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e}(fT),Yhi=function(){function i(t){this.options=Wg({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Oxt(),this.meta=t.meta}var e=i.prototype;return e.setState=function(n){this.dispatch({type:"setState",state:n})},e.addObserver=function(n){this.observers.indexOf(n)===-1&&this.observers.push(n)},e.removeObserver=function(n){this.observers=this.observers.filter(function(r){return r!==n})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Ab).catch(Ab)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var n=this,r,o=this.state.status==="loading",a=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),a=a.then(function(){n.mutationCache.config.onMutate==null||n.mutationCache.config.onMutate(n.state.variables,n)}).then(function(){return n.options.onMutate==null?void 0:n.options.onMutate(n.state.variables)}).then(function(s){s!==n.state.context&&n.dispatch({type:"loading",context:s,variables:n.state.variables})})),a.then(function(){return n.executeMutation()}).then(function(s){r=s,n.mutationCache.config.onSuccess==null||n.mutationCache.config.onSuccess(r,n.state.variables,n.state.context,n)}).then(function(){return n.options.onSuccess==null?void 0:n.options.onSuccess(r,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(r,null,n.state.variables,n.state.context)}).then(function(){return n.dispatch({type:"success",data:r}),r}).catch(function(s){return n.mutationCache.config.onError==null||n.mutationCache.config.onError(s,n.state.variables,n.state.context,n),ote().error(s),Promise.resolve().then(function(){return n.options.onError==null?void 0:n.options.onError(s,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(void 0,s,n.state.variables,n.state.context)}).then(function(){throw n.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var n=this,r;return this.retryer=new Fxt({fn:function(){return n.options.mutationFn?n.options.mutationFn(n.state.variables):Promise.reject("No mutationFn found")},onFail:function(){n.dispatch({type:"failed"})},onPause:function(){n.dispatch({type:"pause"})},onContinue:function(){n.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(n){var r=this;this.state=Vhi(this.state,n),o9.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(n)}),r.mutationCache.notify(r)})},i}();function Oxt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Vhi(i,e){switch(e.type){case"failed":return Wg({},i,{failureCount:i.failureCount+1});case"pause":return Wg({},i,{isPaused:!0});case"continue":return Wg({},i,{isPaused:!1});case"loading":return Wg({},i,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Wg({},i,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Wg({},i,{data:void 0,error:e.error,failureCount:i.failureCount+1,isPaused:!1,status:"error"});case"setState":return Wg({},i,e.state);default:return i}}var jhi=function(i){dT(e,i);function e(n){var r;return r=i.call(this)||this,r.config=n||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,a){var s=new Yhi({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:a,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(s),s},t.add=function(r){this.mutations.push(r),this.notify(r)},t.remove=function(r){this.mutations=this.mutations.filter(function(o){return o!==r}),r.cancel(),this.notify(r)},t.clear=function(){var r=this;o9.batch(function(){r.mutations.forEach(function(o){r.remove(o)})})},t.getAll=function(){return this.mutations},t.find=function(r){return typeof r.exact>"u"&&(r.exact=!0),this.mutations.find(function(o){return Dxt(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return Dxt(r,o)})},t.notify=function(r){var o=this;o9.batch(function(){o.listeners.forEach(function(a){a(r)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var r=this.mutations.filter(function(o){return o.state.isPaused});return o9.batch(function(){return r.reduce(function(o,a){return o.then(function(){return a.continue().catch(Ab)})},Promise.resolve())})},e}(fT);function Khi(){return{onFetch:function(e){e.fetchFn=function(){var t,n,r,o,a,s,c=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",h=(l==null?void 0:l.direction)==="backward",p=((a=e.state.data)==null?void 0:a.pages)||[],m=((s=e.state.data)==null?void 0:s.pageParams)||[],y=Pxt(),v=y==null?void 0:y.signal,I=m,x=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},M=function(oe,ue,de,ge){return I=ge?[ue].concat(I):[].concat(I,[ue]),ge?[de].concat(oe):[].concat(oe,[de])},Y=function(oe,ue,de,ge){if(x)return Promise.reject("Cancelled");if(typeof de>"u"&&!ue&&oe.length)return Promise.resolve(oe);var ye={queryKey:e.queryKey,signal:v,pageParam:de,meta:e.meta},we=w(ye),Re=Promise.resolve(we).then(function(xe){return M(oe,de,xe,ge)});if(ite(we)){var be=Re;be.cancel=we.cancel}return Re},F;if(!p.length)F=Y([]);else if(f){var P=typeof u<"u",T=P?u:Gxt(e.options,p);F=Y(p,P,T)}else if(h){var V=typeof u<"u",O=V?u:qhi(e.options,p);F=Y(p,V,O,!0)}else(function(){I=[];var ne=typeof e.options.getNextPageParam>"u",oe=c&&p[0]?c(p[0],0,p):!0;F=oe?Y([],ne,m[0]):Promise.resolve(M([],m[0],p[0]));for(var ue=function(ye){F=F.then(function(we){var Re=c&&p[ye]?c(p[ye],ye,p):!0;if(Re){var be=ne?m[ye]:Gxt(e.options,we);return Y(we,ne,be)}return Promise.resolve(M(we,m[ye],p[ye]))})},de=1;de<p.length;de++)ue(de)})();var J=F.then(function(ne){return{pages:ne,pageParams:I}}),j=J;return j.cancel=function(){x=!0,y==null||y.abort(),ite(F)&&F.cancel()},J}}}}function Gxt(i,e){return i.getNextPageParam==null?void 0:i.getNextPageParam(e[e.length-1],e)}function qhi(i,e){return i.getPreviousPageParam==null?void 0:i.getPreviousPageParam(e[0],e)}var Whi=function(){function i(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new Hhi,this.mutationCache=t.mutationCache||new jhi,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=i.prototype;return e.mount=function(){var n=this;this.unsubscribeFocus=NF.subscribe(function(){NF.isFocused()&&nte.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=nte.subscribe(function(){NF.isFocused()&&nte.isOnline()&&(n.mutationCache.onOnline(),n.queryCache.onOnline())})},e.unmount=function(){var n,r;(n=this.unsubscribeFocus)==null||n.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(n,r){var o=M4(n,r),a=o[0];return a.fetching=!0,this.queryCache.findAll(a).length},e.isMutating=function(n){return this.mutationCache.findAll(Wg({},n,{fetching:!0})).length},e.getQueryData=function(n,r){var o;return(o=this.queryCache.find(n,r))==null?void 0:o.state.data},e.getQueriesData=function(n){return this.getQueryCache().findAll(n).map(function(r){var o=r.queryKey,a=r.state,s=a.data;return[o,s]})},e.setQueryData=function(n,r,o){var a=$ee(n),s=this.defaultQueryOptions(a);return this.queryCache.build(this,s).setData(r,o)},e.setQueriesData=function(n,r,o){var a=this;return o9.batch(function(){return a.getQueryCache().findAll(n).map(function(s){var c=s.queryKey;return[c,a.setQueryData(c,r,o)]})})},e.getQueryState=function(n,r){var o;return(o=this.queryCache.find(n,r))==null?void 0:o.state},e.removeQueries=function(n,r){var o=M4(n,r),a=o[0],s=this.queryCache;o9.batch(function(){s.findAll(a).forEach(function(c){s.remove(c)})})},e.resetQueries=function(n,r,o){var a=this,s=M4(n,r,o),c=s[0],l=s[1],u=this.queryCache,f=Wg({},c,{active:!0});return o9.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),a.refetchQueries(f,l)})},e.cancelQueries=function(n,r,o){var a=this,s=M4(n,r,o),c=s[0],l=s[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var f=o9.batch(function(){return a.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(f).then(Ab).catch(Ab)},e.invalidateQueries=function(n,r,o){var a,s,c,l=this,u=M4(n,r,o),f=u[0],h=u[1],p=Wg({},f,{active:(a=(s=f.refetchActive)!=null?s:f.active)!=null?a:!0,inactive:(c=f.refetchInactive)!=null?c:!1});return o9.batch(function(){return l.queryCache.findAll(f).forEach(function(m){m.invalidate()}),l.refetchQueries(p,h)})},e.refetchQueries=function(n,r,o){var a=this,s=M4(n,r,o),c=s[0],l=s[1],u=o9.batch(function(){return a.queryCache.findAll(c).map(function(h){return h.fetch(void 0,Wg({},l,{meta:{refetchPage:c==null?void 0:c.refetchPage}}))})}),f=Promise.all(u).then(Ab);return l!=null&&l.throwOnError||(f=f.catch(Ab)),f},e.fetchQuery=function(n,r,o){var a=$ee(n,r,o),s=this.defaultQueryOptions(a);typeof s.retry>"u"&&(s.retry=!1);var c=this.queryCache.build(this,s);return c.isStaleByTime(s.staleTime)?c.fetch(s):Promise.resolve(c.state.data)},e.prefetchQuery=function(n,r,o){return this.fetchQuery(n,r,o).then(Ab).catch(Ab)},e.fetchInfiniteQuery=function(n,r,o){var a=$ee(n,r,o);return a.behavior=Khi(),this.fetchQuery(a)},e.prefetchInfiniteQuery=function(n,r,o){return this.fetchInfiniteQuery(n,r,o).then(Ab).catch(Ab)},e.cancelMutations=function(){var n=this,r=o9.batch(function(){return n.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(Ab).catch(Ab)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(n){return this.mutationCache.build(this,n).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(n){this.defaultOptions=n},e.setQueryDefaults=function(n,r){var o=this.queryDefaults.find(function(a){return fR(n)===fR(a.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:n,defaultOptions:r})},e.getQueryDefaults=function(n){var r;return n?(r=this.queryDefaults.find(function(o){return ete(n,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(n,r){var o=this.mutationDefaults.find(function(a){return fR(n)===fR(a.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:n,defaultOptions:r})},e.getMutationDefaults=function(n){var r;return n?(r=this.mutationDefaults.find(function(o){return ete(n,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var r=Wg({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=rSe(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},e.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:Wg({},this.defaultOptions.mutations,this.getMutationDefaults(n==null?void 0:n.mutationKey),n,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},i}(),Jhi=function(i){dT(e,i);function e(n,r){var o;return o=i.call(this)||this,o.client=n,o.options=r,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(r),o}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),zxt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return aSe(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return aSe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var a=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),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=a.queryKey),this.updateQuery();var c=this.hasListeners();c&&Hxt(this.currentQuery,s,this.options,a)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==s||this.options.enabled!==a.enabled||this.options.staleTime!==a.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==s||this.options.enabled!==a.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,o);return this.createResult(a,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var a=this,s={},c=function(u){a.trackedProps.includes(u)||a.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),s},t.getNextResult=function(r){var o=this;return new Promise(function(a,s){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&(r!=null&&r.throwOnError)?s(l.error):a(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(Wg({},r,{meta:{refetchPage:r==null?void 0:r.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,a=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,a);return s.fetch().then(function(){return o.createResult(s,a)})},t.fetch=function(r){var o=this;return this.executeFetch(r).then(function(){return o.updateResult(),o.currentResult})},t.executeFetch=function(r){this.updateQuery();var o=this.currentQuery.fetch(this.options,r);return r!=null&&r.throwOnError||(o=o.catch(Ab)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(Xee||this.currentResult.isStale||!iSe(this.options.staleTime))){var o=Qxt(this.currentResult.dataUpdatedAt,this.options.staleTime),a=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},a)}},t.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},t.updateRefetchInterval=function(r){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(Xee||this.options.enabled===!1||!iSe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||NF.isFocused())&&o.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(r,o){var a=this.currentQuery,s=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,f=r!==a,h=f?r.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,m=r.state,y=m.dataUpdatedAt,v=m.error,I=m.errorUpdatedAt,x=m.isFetching,w=m.status,M=!1,Y=!1,F;if(o.optimisticResults){var P=this.hasListeners(),T=!P&&zxt(r,o),V=P&&Hxt(r,a,o,s);(T||V)&&(x=!0,y||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&(p!=null&&p.isSuccess)&&w!=="error")F=p.data,y=p.dataUpdatedAt,w=p.status,M=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===(l==null?void 0:l.data)&&o.select===this.selectFn)F=this.selectResult;else try{this.selectFn=o.select,F=o.select(m.data),o.structuralSharing!==!1&&(F=tte(c==null?void 0:c.data,F)),this.selectResult=F,this.selectError=null}catch(j){ote().error(j),this.selectError=j}else F=m.data;if(typeof o.placeholderData<"u"&&typeof F>"u"&&(w==="loading"||w==="idle")){var O;if(c!=null&&c.isPlaceholderData&&o.placeholderData===(u==null?void 0:u.placeholderData))O=c.data;else if(O=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof O<"u")try{O=o.select(O),o.structuralSharing!==!1&&(O=tte(c==null?void 0:c.data,O)),this.selectError=null}catch(j){ote().error(j),this.selectError=j}typeof O<"u"&&(w="success",F=O,Y=!0)}this.selectError&&(v=this.selectError,F=this.selectResult,I=Date.now(),w="error");var J={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:F,dataUpdatedAt:y,error:v,errorUpdatedAt:I,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:x,isRefetching:x&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:Y,isPreviousData:M,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:sSe(r,o),refetch:this.refetch,remove:this.remove};return J},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var a=this.options,s=a.notifyOnChangeProps,c=a.notifyOnChangePropsExclusions;if(!s&&!c||s==="tracked"&&!this.trackedProps.length)return!0;var l=s==="tracked"?this.trackedProps:s;return Object.keys(r).some(function(u){var f=u,h=r[f]!==o[f],p=l==null?void 0:l.some(function(y){return y===u}),m=c==null?void 0:c.some(function(y){return y===u});return h&&!m&&(!l||p)})},t.updateResult=function(r){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!khi(this.currentResult,o)){var a={cache:!0};(r==null?void 0:r.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(a.listeners=!0),this.notify(Wg({},a,r))}},t.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var o=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!rte(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;o9.batch(function(){r.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):r.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),r.listeners&&o.listeners.forEach(function(a){a(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e}(fT);function Xhi(i,e){return e.enabled!==!1&&!i.state.dataUpdatedAt&&!(i.state.status==="error"&&e.retryOnMount===!1)}function zxt(i,e){return Xhi(i,e)||i.state.dataUpdatedAt>0&&aSe(i,e,e.refetchOnMount)}function aSe(i,e,t){if(e.enabled!==!1){var n=typeof t=="function"?t(i):t;return n==="always"||n!==!1&&sSe(i,e)}return!1}function Hxt(i,e,t,n){return t.enabled!==!1&&(i!==e||n.enabled===!1)&&(!t.suspense||i.state.status!=="error")&&sSe(i,t)}function sSe(i,e){return i.isStaleByTime(e.staleTime)}var Zhi=function(i){dT(e,i);function e(n,r){var o;return o=i.call(this)||this,o.client=n,o.setOptions(r),o.bindMethods(),o.updateResult(),o}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(r){this.options=this.client.defaultMutationOptions(r)},t.onUnsubscribe=function(){if(!this.listeners.length){var r;(r=this.currentMutation)==null||r.removeObserver(this)}},t.onMutationUpdate=function(r){this.updateResult();var o={listeners:!0};r.type==="success"?o.onSuccess=!0:r.type==="error"&&(o.onError=!0),this.notify(o)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(r,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Wg({},this.options,{variables:typeof r<"u"?r:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var r=this.currentMutation?this.currentMutation.state:Oxt(),o=Wg({},r,{isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},t.notify=function(r){var o=this;o9.batch(function(){o.mutateOptions&&(r.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):r.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),r.listeners&&o.listeners.forEach(function(a){a(o.currentResult)})})},e}(fT),$hi=WBe.unstable_batchedUpdates;o9.setBatchNotifyFunction($hi);var e0i=console;Ghi(e0i);var Yxt=Cf.createContext(void 0),Vxt=Cf.createContext(!1);function jxt(i){return i&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Yxt),window.ReactQueryClientContext):Yxt}var cSe=function(){var e=Cf.useContext(jxt(Cf.useContext(Vxt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},t0i=function(e){var t=e.client,n=e.contextSharing,r=n===void 0?!1:n,o=e.children;Cf.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var a=jxt(r);return Cf.createElement(Vxt.Provider,{value:r},Cf.createElement(a.Provider,{value:t},o))};function n0i(){var i=!1;return{clearReset:function(){i=!1},reset:function(){i=!0},isReset:function(){return i}}}var i0i=Cf.createContext(n0i()),r0i=function(){return Cf.useContext(i0i)};function Kxt(i,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!i}function o0i(i,e,t){var n=Cf.useRef(!1),r=Cf.useState(0),o=r[1],a=Dhi(i,e),s=cSe(),c=Cf.useRef();c.current?c.current.setOptions(a):c.current=new Zhi(s,a);var l=c.current.getCurrentResult();Cf.useEffect(function(){n.current=!0;var f=c.current.subscribe(o9.batchCalls(function(){n.current&&o(function(h){return h+1})}));return function(){n.current=!1,f()}},[]);var u=Cf.useCallback(function(f,h){c.current.mutate(f,h).catch(Ab)},[]);if(l.error&&Kxt(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return Wg({},l,{mutate:u,mutateAsync:l.mutate})}function a0i(i,e){var t=Cf.useRef(!1),n=Cf.useState(0),r=n[1],o=cSe(),a=r0i(),s=o.defaultQueryObserverOptions(i);s.optimisticResults=!0,s.onError&&(s.onError=o9.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=o9.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=o9.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(a.isReset()||(s.retryOnMount=!1));var c=Cf.useState(function(){return new e(o,s)}),l=c[0],u=l.getOptimisticResult(s);if(Cf.useEffect(function(){t.current=!0,a.clearReset();var f=l.subscribe(o9.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,f()}},[a,l]),Cf.useEffect(function(){l.setOptions(s,{listeners:!1})},[s,l]),s.suspense&&u.isLoading)throw l.fetchOptimistic(s).then(function(f){var h=f.data;s.onSuccess==null||s.onSuccess(h),s.onSettled==null||s.onSettled(h,null)}).catch(function(f){a.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(u.isError&&!a.isReset()&&!u.isFetching&&Kxt(s.suspense,s.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return s.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,s)),u}function s0i(i,e,t){var n=$ee(i,e,t);return a0i(n,Jhi)}function c0i({orderQuote:i,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:n}){const r=e?i.shipping_options.find(o=>o.carrier===e):null;return He.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[He.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[He.jsx(Q5n,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),He.jsx("span",{className:"rf-font-semibold rf-text-lg",children:i.vendor_name.toUpperCase()})]}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[He.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[He.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",n.toFixed(2)]}),He.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),He.jsx("hr",{className:"rf-border-gray-200"}),He.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[He.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),He.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:i.shipping_options.map((o,a)=>He.jsxs("button",{type:"button",className:dg("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===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:()=>t(o.carrier),children:[He.jsx(D5n,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),He.jsxs("div",{className:"rf-text-left rf-flex-1",children:[He.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),He.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[He.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),He.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+a))})]}),e!==null&&r&&He.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:He.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[He.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[He.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(i.total_cost_without_shipping+r.cost).toFixed(2)]}),He.jsx("div",{className:"rf-flex rf-items-center",children:He.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const l0i=async i=>{try{const{order_quote_id:e}=await Hee.post("order_quotes/create",{json:{package_release_id:i,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof D3e){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},u0i=async i=>{const{order_quote:e}=await Hee.get("order_quotes/get",{searchParams:{order_quote_id:i}}).json();return e},d0i=()=>{const i=cSe();return o0i({mutationKey:["createOrderQuote"],mutationFn:e=>l0i(e),onSuccess:e=>{i.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},f0i=i=>{const{data:e,error:t,status:n}=s0i(["getOrderQuote",i],()=>u0i(i||""),{enabled:!!i,refetchInterval:r=>r!=null&&r.is_completed||r!=null&&r.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:n==="loading"?"loading":n==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},h0i=({onCancel:i,packageReleaseId:e,signIn:t,isLoggedIn:n})=>{var y,v,I,x,w,M,Y,F;const[r,o]=st.useState(null),[a,s]=st.useState(null),{mutate:c,error:l}=d0i();st.useEffect(()=>{e&&c(e,{onSuccess:P=>{s(P.order_quote_id)}})},[e]);const{data:u}=f0i(a||void 0),f=l&&((y=l.error)==null?void 0:y.message)||((v=u==null?void 0:u.error)==null?void 0:v.message);N0t({errorMessage:f});const h=async P=>{const T=zee("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${T}?client_reference_id=${P}&shipping_option=${r}`};st.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const P=u.shipping_options.reduce((T,V)=>V.cost<T.cost?V:T,u.shipping_options[0]);o((P==null?void 0:P.carrier)||null)}},[u]);const p=st.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((P,T)=>T.cost<P.cost?T:P,u.shipping_options[0]).cost:0,[u]),m=l&&((x=(I=l.error)==null?void 0:I.error_code)==null?void 0:x.includes("no_token"))||((M=(w=u==null?void 0:u.error)==null?void 0:w.error_code)==null?void 0:M.includes("no_token"))&&t;return!n||m?He.jsx(g0i,{signIn:t}):He.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[He.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u!=null&&u.error)&&(!a||!u||(u==null?void 0:u.is_processing))&&He.jsx(A0i,{message:"Fetching quotes..."}),(l||(u==null?void 0:u.error))&&He.jsx(p0i,{message:l&&((Y=l.error)==null?void 0:Y.message)||((F=u==null?void 0:u.error)==null?void 0:F.message)||"Failed to fetch quotes"}),(u==null?void 0:u.is_completed)&&!l&&!(u!=null&&u.error)&&Array.isArray(u==null?void 0:u.shipping_options)&&u.shipping_options.length>0&&He.jsxs(He.Fragment,{children:[He.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),He.jsx(c0i,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:p+(u.total_cost_without_shipping||0)},u==null?void 0:u.order_quote_id)]}),He.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[He.jsx(hC,{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:i,children:"Cancel"}),He.jsx(hC,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:r===null,onClick:()=>{if(r===null){b9.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),He.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},A0i=({message:i})=>He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[He.jsx(V8,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),He.jsx("p",{className:"rf-text-gray-600",children:i})]}),p0i=({message:i})=>He.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:i}),g0i=({signIn:i})=>He.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[He.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),He.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[He.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),He.jsxs(hC,{onClick:i,className:"rf-flex rf-items-center rf-gap-2",children:[He.jsx(kIe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),m0i=new Whi,y0i=({isOpen:i,onClose:e,stage:t,setStage:n,circuitJson:r,packageReleaseId:o,signIn:a,isLoggedIn:s})=>He.jsx(t0i,{client:m0i,children:He.jsx(IJ,{open:i,onOpenChange:c=>{c||e()},children:He.jsx(QL,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:He.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&He.jsx(h0i,{onCancel:e,packageReleaseId:o??"",signIn:a??(()=>{}),isLoggedIn:s})})})})}),_0i=({isOpen:i,onClose:e,stage:t,setStage:n,signIn:r,isLoggedIn:o})=>{const a=a4(s=>s.circuitJson);return He.jsx(y0i,{signIn:r,isOpen:i,onClose:e,stage:t,setStage:n,circuitJson:a,isLoggedIn:o??!1})},v0i=()=>{const[i,e]=st.useState(!1),[t,n]=st.useState("initial");return{isOpen:i,stage:t,open:()=>e(!0),close:()=>{e(!1),n("initial")},setStage:n,OrderDialog:_0i}},I0i=i=>{const e=fxe(we=>we.lastRunEvalVersion),[t,n]=st.useState(null),[r,o]=st.useState(!1),[a,s]=st.useState(!0),[c,l]=st.useState(!1),[u,f]=st.useState(null),[h,p]=st.useState(null),[m,y]=st.useState(!1),[v,I]=st.useState(null),[x,w]=st.useState(null),[M,Y]=st.useState(!1),[F,P]=st.useState(!1),T=v0i(),V=a4(we=>we.pushEvent),O=a4(we=>we.recentEvents),J=st.useMemo(()=>Date.now(),[]);ukn(we=>{if(!(new Date(we.created_at).valueOf()<J+500)){if(we.event_type==="FILE_UPDATED"){o(!0);return}if(we.event_type==="SNIPPET_SAVED"){o(!1),s(!1),I("Snippet saved successfully."),Y(!1);return}we.event_type==="REQUEST_EXPORT"&&(P(!0),I("Export processing..."),Y(!1)),we.event_type==="EXPORT_CREATED"&&(I(`Export created: ${we.exportFilePath}`),Y(!1),P(!1))}}),st.useEffect(()=>{if(!c||u===null)return;const we=O.filter(xe=>new Date(xe.created_at).valueOf()>u),Re=we.find(xe=>xe.event_type==="FAILED_TO_SAVE_SNIPPET"),be=we.find(xe=>xe.event_type==="SNIPPET_SAVED");Re&&(l(!1),f(null),w(Re.message??"Failed to save snippet. See console for error."),console.error(Re.message),Y(!0),Re.error_code==="SNIPPET_UNSET"&&Re.available_snippet_names&&(p(Re.available_snippet_names),y(!0))),be&&(l(!1),f(null),I("Snippet saved successfully."),Y(!1))},[O,c]);const j=async()=>{l(!0),f(Date.now()),I(null),Y(!1),await V({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},oe=a4(we=>we.circuitJson)??i.circuitJson,[ue,de]=st.useState(!1),[ge,ye]=st.useState(!1);return He.jsxs(He.Fragment,{children:[He.jsxs(I9e,{children:[He.jsx(C9e,{asChild:!0,children:He.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),He.jsxs($q,{children:[!i.isWebEmbedded&&He.jsxs(He.Fragment,{children:[He.jsx(oE,{className:"rf-text-xs",onSelect:j,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&He.jsx(oE,{className:"rf-text-xs",onSelect:()=>{T.open()},children:"Order"}),He.jsx(oE,{className:"rf-text-xs",onSelect:()=>de(!0),disabled:c,children:"Import"}),He.jsx(oE,{className:"rf-text-xs",onSelect:()=>{if(!V3e()){b9.error("Requires tscircuit token");return}ye(!0)},children:"AI Review"})]}),He.jsxs(b9e,{children:[He.jsx(Xq,{className:"rf-text-xs",disabled:F,children:F?"Exporting...":"Export"}),He.jsx(x9e,{children:He.jsx(Zq,{children:Yfi.map((we,Re)=>He.jsx(oE,{onSelect:()=>{if(!oe){b9.error("No Circuit JSON to export");return}Vfi({exportName:we.name,circuitJson:oe,projectName:t??"Untitled"})},disabled:F,children:He.jsx("span",{className:"rf-text-xs",children:we.name})},Re))})})]}),!i.isWebEmbedded&&He.jsxs(b9e,{children:[He.jsx(Xq,{className:"rf-text-xs",children:"Advanced"}),He.jsx(x9e,{children:He.jsxs(Zq,{children:[He.jsx(oE,{className:"rf-flex rf-items-center rf-gap-2",children:He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[He.jsx(TAt,{id:"load-latest-eval",checked:i.shouldLoadLatestEval,onCheckedChange:we=>{var Re;(Re=i.onChangeShouldLoadLatestEval)==null||Re.call(i,we===!0)}}),He.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&He.jsx(oE,{className:"rf-flex rf-items-center rf-gap-2",children:He.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:He.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),He.jsx(oE,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:He.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:He.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),He.jsx(Tkn,{open:M,onOpenChange:Y,children:He.jsxs(IAt,{children:[He.jsxs(CAt,{children:[He.jsx(bAt,{children:"Error Saving Snippet"}),He.jsx(EAt,{children:x})]}),He.jsx(xAt,{children:He.jsx(wAt,{onClick:()=>Y(!1),children:"Dismiss"})})]})}),He.jsx(lkn,{snippetNames:h??[],onSelect:async we=>{l(!0),f(Date.now()),n(we),await V({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:we}),y(!1)},onCancel:()=>y(!1),isOpen:m})]}),He.jsx(sdi,{isOpen:ue,onClose:()=>de(!1)}),He.jsx(Qhi,{isOpen:ge,onClose:()=>ye(!1),packageName:t}),He.jsx(adi,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),He.jsx(T.OrderDialog,{isOpen:T.isOpen,onClose:T.close,stage:T.stage,setStage:T.setStage})]})},C0i=["assembly","bom","circuit_json","errors","render_log"],x0i=({code:i,fsMap:e,onRunClicked:t=void 0,errorMessage:n,errorStack:r,circuitJson:o,autoroutingGraphics:a,showRightHeaderContent:s=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:f=!0,onActiveTabChange:h,renderLog:p,showImportAndFormatButtons:m=!0,className:y,headerClassName:v,leftHeaderContent:I,readOnly:x,isStreaming:w,autoroutingLog:M,onReportAutoroutingLog:Y,isRunningCode:F,hasCodeChangedSinceLastRun:P,onEditEvent:T,editEvents:V,defaultActiveTab:O,defaultTab:J,availableTabs:j,autoRotate3dViewerDisabled:ne,showSchematicDebugGrid:oe=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:de=!1,activeEffectName:ge,allowSelectingVersion:ye=!0,showFileMenu:we=!1,isWebEmbedded:Re=!1})=>{var _t,Kt;Z7n();const{versions:be,latestVersion:xe,lastRunEvalVersion:Pe,search:qe,setSearch:Je,selectVersion:rt}=okn(ye),St=st.useMemo(()=>o?o.filter(Yt=>Yt&&"error_type"in Yt||Yt.type.includes("error")):null,[o]),ot=st.useMemo(()=>o?o.filter(Yt=>Yt&&"warning_type"in Yt||Yt.type.includes("warning")):null,[o]);N0t({errorMessage:n,errorStack:r,circuitJsonErrors:St});const[ke,Ke]=st.useState(O??J??(j==null?void 0:j[0])??"pcb"),[et,dt]=st.useState(null),[At,ct]=st.useState(de);$7n(At);const je=st.useCallback(Yt=>{Ke(Yt),h==null||h(Yt)},[h]),Et=()=>{ct(!At)};st.useEffect(()=>{n&&(ke!=="errors"&&dt(ke),je("errors"))},[n]),st.useEffect(()=>{(ke==="code"||ke==="errors")&&o&&!n&&je(et??O??J??(j==null?void 0:j[0])??"pcb")},[o]);const vt=st.useCallback(Yt=>{window.TSCIRCUIT_3D_OBJECT_REF=Yt===null?void 0:Yt},[]);return He.jsx("div",{className:dg("flex flex-col relative rf-overflow-x-hidden rf-h-full",y),children:He.jsx("div",{className:dg("rf-md:sticky rf-md:top-2 rf-h-full",At&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:He.jsxs(fie,{value:ke,onValueChange:je,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[He.jsxs("div",{className:dg("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",v),children:[I,we&&!I&&He.jsx(I0i,{isWebEmbedded:Re,circuitJson:o}),(I||we)&&He.jsx("div",{className:"rf-flex-grow"}),!I&&!we&&F&&He.jsx(V8,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!I&&!we&&He.jsx("div",{className:"rf-flex-grow"}),p&&p.progress!==1&&!n&&He.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[ge?He.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:ge,children:ge}):p.lastRenderEvent&&He.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:((_t=p.lastRenderEvent)==null?void 0:_t.phase)??"",children:((Kt=p.lastRenderEvent)==null?void 0:Kt.phase)??""}),He.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:He.jsx(V8,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),He.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((p.progress??0)*100).toFixed(1),"%"]})]}),s&&He.jsxs(ZU,{children:[c&&He.jsx(iw,{value:"code",children:"Code"}),!j||j.includes("pcb")?He.jsxs(iw,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&He.jsx("span",{className:dg("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",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!j||j.includes("schematic")?He.jsxs(iw,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&He.jsx("span",{className:dg("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",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!j||j.includes("cad")?He.jsxs(iw,{value:"cad",children:[o&&He.jsx("span",{className:dg("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(ke)&&He.jsx(iw,{value:ke,children:$Qe(ke)}),He.jsxs(I9e,{children:[He.jsx(C9e,{asChild:!0,children:He.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[He.jsx(E5n,{className:"rf-w-4 rf-h-4"}),(St&&St.length>0||n)&&He.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"})]})}),He.jsxs($q,{className:"rf-*:text-xs",children:[C0i.filter(Yt=>!j||j.includes(Yt)).map(Yt=>He.jsxs(oE,{onSelect:()=>je(Yt),children:[ke!==Yt&&He.jsx(Sst,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),ke===Yt&&He.jsx(PIe,{className:"rf-w-3 rf-h-3"}),He.jsx("div",{className:"rf-pr-2",children:$Qe(Yt)}),Yt==="errors"&&(St&&St.length>0||n)&&He.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:n?1:St==null?void 0:St.length})]},Yt)),He.jsx(oE,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:He.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",nkn.split(".").map((Yt,pt)=>pt===2?parseInt(Yt)+1:Yt).join(".")]})}),ye?He.jsxs(b9e,{onOpenChange:Yt=>!Yt&&Je(""),children:[He.jsx(Xq,{className:"rf-text-xs rf-opacity-60",children:He.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Pe??xe??"latest"]})}),He.jsx(x9e,{children:He.jsxs(Zq,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[He.jsx("div",{className:"rf-p-1",children:He.jsx(hCe,{value:qe,onChange:Yt=>Je(Yt.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),He.jsx(Nlt,{}),He.jsx(oE,{onSelect:()=>rt(null),children:xe?`${xe} (latest)`:"latest"}),be.map(Yt=>He.jsx(oE,{onSelect:()=>rt(Yt),children:Yt},Yt))]})})]}):Pe&&He.jsx(oE,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:He.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Pe]})})]})]})]}),ue&&He.jsx(hC,{onClick:Et,variant:"ghost",children:At?He.jsx(M5n,{size:16}):He.jsx(S5n,{size:16})})]}),c&&He.jsx(M2,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:He.jsx("div",{className:"rf-h-full",children:l})}),(!j||j.includes("pcb"))&&He.jsx(M2,{value:"pcb",children:He.jsx("div",{className:dg("rf-overflow-hidden",At?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:He.jsx(Y8,{fallbackRender:({error:Yt})=>He.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:He.jsxs("div",{className:"rf-p-4",children:[He.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),He.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Yt==null?void 0:Yt.message)||"An unknown error occurred"})]})}),children:o?He.jsx(J7n,{focusOnHover:!1,circuitJson:o,debugGraphics:a,containerClassName:dg("rf-h-full rf-w-full",At?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Yt=>{if(T)for(const pt of Yt)T(pt)}}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("assembly"))&&He.jsx(M2,{value:"assembly",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallback:He.jsx("div",{children:"Error loading Assembly"}),children:o?He.jsx(b8n,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("schematic"))&&He.jsx(M2,{value:"schematic",children:He.jsx("div",{className:dg("rf-overflow-auto rf-bg-white",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallbackRender:({error:Yt})=>He.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:He.jsxs("div",{className:"rf-p-4",children:[He.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),He.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Yt==null?void 0:Yt.message)||"An unknown error occurred"})]})}),children:o?He.jsx(I8n,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Yt=>{T==null||T(Yt)},debugGrid:oe}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("cad"))&&He.jsx(M2,{value:"cad",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{FallbackComponent:h5n,children:o?He.jsx(d5n,{ref:vt,circuitJson:o,autoRotateDisabled:ne}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("bom"))&&He.jsx(M2,{value:"bom",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallbackRender:({error:Yt})=>He.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:He.jsxs("div",{className:"rf-p-4",children:[He.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),He.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Yt==null?void 0:Yt.message)||"An unknown error occurred"})]})}),children:o?He.jsx(M8n,{circuitJson:o}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("circuit_json"))&&He.jsx(M2,{value:"circuit_json",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:He.jsx(Y8,{fallback:He.jsx("div",{children:"Error loading JSON viewer"}),children:o?He.jsx(S8n,{elements:o}):He.jsx(TQ,{onRunClicked:t})})})}),(!j||j.includes("errors"))&&He.jsx(M2,{value:"errors",children:He.jsx("div",{className:dg("rf-overflow-auto",At?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:n||St&&St.length>0||o?He.jsx(_Bn,{code:i,fsMap:e,circuitJsonErrors:St,circuitJsonWarnings:ot,errorMessage:n,errorStack:r,circuitJson:o,evalVersion:Pe,autoroutingLog:M,onReportAutoroutingLog:Y}):He.jsx(TQ,{onRunClicked:t})})}),f&&(!j||j.includes("render_log"))&&He.jsx(M2,{value:"render_log",children:He.jsx(tkn,{renderLog:p})})]})})})};YBe.createRoot(document.getElementById("root")).render(He.jsx("div",{style:{height:"100vh"},children:He.jsx(x0i,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}})}));const b0i=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});