@tscircuit/runframe 0.0.555 → 0.0.556
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.
|
@@ -1105,7 +1105,7 @@ var RenderLogViewer = ({
|
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
1107
1107
|
// package.json
|
|
1108
|
-
var version = "0.0.
|
|
1108
|
+
var version = "0.0.555";
|
|
1109
1109
|
|
|
1110
1110
|
// lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
|
|
1111
1111
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED
|
@@ -13071,7 +13071,7 @@ ${l.join(`
|
|
|
13071
13071
|
`)!==-1&&(r=r.replace(/\r\n/g,`
|
|
13072
13072
|
`)),r.indexOf(`\\
|
|
13073
13073
|
`)!==-1&&(r=r.replace(/\\\n/g,""));const t=r.split(`
|
|
13074
|
-
`);let n="",i="",a=0,o=[];const s=typeof"".trimLeft=="function";for(let A=0,u=t.length;A<u;A++)if(n=t[A],n=s?n.trimLeft():n.trim(),a=n.length,a!==0&&(i=n.charAt(0),i!=="#"))if(i==="v"){const d=n.split(/\s+/);switch(d[0]){case"v":e.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),d.length>=7?e.colors.push(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6])):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":e.uvs.push(parseFloat(d[1]),parseFloat(d[2]));break}}else if(i==="f"){const g=n.substr(1).trim().split(/\s+/),m=[];for(let C=0,_=g.length;C<_;C++){const x=g[C];if(x.length>0){const Q=x.split("/");m.push(Q)}}const E=m[0];for(let C=1,_=m.length-1;C<_;C++){const x=m[C],Q=m[C+1];e.addFace(E[0],x[0],Q[0],E[1],x[1],Q[1],E[2],x[2],Q[2])}}else if(i==="l"){const d=n.substring(1).trim().split(" ");let g=[];const m=[];if(n.indexOf("/")===-1)g=d;else for(let E=0,C=d.length;E<C;E++){const _=d[E].split("/");_[0]!==""&&g.push(_[0]),_[1]!==""&&m.push(_[1])}e.addLineGeometry(g,m)}else if(i==="p"){const g=n.substr(1).trim().split(" ");e.addPointGeometry(g)}else if((o=mNt.exec(n))!==null){const d=(" "+o[0].substr(1).trim()).substr(1);e.startObject(d)}else if(vNt.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(yNt.test(n))e.materialLibraries.push(n.substring(7).trim());else if(INt.test(n))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(i==="s"){if(o=n.split(" "),o.length>1){const g=o[1].trim().toLowerCase();e.object.smooth=g!=="0"&&g!=="off"}else e.object.smooth=!0;const d=e.object.currentMaterial();d&&(d.smooth=e.object.smooth)}else{if(n==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}e.finalize();const l=new VQ;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let A=0,u=e.objects.length;A<u;A++){const d=e.objects[A],g=d.geometry,m=d.materials,E=g.type==="Line",C=g.type==="Points";let _=!1;if(g.vertices.length===0)continue;const x=new xf;x.setAttribute("position",new Kc(g.vertices,3)),g.normals.length>0&&x.setAttribute("normal",new Kc(g.normals,3)),g.colors.length>0&&(_=!0,x.setAttribute("color",new Kc(g.colors,3))),g.hasUVIndices===!0&&x.setAttribute("uv",new Kc(g.uvs,2));const Q=[];for(let z=0,O=m.length;z<O;z++){const V=m[z],j=V.name+"_"+V.smooth+"_"+_;let q=e.materials[j];if(this.materials!==null){if(q=this.materials.create(V.name),E&&q&&!(q instanceof W1)){const J=new W1;PE.prototype.copy.call(J,q),J.color.copy(q.color),q=J}else if(C&&q&&!(q instanceof qQ)){const J=new qQ({size:10,sizeAttenuation:!1});PE.prototype.copy.call(J,q),J.color.copy(q.color),J.map=q.map,q=J}}q===void 0&&(E?q=new W1:C?q=new qQ({size:1,sizeAttenuation:!1}):q=new wF,q.name=V.name,q.flatShading=!V.smooth,q.vertexColors=_,e.materials[j]=q),Q.push(q)}let P;if(Q.length>1){for(let z=0,O=m.length;z<O;z++){const V=m[z];x.addGroup(V.groupStart,V.groupCount,z)}E?P=new xx(x,Q):C?P=new fR(x,Q):P=new $y(x,Q)}else E?P=new xx(x,Q[0]):C?P=new fR(x,Q[0]):P=new $y(x,Q[0]);P.name=d.name,l.add(P)}else if(e.vertices.length>0){const A=new qQ({size:1,sizeAttenuation:!1}),u=new xf;u.setAttribute("position",new Kc(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(u.setAttribute("color",new Kc(e.colors,3)),A.vertexColors=!0);const d=new fR(u,A);l.add(d)}return l}};function _Nt({stlUrl:r,mtlUrl:e,color:t,opacity:n=1}){const i=tte(hNt,r),a=yt.useRef();return dt.jsxs("mesh",{ref:a,children:[dt.jsx("primitive",{object:i,attach:"geometry"}),dt.jsx("meshStandardMaterial",{color:t,transparent:n!==1,opacity:n})]})}var BNt={version:"0.0.259"};typeof window<"u"&&(window.TSCI_MAIN_CAMERA_ROTATION=new bB(0,0,0));function xNt(r,e){const t=new n_().setFromEuler(new bB(r.x,r.y,r.z)),n=new zn(0,0,1);return n.applyQuaternion(t),n.multiplyScalar(e)}var bNt=({})=>{const r=yt.useRef();return yt.useRef({lastRotation:new bB}),NR((e,t)=>{if(!r.current)return;const n=window.TSCI_MAIN_CAMERA_ROTATION,i=xNt(n,2);e.camera.position.copy(i),e.camera.lookAt(0,0,0)}),dt.jsxs("mesh",{ref:r,rotation:[Math.PI/2,0,0],children:[dt.jsx("boxGeometry",{args:[1,1,1]}),dt.jsx("meshStandardMaterial",{color:"white"}),dt.jsx(dw,{position:[0,0,.51],fontSize:.25,color:"black",children:"Front"}),dt.jsx(dw,{position:[0,0,-.51],fontSize:.25,color:"black",rotation:[0,Math.PI,0],children:"Back"}),dt.jsx(dw,{position:[.51,0,0],fontSize:.25,color:"black",rotation:[0,Math.PI/2,0],children:"Right"}),dt.jsx(dw,{position:[-.51,0,0],fontSize:.25,color:"black",rotation:[0,-Math.PI/2,0],children:"Left"}),dt.jsx(dw,{position:[0,.51,0],fontSize:.25,color:"black",rotation:[-Math.PI/2,0,0],children:"Top"}),dt.jsx(dw,{position:[0,-.51,0],fontSize:.25,color:"black",rotation:[Math.PI/2,0,0],children:"Bottom"}),dt.jsx("lineSegments",{args:[new mee(new Q2(1,1,1))],material:new W1({color:0,linewidth:2})})]})},SNt=()=>(NR(({camera:r})=>{window.TSCI_MAIN_CAMERA_ROTATION=r.rotation}),dt.jsx(dt.Fragment,{})),yNe=yt.forwardRef(({children:r,initialCameraPosition:e=[5,5,5],autoRotateDisabled:t,clickToInteractEnabled:n=!1},i)=>{const[a,o]=yt.useState(!n);return dt.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[dt.jsx("div",{style:{position:"absolute",top:0,left:0,width:120,height:120},children:dt.jsxs(W2e,{camera:{up:[0,0,1],position:[1,1,1]},style:{zIndex:10},children:[dt.jsx("ambientLight",{intensity:Math.PI/2}),dt.jsx(bNt,{})]})}),dt.jsxs(W2e,{scene:{up:[0,0,1]},camera:{up:[0,0,1],position:e},children:[dt.jsx(SNt,{}),a&&dt.jsx(JCt,{autoRotate:!t,autoRotateSpeed:1}),dt.jsx("ambientLight",{intensity:Math.PI/2}),dt.jsx("pointLight",{position:[-10,-10,10],decay:0,intensity:Math.PI/4}),dt.jsx(WCt,{rotation:[Math.PI/2,0,0],infiniteGrid:!0,cellSize:1,sectionSize:10}),dt.jsx("object3D",{ref:i,children:r})]}),dt.jsxs("div",{style:{position:"absolute",right:24,bottom:24,fontFamily:"sans-serif",color:"white",WebkitTextStroke:"0.5px rgba(0, 0, 0, 0.5)",fontSize:11},children:["@",BNt.version]}),n&&!a&&dt.jsx("div",{onClick:()=>o(!0),style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})})]})}),QNt=wI(VM()),wNt=wI(T5()),gm=.01,eE={copper:[.9,.6,.2],fr4Green:[5/255,163/255,46/255],fr4GreenSolderWithMask:[0/255,152/255,19/255],fr1Copper:[.8,.4,.2],fr1CopperSolderWithMask:[.9,.6,.2]},KM=.001,bw=32,MNt=.035,fG=50,Ore={fr1:eE.fr1Copper,fr4:eE.fr4Green},vNe={fr1:eE.fr1CopperSolderWithMask,fr4:eE.fr4GreenSolderWithMask},DNt=wI(cG()),RNt=wI(VM()),NNt=wI(dG()),INe=r=>{let e=0;for(let n=0;n<r.length;n++){const i=(n+1)%r.length;e+=r[n][0]*r[i][1],e-=r[i][0]*r[n][1]}return e/2<=0},CNe=(r,e=1.2)=>{const{center:t,outline:n}=r;let i=n.map(s=>[s.x,s.y]);INe(i)&&(i=i.reverse());const a=(0,RNt.polygon)({points:i});let o=(0,DNt.extrudeLinear)({height:e},a);return o=(0,NNt.translate)([t.x,t.y,-e/2],o),o},TNt=r=>{const e=hm(r).pcb_board.list()[0];if(!e)return console.warn("No pcb_board found for simplified geometry"),[];let t;const n=1.2;e.outline&&e.outline.length>0?t=CNe({center:e.center,outline:e.outline},n):t=(0,QNt.cuboid)({size:[e.width,e.height,n],center:[e.center.x,e.center.y,0]});const i=Ore[e.material]??eE.fr4Green;return[(0,wNt.colorize)(i,t)]},Sw=wI(dG()),k_=wI(VM()),JM=wI(T5()),Qw=wI(Tre()),nv=wI(VM()),hG=wI(T5()),$B=wI(Tre()),_C=.05,ENe=(r,e)=>{if(r.shape||(r.shape="circle"),r.shape==="circle")return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)((0,nv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:e.pcbThickness}),(0,nv.cylinder)({center:[r.x,r.y,e.pcbThickness/2+_C/2+gm],radius:r.outer_diameter/2,height:_C}),(0,nv.cylinder)({center:[r.x,r.y,-e.pcbThickness/2-_C/2-gm],radius:r.outer_diameter/2,height:_C})),(0,nv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2-gm,height:1.5})));if(r.shape==="circular_hole_with_rect_pad"){const t=r.rect_pad_width||r.hole_diameter,n=r.rect_pad_height||r.hole_diameter;return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)((0,nv.cuboid)({center:[r.x,r.y,1.2/2],size:[t,n,_C]}),(0,nv.cuboid)({center:[r.x,r.y,-1.2/2],size:[t,n,_C]}),(0,nv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:1.2})),(0,nv.cylinder)({center:[r.x,r.y,0],radius:Math.max(r.hole_diameter/2-gm,.01),height:1.5})))}if(r.shape==="pill"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=t?r.outer_height||i+.2:r.outer_width||n+.2,o=t?r.outer_width||n+.2:r.outer_height||i+.2,s=i/2,l=o/2,c=Math.abs(n-i),A=Math.abs(a-o),u=(0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i,c,e.pcbThickness]:[c,i,e.pcbThickness]}),d=(0,nv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s,height:e.pcbThickness}),g=(0,nv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s,height:e.pcbThickness}),m=(0,$B.union)(u,d,g),E=e.pcbThickness/2+_C/2+gm,C=(0,nv.cuboid)({center:[r.x,r.y,E],size:t?[o,A,_C]:[A,o,_C]}),_=(0,nv.cylinder)({center:t?[r.x,r.y-A/2,E]:[r.x-A/2,r.y,E],radius:l,height:_C}),x=(0,nv.cylinder)({center:t?[r.x,r.y+A/2,E]:[r.x+A/2,r.y,E],radius:l,height:_C}),Q=(0,$B.union)(C,_,x),P=-e.pcbThickness/2-_C/2-gm,z=(0,nv.cuboid)({center:[r.x,r.y,P],size:t?[o,A,_C]:[A,o,_C]}),O=(0,nv.cylinder)({center:t?[r.x,r.y-A/2,P]:[r.x-A/2,r.y,P],radius:l,height:_C}),V=(0,nv.cylinder)({center:t?[r.x,r.y+A/2,P]:[r.x+A/2,r.y,P],radius:l,height:_C}),j=(0,$B.union)(z,O,V),q=(0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i-2*gm,c,e.pcbThickness+2*gm]:[c,i-2*gm,e.pcbThickness+2*gm]}),J=(0,nv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s-gm,height:e.pcbThickness+2*gm}),ce=(0,nv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s-gm,height:e.pcbThickness+2*gm}),oe=(0,$B.union)(q,J,ce);return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)(m,Q,j),oe))}if(r.shape==="pill_hole_with_rect_pad"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=i/2,o=Math.abs(n-i),s=r.rect_pad_width||n+.2,l=r.rect_pad_height||i+.2,c=(0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i,o,1.2]:[o,i,1.2]}),A=(0,nv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a,height:1.2}),u=(0,nv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a,height:1.2}),d=(0,nv.cuboid)({center:[r.x,r.y,1.2/2],size:[s,l,_C]}),g=(0,nv.cuboid)({center:[r.x,r.y,-1.2/2],size:[s,l,_C]}),m=(0,$B.union)((0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i-_C,o,1.5]:[o,i-_C,1.5]}),(0,nv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a-_C,height:1.5}),(0,nv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a-_C,height:1.5}));return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)(c,A,u,d,g),m))}else throw new Error(`Unsupported plated hole shape: ${r.shape}`)},gG=wI(cG()),_Ne=wI(Pre()),PNt=wI(Ure());function BNe(r,e){return Array.isArray(e)?[r.a*e[0]+r.c*e[1]+r.e,r.b*e[0]+r.d*e[1]+r.f]:{x:r.a*e.x+r.c*e.y+r.e,y:r.b*e.x+r.d*e.y+r.f}}function z2(r,e=0){return{a:1,c:0,e:r,b:0,d:1,f:e}}function xNe(...r){r=Array.isArray(r[0])?r[0]:r;const e=(t,n)=>({a:t.a*n.a+t.c*n.b,c:t.a*n.c+t.c*n.d,e:t.a*n.e+t.c*n.f+t.e,b:t.b*n.a+t.d*n.b,d:t.b*n.c+t.d*n.d,f:t.b*n.e+t.d*n.f+t.f});switch(r.length){case 0:throw new Error("no matrices provided");case 1:return r[0];case 2:return e(r[0],r[1]);default:{const[t,n,...i]=r,a=e(t,n);return xNe(a,...i)}}}function bNe(...r){return xNe(...r)}var{cos:UNt,sin:FNt}=Math;function SNe(r,e,t){const n=UNt(r),i=FNt(r);return{a:n,c:-i,e:0,b:i,d:n,f:0}}function kNt(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function pG(r,e,t,n){var i=Error.call(this,r);return Object.setPrototypeOf&&Object.setPrototypeOf(i,pG.prototype),i.expected=e,i.found=t,i.location=n,i.name="SyntaxError",i}kNt(pG,Error);function zre(r,e,t){return t=t||" ",r.length>e?r:(e-=r.length,t+=t.repeat(e),r+t.slice(0,e))}pG.prototype.format=function(r){var e="Error: "+this.message;if(this.location){var t=null,n;for(n=0;n<r.length;n++)if(r[n].source===this.location.source){t=r[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,o=this.location.source+":"+a.line+":"+a.column;if(t){var s=this.location.end,l=zre("",a.line.toString().length," "),c=t[i.line-1],A=i.line===s.line?s.column:c.length+1,u=A-i.column||1;e+=`
|
|
13074
|
+
`);let n="",i="",a=0,o=[];const s=typeof"".trimLeft=="function";for(let A=0,u=t.length;A<u;A++)if(n=t[A],n=s?n.trimLeft():n.trim(),a=n.length,a!==0&&(i=n.charAt(0),i!=="#"))if(i==="v"){const d=n.split(/\s+/);switch(d[0]){case"v":e.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),d.length>=7?e.colors.push(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6])):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":e.uvs.push(parseFloat(d[1]),parseFloat(d[2]));break}}else if(i==="f"){const g=n.substr(1).trim().split(/\s+/),m=[];for(let C=0,_=g.length;C<_;C++){const x=g[C];if(x.length>0){const Q=x.split("/");m.push(Q)}}const E=m[0];for(let C=1,_=m.length-1;C<_;C++){const x=m[C],Q=m[C+1];e.addFace(E[0],x[0],Q[0],E[1],x[1],Q[1],E[2],x[2],Q[2])}}else if(i==="l"){const d=n.substring(1).trim().split(" ");let g=[];const m=[];if(n.indexOf("/")===-1)g=d;else for(let E=0,C=d.length;E<C;E++){const _=d[E].split("/");_[0]!==""&&g.push(_[0]),_[1]!==""&&m.push(_[1])}e.addLineGeometry(g,m)}else if(i==="p"){const g=n.substr(1).trim().split(" ");e.addPointGeometry(g)}else if((o=mNt.exec(n))!==null){const d=(" "+o[0].substr(1).trim()).substr(1);e.startObject(d)}else if(vNt.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(yNt.test(n))e.materialLibraries.push(n.substring(7).trim());else if(INt.test(n))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(i==="s"){if(o=n.split(" "),o.length>1){const g=o[1].trim().toLowerCase();e.object.smooth=g!=="0"&&g!=="off"}else e.object.smooth=!0;const d=e.object.currentMaterial();d&&(d.smooth=e.object.smooth)}else{if(n==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}e.finalize();const l=new VQ;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let A=0,u=e.objects.length;A<u;A++){const d=e.objects[A],g=d.geometry,m=d.materials,E=g.type==="Line",C=g.type==="Points";let _=!1;if(g.vertices.length===0)continue;const x=new xf;x.setAttribute("position",new Kc(g.vertices,3)),g.normals.length>0&&x.setAttribute("normal",new Kc(g.normals,3)),g.colors.length>0&&(_=!0,x.setAttribute("color",new Kc(g.colors,3))),g.hasUVIndices===!0&&x.setAttribute("uv",new Kc(g.uvs,2));const Q=[];for(let z=0,O=m.length;z<O;z++){const V=m[z],j=V.name+"_"+V.smooth+"_"+_;let q=e.materials[j];if(this.materials!==null){if(q=this.materials.create(V.name),E&&q&&!(q instanceof W1)){const J=new W1;PE.prototype.copy.call(J,q),J.color.copy(q.color),q=J}else if(C&&q&&!(q instanceof qQ)){const J=new qQ({size:10,sizeAttenuation:!1});PE.prototype.copy.call(J,q),J.color.copy(q.color),J.map=q.map,q=J}}q===void 0&&(E?q=new W1:C?q=new qQ({size:1,sizeAttenuation:!1}):q=new wF,q.name=V.name,q.flatShading=!V.smooth,q.vertexColors=_,e.materials[j]=q),Q.push(q)}let P;if(Q.length>1){for(let z=0,O=m.length;z<O;z++){const V=m[z];x.addGroup(V.groupStart,V.groupCount,z)}E?P=new xx(x,Q):C?P=new fR(x,Q):P=new $y(x,Q)}else E?P=new xx(x,Q[0]):C?P=new fR(x,Q[0]):P=new $y(x,Q[0]);P.name=d.name,l.add(P)}else if(e.vertices.length>0){const A=new qQ({size:1,sizeAttenuation:!1}),u=new xf;u.setAttribute("position",new Kc(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(u.setAttribute("color",new Kc(e.colors,3)),A.vertexColors=!0);const d=new fR(u,A);l.add(d)}return l}};function _Nt({stlUrl:r,mtlUrl:e,color:t,opacity:n=1}){const i=tte(hNt,r),a=yt.useRef();return dt.jsxs("mesh",{ref:a,children:[dt.jsx("primitive",{object:i,attach:"geometry"}),dt.jsx("meshStandardMaterial",{color:t,transparent:n!==1,opacity:n})]})}var BNt={version:"0.0.260"};typeof window<"u"&&(window.TSCI_MAIN_CAMERA_ROTATION=new bB(0,0,0));function xNt(r,e){const t=new n_().setFromEuler(new bB(r.x,r.y,r.z)),n=new zn(0,0,1);return n.applyQuaternion(t),n.multiplyScalar(e)}var bNt=({})=>{const r=yt.useRef();return yt.useRef({lastRotation:new bB}),NR((e,t)=>{if(!r.current)return;const n=window.TSCI_MAIN_CAMERA_ROTATION,i=xNt(n,2);e.camera.position.copy(i),e.camera.lookAt(0,0,0)}),dt.jsxs("mesh",{ref:r,rotation:[Math.PI/2,0,0],children:[dt.jsx("boxGeometry",{args:[1,1,1]}),dt.jsx("meshStandardMaterial",{color:"white"}),dt.jsx(dw,{position:[0,0,.51],fontSize:.25,color:"black",children:"Front"}),dt.jsx(dw,{position:[0,0,-.51],fontSize:.25,color:"black",rotation:[0,Math.PI,0],children:"Back"}),dt.jsx(dw,{position:[.51,0,0],fontSize:.25,color:"black",rotation:[0,Math.PI/2,0],children:"Right"}),dt.jsx(dw,{position:[-.51,0,0],fontSize:.25,color:"black",rotation:[0,-Math.PI/2,0],children:"Left"}),dt.jsx(dw,{position:[0,.51,0],fontSize:.25,color:"black",rotation:[-Math.PI/2,0,0],children:"Top"}),dt.jsx(dw,{position:[0,-.51,0],fontSize:.25,color:"black",rotation:[Math.PI/2,0,0],children:"Bottom"}),dt.jsx("lineSegments",{args:[new mee(new Q2(1,1,1))],material:new W1({color:0,linewidth:2})})]})},SNt=()=>(NR(({camera:r})=>{window.TSCI_MAIN_CAMERA_ROTATION=r.rotation}),dt.jsx(dt.Fragment,{})),yNe=yt.forwardRef(({children:r,initialCameraPosition:e=[5,5,5],autoRotateDisabled:t,clickToInteractEnabled:n=!1},i)=>{const[a,o]=yt.useState(!n);return dt.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[dt.jsx("div",{style:{position:"absolute",top:0,left:0,width:120,height:120},children:dt.jsxs(W2e,{camera:{up:[0,0,1],position:[1,1,1]},style:{zIndex:10},children:[dt.jsx("ambientLight",{intensity:Math.PI/2}),dt.jsx(bNt,{})]})}),dt.jsxs(W2e,{scene:{up:[0,0,1]},camera:{up:[0,0,1],position:e},children:[dt.jsx(SNt,{}),a&&dt.jsx(JCt,{autoRotate:!t,autoRotateSpeed:1}),dt.jsx("ambientLight",{intensity:Math.PI/2}),dt.jsx("pointLight",{position:[-10,-10,10],decay:0,intensity:Math.PI/4}),dt.jsx(WCt,{rotation:[Math.PI/2,0,0],infiniteGrid:!0,cellSize:1,sectionSize:10}),dt.jsx("object3D",{ref:i,children:r})]}),dt.jsxs("div",{style:{position:"absolute",right:24,bottom:24,fontFamily:"sans-serif",color:"white",WebkitTextStroke:"0.5px rgba(0, 0, 0, 0.5)",fontSize:11},children:["@",BNt.version]}),n&&!a&&dt.jsx("div",{onClick:()=>o(!0),style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})})]})}),QNt=wI(VM()),wNt=wI(T5()),gm=.01,eE={copper:[.9,.6,.2],fr4Green:[5/255,163/255,46/255],fr4GreenSolderWithMask:[0/255,152/255,19/255],fr1Copper:[.8,.4,.2],fr1CopperSolderWithMask:[.9,.6,.2]},KM=.001,bw=32,MNt=.035,fG=50,Ore={fr1:eE.fr1Copper,fr4:eE.fr4Green},vNe={fr1:eE.fr1CopperSolderWithMask,fr4:eE.fr4GreenSolderWithMask},DNt=wI(cG()),RNt=wI(VM()),NNt=wI(dG()),INe=r=>{let e=0;for(let n=0;n<r.length;n++){const i=(n+1)%r.length;e+=r[n][0]*r[i][1],e-=r[i][0]*r[n][1]}return e/2<=0},CNe=(r,e=1.2)=>{const{center:t,outline:n}=r;let i=n.map(s=>[s.x,s.y]);INe(i)&&(i=i.reverse());const a=(0,RNt.polygon)({points:i});let o=(0,DNt.extrudeLinear)({height:e},a);return o=(0,NNt.translate)([t.x,t.y,-e/2],o),o},TNt=r=>{const e=hm(r).pcb_board.list()[0];if(!e)return console.warn("No pcb_board found for simplified geometry"),[];let t;const n=1.2;e.outline&&e.outline.length>0?t=CNe({center:e.center,outline:e.outline},n):t=(0,QNt.cuboid)({size:[e.width,e.height,n],center:[e.center.x,e.center.y,0]});const i=Ore[e.material]??eE.fr4Green;return[(0,wNt.colorize)(i,t)]},Sw=wI(dG()),k_=wI(VM()),JM=wI(T5()),Qw=wI(Tre()),nv=wI(VM()),hG=wI(T5()),$B=wI(Tre()),_C=.05,ENe=(r,e)=>{if(r.shape||(r.shape="circle"),r.shape==="circle")return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)((0,nv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:e.pcbThickness}),(0,nv.cylinder)({center:[r.x,r.y,e.pcbThickness/2+_C/2+gm],radius:r.outer_diameter/2,height:_C}),(0,nv.cylinder)({center:[r.x,r.y,-e.pcbThickness/2-_C/2-gm],radius:r.outer_diameter/2,height:_C})),(0,nv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2-gm,height:1.5})));if(r.shape==="circular_hole_with_rect_pad"){const t=r.rect_pad_width||r.hole_diameter,n=r.rect_pad_height||r.hole_diameter;return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)((0,nv.cuboid)({center:[r.x,r.y,1.2/2],size:[t,n,_C]}),(0,nv.cuboid)({center:[r.x,r.y,-1.2/2],size:[t,n,_C]}),(0,nv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:1.2})),(0,nv.cylinder)({center:[r.x,r.y,0],radius:Math.max(r.hole_diameter/2-gm,.01),height:1.5})))}if(r.shape==="pill"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=t?r.outer_height||i+.2:r.outer_width||n+.2,o=t?r.outer_width||n+.2:r.outer_height||i+.2,s=i/2,l=o/2,c=Math.abs(n-i),A=Math.abs(a-o),u=(0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i,c,e.pcbThickness]:[c,i,e.pcbThickness]}),d=(0,nv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s,height:e.pcbThickness}),g=(0,nv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s,height:e.pcbThickness}),m=(0,$B.union)(u,d,g),E=e.pcbThickness/2+_C/2+gm,C=(0,nv.cuboid)({center:[r.x,r.y,E],size:t?[o,A,_C]:[A,o,_C]}),_=(0,nv.cylinder)({center:t?[r.x,r.y-A/2,E]:[r.x-A/2,r.y,E],radius:l,height:_C}),x=(0,nv.cylinder)({center:t?[r.x,r.y+A/2,E]:[r.x+A/2,r.y,E],radius:l,height:_C}),Q=(0,$B.union)(C,_,x),P=-e.pcbThickness/2-_C/2-gm,z=(0,nv.cuboid)({center:[r.x,r.y,P],size:t?[o,A,_C]:[A,o,_C]}),O=(0,nv.cylinder)({center:t?[r.x,r.y-A/2,P]:[r.x-A/2,r.y,P],radius:l,height:_C}),V=(0,nv.cylinder)({center:t?[r.x,r.y+A/2,P]:[r.x+A/2,r.y,P],radius:l,height:_C}),j=(0,$B.union)(z,O,V),q=(0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i-2*gm,c,e.pcbThickness+2*gm]:[c,i-2*gm,e.pcbThickness+2*gm]}),J=(0,nv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s-gm,height:e.pcbThickness+2*gm}),ce=(0,nv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s-gm,height:e.pcbThickness+2*gm}),oe=(0,$B.union)(q,J,ce);return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)(m,Q,j),oe))}if(r.shape==="pill_hole_with_rect_pad"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=i/2,o=Math.abs(n-i),s=r.rect_pad_width||n+.2,l=r.rect_pad_height||i+.2,c=(0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i,o,1.2]:[o,i,1.2]}),A=(0,nv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a,height:1.2}),u=(0,nv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a,height:1.2}),d=(0,nv.cuboid)({center:[r.x,r.y,1.2/2],size:[s,l,_C]}),g=(0,nv.cuboid)({center:[r.x,r.y,-1.2/2],size:[s,l,_C]}),m=(0,$B.union)((0,nv.cuboid)({center:[r.x,r.y,0],size:t?[i-_C,o,1.5]:[o,i-_C,1.5]}),(0,nv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a-_C,height:1.5}),(0,nv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a-_C,height:1.5}));return(0,hG.colorize)(eE.copper,(0,$B.subtract)((0,$B.union)(c,A,u,d,g),m))}else throw new Error(`Unsupported plated hole shape: ${r.shape}`)},gG=wI(cG()),_Ne=wI(Pre()),PNt=wI(Ure());function BNe(r,e){return Array.isArray(e)?[r.a*e[0]+r.c*e[1]+r.e,r.b*e[0]+r.d*e[1]+r.f]:{x:r.a*e.x+r.c*e.y+r.e,y:r.b*e.x+r.d*e.y+r.f}}function z2(r,e=0){return{a:1,c:0,e:r,b:0,d:1,f:e}}function xNe(...r){r=Array.isArray(r[0])?r[0]:r;const e=(t,n)=>({a:t.a*n.a+t.c*n.b,c:t.a*n.c+t.c*n.d,e:t.a*n.e+t.c*n.f+t.e,b:t.b*n.a+t.d*n.b,d:t.b*n.c+t.d*n.d,f:t.b*n.e+t.d*n.f+t.f});switch(r.length){case 0:throw new Error("no matrices provided");case 1:return r[0];case 2:return e(r[0],r[1]);default:{const[t,n,...i]=r,a=e(t,n);return xNe(a,...i)}}}function bNe(...r){return xNe(...r)}var{cos:UNt,sin:FNt}=Math;function SNe(r,e,t){const n=UNt(r),i=FNt(r);return{a:n,c:-i,e:0,b:i,d:n,f:0}}function kNt(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function pG(r,e,t,n){var i=Error.call(this,r);return Object.setPrototypeOf&&Object.setPrototypeOf(i,pG.prototype),i.expected=e,i.found=t,i.location=n,i.name="SyntaxError",i}kNt(pG,Error);function zre(r,e,t){return t=t||" ",r.length>e?r:(e-=r.length,t+=t.repeat(e),r+t.slice(0,e))}pG.prototype.format=function(r){var e="Error: "+this.message;if(this.location){var t=null,n;for(n=0;n<r.length;n++)if(r[n].source===this.location.source){t=r[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,o=this.location.source+":"+a.line+":"+a.column;if(t){var s=this.location.end,l=zre("",a.line.toString().length," "),c=t[i.line-1],A=i.line===s.line?s.column:c.length+1,u=A-i.column||1;e+=`
|
|
13075
13075
|
--> `+o+`
|
|
13076
13076
|
`+l+` |
|
|
13077
13077
|
`+a.line+" | "+c+`
|
|
@@ -13464,4 +13464,4 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return wae}bLt();function F8e(r,e,t,n=
|
|
|
13464
13464
|
&:hover {
|
|
13465
13465
|
background-color: rgba(255, 255, 255, 0.1);
|
|
13466
13466
|
}
|
|
13467
|
-
`,onClick:n=>{n.stopPropagation(),t()},children:[dt.jsx("input",{type:"checkbox",checked:e}),dt.jsx("span",{style:{color:"#eee"},children:r})]}),$Ot=({children:r,elements:e})=>{const[t,n]=_1(j=>[j.is_mouse_over_container,j.setIsMouseOverContainer]),[i,a]=yt.useState(!1),[o,s]=yt.useState(!1),[l,c]=yt.useState(!1),[A,u]=_1(j=>[j.selected_layer,j.selectLayer]),[d,g,m,E,C,_]=_1(j=>[j.in_move_footprint_mode,j.in_draw_trace_mode,j.is_showing_rats_nest,j.is_showing_multiple_traces_length,j.is_showing_autorouting,j.is_showing_drc_errors]),x=_1(j=>j.setEditMode),Q=_1(j=>j.setIsShowingRatsNest),P=_1(j=>j.setIsShowingMultipleTracesLength),z=_1(j=>j.setIsShowingAutorouting),O=_1(j=>j.setIsShowingDrcErrors);eQ("1",()=>u("top")),eQ("2",()=>u("bottom")),eQ("3",()=>u("inner1")),eQ("4",()=>u("inner2")),eQ("5",()=>u("inner3")),eQ("6",()=>u("inner4")),eQ("7",()=>u("inner5")),eQ("8",()=>u("inner6"));const V=(e==null?void 0:e.filter(j=>j.type.includes("error")).length)??0;return dt.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:j=>{n(!1),s(!1)},children:[r,dt.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",qOt.version]}),dt.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:L_.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[dt.jsxs(yD,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[dt.jsxs("div",{children:["layer:"," ",dt.jsx("span",{style:{marginLeft:2,fontWeight:500,color:mD[A]},children:A})]}),o&&dt.jsx("div",{style:{marginTop:4,minWidth:120},children:Aoe.map(j=>j.replace(/-/g,"")).map(j=>dt.jsx(XOt,{name:j,selected:j===A,onClick:()=>{u(j.replace(/-/,""))}},j))})]}),dt.jsxs(yD,{style:V>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[dt.jsxs("div",{children:[V," errors"]}),l&&dt.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(j=>j.type.includes("error")).map((j,q)=>dt.jsxs(yt.Fragment,{children:[dt.jsx("div",{children:j.error_type}),dt.jsx("div",{children:j.message})]},q))})]}),dt.jsx(yD,{style:{},onClick:()=>{x(g?"off":"draw_trace")},children:dt.jsxs("div",{children:[g?"✖ ":"","Edit Traces"]})}),dt.jsx(yD,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:dt.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),dt.jsx(yD,{style:{},onClick:()=>{Q(!m)},children:dt.jsxs("div",{children:[m?"✖ ":"","Rats Nest"]})}),dt.jsx(yD,{onClick:()=>{a(!i)},children:dt.jsxs("div",{children:[dt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",dt.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&dt.jsxs("div",{style:{marginTop:4,minWidth:120},children:[dt.jsx(poe,{label:"Show All Trace Lengths",checked:E,onClick:()=>{P(!E)}}),dt.jsx(poe,{label:"Show Autorouting Animation",checked:C,onClick:()=>{z(!C)}}),dt.jsx(poe,{label:"Show DRC Errors",checked:_,onClick:()=>{O(!_)}})]})]})})]})]})},ezt=r=>{const{transform:e,elements:t}=r,[n,i]=yt.useMemo(()=>{const c=r.elements.flatMap(u=>uOt(u,r.elements)),A=pS(r.elements);return[c,A]},[r.elements]),[a,o]=yt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=yt.useMemo(()=>cOt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=yt.useCallback(c=>{var d,g;const A=[];for(const m of c)if(m._element){const E=i.getNetConnectedToId("pcb_port_id"in m._element?(d=m._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in m._element?(g=m._element)==null?void 0:g.pcb_trace_id:"");A.push(...i.getIdsConnectedToNet(E))}const u=new Set(c.map(m=>m._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:u,primitiveIdsInMousedOverNet:A})},[i]);return dt.jsx(WOt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:dt.jsx(ROt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(UOt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(MOt,{transform:e,focusOnHover:r.focusOnHover,children:dt.jsx($Ot,{elements:t,children:dt.jsx(GOt,{transform:e,elements:t,children:dt.jsx(ZOt,{transform:e,soup:t,children:dt.jsx(QOt,{transform:e,debugGraphics:r.debugGraphics,children:dt.jsx(wOt,{transform:e,elements:t,children:dt.jsx(SOt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},tzt=OA(Kd(400,300),L1(40,-40)),nzt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,A]=yt.useState(!l),[u,d]=hoe(),[g,m]=yt.useState(tzt),{ref:E,setTransform:C,cancelDrag:_}=lOt({transform:g,onSetTransform:m,enabled:c});let[x,Q]=yt.useState([]);x=a??x;const P=yt.useRef(!1),z=yt.useRef(null),O=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,V=()=>{const oe=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:de,width:Ie,height:_e}=q.some(ve=>ve.type.startsWith("pcb_"))?X7t(q.filter(ve=>ve.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((oe.width??0)/Ie,(oe.height??0)/_e,100)*.75,Be=OA(Kd((oe.width??0)/2,(oe.height??0)/2),L1(pe,-pe,0,0),Kd(-de.x,-de.y));C(Be)};yt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(P.current||(V(),P.current=!0))},[r,d]);const j=yt.useMemo(()=>(r==null?void 0:r.filter(oe=>oe.type.startsWith("pcb_")||oe.type.startsWith("source_")))??[],[O]),q=yt.useMemo(()=>yGt({circuitJson:j,editEvents:x}),[j,x]),J=oe=>{Q([...x,oe]),o==null||o([...x,oe])},ce=oe=>{const de=x.map(Ie=>Ie.edit_event_id===oe.edit_event_id?{...Ie,...oe}:Ie);Q(de),o==null||o(de)};return dt.jsxs("div",{ref:E,style:{position:"relative"},children:[dt.jsx("div",{ref:u,children:dt.jsxs(eOt,{initialState:n,children:[dt.jsx(ezt,{transform:g,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:J,onModifyEditEvent:ce,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:q,debugGraphics:e},d.width),dt.jsx(nOt,{})]})}),l&&!c&&dt.jsx("div",{onClick:()=>{A(!0),V()},onTouchStart:oe=>{const de=oe.touches[0];z.current={x:de.clientX,y:de.clientY}},onTouchEnd:oe=>{const de=oe.changedTouches[0],Ie=z.current;if(!Ie)return;const _e=Math.abs(de.clientX-Ie.x),pe=Math.abs(de.clientY-Ie.y);_e<10&&pe<10&&(oe.preventDefault(),A(!0),V()),z.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:L_.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const rzt=({containerClassName:r,...e})=>{const t=yt.useRef(null),[n,i]=yt.useState(620);return yt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:dt.jsx(nzt,{...e,height:n})})},izt='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-tight{line-height:1.25}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',azt=()=>{yt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=izt,document.head.appendChild(e)},[])},qFe=r=>`hsl(${Ix.indexOf(r)*137.5%360}, 70%, 50%)`,ozt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Ix.map(t=>{const n=r[t]||0,i=n/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:qFe(t)},children:dt.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},szt=({renderLog:r})=>{const[e,t]=yt.useState("chronological");if(!r)return dt.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Ix.indexOf(a[0])-Ix.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(ozt,{phaseTimings:r.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:n.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:Ix.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:qFe(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},lzt="0.0.554",czt=["assembly","bom","circuit_json","errors","render_log"],Azt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:A=!0,onActiveTabChange:u,renderLog:d,showImportAndFormatButtons:g=!0,className:m,headerClassName:E,leftHeaderContent:C,readOnly:_,isStreaming:x,autoroutingLog:Q,onReportAutoroutingLog:P,isRunningCode:z,hasCodeChangedSinceLastRun:O,onEditEvent:V,editEvents:j,defaultActiveTab:q,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:ce=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:de=!1})=>{var Fe;azt();const Ie=yt.useMemo(()=>i?i.filter(tt=>tt&&"error_type"in tt||tt.type.includes("error")):null,[i]),[_e,pe]=yt.useState(q??"pcb"),[Be,ve]=yt.useState(de),Ne=yt.useCallback(tt=>{pe(tt),u==null||u(tt)},[u]),we=()=>{ve(!Be)};yt.useEffect(()=>{t&&Ne("errors")},[t]),yt.useEffect(()=>{(_e==="code"||_e==="errors")&&i&&!t&&Ne(q??"pcb")},[i]);const Ue=yt.useCallback(tt=>{window.TSCIRCUIT_3D_OBJECT_REF=tt===null?void 0:tt},[]);return dt.jsx("div",{className:Vv("flex flex-col relative rf-overflow-x-hidden",m),children:dt.jsx("div",{className:Vv("rf-md:sticky rf-md:top-2",Be&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(a7e,{value:_e,onValueChange:Ne,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:Vv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",E),children:[C,C&&dt.jsx("div",{className:"rf-flex-grow"}),!C&&z&&dt.jsx(zNe,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&dt.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Fe=d.lastRenderEvent)==null?void 0:Fe.phase)??""}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(zNe,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&dt.jsxs(_le,{children:[s&&dt.jsx(t9,{value:"code",children:"Code"}),dt.jsxs(t9,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Vv("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",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),dt.jsxs(t9,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Vv("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",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),dt.jsxs(t9,{value:"cad",children:[i&&dt.jsx("span",{className:Vv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(_e)&&dt.jsx(t9,{value:_e,children:Ele(_e)}),dt.jsxs(X4e,{children:[dt.jsx($4e,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(OTt,{className:"rf-w-4 rf-h-4"}),(Ie&&Ie.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),dt.jsxs(wie,{className:"rf-*:text-xs",children:[czt.map(tt=>dt.jsxs(OG,{onSelect:()=>Ne(tt),children:[_e!==tt&&dt.jsx(ONe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),_e===tt&&dt.jsx(GNe,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Ele(tt)}),tt==="errors"&&(Ie&&Ie.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ie==null?void 0:Ie.length})]},tt)),dt.jsx(OG,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",lzt.split(".").map((tt,rt)=>rt===2?parseInt(tt)+1:tt).join(".")]})})]})]})]}),oe&&dt.jsx(H2,{onClick:we,variant:"ghost",children:Be?dt.jsx(YTt,{size:16}):dt.jsx(zTt,{size:16})})]}),s&&dt.jsx(hb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:l})}),dt.jsx(hb,{value:"pcb",children:dt.jsx("div",{className:Vv("rf-overflow-hidden",Be?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallbackRender:({error:tt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(tt==null?void 0:tt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(rzt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Vv("rf-h-full rf-w-full",Be?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:tt=>{V&&tt.forEach(rt=>V(rt))}}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"assembly",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:i?dt.jsx(ykt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"schematic",children:dt.jsx("div",{className:Vv("rf-overflow-auto rf-bg-white",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallbackRender:({error:tt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(tt==null?void 0:tt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(gkt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:tt=>{V==null||V(tt)},debugGrid:ce}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"cad",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{FallbackComponent:STt,children:i?dt.jsx(xTt,{ref:Ue,circuitJson:i,autoRotateDisabled:J}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"bom",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallbackRender:({error:tt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(tt==null?void 0:tt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(_kt,{circuitJson:i}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"circuit_json",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:i?dt.jsx(Ckt,{elements:i}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"errors",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ie&&Ie.length>0?dt.jsx(OUt,{code:r,circuitJsonErrors:Ie,errorMessage:t,errorStack:n,autoroutingLog:Q,onReportAutoroutingLog:P}):dt.jsx(Tw,{onRunClicked:e})})}),A&&dt.jsx(hb,{value:"render_log",children:dt.jsx(szt,{renderLog:d})})]})})})};Hse.createRoot(document.getElementById("root")).render(dt.jsx(Azt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}));const uzt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
|
13467
|
+
`,onClick:n=>{n.stopPropagation(),t()},children:[dt.jsx("input",{type:"checkbox",checked:e}),dt.jsx("span",{style:{color:"#eee"},children:r})]}),$Ot=({children:r,elements:e})=>{const[t,n]=_1(j=>[j.is_mouse_over_container,j.setIsMouseOverContainer]),[i,a]=yt.useState(!1),[o,s]=yt.useState(!1),[l,c]=yt.useState(!1),[A,u]=_1(j=>[j.selected_layer,j.selectLayer]),[d,g,m,E,C,_]=_1(j=>[j.in_move_footprint_mode,j.in_draw_trace_mode,j.is_showing_rats_nest,j.is_showing_multiple_traces_length,j.is_showing_autorouting,j.is_showing_drc_errors]),x=_1(j=>j.setEditMode),Q=_1(j=>j.setIsShowingRatsNest),P=_1(j=>j.setIsShowingMultipleTracesLength),z=_1(j=>j.setIsShowingAutorouting),O=_1(j=>j.setIsShowingDrcErrors);eQ("1",()=>u("top")),eQ("2",()=>u("bottom")),eQ("3",()=>u("inner1")),eQ("4",()=>u("inner2")),eQ("5",()=>u("inner3")),eQ("6",()=>u("inner4")),eQ("7",()=>u("inner5")),eQ("8",()=>u("inner6"));const V=(e==null?void 0:e.filter(j=>j.type.includes("error")).length)??0;return dt.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:j=>{n(!1),s(!1)},children:[r,dt.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",qOt.version]}),dt.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:L_.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[dt.jsxs(yD,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[dt.jsxs("div",{children:["layer:"," ",dt.jsx("span",{style:{marginLeft:2,fontWeight:500,color:mD[A]},children:A})]}),o&&dt.jsx("div",{style:{marginTop:4,minWidth:120},children:Aoe.map(j=>j.replace(/-/g,"")).map(j=>dt.jsx(XOt,{name:j,selected:j===A,onClick:()=>{u(j.replace(/-/,""))}},j))})]}),dt.jsxs(yD,{style:V>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[dt.jsxs("div",{children:[V," errors"]}),l&&dt.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(j=>j.type.includes("error")).map((j,q)=>dt.jsxs(yt.Fragment,{children:[dt.jsx("div",{children:j.error_type}),dt.jsx("div",{children:j.message})]},q))})]}),dt.jsx(yD,{style:{},onClick:()=>{x(g?"off":"draw_trace")},children:dt.jsxs("div",{children:[g?"✖ ":"","Edit Traces"]})}),dt.jsx(yD,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:dt.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),dt.jsx(yD,{style:{},onClick:()=>{Q(!m)},children:dt.jsxs("div",{children:[m?"✖ ":"","Rats Nest"]})}),dt.jsx(yD,{onClick:()=>{a(!i)},children:dt.jsxs("div",{children:[dt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",dt.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&dt.jsxs("div",{style:{marginTop:4,minWidth:120},children:[dt.jsx(poe,{label:"Show All Trace Lengths",checked:E,onClick:()=>{P(!E)}}),dt.jsx(poe,{label:"Show Autorouting Animation",checked:C,onClick:()=>{z(!C)}}),dt.jsx(poe,{label:"Show DRC Errors",checked:_,onClick:()=>{O(!_)}})]})]})})]})]})},ezt=r=>{const{transform:e,elements:t}=r,[n,i]=yt.useMemo(()=>{const c=r.elements.flatMap(u=>uOt(u,r.elements)),A=pS(r.elements);return[c,A]},[r.elements]),[a,o]=yt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=yt.useMemo(()=>cOt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=yt.useCallback(c=>{var d,g;const A=[];for(const m of c)if(m._element){const E=i.getNetConnectedToId("pcb_port_id"in m._element?(d=m._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in m._element?(g=m._element)==null?void 0:g.pcb_trace_id:"");A.push(...i.getIdsConnectedToNet(E))}const u=new Set(c.map(m=>m._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:u,primitiveIdsInMousedOverNet:A})},[i]);return dt.jsx(WOt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:dt.jsx(ROt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(UOt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(MOt,{transform:e,focusOnHover:r.focusOnHover,children:dt.jsx($Ot,{elements:t,children:dt.jsx(GOt,{transform:e,elements:t,children:dt.jsx(ZOt,{transform:e,soup:t,children:dt.jsx(QOt,{transform:e,debugGraphics:r.debugGraphics,children:dt.jsx(wOt,{transform:e,elements:t,children:dt.jsx(SOt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},tzt=OA(Kd(400,300),L1(40,-40)),nzt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,A]=yt.useState(!l),[u,d]=hoe(),[g,m]=yt.useState(tzt),{ref:E,setTransform:C,cancelDrag:_}=lOt({transform:g,onSetTransform:m,enabled:c});let[x,Q]=yt.useState([]);x=a??x;const P=yt.useRef(!1),z=yt.useRef(null),O=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,V=()=>{const oe=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:de,width:Ie,height:_e}=q.some(ve=>ve.type.startsWith("pcb_"))?X7t(q.filter(ve=>ve.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((oe.width??0)/Ie,(oe.height??0)/_e,100)*.75,Be=OA(Kd((oe.width??0)/2,(oe.height??0)/2),L1(pe,-pe,0,0),Kd(-de.x,-de.y));C(Be)};yt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(P.current||(V(),P.current=!0))},[r,d]);const j=yt.useMemo(()=>(r==null?void 0:r.filter(oe=>oe.type.startsWith("pcb_")||oe.type.startsWith("source_")))??[],[O]),q=yt.useMemo(()=>yGt({circuitJson:j,editEvents:x}),[j,x]),J=oe=>{Q([...x,oe]),o==null||o([...x,oe])},ce=oe=>{const de=x.map(Ie=>Ie.edit_event_id===oe.edit_event_id?{...Ie,...oe}:Ie);Q(de),o==null||o(de)};return dt.jsxs("div",{ref:E,style:{position:"relative"},children:[dt.jsx("div",{ref:u,children:dt.jsxs(eOt,{initialState:n,children:[dt.jsx(ezt,{transform:g,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:J,onModifyEditEvent:ce,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:q,debugGraphics:e},d.width),dt.jsx(nOt,{})]})}),l&&!c&&dt.jsx("div",{onClick:()=>{A(!0),V()},onTouchStart:oe=>{const de=oe.touches[0];z.current={x:de.clientX,y:de.clientY}},onTouchEnd:oe=>{const de=oe.changedTouches[0],Ie=z.current;if(!Ie)return;const _e=Math.abs(de.clientX-Ie.x),pe=Math.abs(de.clientY-Ie.y);_e<10&&pe<10&&(oe.preventDefault(),A(!0),V()),z.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:L_.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const rzt=({containerClassName:r,...e})=>{const t=yt.useRef(null),[n,i]=yt.useState(620);return yt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:dt.jsx(nzt,{...e,height:n})})},izt='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-tight{line-height:1.25}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',azt=()=>{yt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=izt,document.head.appendChild(e)},[])},qFe=r=>`hsl(${Ix.indexOf(r)*137.5%360}, 70%, 50%)`,ozt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Ix.map(t=>{const n=r[t]||0,i=n/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:qFe(t)},children:dt.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},szt=({renderLog:r})=>{const[e,t]=yt.useState("chronological");if(!r)return dt.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Ix.indexOf(a[0])-Ix.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(ozt,{phaseTimings:r.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:n.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:Ix.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:qFe(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},lzt="0.0.555",czt=["assembly","bom","circuit_json","errors","render_log"],Azt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:A=!0,onActiveTabChange:u,renderLog:d,showImportAndFormatButtons:g=!0,className:m,headerClassName:E,leftHeaderContent:C,readOnly:_,isStreaming:x,autoroutingLog:Q,onReportAutoroutingLog:P,isRunningCode:z,hasCodeChangedSinceLastRun:O,onEditEvent:V,editEvents:j,defaultActiveTab:q,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:ce=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:de=!1})=>{var Fe;azt();const Ie=yt.useMemo(()=>i?i.filter(tt=>tt&&"error_type"in tt||tt.type.includes("error")):null,[i]),[_e,pe]=yt.useState(q??"pcb"),[Be,ve]=yt.useState(de),Ne=yt.useCallback(tt=>{pe(tt),u==null||u(tt)},[u]),we=()=>{ve(!Be)};yt.useEffect(()=>{t&&Ne("errors")},[t]),yt.useEffect(()=>{(_e==="code"||_e==="errors")&&i&&!t&&Ne(q??"pcb")},[i]);const Ue=yt.useCallback(tt=>{window.TSCIRCUIT_3D_OBJECT_REF=tt===null?void 0:tt},[]);return dt.jsx("div",{className:Vv("flex flex-col relative rf-overflow-x-hidden",m),children:dt.jsx("div",{className:Vv("rf-md:sticky rf-md:top-2",Be&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(a7e,{value:_e,onValueChange:Ne,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:Vv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",E),children:[C,C&&dt.jsx("div",{className:"rf-flex-grow"}),!C&&z&&dt.jsx(zNe,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&dt.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Fe=d.lastRenderEvent)==null?void 0:Fe.phase)??""}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(zNe,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&dt.jsxs(_le,{children:[s&&dt.jsx(t9,{value:"code",children:"Code"}),dt.jsxs(t9,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Vv("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",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),dt.jsxs(t9,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Vv("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",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),dt.jsxs(t9,{value:"cad",children:[i&&dt.jsx("span",{className:Vv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(_e)&&dt.jsx(t9,{value:_e,children:Ele(_e)}),dt.jsxs(X4e,{children:[dt.jsx($4e,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(OTt,{className:"rf-w-4 rf-h-4"}),(Ie&&Ie.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),dt.jsxs(wie,{className:"rf-*:text-xs",children:[czt.map(tt=>dt.jsxs(OG,{onSelect:()=>Ne(tt),children:[_e!==tt&&dt.jsx(ONe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),_e===tt&&dt.jsx(GNe,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Ele(tt)}),tt==="errors"&&(Ie&&Ie.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ie==null?void 0:Ie.length})]},tt)),dt.jsx(OG,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",lzt.split(".").map((tt,rt)=>rt===2?parseInt(tt)+1:tt).join(".")]})})]})]})]}),oe&&dt.jsx(H2,{onClick:we,variant:"ghost",children:Be?dt.jsx(YTt,{size:16}):dt.jsx(zTt,{size:16})})]}),s&&dt.jsx(hb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:l})}),dt.jsx(hb,{value:"pcb",children:dt.jsx("div",{className:Vv("rf-overflow-hidden",Be?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallbackRender:({error:tt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(tt==null?void 0:tt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(rzt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Vv("rf-h-full rf-w-full",Be?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:tt=>{V&&tt.forEach(rt=>V(rt))}}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"assembly",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:i?dt.jsx(ykt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"schematic",children:dt.jsx("div",{className:Vv("rf-overflow-auto rf-bg-white",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallbackRender:({error:tt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(tt==null?void 0:tt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(gkt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:tt=>{V==null||V(tt)},debugGrid:ce}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"cad",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{FallbackComponent:STt,children:i?dt.jsx(xTt,{ref:Ue,circuitJson:i,autoRotateDisabled:J}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"bom",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallbackRender:({error:tt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(tt==null?void 0:tt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(_kt,{circuitJson:i}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"circuit_json",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(jM,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:i?dt.jsx(Ckt,{elements:i}):dt.jsx(Tw,{onRunClicked:e})})})}),dt.jsx(hb,{value:"errors",children:dt.jsx("div",{className:Vv("rf-overflow-auto",Be?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ie&&Ie.length>0?dt.jsx(OUt,{code:r,circuitJsonErrors:Ie,errorMessage:t,errorStack:n,autoroutingLog:Q,onReportAutoroutingLog:P}):dt.jsx(Tw,{onRunClicked:e})})}),A&&dt.jsx(hb,{value:"render_log",children:dt.jsx(szt,{renderLog:d})})]})})})};Hse.createRoot(document.getElementById("root")).render(dt.jsx(Azt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}));const uzt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
package/dist/standalone.min.js
CHANGED
|
@@ -13075,7 +13075,7 @@ ${l.join(`
|
|
|
13075
13075
|
`)!==-1&&(r=r.replace(/\r\n/g,`
|
|
13076
13076
|
`)),r.indexOf(`\\
|
|
13077
13077
|
`)!==-1&&(r=r.replace(/\\\n/g,""));const t=r.split(`
|
|
13078
|
-
`);let n="",i="",a=0,o=[];const s=typeof"".trimLeft=="function";for(let u=0,A=t.length;u<A;u++)if(n=t[u],n=s?n.trimLeft():n.trim(),a=n.length,a!==0&&(i=n.charAt(0),i!=="#"))if(i==="v"){const d=n.split(/\s+/);switch(d[0]){case"v":e.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),d.length>=7?e.colors.push(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6])):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":e.uvs.push(parseFloat(d[1]),parseFloat(d[2]));break}}else if(i==="f"){const f=n.substr(1).trim().split(/\s+/),g=[];for(let I=0,E=f.length;I<E;I++){const x=f[I];if(x.length>0){const B=x.split("/");g.push(B)}}const _=g[0];for(let I=1,E=g.length-1;I<E;I++){const x=g[I],B=g[I+1];e.addFace(_[0],x[0],B[0],_[1],x[1],B[1],_[2],x[2],B[2])}}else if(i==="l"){const d=n.substring(1).trim().split(" ");let f=[];const g=[];if(n.indexOf("/")===-1)f=d;else for(let _=0,I=d.length;_<I;_++){const E=d[_].split("/");E[0]!==""&&f.push(E[0]),E[1]!==""&&g.push(E[1])}e.addLineGeometry(f,g)}else if(i==="p"){const f=n.substr(1).trim().split(" ");e.addPointGeometry(f)}else if((o=TFt.exec(n))!==null){const d=(" "+o[0].substr(1).trim()).substr(1);e.startObject(d)}else if(kFt.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(PFt.test(n))e.materialLibraries.push(n.substring(7).trim());else if(UFt.test(n))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(i==="s"){if(o=n.split(" "),o.length>1){const f=o[1].trim().toLowerCase();e.object.smooth=f!=="0"&&f!=="off"}else e.object.smooth=!0;const d=e.object.currentMaterial();d&&(d.smooth=e.object.smooth)}else{if(n==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}e.finalize();const l=new RQ;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let u=0,A=e.objects.length;u<A;u++){const d=e.objects[u],f=d.geometry,g=d.materials,_=f.type==="Line",I=f.type==="Points";let E=!1;if(f.vertices.length===0)continue;const x=new wf;x.setAttribute("position",new jc(f.vertices,3)),f.normals.length>0&&x.setAttribute("normal",new jc(f.normals,3)),f.colors.length>0&&(E=!0,x.setAttribute("color",new jc(f.colors,3))),f.hasUVIndices===!0&&x.setAttribute("uv",new jc(f.uvs,2));const B=[];for(let L=0,U=g.length;L<U;L++){const H=g[L],G=H.name+"_"+H.smooth+"_"+E;let W=e.materials[G];if(this.materials!==null){if(W=this.materials.create(H.name),_&&W&&!(W instanceof uE)){const z=new uE;ZE.prototype.copy.call(z,W),z.color.copy(W.color),W=z}else if(I&&W&&!(W instanceof FQ)){const z=new FQ({size:10,sizeAttenuation:!1});ZE.prototype.copy.call(z,W),z.color.copy(W.color),z.map=W.map,W=z}}W===void 0&&(_?W=new uE:I?W=new FQ({size:1,sizeAttenuation:!1}):W=new LF,W.name=H.name,W.flatShading=!H.smooth,W.vertexColors=E,e.materials[G]=W),B.push(W)}let P;if(B.length>1){for(let L=0,U=g.length;L<U;L++){const H=g[L];x.addGroup(H.groupStart,H.groupCount,L)}_?P=new OB(x,B):I?P=new AR(x,B):P=new av(x,B)}else _?P=new OB(x,B[0]):I?P=new AR(x,B[0]):P=new av(x,B[0]);P.name=d.name,l.add(P)}else if(e.vertices.length>0){const u=new FQ({size:1,sizeAttenuation:!1}),A=new wf;A.setAttribute("position",new jc(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(A.setAttribute("color",new jc(e.colors,3)),u.vertexColors=!0);const d=new AR(A,u);l.add(d)}return l}};function GFt({stlUrl:r,mtlUrl:e,color:t,opacity:n=1}){const i=qne(DFt,r),a=nt.useRef();return Ve.jsxs("mesh",{ref:a,children:[Ve.jsx("primitive",{object:i,attach:"geometry"}),Ve.jsx("meshStandardMaterial",{color:t,transparent:n!==1,opacity:n})]})}var OFt={version:"0.0.259"};typeof window<"u"&&(window.TSCI_MAIN_CAMERA_ROTATION=new Kx(0,0,0));function zFt(r,e){const t=new v_().setFromEuler(new Kx(r.x,r.y,r.z)),n=new Xn(0,0,1);return n.applyQuaternion(t),n.multiplyScalar(e)}var HFt=({})=>{const r=nt.useRef();return nt.useRef({lastRotation:new Kx}),DR((e,t)=>{if(!r.current)return;const n=window.TSCI_MAIN_CAMERA_ROTATION,i=zFt(n,2);e.camera.position.copy(i),e.camera.lookAt(0,0,0)}),Ve.jsxs("mesh",{ref:r,rotation:[Math.PI/2,0,0],children:[Ve.jsx("boxGeometry",{args:[1,1,1]}),Ve.jsx("meshStandardMaterial",{color:"white"}),Ve.jsx(XQ,{position:[0,0,.51],fontSize:.25,color:"black",children:"Front"}),Ve.jsx(XQ,{position:[0,0,-.51],fontSize:.25,color:"black",rotation:[0,Math.PI,0],children:"Back"}),Ve.jsx(XQ,{position:[.51,0,0],fontSize:.25,color:"black",rotation:[0,Math.PI/2,0],children:"Right"}),Ve.jsx(XQ,{position:[-.51,0,0],fontSize:.25,color:"black",rotation:[0,-Math.PI/2,0],children:"Left"}),Ve.jsx(XQ,{position:[0,.51,0],fontSize:.25,color:"black",rotation:[-Math.PI/2,0,0],children:"Top"}),Ve.jsx(XQ,{position:[0,-.51,0],fontSize:.25,color:"black",rotation:[Math.PI/2,0,0],children:"Bottom"}),Ve.jsx("lineSegments",{args:[new dne(new cw(1,1,1))],material:new uE({color:0,linewidth:2})})]})},YFt=()=>(DR(({camera:r})=>{window.TSCI_MAIN_CAMERA_ROTATION=r.rotation}),Ve.jsx(Ve.Fragment,{})),L8e=nt.forwardRef(({children:r,initialCameraPosition:e=[5,5,5],autoRotateDisabled:t,clickToInteractEnabled:n=!1},i)=>{const[a,o]=nt.useState(!n);return Ve.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[Ve.jsx("div",{style:{position:"absolute",top:0,left:0,width:120,height:120},children:Ve.jsxs(xMe,{camera:{up:[0,0,1],position:[1,1,1]},style:{zIndex:10},children:[Ve.jsx("ambientLight",{intensity:Math.PI/2}),Ve.jsx(HFt,{})]})}),Ve.jsxs(xMe,{scene:{up:[0,0,1]},camera:{up:[0,0,1],position:e},children:[Ve.jsx(YFt,{}),a&&Ve.jsx(_2t,{autoRotate:!t,autoRotateSpeed:1}),Ve.jsx("ambientLight",{intensity:Math.PI/2}),Ve.jsx("pointLight",{position:[-10,-10,10],decay:0,intensity:Math.PI/4}),Ve.jsx(B2t,{rotation:[Math.PI/2,0,0],infiniteGrid:!0,cellSize:1,sectionSize:10}),Ve.jsx("object3D",{ref:i,children:r})]}),Ve.jsxs("div",{style:{position:"absolute",right:24,bottom:24,fontFamily:"sans-serif",color:"white",WebkitTextStroke:"0.5px rgba(0, 0, 0, 0.5)",fontSize:11},children:["@",OFt.version]}),n&&!a&&Ve.jsx("div",{onClick:()=>o(!0),style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:Ve.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})})]})}),VFt=FI(k3()),KFt=FI(RN()),vm=.01,pE={copper:[.9,.6,.2],fr4Green:[5/255,163/255,46/255],fr4GreenSolderWithMask:[0/255,152/255,19/255],fr1Copper:[.8,.4,.2],fr1CopperSolderWithMask:[.9,.6,.2]},U3=.001,d9=32,jFt=.035,C6=50,Rae={fr1:pE.fr1Copper,fr4:pE.fr4Green},G8e={fr1:pE.fr1CopperSolderWithMask,fr4:pE.fr4GreenSolderWithMask},JFt=FI(m6()),WFt=FI(k3()),qFt=FI(I6()),O8e=r=>{let e=0;for(let n=0;n<r.length;n++){const i=(n+1)%r.length;e+=r[n][0]*r[i][1],e-=r[i][0]*r[n][1]}return e/2<=0},z8e=(r,e=1.2)=>{const{center:t,outline:n}=r;let i=n.map(s=>[s.x,s.y]);O8e(i)&&(i=i.reverse());const a=(0,WFt.polygon)({points:i});let o=(0,JFt.extrudeLinear)({height:e},a);return o=(0,qFt.translate)([t.x,t.y,-e/2],o),o},ZFt=r=>{const e=sm(r).pcb_board.list()[0];if(!e)return console.warn("No pcb_board found for simplified geometry"),[];let t;const n=1.2;e.outline&&e.outline.length>0?t=z8e({center:e.center,outline:e.outline},n):t=(0,VFt.cuboid)({size:[e.width,e.height,n],center:[e.center.x,e.center.y,0]});const i=Rae[e.material]??pE.fr4Green;return[(0,KFt.colorize)(i,t)]},f9=FI(I6()),ix=FI(k3()),F3=FI(RN()),h9=FI(Bae()),lv=FI(k3()),E6=FI(RN()),mB=FI(Bae()),TC=.05,H8e=(r,e)=>{if(r.shape||(r.shape="circle"),r.shape==="circle")return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)((0,lv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:e.pcbThickness}),(0,lv.cylinder)({center:[r.x,r.y,e.pcbThickness/2+TC/2+vm],radius:r.outer_diameter/2,height:TC}),(0,lv.cylinder)({center:[r.x,r.y,-e.pcbThickness/2-TC/2-vm],radius:r.outer_diameter/2,height:TC})),(0,lv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2-vm,height:1.5})));if(r.shape==="circular_hole_with_rect_pad"){const t=r.rect_pad_width||r.hole_diameter,n=r.rect_pad_height||r.hole_diameter;return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)((0,lv.cuboid)({center:[r.x,r.y,1.2/2],size:[t,n,TC]}),(0,lv.cuboid)({center:[r.x,r.y,-1.2/2],size:[t,n,TC]}),(0,lv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:1.2})),(0,lv.cylinder)({center:[r.x,r.y,0],radius:Math.max(r.hole_diameter/2-vm,.01),height:1.5})))}if(r.shape==="pill"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=t?r.outer_height||i+.2:r.outer_width||n+.2,o=t?r.outer_width||n+.2:r.outer_height||i+.2,s=i/2,l=o/2,c=Math.abs(n-i),u=Math.abs(a-o),A=(0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i,c,e.pcbThickness]:[c,i,e.pcbThickness]}),d=(0,lv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s,height:e.pcbThickness}),f=(0,lv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s,height:e.pcbThickness}),g=(0,mB.union)(A,d,f),_=e.pcbThickness/2+TC/2+vm,I=(0,lv.cuboid)({center:[r.x,r.y,_],size:t?[o,u,TC]:[u,o,TC]}),E=(0,lv.cylinder)({center:t?[r.x,r.y-u/2,_]:[r.x-u/2,r.y,_],radius:l,height:TC}),x=(0,lv.cylinder)({center:t?[r.x,r.y+u/2,_]:[r.x+u/2,r.y,_],radius:l,height:TC}),B=(0,mB.union)(I,E,x),P=-e.pcbThickness/2-TC/2-vm,L=(0,lv.cuboid)({center:[r.x,r.y,P],size:t?[o,u,TC]:[u,o,TC]}),U=(0,lv.cylinder)({center:t?[r.x,r.y-u/2,P]:[r.x-u/2,r.y,P],radius:l,height:TC}),H=(0,lv.cylinder)({center:t?[r.x,r.y+u/2,P]:[r.x+u/2,r.y,P],radius:l,height:TC}),G=(0,mB.union)(L,U,H),W=(0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i-2*vm,c,e.pcbThickness+2*vm]:[c,i-2*vm,e.pcbThickness+2*vm]}),z=(0,lv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s-vm,height:e.pcbThickness+2*vm}),ae=(0,lv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s-vm,height:e.pcbThickness+2*vm}),te=(0,mB.union)(W,z,ae);return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)(g,B,G),te))}if(r.shape==="pill_hole_with_rect_pad"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=i/2,o=Math.abs(n-i),s=r.rect_pad_width||n+.2,l=r.rect_pad_height||i+.2,c=(0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i,o,1.2]:[o,i,1.2]}),u=(0,lv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a,height:1.2}),A=(0,lv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a,height:1.2}),d=(0,lv.cuboid)({center:[r.x,r.y,1.2/2],size:[s,l,TC]}),f=(0,lv.cuboid)({center:[r.x,r.y,-1.2/2],size:[s,l,TC]}),g=(0,mB.union)((0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i-TC,o,1.5]:[o,i-TC,1.5]}),(0,lv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a-TC,height:1.5}),(0,lv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a-TC,height:1.5}));return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)(c,u,A,d,f),g))}else throw new Error(`Unsupported plated hole shape: ${r.shape}`)},_6=FI(m6()),Y8e=FI(bae()),XFt=FI(Sae());function V8e(r,e){return Array.isArray(e)?[r.a*e[0]+r.c*e[1]+r.e,r.b*e[0]+r.d*e[1]+r.f]:{x:r.a*e.x+r.c*e.y+r.e,y:r.b*e.x+r.d*e.y+r.f}}function _w(r,e=0){return{a:1,c:0,e:r,b:0,d:1,f:e}}function K8e(...r){r=Array.isArray(r[0])?r[0]:r;const e=(t,n)=>({a:t.a*n.a+t.c*n.b,c:t.a*n.c+t.c*n.d,e:t.a*n.e+t.c*n.f+t.e,b:t.b*n.a+t.d*n.b,d:t.b*n.c+t.d*n.d,f:t.b*n.e+t.d*n.f+t.f});switch(r.length){case 0:throw new Error("no matrices provided");case 1:return r[0];case 2:return e(r[0],r[1]);default:{const[t,n,...i]=r,a=e(t,n);return K8e(a,...i)}}}function j8e(...r){return K8e(...r)}var{cos:$Ft,sin:eLt}=Math;function J8e(r,e,t){const n=$Ft(r),i=eLt(r);return{a:n,c:-i,e:0,b:i,d:n,f:0}}function tLt(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function x6(r,e,t,n){var i=Error.call(this,r);return Object.setPrototypeOf&&Object.setPrototypeOf(i,x6.prototype),i.expected=e,i.found=t,i.location=n,i.name="SyntaxError",i}tLt(x6,Error);function Nae(r,e,t){return t=t||" ",r.length>e?r:(e-=r.length,t+=t.repeat(e),r+t.slice(0,e))}x6.prototype.format=function(r){var e="Error: "+this.message;if(this.location){var t=null,n;for(n=0;n<r.length;n++)if(r[n].source===this.location.source){t=r[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,o=this.location.source+":"+a.line+":"+a.column;if(t){var s=this.location.end,l=Nae("",a.line.toString().length," "),c=t[i.line-1],u=i.line===s.line?s.column:c.length+1,A=u-i.column||1;e+=`
|
|
13078
|
+
`);let n="",i="",a=0,o=[];const s=typeof"".trimLeft=="function";for(let u=0,A=t.length;u<A;u++)if(n=t[u],n=s?n.trimLeft():n.trim(),a=n.length,a!==0&&(i=n.charAt(0),i!=="#"))if(i==="v"){const d=n.split(/\s+/);switch(d[0]){case"v":e.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),d.length>=7?e.colors.push(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6])):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":e.uvs.push(parseFloat(d[1]),parseFloat(d[2]));break}}else if(i==="f"){const f=n.substr(1).trim().split(/\s+/),g=[];for(let I=0,E=f.length;I<E;I++){const x=f[I];if(x.length>0){const B=x.split("/");g.push(B)}}const _=g[0];for(let I=1,E=g.length-1;I<E;I++){const x=g[I],B=g[I+1];e.addFace(_[0],x[0],B[0],_[1],x[1],B[1],_[2],x[2],B[2])}}else if(i==="l"){const d=n.substring(1).trim().split(" ");let f=[];const g=[];if(n.indexOf("/")===-1)f=d;else for(let _=0,I=d.length;_<I;_++){const E=d[_].split("/");E[0]!==""&&f.push(E[0]),E[1]!==""&&g.push(E[1])}e.addLineGeometry(f,g)}else if(i==="p"){const f=n.substr(1).trim().split(" ");e.addPointGeometry(f)}else if((o=TFt.exec(n))!==null){const d=(" "+o[0].substr(1).trim()).substr(1);e.startObject(d)}else if(kFt.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(PFt.test(n))e.materialLibraries.push(n.substring(7).trim());else if(UFt.test(n))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(i==="s"){if(o=n.split(" "),o.length>1){const f=o[1].trim().toLowerCase();e.object.smooth=f!=="0"&&f!=="off"}else e.object.smooth=!0;const d=e.object.currentMaterial();d&&(d.smooth=e.object.smooth)}else{if(n==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}e.finalize();const l=new RQ;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let u=0,A=e.objects.length;u<A;u++){const d=e.objects[u],f=d.geometry,g=d.materials,_=f.type==="Line",I=f.type==="Points";let E=!1;if(f.vertices.length===0)continue;const x=new wf;x.setAttribute("position",new jc(f.vertices,3)),f.normals.length>0&&x.setAttribute("normal",new jc(f.normals,3)),f.colors.length>0&&(E=!0,x.setAttribute("color",new jc(f.colors,3))),f.hasUVIndices===!0&&x.setAttribute("uv",new jc(f.uvs,2));const B=[];for(let L=0,U=g.length;L<U;L++){const H=g[L],G=H.name+"_"+H.smooth+"_"+E;let W=e.materials[G];if(this.materials!==null){if(W=this.materials.create(H.name),_&&W&&!(W instanceof uE)){const z=new uE;ZE.prototype.copy.call(z,W),z.color.copy(W.color),W=z}else if(I&&W&&!(W instanceof FQ)){const z=new FQ({size:10,sizeAttenuation:!1});ZE.prototype.copy.call(z,W),z.color.copy(W.color),z.map=W.map,W=z}}W===void 0&&(_?W=new uE:I?W=new FQ({size:1,sizeAttenuation:!1}):W=new LF,W.name=H.name,W.flatShading=!H.smooth,W.vertexColors=E,e.materials[G]=W),B.push(W)}let P;if(B.length>1){for(let L=0,U=g.length;L<U;L++){const H=g[L];x.addGroup(H.groupStart,H.groupCount,L)}_?P=new OB(x,B):I?P=new AR(x,B):P=new av(x,B)}else _?P=new OB(x,B[0]):I?P=new AR(x,B[0]):P=new av(x,B[0]);P.name=d.name,l.add(P)}else if(e.vertices.length>0){const u=new FQ({size:1,sizeAttenuation:!1}),A=new wf;A.setAttribute("position",new jc(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(A.setAttribute("color",new jc(e.colors,3)),u.vertexColors=!0);const d=new AR(A,u);l.add(d)}return l}};function GFt({stlUrl:r,mtlUrl:e,color:t,opacity:n=1}){const i=qne(DFt,r),a=nt.useRef();return Ve.jsxs("mesh",{ref:a,children:[Ve.jsx("primitive",{object:i,attach:"geometry"}),Ve.jsx("meshStandardMaterial",{color:t,transparent:n!==1,opacity:n})]})}var OFt={version:"0.0.260"};typeof window<"u"&&(window.TSCI_MAIN_CAMERA_ROTATION=new Kx(0,0,0));function zFt(r,e){const t=new v_().setFromEuler(new Kx(r.x,r.y,r.z)),n=new Xn(0,0,1);return n.applyQuaternion(t),n.multiplyScalar(e)}var HFt=({})=>{const r=nt.useRef();return nt.useRef({lastRotation:new Kx}),DR((e,t)=>{if(!r.current)return;const n=window.TSCI_MAIN_CAMERA_ROTATION,i=zFt(n,2);e.camera.position.copy(i),e.camera.lookAt(0,0,0)}),Ve.jsxs("mesh",{ref:r,rotation:[Math.PI/2,0,0],children:[Ve.jsx("boxGeometry",{args:[1,1,1]}),Ve.jsx("meshStandardMaterial",{color:"white"}),Ve.jsx(XQ,{position:[0,0,.51],fontSize:.25,color:"black",children:"Front"}),Ve.jsx(XQ,{position:[0,0,-.51],fontSize:.25,color:"black",rotation:[0,Math.PI,0],children:"Back"}),Ve.jsx(XQ,{position:[.51,0,0],fontSize:.25,color:"black",rotation:[0,Math.PI/2,0],children:"Right"}),Ve.jsx(XQ,{position:[-.51,0,0],fontSize:.25,color:"black",rotation:[0,-Math.PI/2,0],children:"Left"}),Ve.jsx(XQ,{position:[0,.51,0],fontSize:.25,color:"black",rotation:[-Math.PI/2,0,0],children:"Top"}),Ve.jsx(XQ,{position:[0,-.51,0],fontSize:.25,color:"black",rotation:[Math.PI/2,0,0],children:"Bottom"}),Ve.jsx("lineSegments",{args:[new dne(new cw(1,1,1))],material:new uE({color:0,linewidth:2})})]})},YFt=()=>(DR(({camera:r})=>{window.TSCI_MAIN_CAMERA_ROTATION=r.rotation}),Ve.jsx(Ve.Fragment,{})),L8e=nt.forwardRef(({children:r,initialCameraPosition:e=[5,5,5],autoRotateDisabled:t,clickToInteractEnabled:n=!1},i)=>{const[a,o]=nt.useState(!n);return Ve.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[Ve.jsx("div",{style:{position:"absolute",top:0,left:0,width:120,height:120},children:Ve.jsxs(xMe,{camera:{up:[0,0,1],position:[1,1,1]},style:{zIndex:10},children:[Ve.jsx("ambientLight",{intensity:Math.PI/2}),Ve.jsx(HFt,{})]})}),Ve.jsxs(xMe,{scene:{up:[0,0,1]},camera:{up:[0,0,1],position:e},children:[Ve.jsx(YFt,{}),a&&Ve.jsx(_2t,{autoRotate:!t,autoRotateSpeed:1}),Ve.jsx("ambientLight",{intensity:Math.PI/2}),Ve.jsx("pointLight",{position:[-10,-10,10],decay:0,intensity:Math.PI/4}),Ve.jsx(B2t,{rotation:[Math.PI/2,0,0],infiniteGrid:!0,cellSize:1,sectionSize:10}),Ve.jsx("object3D",{ref:i,children:r})]}),Ve.jsxs("div",{style:{position:"absolute",right:24,bottom:24,fontFamily:"sans-serif",color:"white",WebkitTextStroke:"0.5px rgba(0, 0, 0, 0.5)",fontSize:11},children:["@",OFt.version]}),n&&!a&&Ve.jsx("div",{onClick:()=>o(!0),style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:Ve.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})})]})}),VFt=FI(k3()),KFt=FI(RN()),vm=.01,pE={copper:[.9,.6,.2],fr4Green:[5/255,163/255,46/255],fr4GreenSolderWithMask:[0/255,152/255,19/255],fr1Copper:[.8,.4,.2],fr1CopperSolderWithMask:[.9,.6,.2]},U3=.001,d9=32,jFt=.035,C6=50,Rae={fr1:pE.fr1Copper,fr4:pE.fr4Green},G8e={fr1:pE.fr1CopperSolderWithMask,fr4:pE.fr4GreenSolderWithMask},JFt=FI(m6()),WFt=FI(k3()),qFt=FI(I6()),O8e=r=>{let e=0;for(let n=0;n<r.length;n++){const i=(n+1)%r.length;e+=r[n][0]*r[i][1],e-=r[i][0]*r[n][1]}return e/2<=0},z8e=(r,e=1.2)=>{const{center:t,outline:n}=r;let i=n.map(s=>[s.x,s.y]);O8e(i)&&(i=i.reverse());const a=(0,WFt.polygon)({points:i});let o=(0,JFt.extrudeLinear)({height:e},a);return o=(0,qFt.translate)([t.x,t.y,-e/2],o),o},ZFt=r=>{const e=sm(r).pcb_board.list()[0];if(!e)return console.warn("No pcb_board found for simplified geometry"),[];let t;const n=1.2;e.outline&&e.outline.length>0?t=z8e({center:e.center,outline:e.outline},n):t=(0,VFt.cuboid)({size:[e.width,e.height,n],center:[e.center.x,e.center.y,0]});const i=Rae[e.material]??pE.fr4Green;return[(0,KFt.colorize)(i,t)]},f9=FI(I6()),ix=FI(k3()),F3=FI(RN()),h9=FI(Bae()),lv=FI(k3()),E6=FI(RN()),mB=FI(Bae()),TC=.05,H8e=(r,e)=>{if(r.shape||(r.shape="circle"),r.shape==="circle")return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)((0,lv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:e.pcbThickness}),(0,lv.cylinder)({center:[r.x,r.y,e.pcbThickness/2+TC/2+vm],radius:r.outer_diameter/2,height:TC}),(0,lv.cylinder)({center:[r.x,r.y,-e.pcbThickness/2-TC/2-vm],radius:r.outer_diameter/2,height:TC})),(0,lv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2-vm,height:1.5})));if(r.shape==="circular_hole_with_rect_pad"){const t=r.rect_pad_width||r.hole_diameter,n=r.rect_pad_height||r.hole_diameter;return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)((0,lv.cuboid)({center:[r.x,r.y,1.2/2],size:[t,n,TC]}),(0,lv.cuboid)({center:[r.x,r.y,-1.2/2],size:[t,n,TC]}),(0,lv.cylinder)({center:[r.x,r.y,0],radius:r.hole_diameter/2,height:1.2})),(0,lv.cylinder)({center:[r.x,r.y,0],radius:Math.max(r.hole_diameter/2-vm,.01),height:1.5})))}if(r.shape==="pill"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=t?r.outer_height||i+.2:r.outer_width||n+.2,o=t?r.outer_width||n+.2:r.outer_height||i+.2,s=i/2,l=o/2,c=Math.abs(n-i),u=Math.abs(a-o),A=(0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i,c,e.pcbThickness]:[c,i,e.pcbThickness]}),d=(0,lv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s,height:e.pcbThickness}),f=(0,lv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s,height:e.pcbThickness}),g=(0,mB.union)(A,d,f),_=e.pcbThickness/2+TC/2+vm,I=(0,lv.cuboid)({center:[r.x,r.y,_],size:t?[o,u,TC]:[u,o,TC]}),E=(0,lv.cylinder)({center:t?[r.x,r.y-u/2,_]:[r.x-u/2,r.y,_],radius:l,height:TC}),x=(0,lv.cylinder)({center:t?[r.x,r.y+u/2,_]:[r.x+u/2,r.y,_],radius:l,height:TC}),B=(0,mB.union)(I,E,x),P=-e.pcbThickness/2-TC/2-vm,L=(0,lv.cuboid)({center:[r.x,r.y,P],size:t?[o,u,TC]:[u,o,TC]}),U=(0,lv.cylinder)({center:t?[r.x,r.y-u/2,P]:[r.x-u/2,r.y,P],radius:l,height:TC}),H=(0,lv.cylinder)({center:t?[r.x,r.y+u/2,P]:[r.x+u/2,r.y,P],radius:l,height:TC}),G=(0,mB.union)(L,U,H),W=(0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i-2*vm,c,e.pcbThickness+2*vm]:[c,i-2*vm,e.pcbThickness+2*vm]}),z=(0,lv.cylinder)({center:t?[r.x,r.y-c/2,0]:[r.x-c/2,r.y,0],radius:s-vm,height:e.pcbThickness+2*vm}),ae=(0,lv.cylinder)({center:t?[r.x,r.y+c/2,0]:[r.x+c/2,r.y,0],radius:s-vm,height:e.pcbThickness+2*vm}),te=(0,mB.union)(W,z,ae);return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)(g,B,G),te))}if(r.shape==="pill_hole_with_rect_pad"){const t=r.hole_height>r.hole_width,n=t?r.hole_height:r.hole_width,i=t?r.hole_width:r.hole_height,a=i/2,o=Math.abs(n-i),s=r.rect_pad_width||n+.2,l=r.rect_pad_height||i+.2,c=(0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i,o,1.2]:[o,i,1.2]}),u=(0,lv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a,height:1.2}),A=(0,lv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a,height:1.2}),d=(0,lv.cuboid)({center:[r.x,r.y,1.2/2],size:[s,l,TC]}),f=(0,lv.cuboid)({center:[r.x,r.y,-1.2/2],size:[s,l,TC]}),g=(0,mB.union)((0,lv.cuboid)({center:[r.x,r.y,0],size:t?[i-TC,o,1.5]:[o,i-TC,1.5]}),(0,lv.cylinder)({center:t?[r.x,r.y-o/2,0]:[r.x-o/2,r.y,0],radius:a-TC,height:1.5}),(0,lv.cylinder)({center:t?[r.x,r.y+o/2,0]:[r.x+o/2,r.y,0],radius:a-TC,height:1.5}));return(0,E6.colorize)(pE.copper,(0,mB.subtract)((0,mB.union)(c,u,A,d,f),g))}else throw new Error(`Unsupported plated hole shape: ${r.shape}`)},_6=FI(m6()),Y8e=FI(bae()),XFt=FI(Sae());function V8e(r,e){return Array.isArray(e)?[r.a*e[0]+r.c*e[1]+r.e,r.b*e[0]+r.d*e[1]+r.f]:{x:r.a*e.x+r.c*e.y+r.e,y:r.b*e.x+r.d*e.y+r.f}}function _w(r,e=0){return{a:1,c:0,e:r,b:0,d:1,f:e}}function K8e(...r){r=Array.isArray(r[0])?r[0]:r;const e=(t,n)=>({a:t.a*n.a+t.c*n.b,c:t.a*n.c+t.c*n.d,e:t.a*n.e+t.c*n.f+t.e,b:t.b*n.a+t.d*n.b,d:t.b*n.c+t.d*n.d,f:t.b*n.e+t.d*n.f+t.f});switch(r.length){case 0:throw new Error("no matrices provided");case 1:return r[0];case 2:return e(r[0],r[1]);default:{const[t,n,...i]=r,a=e(t,n);return K8e(a,...i)}}}function j8e(...r){return K8e(...r)}var{cos:$Ft,sin:eLt}=Math;function J8e(r,e,t){const n=$Ft(r),i=eLt(r);return{a:n,c:-i,e:0,b:i,d:n,f:0}}function tLt(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function x6(r,e,t,n){var i=Error.call(this,r);return Object.setPrototypeOf&&Object.setPrototypeOf(i,x6.prototype),i.expected=e,i.found=t,i.location=n,i.name="SyntaxError",i}tLt(x6,Error);function Nae(r,e,t){return t=t||" ",r.length>e?r:(e-=r.length,t+=t.repeat(e),r+t.slice(0,e))}x6.prototype.format=function(r){var e="Error: "+this.message;if(this.location){var t=null,n;for(n=0;n<r.length;n++)if(r[n].source===this.location.source){t=r[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,o=this.location.source+":"+a.line+":"+a.column;if(t){var s=this.location.end,l=Nae("",a.line.toString().length," "),c=t[i.line-1],u=i.line===s.line?s.column:c.length+1,A=u-i.column||1;e+=`
|
|
13079
13079
|
--> `+o+`
|
|
13080
13080
|
`+l+` |
|
|
13081
13081
|
`+a.line+" | "+c+`
|
|
@@ -13493,7 +13493,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return Mse}GVt();function lLe(r,e,t,n=
|
|
|
13493
13493
|
&:hover {
|
|
13494
13494
|
background-color: rgba(255, 255, 255, 0.1);
|
|
13495
13495
|
}
|
|
13496
|
-
`,onClick:n=>{n.stopPropagation(),t()},children:[Ve.jsx("input",{type:"checkbox",checked:e}),Ve.jsx("span",{style:{color:"#eee"},children:r})]}),fWt=({children:r,elements:e})=>{const[t,n]=G1(G=>[G.is_mouse_over_container,G.setIsMouseOverContainer]),[i,a]=nt.useState(!1),[o,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=G1(G=>[G.selected_layer,G.selectLayer]),[d,f,g,_,I,E]=G1(G=>[G.in_move_footprint_mode,G.in_draw_trace_mode,G.is_showing_rats_nest,G.is_showing_multiple_traces_length,G.is_showing_autorouting,G.is_showing_drc_errors]),x=G1(G=>G.setEditMode),B=G1(G=>G.setIsShowingRatsNest),P=G1(G=>G.setIsShowingMultipleTracesLength),L=G1(G=>G.setIsShowingAutorouting),U=G1(G=>G.setIsShowingDrcErrors);Pw("1",()=>A("top")),Pw("2",()=>A("bottom")),Pw("3",()=>A("inner1")),Pw("4",()=>A("inner2")),Pw("5",()=>A("inner3")),Pw("6",()=>A("inner4")),Pw("7",()=>A("inner5")),Pw("8",()=>A("inner6"));const H=(e==null?void 0:e.filter(G=>G.type.includes("error")).length)??0;return Ve.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:G=>{n(!1),s(!1)},children:[r,Ve.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",AWt.version]}),Ve.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:sx.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ve.jsxs(u5,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ve.jsxs("div",{children:["layer:"," ",Ve.jsx("span",{style:{marginLeft:2,fontWeight:500,color:c5[u]},children:u})]}),o&&Ve.jsx("div",{style:{marginTop:4,minWidth:120},children:Ale.map(G=>G.replace(/-/g,"")).map(G=>Ve.jsx(dWt,{name:G,selected:G===u,onClick:()=>{A(G.replace(/-/,""))}},G))})]}),Ve.jsxs(u5,{style:H>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ve.jsxs("div",{children:[H," errors"]}),l&&Ve.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(G=>G.type.includes("error")).map((G,W)=>Ve.jsxs(nt.Fragment,{children:[Ve.jsx("div",{children:G.error_type}),Ve.jsx("div",{children:G.message})]},W))})]}),Ve.jsx(u5,{style:{},onClick:()=>{x(f?"off":"draw_trace")},children:Ve.jsxs("div",{children:[f?"✖ ":"","Edit Traces"]})}),Ve.jsx(u5,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ve.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ve.jsx(u5,{style:{},onClick:()=>{B(!g)},children:Ve.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ve.jsx(u5,{onClick:()=>{a(!i)},children:Ve.jsxs("div",{children:[Ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ve.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ve.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ve.jsx(mle,{label:"Show All Trace Lengths",checked:_,onClick:()=>{P(!_)}}),Ve.jsx(mle,{label:"Show Autorouting Animation",checked:I,onClick:()=>{L(!I)}}),Ve.jsx(mle,{label:"Show DRC Errors",checked:E,onClick:()=>{U(!E)}})]})]})})]})]})},hWt=r=>{const{transform:e,elements:t}=r,[n,i]=nt.useMemo(()=>{const c=r.elements.flatMap(A=>BJt(A,r.elements)),u=FS(r.elements);return[c,u]},[r.elements]),[a,o]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>_Jt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=nt.useCallback(c=>{var d,f;const u=[];for(const g of c)if(g._element){const _=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(f=g._element)==null?void 0:f.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(_))}const A=new Set(c.map(g=>g._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ve.jsx(cWt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:Ve.jsx(KJt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(qJt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(YJt,{transform:e,focusOnHover:r.focusOnHover,children:Ve.jsx(fWt,{elements:t,children:Ve.jsx($Jt,{transform:e,elements:t,children:Ve.jsx(uWt,{transform:e,soup:t,children:Ve.jsx(zJt,{transform:e,debugGraphics:r.debugGraphics,children:Ve.jsx(HJt,{transform:e,elements:t,children:Ve.jsx(OJt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},pWt=Fu(Od(400,300),N1(40,-40)),gWt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=ple(),[f,g]=nt.useState(pWt),{ref:_,setTransform:I,cancelDrag:E}=EJt({transform:f,onSetTransform:g,enabled:c});let[x,B]=nt.useState([]);x=a??x;const P=nt.useRef(!1),L=nt.useRef(null),U=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,H=()=>{const te=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:le,width:pe,height:Ae}=W.some(ge=>ge.type.startsWith("pcb_"))?dJt(W.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((te.width??0)/pe,(te.height??0)/Ae,100)*.75,Ie=Fu(Od((te.width??0)/2,(te.height??0)/2),N1(he,-he,0,0),Od(-le.x,-le.y));I(Ie)};nt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(P.current||(H(),P.current=!0))},[r,d]);const G=nt.useMemo(()=>(r==null?void 0:r.filter(te=>te.type.startsWith("pcb_")||te.type.startsWith("source_")))??[],[U]),W=nt.useMemo(()=>RYt({circuitJson:G,editEvents:x}),[G,x]),z=te=>{B([...x,te]),o==null||o([...x,te])},ae=te=>{const le=x.map(pe=>pe.edit_event_id===te.edit_event_id?{...pe,...te}:pe);B(le),o==null||o(le)};return Ve.jsxs("div",{ref:_,style:{position:"relative"},children:[Ve.jsx("div",{ref:A,children:Ve.jsxs(hJt,{initialState:n,children:[Ve.jsx(hWt,{transform:f,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:z,onModifyEditEvent:ae,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:W,debugGraphics:e},d.width),Ve.jsx(gJt,{})]})}),l&&!c&&Ve.jsx("div",{onClick:()=>{u(!0),H()},onTouchStart:te=>{const le=te.touches[0];L.current={x:le.clientX,y:le.clientY}},onTouchEnd:te=>{const le=te.changedTouches[0],pe=L.current;if(!pe)return;const Ae=Math.abs(le.clientX-pe.x),he=Math.abs(le.clientY-pe.y);Ae<10&&he<10&&(te.preventDefault(),u(!0),H()),L.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:sx.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ve.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const mWt=({containerClassName:r,...e})=>{const t=nt.useRef(null),[n,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ve.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:Ve.jsx(gWt,{...e,height:n})})},yWt='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-tight{line-height:1.25}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',vWt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=yWt,document.head.appendChild(e)},[])},EGe=r=>`hsl(${Hx.indexOf(r)*137.5%360}, 70%, 50%)`,IWt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Hx.map(t=>{const n=r[t]||0,i=n/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:EGe(t)},children:Ve.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},CWt=({renderLog:r})=>{const[e,t]=nt.useState("chronological");if(!r)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Hx.indexOf(a[0])-Hx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx(IWt,{phaseTimings:r.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:n.map(([a,o])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:Hx.indexOf(a)}),Ve.jsx("td",{className:"rf-p-2",children:a}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:EGe(a),width:`${o/i*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},EWt="0.0.554",_Wt=["assembly","bom","circuit_json","errors","render_log"],xWt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:A,renderLog:d,showImportAndFormatButtons:f=!0,className:g,headerClassName:_,leftHeaderContent:I,readOnly:E,isStreaming:x,autoroutingLog:B,onReportAutoroutingLog:P,isRunningCode:L,hasCodeChangedSinceLastRun:U,onEditEvent:H,editEvents:G,defaultActiveTab:W,autoRotate3dViewerDisabled:z,showSchematicDebugGrid:ae=!1,showToggleFullScreen:te=!0,defaultToFullScreen:le=!1})=>{var we;vWt();const pe=nt.useMemo(()=>i?i.filter(Ge=>Ge&&"error_type"in Ge||Ge.type.includes("error")):null,[i]),[Ae,he]=nt.useState(W??"pcb"),[Ie,ge]=nt.useState(le),Me=nt.useCallback(Ge=>{he(Ge),A==null||A(Ge)},[A]),Se=()=>{ge(!Ie)};nt.useEffect(()=>{t&&Me("errors")},[t]),nt.useEffect(()=>{(Ae==="code"||Ae==="errors")&&i&&!t&&Me(W??"pcb")},[i]);const Re=nt.useCallback(Ge=>{window.TSCIRCUIT_3D_OBJECT_REF=Ge===null?void 0:Ge},[]);return Ve.jsx("div",{className:Mp("flex flex-col relative rf-overflow-x-hidden",g),children:Ve.jsx("div",{className:Mp("rf-md:sticky rf-md:top-2",Ie&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ve.jsxs(qve,{value:Ae,onValueChange:Me,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ve.jsxs("div",{className:Mp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",_),children:[I,I&&Ve.jsx("div",{className:"rf-flex-grow"}),!I&&L&&Ve.jsx(G3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!I&&Ve.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((we=d.lastRenderEvent)==null?void 0:we.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ve.jsx(G3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&Ve.jsxs(NK,{children:[s&&Ve.jsx($2,{value:"code",children:"Code"}),Ve.jsxs($2,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ve.jsxs($2,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ve.jsxs($2,{value:"cad",children:[i&&Ve.jsx("span",{className:Mp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Ae)&&Ve.jsx($2,{value:Ae,children:Wve(Ae)}),Ve.jsxs(Soe,{children:[Ve.jsx(woe,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(r6t,{className:"rf-w-4 rf-h-4"}),(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(J6,{className:"rf-*:text-xs",children:[_Wt.map(Ge=>Ve.jsxs(yb,{onSelect:()=>Me(Ge),children:[Ae!==Ge&&Ve.jsx(lPe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ae===Ge&&Ve.jsx(Pae,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:Wve(Ge)}),Ge==="errors"&&(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:pe==null?void 0:pe.length})]},Ge)),Ve.jsx(yb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",EWt.split(".").map((Ge,$e)=>$e===2?parseInt(Ge)+1:Ge).join(".")]})})]})]})]}),te&&Ve.jsx(w_,{onClick:Se,variant:"ghost",children:Ie?Ve.jsx(s6t,{size:16}):Ve.jsx(a6t,{size:16})})]}),s&&Ve.jsx(jb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:l})}),Ve.jsx(jb,{value:"pcb",children:Ve.jsx("div",{className:Mp("rf-overflow-hidden",Ie?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallbackRender:({error:Ge})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ge==null?void 0:Ge.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(mWt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Mp("rf-h-full rf-w-full",Ie?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ge=>{H&&Ge.forEach($e=>H($e))}}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"assembly",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:i?Ve.jsx(RHt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"schematic",children:Ve.jsx("div",{className:Mp("rf-overflow-auto rf-bg-white",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallbackRender:({error:Ge})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ge==null?void 0:Ge.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(QHt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ge=>{H==null||H(Ge)},debugGrid:ae}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"cad",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{FallbackComponent:YLt,children:i?Ve.jsx(zLt,{ref:Re,circuitJson:i,autoRotateDisabled:z}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"bom",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallbackRender:({error:Ge})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ge==null?void 0:Ge.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(UHt,{circuitJson:i}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"circuit_json",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:i?Ve.jsx(PHt,{elements:i}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"errors",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||pe&&pe.length>0?Ve.jsx(tzt,{code:r,circuitJsonErrors:pe,errorMessage:t,errorStack:n,autoroutingLog:B,onReportAutoroutingLog:P}):Ve.jsx(v9,{onRunClicked:e})})}),u&&Ve.jsx(jb,{value:"render_log",children:Ve.jsx(CWt,{renderLog:d})})]})})})};var YG="Dialog",[_Ge,xGe]=HS(YG),[BWt,Eb]=_Ge(YG),BGe=r=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=r,s=nt.useRef(null),l=nt.useRef(null),[c,u]=IM({prop:n,defaultProp:i??!1,onChange:a,caller:YG});return Ve.jsx(BWt,{scope:e,triggerRef:s,contentRef:l,contentId:YS(),titleId:YS(),descriptionId:YS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:o,children:t})};BGe.displayName=YG;var bGe="DialogTrigger",SGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(bGe,t),a=s1(e,i.triggerRef);return Ve.jsx(Bv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ile(i.open),...n,ref:a,onClick:Oh(r.onClick,i.onOpenToggle)})});SGe.displayName=bGe;var yle="DialogPortal",[bWt,wGe]=_Ge(yle,{forceMount:void 0}),QGe=r=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=r,a=Eb(yle,e);return Ve.jsx(bWt,{scope:e,forceMount:t,children:nt.Children.map(n,o=>Ve.jsx(Vb,{present:t||a.open,children:Ve.jsx(Aoe,{asChild:!0,container:i,children:o})}))})};QGe.displayName=yle;var VG="DialogOverlay",MGe=nt.forwardRef((r,e)=>{const t=wGe(VG,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Eb(VG,r.__scopeDialog);return a.modal?Ve.jsx(Vb,{present:n||a.open,children:Ve.jsx(wWt,{...i,ref:e})}):null});MGe.displayName=VG;var SWt=vM("DialogOverlay.RemoveScroll"),wWt=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(VG,t);return Ve.jsx(moe,{as:SWt,allowPinchZoom:!0,shards:[i.contentRef],children:Ve.jsx(Bv.div,{"data-state":Ile(i.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),w9="DialogContent",DGe=nt.forwardRef((r,e)=>{const t=wGe(w9,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Eb(w9,r.__scopeDialog);return Ve.jsx(Vb,{present:n||a.open,children:a.modal?Ve.jsx(QWt,{...i,ref:e}):Ve.jsx(MWt,{...i,ref:e})})});DGe.displayName=w9;var QWt=nt.forwardRef((r,e)=>{const t=Eb(w9,r.__scopeDialog),n=nt.useRef(null),i=s1(e,t.contentRef,n);return nt.useEffect(()=>{const a=n.current;if(a)return fke(a)},[]),Ve.jsx(RGe,{...r,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oh(r.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Oh(r.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Oh(r.onFocusOutside,a=>a.preventDefault())})}),MWt=nt.forwardRef((r,e)=>{const t=Eb(w9,r.__scopeDialog),n=nt.useRef(!1),i=nt.useRef(!1);return Ve.jsx(RGe,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=r.onCloseAutoFocus)==null||o.call(r,a),a.defaultPrevented||(n.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=r.onInteractOutside)==null||l.call(r,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),RGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=r,s=Eb(w9,t),l=nt.useRef(null),c=s1(e,l);return wPe(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(qae,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ve.jsx(Kae,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ile(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(RWt,{titleId:s.titleId}),Ve.jsx(TWt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),vle="DialogTitle",NGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(vle,t);return Ve.jsx(Bv.h2,{id:i.titleId,...n,ref:e})});NGe.displayName=vle;var TGe="DialogDescription",PGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(TGe,t);return Ve.jsx(Bv.p,{id:i.descriptionId,...n,ref:e})});PGe.displayName=TGe;var kGe="DialogClose",UGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(kGe,t);return Ve.jsx(Bv.button,{type:"button",...n,ref:e,onClick:Oh(r.onClick,()=>i.onOpenChange(!1))})});UGe.displayName=kGe;function Ile(r){return r?"open":"closed"}var FGe="DialogTitleWarning",[DWt,LGe]=Rht(FGe,{contentName:w9,titleName:vle,docsSlug:"dialog"}),RWt=({titleId:r})=>{const e=LGe(FGe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13496
|
+
`,onClick:n=>{n.stopPropagation(),t()},children:[Ve.jsx("input",{type:"checkbox",checked:e}),Ve.jsx("span",{style:{color:"#eee"},children:r})]}),fWt=({children:r,elements:e})=>{const[t,n]=G1(G=>[G.is_mouse_over_container,G.setIsMouseOverContainer]),[i,a]=nt.useState(!1),[o,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=G1(G=>[G.selected_layer,G.selectLayer]),[d,f,g,_,I,E]=G1(G=>[G.in_move_footprint_mode,G.in_draw_trace_mode,G.is_showing_rats_nest,G.is_showing_multiple_traces_length,G.is_showing_autorouting,G.is_showing_drc_errors]),x=G1(G=>G.setEditMode),B=G1(G=>G.setIsShowingRatsNest),P=G1(G=>G.setIsShowingMultipleTracesLength),L=G1(G=>G.setIsShowingAutorouting),U=G1(G=>G.setIsShowingDrcErrors);Pw("1",()=>A("top")),Pw("2",()=>A("bottom")),Pw("3",()=>A("inner1")),Pw("4",()=>A("inner2")),Pw("5",()=>A("inner3")),Pw("6",()=>A("inner4")),Pw("7",()=>A("inner5")),Pw("8",()=>A("inner6"));const H=(e==null?void 0:e.filter(G=>G.type.includes("error")).length)??0;return Ve.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:G=>{n(!1),s(!1)},children:[r,Ve.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",AWt.version]}),Ve.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:sx.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ve.jsxs(u5,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ve.jsxs("div",{children:["layer:"," ",Ve.jsx("span",{style:{marginLeft:2,fontWeight:500,color:c5[u]},children:u})]}),o&&Ve.jsx("div",{style:{marginTop:4,minWidth:120},children:Ale.map(G=>G.replace(/-/g,"")).map(G=>Ve.jsx(dWt,{name:G,selected:G===u,onClick:()=>{A(G.replace(/-/,""))}},G))})]}),Ve.jsxs(u5,{style:H>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ve.jsxs("div",{children:[H," errors"]}),l&&Ve.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(G=>G.type.includes("error")).map((G,W)=>Ve.jsxs(nt.Fragment,{children:[Ve.jsx("div",{children:G.error_type}),Ve.jsx("div",{children:G.message})]},W))})]}),Ve.jsx(u5,{style:{},onClick:()=>{x(f?"off":"draw_trace")},children:Ve.jsxs("div",{children:[f?"✖ ":"","Edit Traces"]})}),Ve.jsx(u5,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ve.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ve.jsx(u5,{style:{},onClick:()=>{B(!g)},children:Ve.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ve.jsx(u5,{onClick:()=>{a(!i)},children:Ve.jsxs("div",{children:[Ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ve.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ve.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ve.jsx(mle,{label:"Show All Trace Lengths",checked:_,onClick:()=>{P(!_)}}),Ve.jsx(mle,{label:"Show Autorouting Animation",checked:I,onClick:()=>{L(!I)}}),Ve.jsx(mle,{label:"Show DRC Errors",checked:E,onClick:()=>{U(!E)}})]})]})})]})]})},hWt=r=>{const{transform:e,elements:t}=r,[n,i]=nt.useMemo(()=>{const c=r.elements.flatMap(A=>BJt(A,r.elements)),u=FS(r.elements);return[c,u]},[r.elements]),[a,o]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>_Jt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=nt.useCallback(c=>{var d,f;const u=[];for(const g of c)if(g._element){const _=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(f=g._element)==null?void 0:f.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(_))}const A=new Set(c.map(g=>g._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ve.jsx(cWt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:Ve.jsx(KJt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(qJt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ve.jsx(YJt,{transform:e,focusOnHover:r.focusOnHover,children:Ve.jsx(fWt,{elements:t,children:Ve.jsx($Jt,{transform:e,elements:t,children:Ve.jsx(uWt,{transform:e,soup:t,children:Ve.jsx(zJt,{transform:e,debugGraphics:r.debugGraphics,children:Ve.jsx(HJt,{transform:e,elements:t,children:Ve.jsx(OJt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},pWt=Fu(Od(400,300),N1(40,-40)),gWt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=ple(),[f,g]=nt.useState(pWt),{ref:_,setTransform:I,cancelDrag:E}=EJt({transform:f,onSetTransform:g,enabled:c});let[x,B]=nt.useState([]);x=a??x;const P=nt.useRef(!1),L=nt.useRef(null),U=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,H=()=>{const te=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:le,width:pe,height:Ae}=W.some(ge=>ge.type.startsWith("pcb_"))?dJt(W.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((te.width??0)/pe,(te.height??0)/Ae,100)*.75,Ie=Fu(Od((te.width??0)/2,(te.height??0)/2),N1(he,-he,0,0),Od(-le.x,-le.y));I(Ie)};nt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(P.current||(H(),P.current=!0))},[r,d]);const G=nt.useMemo(()=>(r==null?void 0:r.filter(te=>te.type.startsWith("pcb_")||te.type.startsWith("source_")))??[],[U]),W=nt.useMemo(()=>RYt({circuitJson:G,editEvents:x}),[G,x]),z=te=>{B([...x,te]),o==null||o([...x,te])},ae=te=>{const le=x.map(pe=>pe.edit_event_id===te.edit_event_id?{...pe,...te}:pe);B(le),o==null||o(le)};return Ve.jsxs("div",{ref:_,style:{position:"relative"},children:[Ve.jsx("div",{ref:A,children:Ve.jsxs(hJt,{initialState:n,children:[Ve.jsx(hWt,{transform:f,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:z,onModifyEditEvent:ae,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:W,debugGraphics:e},d.width),Ve.jsx(gJt,{})]})}),l&&!c&&Ve.jsx("div",{onClick:()=>{u(!0),H()},onTouchStart:te=>{const le=te.touches[0];L.current={x:le.clientX,y:le.clientY}},onTouchEnd:te=>{const le=te.changedTouches[0],pe=L.current;if(!pe)return;const Ae=Math.abs(le.clientX-pe.x),he=Math.abs(le.clientY-pe.y);Ae<10&&he<10&&(te.preventDefault(),u(!0),H()),L.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:sx.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ve.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const mWt=({containerClassName:r,...e})=>{const t=nt.useRef(null),[n,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ve.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:Ve.jsx(gWt,{...e,height:n})})},yWt='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-tight{line-height:1.25}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',vWt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=yWt,document.head.appendChild(e)},[])},EGe=r=>`hsl(${Hx.indexOf(r)*137.5%360}, 70%, 50%)`,IWt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Hx.map(t=>{const n=r[t]||0,i=n/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:EGe(t)},children:Ve.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",n.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},CWt=({renderLog:r})=>{const[e,t]=nt.useState("chronological");if(!r)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Hx.indexOf(a[0])-Hx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx(IWt,{phaseTimings:r.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:n.map(([a,o])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:Hx.indexOf(a)}),Ve.jsx("td",{className:"rf-p-2",children:a}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:EGe(a),width:`${o/i*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},EWt="0.0.555",_Wt=["assembly","bom","circuit_json","errors","render_log"],xWt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:A,renderLog:d,showImportAndFormatButtons:f=!0,className:g,headerClassName:_,leftHeaderContent:I,readOnly:E,isStreaming:x,autoroutingLog:B,onReportAutoroutingLog:P,isRunningCode:L,hasCodeChangedSinceLastRun:U,onEditEvent:H,editEvents:G,defaultActiveTab:W,autoRotate3dViewerDisabled:z,showSchematicDebugGrid:ae=!1,showToggleFullScreen:te=!0,defaultToFullScreen:le=!1})=>{var we;vWt();const pe=nt.useMemo(()=>i?i.filter(Ge=>Ge&&"error_type"in Ge||Ge.type.includes("error")):null,[i]),[Ae,he]=nt.useState(W??"pcb"),[Ie,ge]=nt.useState(le),Me=nt.useCallback(Ge=>{he(Ge),A==null||A(Ge)},[A]),Se=()=>{ge(!Ie)};nt.useEffect(()=>{t&&Me("errors")},[t]),nt.useEffect(()=>{(Ae==="code"||Ae==="errors")&&i&&!t&&Me(W??"pcb")},[i]);const Re=nt.useCallback(Ge=>{window.TSCIRCUIT_3D_OBJECT_REF=Ge===null?void 0:Ge},[]);return Ve.jsx("div",{className:Mp("flex flex-col relative rf-overflow-x-hidden",g),children:Ve.jsx("div",{className:Mp("rf-md:sticky rf-md:top-2",Ie&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ve.jsxs(qve,{value:Ae,onValueChange:Me,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ve.jsxs("div",{className:Mp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",_),children:[I,I&&Ve.jsx("div",{className:"rf-flex-grow"}),!I&&L&&Ve.jsx(G3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!I&&Ve.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((we=d.lastRenderEvent)==null?void 0:we.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ve.jsx(G3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&Ve.jsxs(NK,{children:[s&&Ve.jsx($2,{value:"code",children:"Code"}),Ve.jsxs($2,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ve.jsxs($2,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ve.jsxs($2,{value:"cad",children:[i&&Ve.jsx("span",{className:Mp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Ae)&&Ve.jsx($2,{value:Ae,children:Wve(Ae)}),Ve.jsxs(Soe,{children:[Ve.jsx(woe,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(r6t,{className:"rf-w-4 rf-h-4"}),(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(J6,{className:"rf-*:text-xs",children:[_Wt.map(Ge=>Ve.jsxs(yb,{onSelect:()=>Me(Ge),children:[Ae!==Ge&&Ve.jsx(lPe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ae===Ge&&Ve.jsx(Pae,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:Wve(Ge)}),Ge==="errors"&&(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:pe==null?void 0:pe.length})]},Ge)),Ve.jsx(yb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",EWt.split(".").map((Ge,$e)=>$e===2?parseInt(Ge)+1:Ge).join(".")]})})]})]})]}),te&&Ve.jsx(w_,{onClick:Se,variant:"ghost",children:Ie?Ve.jsx(s6t,{size:16}):Ve.jsx(a6t,{size:16})})]}),s&&Ve.jsx(jb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:l})}),Ve.jsx(jb,{value:"pcb",children:Ve.jsx("div",{className:Mp("rf-overflow-hidden",Ie?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallbackRender:({error:Ge})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ge==null?void 0:Ge.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(mWt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Mp("rf-h-full rf-w-full",Ie?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ge=>{H&&Ge.forEach($e=>H($e))}}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"assembly",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:i?Ve.jsx(RHt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"schematic",children:Ve.jsx("div",{className:Mp("rf-overflow-auto rf-bg-white",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallbackRender:({error:Ge})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ge==null?void 0:Ge.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(QHt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ge=>{H==null||H(Ge)},debugGrid:ae}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"cad",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{FallbackComponent:YLt,children:i?Ve.jsx(zLt,{ref:Re,circuitJson:i,autoRotateDisabled:z}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"bom",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallbackRender:({error:Ge})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ge==null?void 0:Ge.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(UHt,{circuitJson:i}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"circuit_json",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(L3,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:i?Ve.jsx(PHt,{elements:i}):Ve.jsx(v9,{onRunClicked:e})})})}),Ve.jsx(jb,{value:"errors",children:Ve.jsx("div",{className:Mp("rf-overflow-auto",Ie?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||pe&&pe.length>0?Ve.jsx(tzt,{code:r,circuitJsonErrors:pe,errorMessage:t,errorStack:n,autoroutingLog:B,onReportAutoroutingLog:P}):Ve.jsx(v9,{onRunClicked:e})})}),u&&Ve.jsx(jb,{value:"render_log",children:Ve.jsx(CWt,{renderLog:d})})]})})})};var YG="Dialog",[_Ge,xGe]=HS(YG),[BWt,Eb]=_Ge(YG),BGe=r=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=r,s=nt.useRef(null),l=nt.useRef(null),[c,u]=IM({prop:n,defaultProp:i??!1,onChange:a,caller:YG});return Ve.jsx(BWt,{scope:e,triggerRef:s,contentRef:l,contentId:YS(),titleId:YS(),descriptionId:YS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:o,children:t})};BGe.displayName=YG;var bGe="DialogTrigger",SGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(bGe,t),a=s1(e,i.triggerRef);return Ve.jsx(Bv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ile(i.open),...n,ref:a,onClick:Oh(r.onClick,i.onOpenToggle)})});SGe.displayName=bGe;var yle="DialogPortal",[bWt,wGe]=_Ge(yle,{forceMount:void 0}),QGe=r=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=r,a=Eb(yle,e);return Ve.jsx(bWt,{scope:e,forceMount:t,children:nt.Children.map(n,o=>Ve.jsx(Vb,{present:t||a.open,children:Ve.jsx(Aoe,{asChild:!0,container:i,children:o})}))})};QGe.displayName=yle;var VG="DialogOverlay",MGe=nt.forwardRef((r,e)=>{const t=wGe(VG,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Eb(VG,r.__scopeDialog);return a.modal?Ve.jsx(Vb,{present:n||a.open,children:Ve.jsx(wWt,{...i,ref:e})}):null});MGe.displayName=VG;var SWt=vM("DialogOverlay.RemoveScroll"),wWt=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(VG,t);return Ve.jsx(moe,{as:SWt,allowPinchZoom:!0,shards:[i.contentRef],children:Ve.jsx(Bv.div,{"data-state":Ile(i.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),w9="DialogContent",DGe=nt.forwardRef((r,e)=>{const t=wGe(w9,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Eb(w9,r.__scopeDialog);return Ve.jsx(Vb,{present:n||a.open,children:a.modal?Ve.jsx(QWt,{...i,ref:e}):Ve.jsx(MWt,{...i,ref:e})})});DGe.displayName=w9;var QWt=nt.forwardRef((r,e)=>{const t=Eb(w9,r.__scopeDialog),n=nt.useRef(null),i=s1(e,t.contentRef,n);return nt.useEffect(()=>{const a=n.current;if(a)return fke(a)},[]),Ve.jsx(RGe,{...r,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oh(r.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Oh(r.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Oh(r.onFocusOutside,a=>a.preventDefault())})}),MWt=nt.forwardRef((r,e)=>{const t=Eb(w9,r.__scopeDialog),n=nt.useRef(!1),i=nt.useRef(!1);return Ve.jsx(RGe,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=r.onCloseAutoFocus)==null||o.call(r,a),a.defaultPrevented||(n.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=r.onInteractOutside)==null||l.call(r,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),RGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=r,s=Eb(w9,t),l=nt.useRef(null),c=s1(e,l);return wPe(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(qae,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ve.jsx(Kae,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ile(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(RWt,{titleId:s.titleId}),Ve.jsx(TWt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),vle="DialogTitle",NGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(vle,t);return Ve.jsx(Bv.h2,{id:i.titleId,...n,ref:e})});NGe.displayName=vle;var TGe="DialogDescription",PGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(TGe,t);return Ve.jsx(Bv.p,{id:i.descriptionId,...n,ref:e})});PGe.displayName=TGe;var kGe="DialogClose",UGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Eb(kGe,t);return Ve.jsx(Bv.button,{type:"button",...n,ref:e,onClick:Oh(r.onClick,()=>i.onOpenChange(!1))})});UGe.displayName=kGe;function Ile(r){return r?"open":"closed"}var FGe="DialogTitleWarning",[DWt,LGe]=Rht(FGe,{contentName:w9,titleName:vle,docsSlug:"dialog"}),RWt=({titleId:r})=>{const e=LGe(FGe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13497
13497
|
|
|
13498
13498
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
13499
13499
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tscircuit/runframe",
|
|
3
3
|
"main": "dist/preview.js",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.556",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dist/preview.js",
|
|
8
8
|
"./preview": "./dist/preview.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@radix-ui/react-progress": "^1.1.2",
|
|
81
81
|
"@radix-ui/react-slot": "^1.1.1",
|
|
82
82
|
"@radix-ui/react-tabs": "^1.1.2",
|
|
83
|
-
"@tscircuit/3d-viewer": "^0.0.
|
|
83
|
+
"@tscircuit/3d-viewer": "^0.0.261",
|
|
84
84
|
"@tscircuit/assembly-viewer": "^0.0.1",
|
|
85
85
|
"@tscircuit/core": "^0.0.449",
|
|
86
86
|
"@tscircuit/create-snippet-url": "^0.0.8",
|