@tscircuit/runframe 0.0.1224 → 0.0.1226
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.
package/dist/standalone.min.js
CHANGED
|
@@ -5592,7 +5592,7 @@ to {
|
|
|
5592
5592
|
}
|
|
5593
5593
|
`,oY=16,i6n=({reverseOrder:n,position:e="top-center",toastOptions:t,gutter:i,children:r,toasterId:o,containerStyle:s,containerClassName:a})=>{let{toasts:c,handlers:l}=IOn(t,o);return ce.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:oY,left:oY,right:oY,bottom:oY,pointerEvents:"none",...s},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(u=>{let d=u.position||e,h=l.calculateOffset(u,{reverseOrder:n,gutter:i,defaultPosition:e}),p=t6n(d,h);return ce.createElement(e6n,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?n6n:"",style:p},u.type==="custom"?nY(u.message,u):r?r(u):ce.createElement(JOn,{toast:u,position:d}))}))};const r6n=({code:n,fsMap:e,autoroutingLog:t,circuitJsonErrors:i,circuitJsonWarnings:r,onReportAutoroutingLog:o,errorMessage:s,errorStack:a,circuitJson:c,evalVersion:l})=>{const u=ce.useMemo(()=>{const I=[];if(s&&I.push({type:"Execution Error",message:s,stack:a||void 0,source:"execution"}),i&&i.length>0)for(const A of i)I.push({type:A.type||"Circuit JSON Error",message:A.message||"No error message available",stack:A.stack||"",source:"circuitJson"});return I},[s,a,i]),d=ce.useMemo(()=>!c||!Array.isArray(c)?void 0:c.find(A=>A.type==="source_project_metadata")?.software_used_string,[c]),h=ce.useMemo(()=>{const I=[];if(r&&r.length>0)for(const A of r)I.push({type:A.type||"Circuit JSON Warning",message:A.message||"No warning message available",stack:A.stack||"",source:"circuitJson"});return I},[r]),p=()=>{if(e)try{return Zin(e instanceof Map?Object.fromEntries(e.entries()):e)}catch{}return z9n(n??"")},m=(I,A)=>{const R=`https://github.com/tscircuit/tscircuit.com/issues/new?title=${encodeURIComponent(I)}&body=${encodeURIComponent(A)}`;window.open(R,"_blank")};if(u.length===0&&h.length===0)return oe.jsxs("div",{className:"px-2",children:[oe.jsx("div",{className:"rf-mt-4 rf-bg-green-50 rf-rounded-md rf-border rf-border-green-200",children:oe.jsxs("div",{className:"rf-p-4",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-green-800 rf-mb-3",children:"No errors or warnings!"}),oe.jsx("p",{className:"rf-text-sm rf-text-green-700",children:"Your code is running without any errors or warnings."})]})}),oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[oe.jsx(Gst,{autoroutingLog:t,onReportAutoroutingLog:o}),oe.jsxs(R0,{variant:"outline",className:"rf-p-1",onClick:()=>{const I=p();m("Issue Report",`[Package code to reproduce](${I})`)},children:[oe.jsx(Fxe,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]});ce.useEffect(()=>{if(s){let I=s;a&&(I+=`
|
|
5594
5594
|
|
|
5595
|
-
${a}`),typeof window<"u"&&(window.__TSCIRCUIT_LAST_EXECUTION_ERROR=I)}},[s,a]);const[_,g]=ce.useState(()=>{const I=new Set;return u.forEach((A,R)=>I.add(R)),I}),[x,b]=ce.useState(()=>{const I=new Set;return h.forEach((A,R)=>I.add(R)),I}),w=I=>{g(A=>{const R=new Set(A);return R.has(I)?R.delete(I):R.add(I),R})},E=I=>{b(A=>{const R=new Set(A);return R.has(I)?R.delete(I):R.add(I),R})};return oe.jsx(oe.Fragment,{children:oe.jsxs("div",{className:"rf-w-full",children:[u.length>0&&oe.jsxs("div",{className:"rf-mt-2",children:[oe.jsxs("div",{className:"rf-text-xs rf-text-red-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-red-50 rf-border-b rf-border-red-200",children:[u.length," ",u.length===1?"error":"errors"]}),u.map((I,A)=>{const R=_.has(A);I.message;const M=I.stack||l||d;return oe.jsxs("div",{className:"rf-bg-white hover:rf-bg-red-100",children:[oe.jsxs("div",{className:"rf-flex rf-items-start rf-gap-1 rf-px-2 rf-pb-1 rf-cursor-pointer rf-bg-red-50/50",onClick:()=>M&&w(A),children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",style:{marginTop:"
|
|
5595
|
+
${a}`),typeof window<"u"&&(window.__TSCIRCUIT_LAST_EXECUTION_ERROR=I)}},[s,a]);const[_,g]=ce.useState(()=>{const I=new Set;return u.forEach((A,R)=>I.add(R)),I}),[x,b]=ce.useState(()=>{const I=new Set;return h.forEach((A,R)=>I.add(R)),I}),w=I=>{g(A=>{const R=new Set(A);return R.has(I)?R.delete(I):R.add(I),R})},E=I=>{b(A=>{const R=new Set(A);return R.has(I)?R.delete(I):R.add(I),R})};return oe.jsx(oe.Fragment,{children:oe.jsxs("div",{className:"rf-w-full",children:[u.length>0&&oe.jsxs("div",{className:"rf-mt-2",children:[oe.jsxs("div",{className:"rf-text-xs rf-text-red-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-red-50 rf-border-b rf-border-red-200",children:[u.length," ",u.length===1?"error":"errors"]}),u.map((I,A)=>{const R=_.has(A);I.message;const M=I.stack||l||d;return oe.jsxs("div",{className:"rf-bg-white hover:rf-bg-red-100",children:[oe.jsxs("div",{className:"rf-flex rf-items-start rf-gap-1 rf-px-2 rf-pt-1 rf-pb-1 rf-cursor-pointer rf-bg-red-50/50",onClick:()=>M&&w(A),children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",style:{marginTop:"2px"},children:[oe.jsx(f9n,{className:"rf-h-4 rf-w-4 rf-text-red-500 rf-flex-shrink-0"}),M&&oe.jsx(EG,{className:`rf-h-3 rf-w-3 rf-text-red-500 rf-flex-shrink-0 rf-transition-transform ${R?"rf-rotate-90":""}`})]}),oe.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-leading-[1rem]",children:[oe.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-700 rf-leading-[0.95rem]",children:[I.type,":"]}),oe.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-600 rf-ml-1 rf-leading-[0.95rem]",children:I.message})]})]}),R&&M&&oe.jsxs("div",{className:"rf-bg-red-50/50 rf-pl-12",children:[I.stack?.split(`
|
|
5596
5596
|
`).filter(k=>k.trim()).slice(1).map((k,C)=>oe.jsx("div",{className:"rf-px-2 rf-leading-tight",children:oe.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-500",children:k})},C)),(l||d)&&oe.jsx("div",{className:"rf-px-2",children:oe.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-400",children:[l&&`@tscircuit/eval@${l}`,l&&d&&" • ",d]})})]})]},A)})]}),h.length>0&&oe.jsxs("div",{className:"rf-mt-2",children:[oe.jsxs("div",{className:"rf-text-xs rf-text-orange-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-orange-50 rf-border-b rf-border-orange-200",children:[h.length," ",h.length===1?"warning":"warnings"]}),h.map((I,A)=>{const R=x.has(A);I.message;const M=!!I.stack;return oe.jsxs("div",{className:"rf-bg-white hover:rf-bg-orange-100",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-px-2 rf-py-1 rf-cursor-pointer rf-bg-orange-50/50",onClick:()=>M&&E(A),children:[oe.jsx(p9n,{className:"rf-h-4 rf-w-4 rf-text-orange-500 rf-flex-shrink-0"}),M&&oe.jsx(EG,{className:`rf-h-3 rf-w-3 rf-text-orange-500 rf-flex-shrink-0 rf-transition-transform ${R?"rf-rotate-90":""}`}),oe.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-flex rf-items-center rf-flex-wrap",children:[oe.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-orange-700 rf-break-words",children:[I.type,":"]}),oe.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-orange-600 rf-ml-1 rf-break-words",children:I.message})]})]}),R&&M&&oe.jsx("div",{className:"rf-bg-orange-50/50 rf-pl-12",children:I.stack?.split(`
|
|
5597
5597
|
`).filter(k=>k.trim()).slice(1).map((k,C)=>oe.jsx("div",{className:"rf-px-2 rf-leading-tight",children:oe.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-orange-500",children:k})},C))})]},A)})]}),oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[oe.jsx(Gst,{autoroutingLog:t,onReportAutoroutingLog:o}),oe.jsxs(R0,{variant:"outline",className:"rf-p-1",onClick:()=>{const I=u[0];let A=`${I.type}: ${I.message}`;l&&(A+=`
|
|
5598
5598
|
@tscircuit/eval@${l}`),d&&(A+=`
|
|
@@ -5869,7 +5869,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}});function Wht(n,e,t){if(!e||!t)retu
|
|
|
5869
5869
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5870
5870
|
* Released under the MIT License.
|
|
5871
5871
|
*)
|
|
5872
|
-
*/const Ljn=({containerClassName:n,...e})=>{const t=ce.useRef(null),[i,r]=ce.useState(620);return ce.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),oe.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:oe.jsx(Ojn,{...e,height:i})})},Djn='*,: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.18 | 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-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.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-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.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-20{height:5rem}.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-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.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-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-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-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.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-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.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-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.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-grid-cols-3{grid-template-columns:repeat(3,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-baseline{align-items:baseline}.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-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-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!important}.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;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.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-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/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-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/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-100{--tw-border-opacity:1;border-color:rgb(255 237 213/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-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.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-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/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-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.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-50\\/30{background-color:rgba(239,246,255,.3)}.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-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/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-50\\/50{background-color:hsla(0,86%,97%,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/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-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/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-amber-500{fill:#f59e0b}.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-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.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-1{padding-top:.25rem}.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-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.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-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.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-400{--tw-text-opacity:1;color:rgb(251 146 60/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-700{--tw-text-opacity:1;color:rgb(194 65 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-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/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-600{--tw-text-opacity:1;color:rgb(202 138 4/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-70{opacity:.7}.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,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-transition-transform{transition-duration:.15s;transition-property:transform;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-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/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-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.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-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/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-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.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:hover .group-hover\\:rf-opacity-100,.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-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr 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-justify-self-end{justify-self:end}.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-right{text-align:right}.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}',yq=()=>{ce.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Djn,document.head.appendChild(e)},[])},zjn=n=>{ce.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])};function cN(n,e){const[t,i]=ce.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return ce.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const fpt=n=>`hsl(${lw.indexOf(n)*137.5%360}, 70%, 50%)`,$jn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return oe.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[oe.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:lw.map(t=>{const i=n[t]||0,r=i/e*100;return oe.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:fpt(t)},children:oe.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,": ",i.toFixed(1),"ms"]})},t)})}),oe.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Fjn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},Ujn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=ce.useState("chronological"),[r,o]=ce.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return oe.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[oe.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>lw.indexOf(l[0])-lw.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return oe.jsxs("div",{className:"rf-bg-white",children:[oe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[oe.jsx("div",{children:"Render Logs"}),oe.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),oe.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:oe.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=Fjn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[oe.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>oe.jsx("option",{value:l.name,children:l.name},l.name))]})}),oe.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[oe.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),oe.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[oe.jsx("option",{value:"chronological",children:"Phase Order"}),oe.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),oe.jsx($jn,{phaseTimings:n.phaseTimings}),oe.jsxs("table",{className:"rf-w-full rf-text-xs",children:[oe.jsx("thead",{children:oe.jsxs("tr",{children:[oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),oe.jsx("tbody",{children:a.map(([l,u])=>oe.jsxs("tr",{children:[oe.jsx("td",{className:"rf-p-2",children:lw.indexOf(l)}),oe.jsx("td",{className:"rf-p-2",children:l}),oe.jsx("td",{className:"rf-p-2",children:oe.jsx("div",{className:"rf-w-8",children:oe.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:fpt(l),width:`${u/c*100}%`}})})}),oe.jsx("td",{className:"rf-p-2",children:oe.jsxs("div",{className:"rf-flex w-full",children:[oe.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),oe.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},mpt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{ce.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Yj.captureException(i)}catch{}}},[n,e]),ce.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Yj.captureException(r,{error_type:i.type})}catch{}}},[t])},_pt="0.0.1223",Bjn={version:_pt},gq=Mze()(Cze(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),jjn=n=>{const[e,t]=ce.useState([]),[i,r]=ce.useState(null),[o,s]=ce.useState(""),[a,c]=cN("eval-version-selection",null),l=gq(p=>p.setLastRunEvalVersion),u=gq(p=>p.lastRunEvalVersion);return ce.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(_=>_!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),ce.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:ce.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},Hjn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=ce.useState(""),[s,a]=ce.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return oe.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:oe.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[oe.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),oe.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),oe.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>oe.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&oe.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),oe.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},Vjn=n=>{const e=ce.useRef(null),t=ub(i=>i.recentEvents);ce.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var xq="Dialog",[ypt,gpt]=tT(xq),[Gjn,fE]=ypt(xq),xpt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=ce.useRef(null),c=ce.useRef(null),[l,u]=GA({prop:i,defaultProp:r??!1,onChange:o,caller:xq});return oe.jsx(Gjn,{scope:e,triggerRef:a,contentRef:c,contentId:Gb(),titleId:Gb(),descriptionId:Gb(),open:l,onOpenChange:u,onOpenToggle:ce.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};xpt.displayName=xq;var bpt="DialogTrigger",vpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(bpt,t),o=H_(e,r.triggerRef);return oe.jsx(uu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Sve(r.open),...i,ref:o,onClick:ca(n.onClick,r.onOpenToggle)})});vpt.displayName=bpt;var vve="DialogPortal",[Yjn,wpt]=ypt(vve,{forceMount:void 0}),Spt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=fE(vve,e);return oe.jsx(Yjn,{scope:e,forceMount:t,children:ce.Children.map(i,s=>oe.jsx(QS,{present:t||o.open,children:oe.jsx(FG,{asChild:!0,container:r,children:s})}))})};Spt.displayName=vve;var bq="DialogOverlay",Ept=ce.forwardRef((n,e)=>{const t=wpt(bq,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=fE(bq,n.__scopeDialog);return o.modal?oe.jsx(QS,{present:i||o.open,children:oe.jsx(Xjn,{...r,ref:e})}):null});Ept.displayName=bq;var qjn=VA("DialogOverlay.RemoveScroll"),Xjn=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(bq,t);return oe.jsx(qG,{as:qjn,allowPinchZoom:!0,shards:[r.contentRef],children:oe.jsx(uu.div,{"data-state":Sve(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Q4="DialogContent",Tpt=ce.forwardRef((n,e)=>{const t=wpt(Q4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=fE(Q4,n.__scopeDialog);return oe.jsx(QS,{present:i||o.open,children:o.modal?oe.jsx(Wjn,{...r,ref:e}):oe.jsx(Kjn,{...r,ref:e})})});Tpt.displayName=Q4;var Wjn=ce.forwardRef((n,e)=>{const t=fE(Q4,n.__scopeDialog),i=ce.useRef(null),r=H_(e,t.contentRef,i);return ce.useEffect(()=>{const o=i.current;if(o)return c1e(o)},[]),oe.jsx(Mpt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ca(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault())})}),Kjn=ce.forwardRef((n,e)=>{const t=fE(Q4,n.__scopeDialog),i=ce.useRef(!1),r=ce.useRef(!1);return oe.jsx(Mpt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),Mpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=fE(Q4,t),c=ce.useRef(null),l=H_(e,c);return Hxe(),oe.jsxs(oe.Fragment,{children:[oe.jsx(CG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:oe.jsx(MG,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Sve(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),oe.jsxs(oe.Fragment,{children:[oe.jsx(Qjn,{titleId:a.titleId}),oe.jsx(eHn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),wve="DialogTitle",Cpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(wve,t);return oe.jsx(uu.h2,{id:r.titleId,...i,ref:e})});Cpt.displayName=wve;var Apt="DialogDescription",Ppt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(Apt,t);return oe.jsx(uu.p,{id:r.descriptionId,...i,ref:e})});Ppt.displayName=Apt;var Rpt="DialogClose",Ipt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(Rpt,t);return oe.jsx(uu.button,{type:"button",...i,ref:e,onClick:ca(n.onClick,()=>r.onOpenChange(!1))})});Ipt.displayName=Rpt;function Sve(n){return n?"open":"closed"}var Npt="DialogTitleWarning",[Zjn,kpt]=yen(Npt,{contentName:Q4,titleName:wve,docsSlug:"dialog"}),Qjn=({titleId:n})=>{const e=kpt(Npt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5872
|
+
*/const Ljn=({containerClassName:n,...e})=>{const t=ce.useRef(null),[i,r]=ce.useState(620);return ce.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),oe.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:oe.jsx(Ojn,{...e,height:i})})},Djn='*,: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.18 | 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-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.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-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.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-20{height:5rem}.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-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.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-\\[95vw\\]{width:95vw!important}.rf-w-1{width:.25rem}.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-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-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-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.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-\\[95vw\\]{max-width:95vw!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-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.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-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.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-grid-cols-3{grid-template-columns:repeat(3,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-baseline{align-items:baseline}.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-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-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!important}.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;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.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-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/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-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/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-100{--tw-border-opacity:1;border-color:rgb(255 237 213/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-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.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-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/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-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.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-50\\/30{background-color:rgba(239,246,255,.3)}.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-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/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-50\\/50{background-color:hsla(0,86%,97%,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/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-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/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-amber-500{fill:#f59e0b}.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-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.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-1{padding-top:.25rem}.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-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.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-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.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-400{--tw-text-opacity:1;color:rgb(251 146 60/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-700{--tw-text-opacity:1;color:rgb(194 65 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-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/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-600{--tw-text-opacity:1;color:rgb(202 138 4/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-70{opacity:.7}.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,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-transition-transform{transition-duration:.15s;transition-property:transform;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-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/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-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.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-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/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-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.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:hover .group-hover\\:rf-opacity-100,.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-mt-4{margin-top:1rem}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-h-5{height:1.25rem}.sm\\:rf-w-1\\/2{width:50%}.sm\\:rf-w-5{width:1.25rem}.sm\\:rf-w-\\[90vw\\]{width:90vw}.sm\\:rf-w-auto{width:auto}.sm\\:rf-max-w-\\[500px\\]{max-width:500px}.sm\\:rf-max-w-md{max-width:28rem}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr 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-gap-4{gap:1rem}.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-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-p-3{padding:.75rem}.sm\\:rf-p-6{padding:1.5rem}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:rf-text-base{font-size:1rem;line-height:1.5rem}.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-w-auto{width:auto}.md\\:rf-max-w-\\[660px\\]{max-width:660px}.md\\:rf-max-w-lg{max-width:32rem}.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:rf-p-8{padding:2rem}.md\\:rf-py-8{padding-bottom:2rem;padding-top:2rem}.md\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\\:rf-max-w-\\[720px\\]{max-width:720px}.lg\\:rf-max-w-xl{max-width:36rem}}@media (min-width:1280px){.xl\\:rf-max-w-\\[800px\\]{max-width:800px}}.\\[\\&\\>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}',yq=()=>{ce.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Djn,document.head.appendChild(e)},[])},zjn=n=>{ce.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])};function cN(n,e){const[t,i]=ce.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return ce.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const fpt=n=>`hsl(${lw.indexOf(n)*137.5%360}, 70%, 50%)`,$jn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return oe.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[oe.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:lw.map(t=>{const i=n[t]||0,r=i/e*100;return oe.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:fpt(t)},children:oe.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,": ",i.toFixed(1),"ms"]})},t)})}),oe.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Fjn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},Ujn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=ce.useState("chronological"),[r,o]=ce.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return oe.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[oe.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>lw.indexOf(l[0])-lw.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return oe.jsxs("div",{className:"rf-bg-white",children:[oe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[oe.jsx("div",{children:"Render Logs"}),oe.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),oe.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:oe.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=Fjn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[oe.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>oe.jsx("option",{value:l.name,children:l.name},l.name))]})}),oe.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[oe.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),oe.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[oe.jsx("option",{value:"chronological",children:"Phase Order"}),oe.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),oe.jsx($jn,{phaseTimings:n.phaseTimings}),oe.jsxs("table",{className:"rf-w-full rf-text-xs",children:[oe.jsx("thead",{children:oe.jsxs("tr",{children:[oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),oe.jsx("tbody",{children:a.map(([l,u])=>oe.jsxs("tr",{children:[oe.jsx("td",{className:"rf-p-2",children:lw.indexOf(l)}),oe.jsx("td",{className:"rf-p-2",children:l}),oe.jsx("td",{className:"rf-p-2",children:oe.jsx("div",{className:"rf-w-8",children:oe.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:fpt(l),width:`${u/c*100}%`}})})}),oe.jsx("td",{className:"rf-p-2",children:oe.jsxs("div",{className:"rf-flex w-full",children:[oe.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),oe.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},mpt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{ce.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Yj.captureException(i)}catch{}}},[n,e]),ce.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Yj.captureException(r,{error_type:i.type})}catch{}}},[t])},_pt="0.0.1225",Bjn={version:_pt},gq=Mze()(Cze(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),jjn=n=>{const[e,t]=ce.useState([]),[i,r]=ce.useState(null),[o,s]=ce.useState(""),[a,c]=cN("eval-version-selection",null),l=gq(p=>p.setLastRunEvalVersion),u=gq(p=>p.lastRunEvalVersion);return ce.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(_=>_!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),ce.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:ce.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},Hjn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=ce.useState(""),[s,a]=ce.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return oe.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:oe.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[oe.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),oe.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),oe.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>oe.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&oe.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),oe.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},Vjn=n=>{const e=ce.useRef(null),t=ub(i=>i.recentEvents);ce.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var xq="Dialog",[ypt,gpt]=tT(xq),[Gjn,fE]=ypt(xq),xpt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=ce.useRef(null),c=ce.useRef(null),[l,u]=GA({prop:i,defaultProp:r??!1,onChange:o,caller:xq});return oe.jsx(Gjn,{scope:e,triggerRef:a,contentRef:c,contentId:Gb(),titleId:Gb(),descriptionId:Gb(),open:l,onOpenChange:u,onOpenToggle:ce.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};xpt.displayName=xq;var bpt="DialogTrigger",vpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(bpt,t),o=H_(e,r.triggerRef);return oe.jsx(uu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Sve(r.open),...i,ref:o,onClick:ca(n.onClick,r.onOpenToggle)})});vpt.displayName=bpt;var vve="DialogPortal",[Yjn,wpt]=ypt(vve,{forceMount:void 0}),Spt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=fE(vve,e);return oe.jsx(Yjn,{scope:e,forceMount:t,children:ce.Children.map(i,s=>oe.jsx(QS,{present:t||o.open,children:oe.jsx(FG,{asChild:!0,container:r,children:s})}))})};Spt.displayName=vve;var bq="DialogOverlay",Ept=ce.forwardRef((n,e)=>{const t=wpt(bq,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=fE(bq,n.__scopeDialog);return o.modal?oe.jsx(QS,{present:i||o.open,children:oe.jsx(Xjn,{...r,ref:e})}):null});Ept.displayName=bq;var qjn=VA("DialogOverlay.RemoveScroll"),Xjn=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(bq,t);return oe.jsx(qG,{as:qjn,allowPinchZoom:!0,shards:[r.contentRef],children:oe.jsx(uu.div,{"data-state":Sve(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Q4="DialogContent",Tpt=ce.forwardRef((n,e)=>{const t=wpt(Q4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=fE(Q4,n.__scopeDialog);return oe.jsx(QS,{present:i||o.open,children:o.modal?oe.jsx(Wjn,{...r,ref:e}):oe.jsx(Kjn,{...r,ref:e})})});Tpt.displayName=Q4;var Wjn=ce.forwardRef((n,e)=>{const t=fE(Q4,n.__scopeDialog),i=ce.useRef(null),r=H_(e,t.contentRef,i);return ce.useEffect(()=>{const o=i.current;if(o)return c1e(o)},[]),oe.jsx(Mpt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ca(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault())})}),Kjn=ce.forwardRef((n,e)=>{const t=fE(Q4,n.__scopeDialog),i=ce.useRef(!1),r=ce.useRef(!1);return oe.jsx(Mpt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),Mpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=fE(Q4,t),c=ce.useRef(null),l=H_(e,c);return Hxe(),oe.jsxs(oe.Fragment,{children:[oe.jsx(CG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:oe.jsx(MG,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Sve(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),oe.jsxs(oe.Fragment,{children:[oe.jsx(Qjn,{titleId:a.titleId}),oe.jsx(eHn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),wve="DialogTitle",Cpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(wve,t);return oe.jsx(uu.h2,{id:r.titleId,...i,ref:e})});Cpt.displayName=wve;var Apt="DialogDescription",Ppt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(Apt,t);return oe.jsx(uu.p,{id:r.descriptionId,...i,ref:e})});Ppt.displayName=Apt;var Rpt="DialogClose",Ipt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=fE(Rpt,t);return oe.jsx(uu.button,{type:"button",...i,ref:e,onClick:ca(n.onClick,()=>r.onOpenChange(!1))})});Ipt.displayName=Rpt;function Sve(n){return n?"open":"closed"}var Npt="DialogTitleWarning",[Zjn,kpt]=yen(Npt,{contentName:Q4,titleName:wve,docsSlug:"dialog"}),Qjn=({titleId:n})=>{const e=kpt(Npt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5873
5873
|
|
|
5874
5874
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5875
5875
|
|
|
@@ -6844,7 +6844,25 @@ ${n}</tr>
|
|
|
6844
6844
|
`}tablecell(n){const e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
|
|
6845
6845
|
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${r5(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){const i=this.parser.parseInline(t),r=qTt(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return e&&(o+=' title="'+r5(e)+'"'),o+=">"+i+"</a>",o}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));const r=qTt(n);if(r===null)return r5(t);n=r;let o=`<img src="${n}" alt="${t}"`;return e&&(o+=` title="${r5(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:r5(n.text)}},gAe=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},L3=class h4e{options;renderer;textRenderer;constructor(e){this.options=e||SP,this.options.renderer=this.options.renderer||new kQ,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gAe}static parse(e,t){return new h4e(t).parse(e)}static parseInline(e,t){return new h4e(t).parseInline(e)}parse(e,t=!0){let i="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const a=o,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=c||"";continue}}const s=o;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let a=s,c=this.renderer.text(a);for(;r+1<e.length&&e[r+1].type==="text";)a=e[++r],c+=`
|
|
6846
6846
|
`+this.renderer.text(a);t?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(e,t=this.renderer){let i="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}const s=o;switch(s.type){case"escape":{i+=t.text(s);break}case"html":{i+=t.html(s);break}case"link":{i+=t.link(s);break}case"image":{i+=t.image(s);break}case"strong":{i+=t.strong(s);break}case"em":{i+=t.em(s);break}case"codespan":{i+=t.codespan(s);break}case"br":{i+=t.br(s);break}case"del":{i+=t.del(s);break}case"text":{i+=t.text(s);break}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},OQ=class{options;block;constructor(n){this.options=n||SP}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?O3.lex:O3.lexInline}provideParser(){return this.block?L3.parse:L3.parseInline}},TSi=class{defaults=lAe();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=L3;Renderer=kQ;TextRenderer=gAe;Lexer=O3;Tokenizer=NQ;Hooks=OQ;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(const i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{const r=i;for(const o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(const o of r.rows)for(const s of o)t=t.concat(this.walkTokens(s.tokens,e));break}case"list":{const r=i;t=t.concat(this.walkTokens(r.items,e));break}default:{const r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{const s=r[o].flat(1/0);t=t.concat(this.walkTokens(s,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{const i={...t};if(i.async=this.defaults.async||i.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(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}: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)}),i.extensions=e),t.renderer){const r=this.defaults.renderer||new kQ(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 s=o,a=t.renderer[s],c=r[s];r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u||""}}i.renderer=r}if(t.tokenizer){const r=this.defaults.tokenizer||new NQ(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 s=o,a=t.tokenizer[s],c=r[s];r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}i.tokenizer=r}if(t.hooks){const r=this.defaults.hooks||new OQ;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 s=o,a=t.hooks[s],c=r[s];OQ.passThroughHooks.has(o)?r[s]=l=>{if(this.defaults.async)return Promise.resolve(a.call(r,l)).then(d=>c.call(r,d));const u=a.call(r,l);return c.call(r,u)}:r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}i.hooks=r}if(t.walkTokens){const r=this.defaults.walkTokens,o=t.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),r&&(a=a.concat(r.call(this,s))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return O3.lex(n,e??this.defaults)}parser(n,e){return L3.parse(n,e??this.defaults)}parseMarkdown(n){return(t,i)=>{const r={...i},o={...this.defaults,...r},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);const a=o.hooks?o.hooks.provideLexer():n?O3.lex:O3.lexInline,c=o.hooks?o.hooks.provideParser():n?L3.parse:L3.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(l=>a(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(s);try{o.hooks&&(t=o.hooks.preprocess(t));let l=a(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 s(l)}}}onError(n,e){return t=>{if(t.message+=`
|
|
6847
|
-
Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+r5(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},EP=new TSi;function tf(n,e){return EP.parse(n,e)}tf.options=tf.setOptions=function(n){return EP.setOptions(n),tf.defaults=EP.defaults,OTt(tf.defaults),tf},tf.getDefaults=lAe,tf.defaults=SP,tf.use=function(...n){return EP.use(...n),tf.defaults=EP.defaults,OTt(tf.defaults),tf},tf.walkTokens=function(n,e){return EP.walkTokens(n,e)},tf.parseInline=EP.parseInline,tf.Parser=L3,tf.parser=L3.parse,tf.Renderer=kQ,tf.TextRenderer=gAe,tf.Lexer=O3,tf.lexer=O3.lex,tf.Tokenizer=NQ,tf.Hooks=OQ,tf.parse=tf,tf.options,tf.setOptions,tf.use,tf.walkTokens,tf.parseInline,L3.parse,O3.lex;const MSi=({review:n,onBack:e})=>{const[t,i]=ce.useState(n.ai_review_text??null),r=wP(),o=n.ai_review_id;ce.useEffect(()=>{if(!o)return;let a;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){i(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}a=setTimeout(c,1e3)}return a=setTimeout(c,1e3),()=>clearTimeout(a)},[o]);const s=ce.useMemo(()=>tf.parse(n.ai_review_text||""),[n.ai_review_text]);return oe.jsxs(oe.Fragment,{children:[oe.jsxs(K8,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[oe.jsx(R0,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),oe.jsx(Z8,{children:"AI Review"})]}),t?oe.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):oe.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[oe.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:[oe.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),oe.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),oe.jsx("span",{children:"Loading..."})]})})]})},CSi=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=ce.useState("list_reviews"),[o,s]=ce.useState(null),a=c=>{s(c),r("view_review")};return oe.jsx(Eq,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:oe.jsxs(W8,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&oe.jsx(Hwi,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&oe.jsx(MSi,{review:o,onBack:()=>r("list_reviews")})]})})};function xAe(n,e){return xAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},xAe(n,e)}function uk(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,xAe(n,e)}var dk=(function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(i){var r=this,o=i||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(s){return s!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n})();function yu(){return yu=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},yu.apply(null,arguments)}var LQ=typeof window>"u";function Eb(){}function ASi(n,e){return typeof n=="function"?n(e):n}function bAe(n){return typeof n=="number"&&n>=0&&n!==1/0}function DQ(n){return Array.isArray(n)?n:[n]}function KTt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function zQ(n,e,t){return T7(n)?typeof e=="function"?yu({},t,{queryKey:n,queryFn:e}):yu({},e,{queryKey:n}):n}function PSi(n,e,t){return T7(n)?yu({},e,{mutationKey:n}):typeof n=="function"?yu({},e,{mutationFn:n}):yu({},n)}function WC(n,e,t){return T7(n)?[yu({},e,{queryKey:n}),t]:[n||{},e]}function RSi(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function ZTt(n,e){var t=n.active,i=n.exact,r=n.fetching,o=n.inactive,s=n.predicate,a=n.queryKey,c=n.stale;if(T7(a)){if(i){if(e.queryHash!==vAe(a,e.options))return!1}else if(!$Q(e.queryKey,a))return!1}var l=RSi(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||s&&!s(e))}function QTt(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(T7(o)){if(!e.options.mutationKey)return!1;if(t){if(TP(e.options.mutationKey)!==TP(o))return!1}else if(!$Q(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function vAe(n,e){var t=e?.queryKeyHashFn||TP;return t(n)}function TP(n){var e=DQ(n);return ISi(e)}function ISi(n){return JSON.stringify(n,function(e,t){return wAe(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function $Q(n,e){return JTt(DQ(n),DQ(e))}function JTt(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!JTt(n[t],e[t])}):!1}function FQ(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||wAe(n)&&wAe(e)){for(var i=t?n.length:Object.keys(n).length,r=t?e:Object.keys(e),o=r.length,s=t?[]:{},a=0,c=0;c<o;c++){var l=t?c:r[c];s[l]=FQ(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function NSi(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function wAe(n){if(!e5t(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!e5t(t)||!t.hasOwnProperty("isPrototypeOf"))}function e5t(n){return Object.prototype.toString.call(n)==="[object Object]"}function T7(n){return typeof n=="string"||Array.isArray(n)}function kSi(n){return new Promise(function(e){setTimeout(e,n)})}function t5t(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function n5t(){if(typeof AbortController=="function")return new AbortController}var OSi=(function(n){uk(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!LQ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},i}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,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setFocused(a):s.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})(dk),M7=new OSi,LSi=(function(n){uk(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!LQ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},i}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,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setOnline(a):s.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})(dk),UQ=new LSi;function DSi(n){return Math.min(1e3*Math.pow(2,n),3e4)}function BQ(n){return typeof n?.cancel=="function"}var i5t=function(e){this.revert=e?.revert,this.silent=e?.silent};function jQ(n){return n instanceof i5t}var r5t=function(e){var t=this,i=!1,r,o,s,a;this.abort=e.abort,this.cancel=function(h){return r?.(h)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return o?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,p){s=h,a=p});var c=function(p){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(p),o?.(),s(p))},l=function(p){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(p),o?.(),a(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()})},d=function h(){if(!t.isResolved){var p;try{p=e.fn()}catch(m){p=Promise.reject(m)}r=function(_){if(!t.isResolved&&(l(new i5t(_)),t.abort==null||t.abort(),BQ(p)))try{p.cancel()}catch{}},t.isTransportCancelable=BQ(p),Promise.resolve(p).then(c).catch(function(m){var _,g;if(!t.isResolved){var x=(_=e.retry)!=null?_:3,b=(g=e.retryDelay)!=null?g:DSi,w=typeof b=="function"?b(t.failureCount,m):b,E=x===!0||typeof x=="number"&&t.failureCount<x||typeof x=="function"&&x(t.failureCount,m);if(i||!E){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),kSi(w).then(function(){if(!M7.isFocused()||!UQ.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},zSi=(function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(i){var r;this.transactions++;try{r=i()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(i){var r=this;this.transactions?this.queue.push(i):t5t(function(){r.notifyFn(i)})},e.batchCalls=function(i){var r=this;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r.schedule(function(){i.apply(void 0,s)})}},e.flush=function(){var i=this,r=this.queue;this.queue=[],r.length&&t5t(function(){i.batchNotifyFn(function(){r.forEach(function(o){i.notifyFn(o)})})})},e.setNotifyFunction=function(i){this.notifyFn=i},e.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n})(),h_=new zSi,o5t=console;function HQ(){return o5t}function $Si(n){o5t=n}var FSi=(function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(i){var r;this.options=yu({},this.defaultOptions,i),this.meta=i?.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(i){this.defaultOptions=i},e.scheduleGc=function(){var i=this;this.clearGcTimeout(),bAe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.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(i,r){var o,s,a=this.state.data,c=ASi(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=FQ(a,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r?.updatedAt}),c},e.setState=function(i,r){this.dispatch({type:"setState",state:i,setStateOptions:r})},e.cancel=function(i){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(i),o?o.then(Eb).catch(Eb):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(i){return i.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},e.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!KTt(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),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:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(b){return b.options.queryFn});u&&this.setOptions(u.options)}var d=DQ(this.queryKey),h=n5t(),p={queryKey:d,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")},_={fetchOptions:r,options:this.options,queryKey:d,state:this.state,fetchFn:m,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(_)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=_.fetchOptions)==null?void 0:a.meta)){var x;this.dispatch({type:"fetch",meta:(x=_.fetchOptions)==null?void 0:x.meta})}return this.retryer=new r5t({fn:_.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){jQ(w)&&w.silent||o.dispatch({type:"error",error:w}),jQ(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),HQ().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:_.options.retry,retryDelay:_.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(i){var r=this;this.state=this.reducer(this.state,i),h_.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(i)}),r.cache.notify({query:r,type:"queryUpdated",action:i})})},e.getDefaultState=function(i){var r=typeof i.initialData=="function"?i.initialData():i.initialData,o=typeof i.initialData<"u",s=o?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,a=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(i,r){var o,s;switch(r.type){case"failed":return yu({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return yu({},i,{isPaused:!0});case"continue":return yu({},i,{isPaused:!1});case"fetch":return yu({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return yu({},i,{data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(s=r.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=r.error;return jQ(a)&&a.revert&&this.revertState?yu({},this.revertState):yu({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return yu({},i,{isInvalidated:!0});case"setState":return yu({},i,r.state);default:return i}},n})(),USi=(function(n){uk(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,s){var a,c=o.queryKey,l=(a=o.queryHash)!=null?a:vAe(c,o),u=this.get(l);return u||(u=new FSi({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:s,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(s){return s!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;h_.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 s=WC(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return ZTt(a,c)})},t.findAll=function(r,o){var s=WC(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return ZTt(a,c)}):this.queries},t.notify=function(r){var o=this;h_.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;h_.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;h_.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(dk),BSi=(function(){function n(t){this.options=yu({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||s5t(),this.meta=t.meta}var e=n.prototype;return e.setState=function(i){this.dispatch({type:"setState",state:i})},e.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},e.removeObserver=function(i){this.observers=this.observers.filter(function(r){return r!==i})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Eb).catch(Eb)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var i=this,r,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(a){a!==i.state.context&&i.dispatch({type:"loading",context:a,variables:i.state.variables})})),s.then(function(){return i.executeMutation()}).then(function(a){r=a,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(r,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(r,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(r,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:r}),r}).catch(function(a){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(a,i.state.variables,i.state.context,i),HQ().error(a),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(a,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,a,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var i=this,r;return this.retryer=new r5t({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(i){var r=this;this.state=jSi(this.state,i),h_.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function s5t(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function jSi(n,e){switch(e.type){case"failed":return yu({},n,{failureCount:n.failureCount+1});case"pause":return yu({},n,{isPaused:!0});case"continue":return yu({},n,{isPaused:!1});case"loading":return yu({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return yu({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return yu({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return yu({},n,e.state);default:return n}}var HSi=(function(n){uk(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,s){var a=new BSi({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(a),a},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;h_.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 QTt(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return QTt(r,o)})},t.notify=function(r){var o=this;h_.batch(function(){o.listeners.forEach(function(s){s(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 h_.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(Eb)})},Promise.resolve())})},e})(dk);function VSi(){return{onFetch:function(e){e.fetchFn=function(){var t,i,r,o,s,a,c=(t=e.fetchOptions)==null||(i=t.meta)==null?void 0:i.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l?.pageParam,d=l?.direction==="forward",h=l?.direction==="backward",p=((s=e.state.data)==null?void 0:s.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[],_=n5t(),g=_?.signal,x=m,b=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},E=function(Y,X,K,J){return x=J?[X].concat(x):[].concat(x,[X]),J?[K].concat(Y):[].concat(Y,[K])},I=function(Y,X,K,J){if(b)return Promise.reject("Cancelled");if(typeof K>"u"&&!X&&Y.length)return Promise.resolve(Y);var le={queryKey:e.queryKey,signal:g,pageParam:K,meta:e.meta},pe=w(le),ve=Promise.resolve(pe).then(function(ae){return E(Y,K,ae,J)});if(BQ(pe)){var re=ve;re.cancel=pe.cancel}return ve},A;if(!p.length)A=I([]);else if(d){var R=typeof u<"u",M=R?u:a5t(e.options,p);A=I(p,R,M)}else if(h){var k=typeof u<"u",C=k?u:GSi(e.options,p);A=I(p,k,C,!0)}else(function(){x=[];var H=typeof e.options.getNextPageParam>"u",Y=c&&p[0]?c(p[0],0,p):!0;A=Y?I([],H,m[0]):Promise.resolve(E([],m[0],p[0]));for(var X=function(le){A=A.then(function(pe){var ve=c&&p[le]?c(p[le],le,p):!0;if(ve){var re=H?m[le]:a5t(e.options,pe);return I(pe,H,re)}return Promise.resolve(E(pe,m[le],p[le]))})},K=1;K<p.length;K++)X(K)})();var U=A.then(function(H){return{pages:H,pageParams:x}}),O=U;return O.cancel=function(){b=!0,_?.abort(),BQ(A)&&A.cancel()},U}}}}function a5t(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function GSi(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var YSi=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new USi,this.mutationCache=t.mutationCache||new HSi,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=M7.subscribe(function(){M7.isFocused()&&UQ.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=UQ.subscribe(function(){M7.isFocused()&&UQ.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},e.unmount=function(){var i,r;(i=this.unsubscribeFocus)==null||i.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(i,r){var o=WC(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(yu({},i,{fetching:!0})).length},e.getQueryData=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state.data},e.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(r){var o=r.queryKey,s=r.state,a=s.data;return[o,a]})},e.setQueryData=function(i,r,o){var s=zQ(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return h_.batch(function(){return s.getQueryCache().findAll(i).map(function(a){var c=a.queryKey;return[c,s.setQueryData(c,r,o)]})})},e.getQueryState=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state},e.removeQueries=function(i,r){var o=WC(i,r),s=o[0],a=this.queryCache;h_.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=WC(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=yu({},c,{active:!0});return h_.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),s.refetchQueries(d,l)})},e.cancelQueries=function(i,r,o){var s=this,a=WC(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=h_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(d).then(Eb).catch(Eb)},e.invalidateQueries=function(i,r,o){var s,a,c,l=this,u=WC(i,r,o),d=u[0],h=u[1],p=yu({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return h_.batch(function(){return l.queryCache.findAll(d).forEach(function(m){m.invalidate()}),l.refetchQueries(p,h)})},e.refetchQueries=function(i,r,o){var s=this,a=WC(i,r,o),c=a[0],l=a[1],u=h_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,yu({},l,{meta:{refetchPage:c?.refetchPage}}))})}),d=Promise.all(u).then(Eb);return l?.throwOnError||(d=d.catch(Eb)),d},e.fetchQuery=function(i,r,o){var s=zQ(i,r,o),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var c=this.queryCache.build(this,a);return c.isStaleByTime(a.staleTime)?c.fetch(a):Promise.resolve(c.state.data)},e.prefetchQuery=function(i,r,o){return this.fetchQuery(i,r,o).then(Eb).catch(Eb)},e.fetchInfiniteQuery=function(i,r,o){var s=zQ(i,r,o);return s.behavior=VSi(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(i,r,o){return this.fetchInfiniteQuery(i,r,o).then(Eb).catch(Eb)},e.cancelMutations=function(){var i=this,r=h_.batch(function(){return i.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(Eb).catch(Eb)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(i){this.defaultOptions=i},e.setQueryDefaults=function(i,r){var o=this.queryDefaults.find(function(s){return TP(i)===TP(s.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:i,defaultOptions:r})},e.getQueryDefaults=function(i){var r;return i?(r=this.queryDefaults.find(function(o){return $Q(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return TP(i)===TP(s.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:i,defaultOptions:r})},e.getMutationDefaults=function(i){var r;return i?(r=this.mutationDefaults.find(function(o){return $Q(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=yu({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=vAe(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:yu({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),qSi=(function(n){uk(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,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),c5t(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return SAe(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return SAe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var s=this.options,a=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=s.queryKey),this.updateQuery();var c=this.hasListeners();c&&l5t(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var s=this,a={},c=function(u){s.trackedProps.includes(u)||s.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),a},t.getNextResult=function(r){var o=this;return new Promise(function(s,a){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&r?.throwOnError?a(l.error):s(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(yu({},r,{meta:{refetchPage:r?.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,s=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return o.createResult(a,s)})},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?.throwOnError||(o=o.catch(Eb)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(LQ||this.currentResult.isStale||!bAe(this.options.staleTime))){var o=KTt(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},s)}},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,!(LQ||this.options.enabled===!1||!bAe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||M7.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 s=this.currentQuery,a=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,d=r!==s,h=d?r.state:this.currentQueryInitialState,p=d?this.currentResult:this.previousQueryResult,m=r.state,_=m.dataUpdatedAt,g=m.error,x=m.errorUpdatedAt,b=m.isFetching,w=m.status,E=!1,I=!1,A;if(o.optimisticResults){var R=this.hasListeners(),M=!R&&c5t(r,o),k=R&&l5t(r,s,o,a);(M||k)&&(b=!0,_||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&p?.isSuccess&&w!=="error")A=p.data,_=p.dataUpdatedAt,w=p.status,E=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===l?.data&&o.select===this.selectFn)A=this.selectResult;else try{this.selectFn=o.select,A=o.select(m.data),o.structuralSharing!==!1&&(A=FQ(c?.data,A)),this.selectResult=A,this.selectError=null}catch(O){HQ().error(O),this.selectError=O}else A=m.data;if(typeof o.placeholderData<"u"&&typeof A>"u"&&(w==="loading"||w==="idle")){var C;if(c?.isPlaceholderData&&o.placeholderData===u?.placeholderData)C=c.data;else if(C=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof C<"u")try{C=o.select(C),o.structuralSharing!==!1&&(C=FQ(c?.data,C)),this.selectError=null}catch(O){HQ().error(O),this.selectError=O}typeof C<"u"&&(w="success",A=C,I=!0)}this.selectError&&(g=this.selectError,A=this.selectResult,x=Date.now(),w="error");var U={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:A,dataUpdatedAt:_,error:g,errorUpdatedAt:x,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:b,isRefetching:b&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:I,isPreviousData:E,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:EAe(r,o),refetch:this.refetch,remove:this.remove};return U},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var s=this.options,a=s.notifyOnChangeProps,c=s.notifyOnChangePropsExclusions;if(!a&&!c||a==="tracked"&&!this.trackedProps.length)return!0;var l=a==="tracked"?this.trackedProps:a;return Object.keys(r).some(function(u){var d=u,h=r[d]!==o[d],p=l?.some(function(_){return _===u}),m=c?.some(function(_){return _===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,!NSi(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(yu({},s,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?.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!jQ(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;h_.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(s){s(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e})(dk);function XSi(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function c5t(n,e){return XSi(n,e)||n.state.dataUpdatedAt>0&&SAe(n,e,e.refetchOnMount)}function SAe(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&EAe(n,e)}return!1}function l5t(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&EAe(n,t)}function EAe(n,e){return n.isStaleByTime(e.staleTime)}var WSi=(function(n){uk(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,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,yu({},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:s5t(),o=yu({},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;h_.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(s){s(o.currentResult)})})},e})(dk),KSi=mj.unstable_batchedUpdates;h_.setBatchNotifyFunction(KSi);var ZSi=console;$Si(ZSi);var u5t=So.createContext(void 0),d5t=So.createContext(!1);function h5t(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=u5t),window.ReactQueryClientContext):u5t}var TAe=function(){var e=So.useContext(h5t(So.useContext(d5t)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},QSi=function(e){var t=e.client,i=e.contextSharing,r=i===void 0?!1:i,o=e.children;So.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=h5t(r);return So.createElement(d5t.Provider,{value:r},So.createElement(s.Provider,{value:t},o))};function JSi(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var e2i=So.createContext(JSi()),t2i=function(){return So.useContext(e2i)};function p5t(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function n2i(n,e,t){var i=So.useRef(!1),r=So.useState(0),o=r[1],s=PSi(n,e),a=TAe(),c=So.useRef();c.current?c.current.setOptions(s):c.current=new WSi(a,s);var l=c.current.getCurrentResult();So.useEffect(function(){i.current=!0;var d=c.current.subscribe(h_.batchCalls(function(){i.current&&o(function(h){return h+1})}));return function(){i.current=!1,d()}},[]);var u=So.useCallback(function(d,h){c.current.mutate(d,h).catch(Eb)},[]);if(l.error&&p5t(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return yu({},l,{mutate:u,mutateAsync:l.mutate})}function i2i(n,e){var t=So.useRef(!1),i=So.useState(0),r=i[1],o=TAe(),s=t2i(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=h_.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=h_.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=h_.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var c=So.useState(function(){return new e(o,a)}),l=c[0],u=l.getOptimisticResult(a);if(So.useEffect(function(){t.current=!0,s.clearReset();var d=l.subscribe(h_.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,d()}},[s,l]),So.useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.fetchOptimistic(a).then(function(d){var h=d.data;a.onSuccess==null||a.onSuccess(h),a.onSettled==null||a.onSettled(h,null)}).catch(function(d){s.clearReset(),a.onError==null||a.onError(d),a.onSettled==null||a.onSettled(void 0,d)});if(u.isError&&!s.isReset()&&!u.isFetching&&p5t(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function r2i(n,e,t){var i=zQ(n,e,t);return i2i(i,qSi)}function o2i({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return oe.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[oe.jsx(R9n,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),oe.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[oe.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[oe.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),oe.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),oe.jsx("hr",{className:"rf-border-gray-200"}),oe.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[oe.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),oe.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>oe.jsxs("button",{type:"button",className:co("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:[oe.jsx(N9n,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),oe.jsxs("div",{className:"rf-text-left rf-flex-1",children:[oe.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),oe.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[oe.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),oe.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&oe.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:oe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[oe.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[oe.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),oe.jsx("div",{className:"rf-flex rf-items-center",children:oe.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const s2i=async n=>{try{const{order_quote_id:e}=await b7.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof g7){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},a2i=async n=>{const{order_quote:e}=await b7.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},c2i=()=>{const n=TAe();return n2i({mutationKey:["createOrderQuote"],mutationFn:e=>s2i(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},l2i=n=>{const{data:e,error:t,status:i}=r2i(["getOrderQuote",n],()=>a2i(n||""),{enabled:!!n,refetchInterval:r=>r?.is_completed||r?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:i==="loading"?"loading":i==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},u2i=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=ce.useState(null),[s,a]=ce.useState(null),{mutate:c,error:l}=c2i();ce.useEffect(()=>{e&&c(e,{onSuccess:_=>{a(_.order_quote_id)}})},[e]);const{data:u}=l2i(s||void 0),d=l&&l.error?.message||u?.error?.message;mpt({errorMessage:d});const h=async _=>{const g=MQ("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${_}&shipping_option=${r}`};ce.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const _=u.shipping_options.reduce((g,x)=>x.cost<g.cost?x:g,u.shipping_options[0]);o(_?.carrier||null)}},[u]);const p=ce.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((_,g)=>g.cost<_.cost?g:_,u.shipping_options[0]).cost:0,[u]),m=l&&l.error?.error_code?.includes("no_token")||u?.error?.error_code?.includes("no_token")&&t;return!i||m?oe.jsx(p2i,{signIn:t}):oe.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:[oe.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&oe.jsx(d2i,{message:"Fetching quotes..."}),(l||u?.error)&&oe.jsx(h2i,{message:l&&l.error?.message||u?.error?.message||"Failed to fetch quotes"}),u?.is_completed&&!l&&!u?.error&&Array.isArray(u?.shipping_options)&&u.shipping_options.length>0&&oe.jsxs(oe.Fragment,{children:[oe.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"}),oe.jsx(o2i,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:p+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),oe.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[oe.jsx(R0,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:n,children:"Cancel"}),oe.jsx(R0,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:r===null,onClick:()=>{if(r===null){ql.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),oe.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},d2i=({message:n})=>oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[oe.jsx(r3,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),oe.jsx("p",{className:"rf-text-gray-600",children:n})]}),h2i=({message:n})=>oe.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),p2i=({signIn:n})=>oe.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:[oe.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[oe.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),oe.jsxs(R0,{onClick:n,className:"rf-flex rf-items-center rf-gap-2",children:[oe.jsx(Fxe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),f2i=new YSi,m2i=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>oe.jsx(QSi,{client:f2i,children:oe.jsx(Eq,{open:n,onOpenChange:c=>{c||e()},children:oe.jsx(W8,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:oe.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&oe.jsx(u2i,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),_2i=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=ub(a=>a.circuitJson);return oe.jsx(m2i,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},y2i=()=>{const[n,e]=ce.useState(!1),[t,i]=ce.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:_2i}};async function f5t(){const n=await fetch(`${eS}/files/list`),{file_list:e}=await n.json(),t=new Map;for(const i of e){const o=await(await fetch(`${eS}/files/get?file_path=${encodeURIComponent(i.file_path)}`)).json();(o.file?.text_content||o.file?.binary_content_b64)&&t.set(i.file_path,{text_content:o.file.text_content,binary_content_b64:o.file.binary_content_b64})}return t}const g2i="https://api.tscircuit.com/bug_reports/view?bug_report_id=",x2i=n=>`${g2i}${n}`,b2i=()=>{const[n,e]=ce.useState(!1),[t,i]=ce.useState(!1),[r,o]=ce.useState(null),s=ce.useRef(null),[a,c]=ce.useState(null),[l,u]=ce.useState(0),d=ce.useMemo(()=>CQ()?!0:typeof document>"u"?!1:document.cookie.split(";").some(g=>g.trim().startsWith("session=")),[n]);ce.useEffect(()=>{if(n&&!a&&s.current){const g=typeof window<"u"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;g&&(s.current.value=`I'm getting this execution error:
|
|
6847
|
+
Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+r5(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},EP=new TSi;function tf(n,e){return EP.parse(n,e)}tf.options=tf.setOptions=function(n){return EP.setOptions(n),tf.defaults=EP.defaults,OTt(tf.defaults),tf},tf.getDefaults=lAe,tf.defaults=SP,tf.use=function(...n){return EP.use(...n),tf.defaults=EP.defaults,OTt(tf.defaults),tf},tf.walkTokens=function(n,e){return EP.walkTokens(n,e)},tf.parseInline=EP.parseInline,tf.Parser=L3,tf.parser=L3.parse,tf.Renderer=kQ,tf.TextRenderer=gAe,tf.Lexer=O3,tf.lexer=O3.lex,tf.Tokenizer=NQ,tf.Hooks=OQ,tf.parse=tf,tf.options,tf.setOptions,tf.use,tf.walkTokens,tf.parseInline,L3.parse,O3.lex;const MSi=({review:n,onBack:e})=>{const[t,i]=ce.useState(n.ai_review_text??null),r=wP(),o=n.ai_review_id;ce.useEffect(()=>{if(!o)return;let a;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){i(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}a=setTimeout(c,1e3)}return a=setTimeout(c,1e3),()=>clearTimeout(a)},[o]);const s=ce.useMemo(()=>tf.parse(n.ai_review_text||""),[n.ai_review_text]);return oe.jsxs(oe.Fragment,{children:[oe.jsxs(K8,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[oe.jsx(R0,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),oe.jsx(Z8,{children:"AI Review"})]}),t?oe.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):oe.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[oe.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:[oe.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),oe.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),oe.jsx("span",{children:"Loading..."})]})})]})},CSi=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=ce.useState("list_reviews"),[o,s]=ce.useState(null),a=c=>{s(c),r("view_review")};return oe.jsx(Eq,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:oe.jsxs(W8,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&oe.jsx(Hwi,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&oe.jsx(MSi,{review:o,onBack:()=>r("list_reviews")})]})})};function xAe(n,e){return xAe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},xAe(n,e)}function uk(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,xAe(n,e)}var dk=(function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(i){var r=this,o=i||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(s){return s!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n})();function yu(){return yu=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},yu.apply(null,arguments)}var LQ=typeof window>"u";function Eb(){}function ASi(n,e){return typeof n=="function"?n(e):n}function bAe(n){return typeof n=="number"&&n>=0&&n!==1/0}function DQ(n){return Array.isArray(n)?n:[n]}function KTt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function zQ(n,e,t){return T7(n)?typeof e=="function"?yu({},t,{queryKey:n,queryFn:e}):yu({},e,{queryKey:n}):n}function PSi(n,e,t){return T7(n)?yu({},e,{mutationKey:n}):typeof n=="function"?yu({},e,{mutationFn:n}):yu({},n)}function WC(n,e,t){return T7(n)?[yu({},e,{queryKey:n}),t]:[n||{},e]}function RSi(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function ZTt(n,e){var t=n.active,i=n.exact,r=n.fetching,o=n.inactive,s=n.predicate,a=n.queryKey,c=n.stale;if(T7(a)){if(i){if(e.queryHash!==vAe(a,e.options))return!1}else if(!$Q(e.queryKey,a))return!1}var l=RSi(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||s&&!s(e))}function QTt(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(T7(o)){if(!e.options.mutationKey)return!1;if(t){if(TP(e.options.mutationKey)!==TP(o))return!1}else if(!$Q(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function vAe(n,e){var t=e?.queryKeyHashFn||TP;return t(n)}function TP(n){var e=DQ(n);return ISi(e)}function ISi(n){return JSON.stringify(n,function(e,t){return wAe(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function $Q(n,e){return JTt(DQ(n),DQ(e))}function JTt(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!JTt(n[t],e[t])}):!1}function FQ(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||wAe(n)&&wAe(e)){for(var i=t?n.length:Object.keys(n).length,r=t?e:Object.keys(e),o=r.length,s=t?[]:{},a=0,c=0;c<o;c++){var l=t?c:r[c];s[l]=FQ(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function NSi(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function wAe(n){if(!e5t(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!e5t(t)||!t.hasOwnProperty("isPrototypeOf"))}function e5t(n){return Object.prototype.toString.call(n)==="[object Object]"}function T7(n){return typeof n=="string"||Array.isArray(n)}function kSi(n){return new Promise(function(e){setTimeout(e,n)})}function t5t(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function n5t(){if(typeof AbortController=="function")return new AbortController}var OSi=(function(n){uk(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!LQ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},i}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,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setFocused(a):s.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})(dk),M7=new OSi,LSi=(function(n){uk(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!LQ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},i}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,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setOnline(a):s.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})(dk),UQ=new LSi;function DSi(n){return Math.min(1e3*Math.pow(2,n),3e4)}function BQ(n){return typeof n?.cancel=="function"}var i5t=function(e){this.revert=e?.revert,this.silent=e?.silent};function jQ(n){return n instanceof i5t}var r5t=function(e){var t=this,i=!1,r,o,s,a;this.abort=e.abort,this.cancel=function(h){return r?.(h)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return o?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,p){s=h,a=p});var c=function(p){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(p),o?.(),s(p))},l=function(p){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(p),o?.(),a(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()})},d=function h(){if(!t.isResolved){var p;try{p=e.fn()}catch(m){p=Promise.reject(m)}r=function(_){if(!t.isResolved&&(l(new i5t(_)),t.abort==null||t.abort(),BQ(p)))try{p.cancel()}catch{}},t.isTransportCancelable=BQ(p),Promise.resolve(p).then(c).catch(function(m){var _,g;if(!t.isResolved){var x=(_=e.retry)!=null?_:3,b=(g=e.retryDelay)!=null?g:DSi,w=typeof b=="function"?b(t.failureCount,m):b,E=x===!0||typeof x=="number"&&t.failureCount<x||typeof x=="function"&&x(t.failureCount,m);if(i||!E){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),kSi(w).then(function(){if(!M7.isFocused()||!UQ.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},zSi=(function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(i){var r;this.transactions++;try{r=i()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(i){var r=this;this.transactions?this.queue.push(i):t5t(function(){r.notifyFn(i)})},e.batchCalls=function(i){var r=this;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r.schedule(function(){i.apply(void 0,s)})}},e.flush=function(){var i=this,r=this.queue;this.queue=[],r.length&&t5t(function(){i.batchNotifyFn(function(){r.forEach(function(o){i.notifyFn(o)})})})},e.setNotifyFunction=function(i){this.notifyFn=i},e.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n})(),h_=new zSi,o5t=console;function HQ(){return o5t}function $Si(n){o5t=n}var FSi=(function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(i){var r;this.options=yu({},this.defaultOptions,i),this.meta=i?.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(i){this.defaultOptions=i},e.scheduleGc=function(){var i=this;this.clearGcTimeout(),bAe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.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(i,r){var o,s,a=this.state.data,c=ASi(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=FQ(a,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r?.updatedAt}),c},e.setState=function(i,r){this.dispatch({type:"setState",state:i,setStateOptions:r})},e.cancel=function(i){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(i),o?o.then(Eb).catch(Eb):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(i){return i.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},e.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!KTt(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),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:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(b){return b.options.queryFn});u&&this.setOptions(u.options)}var d=DQ(this.queryKey),h=n5t(),p={queryKey:d,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")},_={fetchOptions:r,options:this.options,queryKey:d,state:this.state,fetchFn:m,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(_)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=_.fetchOptions)==null?void 0:a.meta)){var x;this.dispatch({type:"fetch",meta:(x=_.fetchOptions)==null?void 0:x.meta})}return this.retryer=new r5t({fn:_.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){jQ(w)&&w.silent||o.dispatch({type:"error",error:w}),jQ(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),HQ().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:_.options.retry,retryDelay:_.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(i){var r=this;this.state=this.reducer(this.state,i),h_.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(i)}),r.cache.notify({query:r,type:"queryUpdated",action:i})})},e.getDefaultState=function(i){var r=typeof i.initialData=="function"?i.initialData():i.initialData,o=typeof i.initialData<"u",s=o?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,a=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(i,r){var o,s;switch(r.type){case"failed":return yu({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return yu({},i,{isPaused:!0});case"continue":return yu({},i,{isPaused:!1});case"fetch":return yu({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return yu({},i,{data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(s=r.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=r.error;return jQ(a)&&a.revert&&this.revertState?yu({},this.revertState):yu({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return yu({},i,{isInvalidated:!0});case"setState":return yu({},i,r.state);default:return i}},n})(),USi=(function(n){uk(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,s){var a,c=o.queryKey,l=(a=o.queryHash)!=null?a:vAe(c,o),u=this.get(l);return u||(u=new FSi({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:s,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(s){return s!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;h_.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 s=WC(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return ZTt(a,c)})},t.findAll=function(r,o){var s=WC(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return ZTt(a,c)}):this.queries},t.notify=function(r){var o=this;h_.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;h_.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;h_.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(dk),BSi=(function(){function n(t){this.options=yu({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||s5t(),this.meta=t.meta}var e=n.prototype;return e.setState=function(i){this.dispatch({type:"setState",state:i})},e.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},e.removeObserver=function(i){this.observers=this.observers.filter(function(r){return r!==i})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Eb).catch(Eb)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var i=this,r,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(a){a!==i.state.context&&i.dispatch({type:"loading",context:a,variables:i.state.variables})})),s.then(function(){return i.executeMutation()}).then(function(a){r=a,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(r,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(r,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(r,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:r}),r}).catch(function(a){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(a,i.state.variables,i.state.context,i),HQ().error(a),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(a,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,a,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var i=this,r;return this.retryer=new r5t({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(i){var r=this;this.state=jSi(this.state,i),h_.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function s5t(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function jSi(n,e){switch(e.type){case"failed":return yu({},n,{failureCount:n.failureCount+1});case"pause":return yu({},n,{isPaused:!0});case"continue":return yu({},n,{isPaused:!1});case"loading":return yu({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return yu({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return yu({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return yu({},n,e.state);default:return n}}var HSi=(function(n){uk(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,s){var a=new BSi({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(a),a},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;h_.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 QTt(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return QTt(r,o)})},t.notify=function(r){var o=this;h_.batch(function(){o.listeners.forEach(function(s){s(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 h_.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(Eb)})},Promise.resolve())})},e})(dk);function VSi(){return{onFetch:function(e){e.fetchFn=function(){var t,i,r,o,s,a,c=(t=e.fetchOptions)==null||(i=t.meta)==null?void 0:i.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l?.pageParam,d=l?.direction==="forward",h=l?.direction==="backward",p=((s=e.state.data)==null?void 0:s.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[],_=n5t(),g=_?.signal,x=m,b=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},E=function(Y,X,K,J){return x=J?[X].concat(x):[].concat(x,[X]),J?[K].concat(Y):[].concat(Y,[K])},I=function(Y,X,K,J){if(b)return Promise.reject("Cancelled");if(typeof K>"u"&&!X&&Y.length)return Promise.resolve(Y);var le={queryKey:e.queryKey,signal:g,pageParam:K,meta:e.meta},pe=w(le),ve=Promise.resolve(pe).then(function(ae){return E(Y,K,ae,J)});if(BQ(pe)){var re=ve;re.cancel=pe.cancel}return ve},A;if(!p.length)A=I([]);else if(d){var R=typeof u<"u",M=R?u:a5t(e.options,p);A=I(p,R,M)}else if(h){var k=typeof u<"u",C=k?u:GSi(e.options,p);A=I(p,k,C,!0)}else(function(){x=[];var H=typeof e.options.getNextPageParam>"u",Y=c&&p[0]?c(p[0],0,p):!0;A=Y?I([],H,m[0]):Promise.resolve(E([],m[0],p[0]));for(var X=function(le){A=A.then(function(pe){var ve=c&&p[le]?c(p[le],le,p):!0;if(ve){var re=H?m[le]:a5t(e.options,pe);return I(pe,H,re)}return Promise.resolve(E(pe,m[le],p[le]))})},K=1;K<p.length;K++)X(K)})();var U=A.then(function(H){return{pages:H,pageParams:x}}),O=U;return O.cancel=function(){b=!0,_?.abort(),BQ(A)&&A.cancel()},U}}}}function a5t(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function GSi(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var YSi=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new USi,this.mutationCache=t.mutationCache||new HSi,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=M7.subscribe(function(){M7.isFocused()&&UQ.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=UQ.subscribe(function(){M7.isFocused()&&UQ.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},e.unmount=function(){var i,r;(i=this.unsubscribeFocus)==null||i.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(i,r){var o=WC(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(yu({},i,{fetching:!0})).length},e.getQueryData=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state.data},e.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(r){var o=r.queryKey,s=r.state,a=s.data;return[o,a]})},e.setQueryData=function(i,r,o){var s=zQ(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return h_.batch(function(){return s.getQueryCache().findAll(i).map(function(a){var c=a.queryKey;return[c,s.setQueryData(c,r,o)]})})},e.getQueryState=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state},e.removeQueries=function(i,r){var o=WC(i,r),s=o[0],a=this.queryCache;h_.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=WC(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=yu({},c,{active:!0});return h_.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),s.refetchQueries(d,l)})},e.cancelQueries=function(i,r,o){var s=this,a=WC(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=h_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(d).then(Eb).catch(Eb)},e.invalidateQueries=function(i,r,o){var s,a,c,l=this,u=WC(i,r,o),d=u[0],h=u[1],p=yu({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return h_.batch(function(){return l.queryCache.findAll(d).forEach(function(m){m.invalidate()}),l.refetchQueries(p,h)})},e.refetchQueries=function(i,r,o){var s=this,a=WC(i,r,o),c=a[0],l=a[1],u=h_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,yu({},l,{meta:{refetchPage:c?.refetchPage}}))})}),d=Promise.all(u).then(Eb);return l?.throwOnError||(d=d.catch(Eb)),d},e.fetchQuery=function(i,r,o){var s=zQ(i,r,o),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var c=this.queryCache.build(this,a);return c.isStaleByTime(a.staleTime)?c.fetch(a):Promise.resolve(c.state.data)},e.prefetchQuery=function(i,r,o){return this.fetchQuery(i,r,o).then(Eb).catch(Eb)},e.fetchInfiniteQuery=function(i,r,o){var s=zQ(i,r,o);return s.behavior=VSi(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(i,r,o){return this.fetchInfiniteQuery(i,r,o).then(Eb).catch(Eb)},e.cancelMutations=function(){var i=this,r=h_.batch(function(){return i.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(Eb).catch(Eb)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(i){this.defaultOptions=i},e.setQueryDefaults=function(i,r){var o=this.queryDefaults.find(function(s){return TP(i)===TP(s.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:i,defaultOptions:r})},e.getQueryDefaults=function(i){var r;return i?(r=this.queryDefaults.find(function(o){return $Q(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return TP(i)===TP(s.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:i,defaultOptions:r})},e.getMutationDefaults=function(i){var r;return i?(r=this.mutationDefaults.find(function(o){return $Q(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=yu({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=vAe(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:yu({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),qSi=(function(n){uk(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,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),c5t(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return SAe(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return SAe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var s=this.options,a=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=s.queryKey),this.updateQuery();var c=this.hasListeners();c&&l5t(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var s=this,a={},c=function(u){s.trackedProps.includes(u)||s.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),a},t.getNextResult=function(r){var o=this;return new Promise(function(s,a){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&r?.throwOnError?a(l.error):s(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(yu({},r,{meta:{refetchPage:r?.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,s=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return o.createResult(a,s)})},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?.throwOnError||(o=o.catch(Eb)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(LQ||this.currentResult.isStale||!bAe(this.options.staleTime))){var o=KTt(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},s)}},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,!(LQ||this.options.enabled===!1||!bAe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||M7.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 s=this.currentQuery,a=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,d=r!==s,h=d?r.state:this.currentQueryInitialState,p=d?this.currentResult:this.previousQueryResult,m=r.state,_=m.dataUpdatedAt,g=m.error,x=m.errorUpdatedAt,b=m.isFetching,w=m.status,E=!1,I=!1,A;if(o.optimisticResults){var R=this.hasListeners(),M=!R&&c5t(r,o),k=R&&l5t(r,s,o,a);(M||k)&&(b=!0,_||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&p?.isSuccess&&w!=="error")A=p.data,_=p.dataUpdatedAt,w=p.status,E=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===l?.data&&o.select===this.selectFn)A=this.selectResult;else try{this.selectFn=o.select,A=o.select(m.data),o.structuralSharing!==!1&&(A=FQ(c?.data,A)),this.selectResult=A,this.selectError=null}catch(O){HQ().error(O),this.selectError=O}else A=m.data;if(typeof o.placeholderData<"u"&&typeof A>"u"&&(w==="loading"||w==="idle")){var C;if(c?.isPlaceholderData&&o.placeholderData===u?.placeholderData)C=c.data;else if(C=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof C<"u")try{C=o.select(C),o.structuralSharing!==!1&&(C=FQ(c?.data,C)),this.selectError=null}catch(O){HQ().error(O),this.selectError=O}typeof C<"u"&&(w="success",A=C,I=!0)}this.selectError&&(g=this.selectError,A=this.selectResult,x=Date.now(),w="error");var U={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:A,dataUpdatedAt:_,error:g,errorUpdatedAt:x,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:b,isRefetching:b&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:I,isPreviousData:E,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:EAe(r,o),refetch:this.refetch,remove:this.remove};return U},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var s=this.options,a=s.notifyOnChangeProps,c=s.notifyOnChangePropsExclusions;if(!a&&!c||a==="tracked"&&!this.trackedProps.length)return!0;var l=a==="tracked"?this.trackedProps:a;return Object.keys(r).some(function(u){var d=u,h=r[d]!==o[d],p=l?.some(function(_){return _===u}),m=c?.some(function(_){return _===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,!NSi(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(yu({},s,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?.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!jQ(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;h_.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(s){s(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e})(dk);function XSi(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function c5t(n,e){return XSi(n,e)||n.state.dataUpdatedAt>0&&SAe(n,e,e.refetchOnMount)}function SAe(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&EAe(n,e)}return!1}function l5t(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&EAe(n,t)}function EAe(n,e){return n.isStaleByTime(e.staleTime)}var WSi=(function(n){uk(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,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,yu({},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:s5t(),o=yu({},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;h_.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(s){s(o.currentResult)})})},e})(dk),KSi=mj.unstable_batchedUpdates;h_.setBatchNotifyFunction(KSi);var ZSi=console;$Si(ZSi);var u5t=So.createContext(void 0),d5t=So.createContext(!1);function h5t(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=u5t),window.ReactQueryClientContext):u5t}var TAe=function(){var e=So.useContext(h5t(So.useContext(d5t)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},QSi=function(e){var t=e.client,i=e.contextSharing,r=i===void 0?!1:i,o=e.children;So.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=h5t(r);return So.createElement(d5t.Provider,{value:r},So.createElement(s.Provider,{value:t},o))};function JSi(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var e2i=So.createContext(JSi()),t2i=function(){return So.useContext(e2i)};function p5t(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function n2i(n,e,t){var i=So.useRef(!1),r=So.useState(0),o=r[1],s=PSi(n,e),a=TAe(),c=So.useRef();c.current?c.current.setOptions(s):c.current=new WSi(a,s);var l=c.current.getCurrentResult();So.useEffect(function(){i.current=!0;var d=c.current.subscribe(h_.batchCalls(function(){i.current&&o(function(h){return h+1})}));return function(){i.current=!1,d()}},[]);var u=So.useCallback(function(d,h){c.current.mutate(d,h).catch(Eb)},[]);if(l.error&&p5t(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return yu({},l,{mutate:u,mutateAsync:l.mutate})}function i2i(n,e){var t=So.useRef(!1),i=So.useState(0),r=i[1],o=TAe(),s=t2i(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=h_.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=h_.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=h_.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var c=So.useState(function(){return new e(o,a)}),l=c[0],u=l.getOptimisticResult(a);if(So.useEffect(function(){t.current=!0,s.clearReset();var d=l.subscribe(h_.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,d()}},[s,l]),So.useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.fetchOptimistic(a).then(function(d){var h=d.data;a.onSuccess==null||a.onSuccess(h),a.onSettled==null||a.onSettled(h,null)}).catch(function(d){s.clearReset(),a.onError==null||a.onError(d),a.onSettled==null||a.onSettled(void 0,d)});if(u.isError&&!s.isReset()&&!u.isFetching&&p5t(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function r2i(n,e,t){var i=zQ(n,e,t);return i2i(i,qSi)}function o2i({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return oe.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[oe.jsx(R9n,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),oe.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[oe.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[oe.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),oe.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),oe.jsx("hr",{className:"rf-border-gray-200"}),oe.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[oe.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),oe.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>oe.jsxs("button",{type:"button",className:co("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:[oe.jsx(N9n,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),oe.jsxs("div",{className:"rf-text-left rf-flex-1",children:[oe.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),oe.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[oe.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),oe.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&oe.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:oe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[oe.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[oe.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),oe.jsx("div",{className:"rf-flex rf-items-center",children:oe.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const s2i=async n=>{try{const{order_quote_id:e}=await b7.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof g7){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},a2i=async n=>{const{order_quote:e}=await b7.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},c2i=()=>{const n=TAe();return n2i({mutationKey:["createOrderQuote"],mutationFn:e=>s2i(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},l2i=n=>{const{data:e,error:t,status:i}=r2i(["getOrderQuote",n],()=>a2i(n||""),{enabled:!!n,refetchInterval:r=>r?.is_completed||r?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:i==="loading"?"loading":i==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},u2i=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=ce.useState(null),[s,a]=ce.useState(null),{mutate:c,error:l}=c2i();ce.useEffect(()=>{e&&c(e,{onSuccess:_=>{a(_.order_quote_id)}})},[e]);const{data:u}=l2i(s||void 0),d=l&&l.error?.message||u?.error?.message;mpt({errorMessage:d});const h=async _=>{const g=MQ("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${_}&shipping_option=${r}`};ce.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const _=u.shipping_options.reduce((g,x)=>x.cost<g.cost?x:g,u.shipping_options[0]);o(_?.carrier||null)}},[u]);const p=ce.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((_,g)=>g.cost<_.cost?g:_,u.shipping_options[0]).cost:0,[u]),m=l&&l.error?.error_code?.includes("no_token")||u?.error?.error_code?.includes("no_token")&&t;return!i||m?oe.jsx(p2i,{signIn:t}):oe.jsxs("div",{className:`
|
|
6848
|
+
rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl
|
|
6849
|
+
rf-p-4 sm:rf-p-6 md:rf-p-8
|
|
6850
|
+
rf-flex rf-flex-col rf-gap-3
|
|
6851
|
+
rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl
|
|
6852
|
+
`,children:[oe.jsx("h2",{className:"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&oe.jsx(d2i,{message:"Fetching quotes..."}),(l||u?.error)&&oe.jsx(h2i,{message:l&&l.error?.message||u?.error?.message||"Failed to fetch quotes"}),u?.is_completed&&!l&&!u?.error&&Array.isArray(u?.shipping_options)&&u.shipping_options.length>0&&oe.jsxs(oe.Fragment,{children:[oe.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-2 sm:rf-p-3 rf-rounded-md rf-text-center rf-text-xs sm:rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),oe.jsx(o2i,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:p+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),oe.jsxs("div",{className:"rf-flex rf-flex-col-reverse sm:rf-flex-row rf-justify-between rf-mt-5 rf-gap-3 sm:rf-gap-4",children:[oe.jsx(R0,{variant:"outline",type:"button",className:"rf-w-full sm:rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600 rf-text-sm sm:rf-text-base",onClick:n,children:"Cancel"}),oe.jsx(R0,{type:"button",className:"rf-w-full sm:rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700 rf-text-sm sm:rf-text-base",disabled:r===null,onClick:()=>{if(r===null){ql.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),oe.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-3 sm:rf-mt-4 rf-px-2",children:"Pricing may vary based on specifications."})]})},d2i=({message:n})=>oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[oe.jsx(r3,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),oe.jsx("p",{className:"rf-text-gray-600",children:n})]}),h2i=({message:n})=>oe.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),p2i=({signIn:n})=>oe.jsxs("div",{className:`
|
|
6853
|
+
rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl
|
|
6854
|
+
rf-p-4 sm:rf-p-6 md:rf-p-8
|
|
6855
|
+
rf-flex rf-flex-col rf-gap-3
|
|
6856
|
+
rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl
|
|
6857
|
+
`,children:[oe.jsx("h2",{className:"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4 sm:rf-py-6 md:rf-py-8",children:[oe.jsx("p",{className:"rf-text-gray-600 rf-text-sm sm:rf-text-base rf-text-center rf-px-2",children:"Please sign in to continue"}),oe.jsxs(R0,{onClick:n,className:"rf-flex rf-items-center rf-gap-2 rf-text-sm sm:rf-text-base rf-px-4 sm:rf-px-6",children:[oe.jsx(Fxe,{className:"rf-w-4 rf-h-4 sm:rf-w-5 sm:rf-h-5"}),"Sign in with GitHub"]})]})]}),f2i=new YSi,m2i=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>oe.jsx(QSi,{client:f2i,children:oe.jsx(Eq,{open:n,onOpenChange:c=>{c||e()},children:oe.jsx(W8,{className:`
|
|
6858
|
+
!rf-p-0 !rf-z-[101] rf-rounded-md
|
|
6859
|
+
!rf-w-[95vw] !rf-max-w-[95vw]
|
|
6860
|
+
sm:rf-w-[90vw] sm:rf-max-w-[500px]
|
|
6861
|
+
md:rf-w-auto md:rf-max-w-[660px]
|
|
6862
|
+
lg:rf-max-w-[720px]
|
|
6863
|
+
xl:rf-max-w-[800px]
|
|
6864
|
+
rf-max-h-[90vh] rf-overflow-y-auto
|
|
6865
|
+
`,children:oe.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&oe.jsx(u2i,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),_2i=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=ub(a=>a.circuitJson);return oe.jsx(m2i,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},y2i=()=>{const[n,e]=ce.useState(!1),[t,i]=ce.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:_2i}};async function f5t(){const n=await fetch(`${eS}/files/list`),{file_list:e}=await n.json(),t=new Map;for(const i of e){const o=await(await fetch(`${eS}/files/get?file_path=${encodeURIComponent(i.file_path)}`)).json();(o.file?.text_content||o.file?.binary_content_b64)&&t.set(i.file_path,{text_content:o.file.text_content,binary_content_b64:o.file.binary_content_b64})}return t}const g2i="https://api.tscircuit.com/bug_reports/view?bug_report_id=",x2i=n=>`${g2i}${n}`,b2i=()=>{const[n,e]=ce.useState(!1),[t,i]=ce.useState(!1),[r,o]=ce.useState(null),s=ce.useRef(null),[a,c]=ce.useState(null),[l,u]=ce.useState(0),d=ce.useMemo(()=>CQ()?!0:typeof document>"u"?!1:document.cookie.split(";").some(g=>g.trim().startsWith("session=")),[n]);ce.useEffect(()=>{if(n&&!a&&s.current){const g=typeof window<"u"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;g&&(s.current.value=`I'm getting this execution error:
|
|
6848
6866
|
|
|
6849
6867
|
${g}`)}},[n,a]),ce.useEffect(()=>{n&&!a&&f5t().then(g=>{u(g.size)}).catch(g=>{console.error("Failed to fetch file count",g),u(0)})},[n,a]);const h=ce.useCallback(()=>{o(null),c(null),s.current&&(s.current.value=""),e(!0)},[]),p=ce.useCallback(()=>{e(!1)},[]),m=ce.useCallback(async()=>{i(!0),o(null);const g=wP(),x=s.current?.value||"";try{const b=await f5t();if(b.size===0){ql.error("No project files available to include in the bug report"),i(!1);return}const w=new Date(Date.now()+1440*60*1e3).toISOString(),I=(await g.post("bug_reports/create",{json:{text:x.trim()||void 0,is_auto_deleted:!0,delete_at:w}}).json()).bug_report.bug_report_id;for(const[R,M]of b.entries()){const k={bug_report_id:I,file_path:R};M.text_content&&(k.content_text=M.text_content),M.binary_content_b64&&(k.content_base64=M.binary_content_b64),await g.post("bug_reports/upload_file",{json:k})}const A=x2i(I);c({bugReportUrl:A})}catch(b){if(console.error("Failed to submit bug report",b),b instanceof g7)if(b.response.status===401){const w="You must be logged in to report a bug. Please sign in and try again.";o(w),ql.error(w)}else{const w=`Failed to submit bug report (${b.response.status})`;o(w),ql.error(w)}else if(b instanceof Error)o(b.message),ql.error(b.message);else{const w="Failed to submit bug report";o(w),ql.error(w)}}finally{i(!1)}},[]);return{BugReportDialog:ce.useMemo(()=>oe.jsx(Jpt,{open:n,onOpenChange:g=>{g?(o(null),c(null),e(!0)):t||p()},children:oe.jsxs(Ave,{children:[oe.jsxs(Pve,{children:[oe.jsx(Ive,{children:a?"Bug Report Created":"Report Bug"}),oe.jsx(Nve,{asChild:!0,children:a?oe.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[oe.jsx("p",{children:"Bug report created successfully."}),oe.jsx("div",{children:oe.jsx("a",{className:"rf-text-blue-600 hover:rf-underline",href:a.bugReportUrl,target:"_blank",rel:"noreferrer",children:"View bug report"})}),oe.jsxs("p",{children:["Please share this link privately with tscircuit staff so we can help debug. Join the",oe.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"tscircuit Discord"}),"."]})]}):oe.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[oe.jsxs("p",{children:["Reporting a bug will upload your entire project",l>0?` (${l} file${l===1?"":"s"})`:""," ","to tscircuit support."]}),oe.jsxs("div",{className:"rf-space-y-2",children:[oe.jsx("label",{htmlFor:"bug-description",className:"rf-block rf-font-medium",children:"Description (optional)"}),oe.jsx("textarea",{ref:s,id:"bug-description",className:"rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500",placeholder:"Describe the issue you're experiencing...",disabled:t})]}),oe.jsxs("p",{children:["Share the generated bug report link privately with tscircuit staff so we can help debug your issue. You can also reach out on our",oe.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"Discord community"}),"."]}),!d&&oe.jsx("p",{className:"rf-text-red-600",children:"You appear to be logged out. Please log in before reporting a bug or the upload will fail."}),r&&oe.jsx("p",{className:"rf-text-red-600",children:r})]})})]}),oe.jsx(Rve,{children:a?oe.jsx("button",{type:"button",className:JL(),onClick:()=>{p()},children:"Close"}):oe.jsxs(oe.Fragment,{children:[oe.jsx(kve,{disabled:t,onClick:()=>{t||p()},children:"Cancel"}),oe.jsx("button",{type:"button",className:V2(JL(),t&&"rf-opacity-70 rf-cursor-not-allowed"),disabled:t,onClick:g=>{g.preventDefault(),m()},children:t?"Reporting...":"Upload & Report"})]})})]})},"bug-report-dialog"),[n,t,p,r,a,l,d,m]),openBugReportDialog:h}},C7=n=>{const e=gq(ae=>ae.lastRunEvalVersion),t=ub(ae=>ae.currentMainComponentPath),[i,r]=ce.useState(null),[o,s]=ce.useState(!1),[a,c]=ce.useState(!0),[l,u]=ce.useState(!1),[d,h]=ce.useState(null),[p,m]=ce.useState(null),[_,g]=ce.useState(!1),[x,b]=ce.useState(null),[w,E]=ce.useState(null),[I,A]=ce.useState(!1),[R,M]=ce.useState(!1),k=y2i(),C=ub(ae=>ae.pushEvent),U=ub(ae=>ae.recentEvents),O=ce.useMemo(()=>Date.now(),[]);Vjn(ae=>{if(!(new Date(ae.created_at).valueOf()<O+500)){if(ae.event_type==="FILE_UPDATED"){s(!0);return}if(ae.event_type==="SNIPPET_SAVED"){s(!1),c(!1),b("Snippet saved successfully."),A(!1);return}ae.event_type==="REQUEST_EXPORT"&&(M(!0),b("Export processing..."),A(!1)),ae.event_type==="EXPORT_CREATED"&&(b(`Export created: ${ae.exportFilePath}`),A(!1),M(!1))}}),ce.useEffect(()=>{if(!l||d===null)return;const ae=U.filter(Me=>new Date(Me.created_at).valueOf()>d),de=ae.find(Me=>Me.event_type==="FAILED_TO_SAVE_SNIPPET"),Te=ae.find(Me=>Me.event_type==="SNIPPET_SAVED");de&&(u(!1),h(null),E(de.message??"Failed to save snippet. See console for error."),console.error(de.message),A(!0),de.error_code==="SNIPPET_UNSET"&&de.available_snippet_names&&(m(de.available_snippet_names),g(!0))),Te&&(u(!1),h(null),b("Snippet saved successfully."),A(!1))},[U,l]);const H=async()=>{u(!0),h(Date.now()),b(null),A(!1),await C({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:i})},X=ub(ae=>ae.circuitJson)??n.circuitJson,[K,J]=ce.useState(!1),[le,pe]=ce.useState(!1),{BugReportDialog:ve,openBugReportDialog:re}=b2i();return oe.jsxs(oe.Fragment,{children:[oe.jsxs(w1e,{children:[oe.jsx(S1e,{asChild:!0,children:oe.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),oe.jsxs(eY,{className:"rf-z-[101]",children:[!n.isWebEmbedded&&oe.jsxs(oe.Fragment,{children:[oe.jsx(gb,{className:"rf-text-xs",onSelect:H,disabled:l,children:l?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&oe.jsx(gb,{className:"rf-text-xs",onSelect:()=>{k.open()},children:"Order"}),oe.jsx(gb,{className:"rf-text-xs",onSelect:()=>J(!0),disabled:l,children:"Import"}),oe.jsx(gb,{className:"rf-text-xs",onSelect:()=>{if(!CQ()){ql.error("Requires tscircuit token");return}pe(!0)},children:"AI Review"})]}),!n.isWebEmbedded&&oe.jsx(gb,{className:"rf-text-xs",onSelect:()=>{re()},children:"Report Bug"}),oe.jsxs(T1e,{children:[oe.jsx(QG,{className:"rf-text-xs",disabled:R,children:R?"Exporting...":"Export"}),oe.jsx(E1e,{children:oe.jsx(JG,{children:xwi.map((ae,de)=>oe.jsx(gb,{onSelect:()=>{if(!X){ql.error("No Circuit JSON to export");return}let Te="Untitled";if(t){const Me=t.split("/").pop();Me&&(Te=Me.replace(/\.[^.]+$/,""))}bwi({exportName:ae.name,circuitJson:X,projectName:n.projectName??i??Te})},disabled:R,children:oe.jsx("span",{className:"rf-text-xs",children:ae.name})},de))})})]}),!n.isWebEmbedded&&oe.jsxs(T1e,{children:[oe.jsx(QG,{className:"rf-text-xs",children:"Advanced"}),oe.jsx(E1e,{children:oe.jsxs(JG,{children:[oe.jsx(gb,{className:"rf-flex rf-items-center rf-gap-2",children:oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[oe.jsx(cft,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:ae=>{n.onChangeShouldLoadLatestEval?.(ae===!0)}}),oe.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&oe.jsx(gb,{className:"rf-flex rf-items-center rf-gap-2",children:oe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:oe.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),oe.jsx(gb,{className:"rf-flex rf-items-center rf-gap-2",children:oe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:oe.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/runframe@",Bjn.version]})})}),oe.jsx(gb,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:oe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:oe.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),oe.jsx(Jpt,{open:I,onOpenChange:A,children:oe.jsxs(Ave,{children:[oe.jsxs(Pve,{children:[oe.jsx(Ive,{children:"Error Saving Snippet"}),oe.jsx(Nve,{children:w})]}),oe.jsx(Rve,{children:oe.jsx(kve,{onClick:()=>A(!1),children:"Dismiss"})})]})}),oe.jsx(Hjn,{snippetNames:p??[],onSelect:async ae=>{u(!0),h(Date.now()),r(ae),await C({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:ae}),g(!1)},onCancel:()=>g(!1),isOpen:_})]}),ve,oe.jsx(Wwt,{isOpen:K,onClose:()=>J(!1)}),oe.jsx(CSi,{isOpen:le,onClose:()=>pe(!1),packageName:i}),oe.jsx(i6n,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{className:"rf-break-all",style:{zIndex:1e5}}}),oe.jsx(k.OrderDialog,{isOpen:k.isOpen,onClose:k.close,stage:k.stage,setStage:k.setStage})]})},v2i=["assembly","pinout","bom","circuit_json","errors","render_log"],m5t=({code:n,fsMap:e,onRunClicked:t=void 0,errorMessage:i,errorStack:r,circuitJson:o,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:d=!0,onActiveTabChange:h,renderLog:p,showImportAndFormatButtons:m=!0,className:_,headerClassName:g,leftHeaderContent:x,readOnly:b,isStreaming:w,autoroutingLog:E,onReportAutoroutingLog:I,isRunningCode:A,hasCodeChangedSinceLastRun:R,onEditEvent:M,editEvents:k,defaultActiveTab:C,defaultTab:U,availableTabs:O,autoRotate3dViewerDisabled:H,showSchematicDebugGrid:Y=!1,showToggleFullScreen:X=!0,defaultToFullScreen:K=!1,activeEffectName:J,allowSelectingVersion:le=!0,showFileMenu:pe=!1,isWebEmbedded:ve=!1,projectName:re,onRerunWithDebug:ae})=>{yq();const{versions:de,latestVersion:Te,lastRunEvalVersion:Me,search:Oe,setSearch:$e,selectVersion:Ae}=jjn(le),se=ce.useMemo(()=>o?o.filter(De=>De&&"error_type"in De||De.type.includes("error")):null,[o]),Se=ce.useMemo(()=>o?o.filter(De=>De&&"warning_type"in De||De.type.includes("warning")):null,[o]);mpt({errorMessage:i,errorStack:r,circuitJsonErrors:se});const[xe,Ve]=cN("runframe-active-tab",C??U??O?.[0]??"pcb"),[tt,ct]=ce.useState(null),[Ce,Qe]=ce.useState(K);zjn(Ce);const Xe=ce.useCallback(De=>{Ve(De),h?.(De)},[h,Ve]),Ge=()=>{Qe(!Ce)};ce.useEffect(()=>{i&&(xe!=="errors"&&ct(xe),Xe("errors"))},[i]),ce.useEffect(()=>{(xe==="code"||xe==="errors")&&o&&!i&&Xe(tt??C??U??O?.[0]??"pcb")},[o]);const et=ce.useCallback(De=>{window.TSCIRCUIT_3D_OBJECT_REF=De===null?void 0:De},[]);return oe.jsx("div",{className:co("flex flex-col relative rf-overflow-x-hidden rf-h-full",_),children:oe.jsx("div",{className:co("rf-md:sticky rf-md:top-2 rf-h-full",Ce&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:oe.jsxs(Uce,{value:xe,onValueChange:Xe,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[oe.jsxs("div",{className:co("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[x,pe&&!x&&oe.jsx(C7,{isWebEmbedded:ve,circuitJson:o,projectName:re}),(x||pe)&&oe.jsx("div",{className:"rf-flex-grow"}),!x&&!pe&&A&&oe.jsx(r3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!x&&!pe&&oe.jsx("div",{className:"rf-flex-grow"}),p&&p.progress!==1&&!i&&oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[J?oe.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:J,children:J}):p.lastRenderEvent&&oe.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:p.lastRenderEvent?.phase??"",children:p.lastRenderEvent?.phase??""}),oe.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:oe.jsx(r3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),oe.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),"%"]})]}),a&&oe.jsxs(Xj,{children:[c&&oe.jsx(F5,{value:"code",children:"Code"}),!O||O.includes("pcb")?oe.jsxs(F5,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&oe.jsx("span",{className:co("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",R?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!O||O.includes("schematic")?oe.jsxs(F5,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&oe.jsx("span",{className:co("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",R?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!O||O.includes("cad")?oe.jsxs(F5,{value:"cad",children:[o&&oe.jsx("span",{className:co("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",R?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(xe)&&oe.jsx(F5,{value:xe,children:CUe(xe)}),oe.jsxs(w1e,{children:[oe.jsx(S1e,{asChild:!0,children:oe.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[oe.jsx(b9n,{className:"rf-w-4 rf-h-4"}),(se&&se.length>0||i)&&oe.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"})]})}),oe.jsxs(eY,{className:"rf-*:text-xs rf-z-[101]",children:[v2i.filter(De=>!O||O.includes(De)).map(De=>oe.jsxs(gb,{onSelect:()=>Xe(De),children:[xe!==De&&oe.jsx(Frt,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),xe===De&&oe.jsx(aC,{className:"rf-w-3 rf-h-3"}),oe.jsx("div",{className:"rf-pr-2",children:CUe(De)}),De==="errors"&&(se&&se.length>0||i)&&oe.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:i?1:se?.length})]},De)),oe.jsx(gb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:oe.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",_pt.split(".").map((De,ke)=>ke===2?parseInt(De)+1:De).join(".")]})}),le?oe.jsxs(T1e,{onOpenChange:De=>!De&&$e(""),children:[oe.jsx(QG,{className:"rf-text-xs rf-opacity-60",children:oe.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Me??Te??"latest"]})}),oe.jsx(E1e,{children:oe.jsxs(JG,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[oe.jsx("div",{className:"rf-p-1",children:oe.jsx(xbe,{value:Oe,onChange:De=>$e(De.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),oe.jsx(Vst,{}),oe.jsx(gb,{onSelect:()=>Ae(null),children:Te?`${Te} (latest)`:"latest"}),de.map(De=>oe.jsx(gb,{onSelect:()=>Ae(De),children:De},De))]})})]}):Me&&oe.jsx(gb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:oe.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Me]})})]})]})]}),X&&oe.jsx(R0,{onClick:Ge,variant:"ghost",children:Ce?oe.jsx(P9n,{size:16}):oe.jsx(C9n,{size:16})})]}),c&&oe.jsx(rS,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:oe.jsx("div",{className:"rf-h-full",children:l})}),(!O||O.includes("pcb"))&&oe.jsx(rS,{value:"pcb",children:oe.jsx("div",{className:co("rf-overflow-hidden",Ce?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:oe.jsx(sC,{fallbackRender:({error:De})=>oe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:oe.jsxs("div",{className:"rf-p-4",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),oe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:De?.message||"An unknown error occurred"})]})}),children:o?oe.jsx(Ljn,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:co("rf-h-full rf-w-full",Ce?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:De=>{if(M)for(const ke of De)M(ke)}}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("assembly"))&&oe.jsx(rS,{value:"assembly",children:oe.jsx("div",{className:co("rf-overflow-auto",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:oe.jsx(sC,{fallback:oe.jsx("div",{children:"Error loading Assembly"}),children:o?oe.jsx(G$n,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("pinout"))&&oe.jsx(rS,{value:"pinout",children:oe.jsx("div",{className:co("rf-overflow-auto",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:oe.jsx(sC,{fallback:oe.jsx("div",{children:"Error loading Pinout Viewer"}),children:o?oe.jsx(Y$n,{circuitJson:o,containerStyle:{height:"100%"}}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("schematic"))&&oe.jsx(rS,{value:"schematic",children:oe.jsx("div",{className:co("rf-overflow-auto rf-bg-white",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:oe.jsx(sC,{fallbackRender:({error:De})=>oe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:oe.jsxs("div",{className:"rf-p-4",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),oe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:De?.message||"An unknown error occurred"})]})}),children:o?oe.jsx(V$n,{spiceSimulationEnabled:!0,circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:De=>{M?.(De)},debugGrid:Y}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("cad"))&&oe.jsx(rS,{value:"cad",children:oe.jsx("div",{className:co("rf-overflow-auto",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:oe.jsx(sC,{FallbackComponent:n9n,children:o?oe.jsx(e9n,{ref:et,circuitJson:o,autoRotateDisabled:H}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("bom"))&&oe.jsx(rS,{value:"bom",children:oe.jsx("div",{className:co("rf-overflow-auto",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:oe.jsx(sC,{fallbackRender:({error:De})=>oe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:oe.jsxs("div",{className:"rf-p-4",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),oe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:De?.message||"An unknown error occurred"})]})}),children:o?oe.jsx(Z$n,{circuitJson:o}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("circuit_json"))&&oe.jsx(rS,{value:"circuit_json",children:oe.jsx("div",{className:co("rf-overflow-auto",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:oe.jsx(sC,{fallback:oe.jsx("div",{children:"Error loading JSON viewer"}),children:o?oe.jsx(W$n,{elements:o}):oe.jsx(vC,{onRunClicked:t})})})}),(!O||O.includes("errors"))&&oe.jsx(rS,{value:"errors",children:oe.jsx("div",{className:co("rf-overflow-auto",Ce?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||se&&se.length>0||o?oe.jsx(r6n,{code:n,fsMap:e,circuitJsonErrors:se,circuitJsonWarnings:Se,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:Me,autoroutingLog:E,onReportAutoroutingLog:I}):oe.jsx(vC,{onRunClicked:t})})}),d&&(!O||O.includes("render_log"))&&oe.jsx(rS,{value:"render_log",children:oe.jsx(Ujn,{renderLog:p,onRerunWithDebug:ae})})]})})})};/**
|
|
6850
6868
|
* @license
|