claude-live 3.0.1 → 3.1.0

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.
@@ -1,4 +1,4 @@
1
- import{C as W,G as p,a as b,W as z,S as M,P as A,O as S,B as k,b as C,M as F,A as u,d as h,E as j,R,U as L,V,g as E,L as _,h as G,Q as I,k as g,D as f,I as P,r as v,l as o}from"./index-zmiMo1Db.js";class D{constructor(e){this.clock=new W,this.elapsed=0,this.agentGroup=new p,this.currentVisual=null,this.currentVariation=null,this.agentTetherLine=null,this.wanderOffsets=new b(Math.random()*100,Math.random()*100,Math.random()*100),this.pulseTimer=0,this.pulseInterval=2,this._onResize=()=>{const d=this.renderer.domElement.parentElement;if(!d)return;const y=Math.max(1,d.clientWidth),l=Math.max(1,d.clientHeight);this.camera.aspect=y/l,this.camera.updateProjectionMatrix(),this.renderer.setSize(y,l),this.composer.setSize(y,l)},this.renderer=new z({antialias:!0}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(e.clientWidth,e.clientHeight),this.renderer.setClearColor(197384),e.appendChild(this.renderer.domElement),this.scene=new M;const t=Math.max(1,e.clientWidth),r=Math.max(1,e.clientHeight);this.camera=new A(55,t/r,1,2e3),this.camera.position.set(0,30,110),this.controls=new S(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.06,this.controls.autoRotate=!0,this.controls.autoRotateSpeed=.5,this.controls.target.set(0,15,0),this.controls.minDistance=20,this.controls.maxDistance=300,this.background=new k,this.scene.add(this.background.group);const n=new C(3,16,16),a=new F({color:4491519,transparent:!0,opacity:.5,blending:u}),i=new h(n,a);this.scene.add(i),this.scene.add(this.agentGroup),this.composer=new j(this.renderer),this.composer.addPass(new R(this.scene,this.camera));const c=new L(new V(e.clientWidth,e.clientHeight),1.2,.4,.15);this.composer.addPass(c),this.scene.updateMatrixWorld(!0),this.resizeObserver=new ResizeObserver(this._onResize),this.resizeObserver.observe(e),window.addEventListener("resize",this._onResize),this._onResize()}setVariation(e){if(this.currentVariation=e,this._clearVisual(),this.currentVisual=e.build(this.agentGroup),!this.agentTetherLine){const t=new E().setFromPoints(new Array(21).fill(new b)),r=new _({color:4500223,transparent:!0,opacity:.2,blending:u});this.agentTetherLine=new G(t,r),this.scene.add(this.agentTetherLine)}this.pulseTimer=0}triggerPulse(){var e,t;(t=(e=this.currentVisual)==null?void 0:e.pulse)==null||t.call(e)}_clearVisual(){this.currentVisual&&(this.currentVisual.dispose(),this.currentVisual=null)}tick(){const e=Math.min(this.clock.getDelta(),.05);if(this.elapsed+=e,this.controls.update(),this.background.tick(e),this.currentVisual){this.currentVisual.tick(e,this.elapsed);const t=.25;this.wanderOffsets.x+=e*t*.8,this.wanderOffsets.y+=e*t*1.1,this.wanderOffsets.z+=e*t*.9;const r=50;if(this.agentGroup.position.set(Math.sin(this.wanderOffsets.x)*r,25+Math.sin(this.wanderOffsets.y)*15,Math.cos(this.wanderOffsets.z)*r*Math.cos(this.wanderOffsets.x*.5)),this.agentTetherLine){const n=new b(0,0,0),a=this.agentGroup.position.clone(),i=n.clone().lerp(a,.5);i.y-=10+Math.sin(this.elapsed*2)*4;const c=new I(n,i,a);this.agentTetherLine.geometry.setFromPoints(c.getPoints(20))}this.pulseTimer+=e,this.pulseTimer>=this.pulseInterval&&(this.pulseTimer=0,this.pulseInterval=1.5+Math.random()*3)}try{this.composer.render()}catch{}}destroy(){this.resizeObserver.disconnect(),window.removeEventListener("resize",this._onResize),this.renderer.dispose(),this.renderer.domElement.remove(),this._clearVisual(),this.agentTetherLine&&(this.scene.remove(this.agentTetherLine),this.agentTetherLine.geometry.dispose(),this.agentTetherLine.material.dispose())}}const w=new P(3.5,128),T=new P(3.5,32).toNonIndexed();function O(s){const e=new p;s.add(e);const t=new g({uniforms:{uTime:{value:0},uActivity:{value:0}},vertexShader:`
1
+ import{C as W,G as p,a as b,W as z,S as M,P as A,O as S,B as k,b as C,M as F,A as u,d as h,E as j,R,U as L,V,g as E,L as _,h as G,Q as I,k as g,D as f,I as P,r as v,l as o}from"./index-cWLk4rCz.js";class D{constructor(e){this.clock=new W,this.elapsed=0,this.agentGroup=new p,this.currentVisual=null,this.currentVariation=null,this.agentTetherLine=null,this.wanderOffsets=new b(Math.random()*100,Math.random()*100,Math.random()*100),this.pulseTimer=0,this.pulseInterval=2,this._onResize=()=>{const d=this.renderer.domElement.parentElement;if(!d)return;const y=Math.max(1,d.clientWidth),l=Math.max(1,d.clientHeight);this.camera.aspect=y/l,this.camera.updateProjectionMatrix(),this.renderer.setSize(y,l),this.composer.setSize(y,l)},this.renderer=new z({antialias:!0}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(e.clientWidth,e.clientHeight),this.renderer.setClearColor(197384),e.appendChild(this.renderer.domElement),this.scene=new M;const t=Math.max(1,e.clientWidth),r=Math.max(1,e.clientHeight);this.camera=new A(55,t/r,1,2e3),this.camera.position.set(0,30,110),this.controls=new S(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.06,this.controls.autoRotate=!0,this.controls.autoRotateSpeed=.5,this.controls.target.set(0,15,0),this.controls.minDistance=20,this.controls.maxDistance=300,this.background=new k,this.scene.add(this.background.group);const n=new C(3,16,16),a=new F({color:4491519,transparent:!0,opacity:.5,blending:u}),i=new h(n,a);this.scene.add(i),this.scene.add(this.agentGroup),this.composer=new j(this.renderer),this.composer.addPass(new R(this.scene,this.camera));const c=new L(new V(e.clientWidth,e.clientHeight),1.2,.4,.15);this.composer.addPass(c),this.scene.updateMatrixWorld(!0),this.resizeObserver=new ResizeObserver(this._onResize),this.resizeObserver.observe(e),window.addEventListener("resize",this._onResize),this._onResize()}setVariation(e){if(this.currentVariation=e,this._clearVisual(),this.currentVisual=e.build(this.agentGroup),!this.agentTetherLine){const t=new E().setFromPoints(new Array(21).fill(new b)),r=new _({color:4500223,transparent:!0,opacity:.2,blending:u});this.agentTetherLine=new G(t,r),this.scene.add(this.agentTetherLine)}this.pulseTimer=0}triggerPulse(){var e,t;(t=(e=this.currentVisual)==null?void 0:e.pulse)==null||t.call(e)}_clearVisual(){this.currentVisual&&(this.currentVisual.dispose(),this.currentVisual=null)}tick(){const e=Math.min(this.clock.getDelta(),.05);if(this.elapsed+=e,this.controls.update(),this.background.tick(e),this.currentVisual){this.currentVisual.tick(e,this.elapsed);const t=.25;this.wanderOffsets.x+=e*t*.8,this.wanderOffsets.y+=e*t*1.1,this.wanderOffsets.z+=e*t*.9;const r=50;if(this.agentGroup.position.set(Math.sin(this.wanderOffsets.x)*r,25+Math.sin(this.wanderOffsets.y)*15,Math.cos(this.wanderOffsets.z)*r*Math.cos(this.wanderOffsets.x*.5)),this.agentTetherLine){const n=new b(0,0,0),a=this.agentGroup.position.clone(),i=n.clone().lerp(a,.5);i.y-=10+Math.sin(this.elapsed*2)*4;const c=new I(n,i,a);this.agentTetherLine.geometry.setFromPoints(c.getPoints(20))}this.pulseTimer+=e,this.pulseTimer>=this.pulseInterval&&(this.pulseTimer=0,this.pulseInterval=1.5+Math.random()*3)}try{this.composer.render()}catch{}}destroy(){this.resizeObserver.disconnect(),window.removeEventListener("resize",this._onResize),this.renderer.dispose(),this.renderer.domElement.remove(),this._clearVisual(),this.agentTetherLine&&(this.scene.remove(this.agentTetherLine),this.agentTetherLine.geometry.dispose(),this.agentTetherLine.material.dispose())}}const w=new P(3.5,128),T=new P(3.5,32).toNonIndexed();function O(s){const e=new p;s.add(e);const t=new g({uniforms:{uTime:{value:0},uActivity:{value:0}},vertexShader:`
2
2
  uniform float uTime; uniform float uActivity;
3
3
  varying vec3 vWorldPos;
4
4
 
@@ -1 +1 @@
1
- import{C as U,G as O,c as x,W as $,a6 as _,aj as Y,S as X,P as Z,O as J,B as K,a9 as Q,ab as B,d as N,I as W,ak as ee,al as q,M as T,ac as te,E as se,R as ne,U as ie,V as oe,a as p,am as re,A as j,an as ae,ao as ce,Y as G,X as E,v as le,$ as he,a5 as de,_ as pe,r as w,l as h}from"./index-zmiMo1Db.js";class ue{constructor(e){this.clock=new U,this.elapsed=0,this.visualGroup=new O,this.currentVisual=null,this.pulseTimer=0,this.pulseInterval=2.6,this.coreActivity=0,this.accent=new x("#7ec8ff"),this.coreGroup=new O,this.onResize=()=>{const a=this.renderer.domElement.parentElement;if(!a)return;const l=Math.max(1,a.clientWidth),c=Math.max(1,a.clientHeight);this.camera.aspect=l/c,this.camera.updateProjectionMatrix(),this.renderer.setSize(l,c),this.composer.setSize(l,c)},this.renderer=new $({antialias:!0}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(e.clientWidth,e.clientHeight),this.renderer.setClearColor(263435),this.renderer.outputColorSpace=_,this.renderer.toneMapping=Y,this.renderer.toneMappingExposure=1.08,e.appendChild(this.renderer.domElement),this.scene=new X;const t=Math.max(1,e.clientWidth),s=Math.max(1,e.clientHeight);this.camera=new Z(44,t/s,1,3e3),this.camera.position.set(0,60,164),this.controls=new J(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.06,this.controls.autoRotate=!0,this.controls.autoRotateSpeed=.18,this.controls.target.set(0,18,0),this.controls.minDistance=58,this.controls.maxDistance=320,this.background=new K,this.scene.add(this.background.group),this.scene.add(new Q(13424639,1.2));const n=new B(16777215,.75);n.position.set(90,120,100),this.scene.add(n);const i=new B(8959999,.42);i.position.set(-100,40,-80),this.scene.add(i),this.coreShell=new N(new W(6.4,1),new ee({color:new x("#0b1120"),emissive:this.accent.clone().multiplyScalar(.28),emissiveIntensity:1,specular:new x("#ffffff"),shininess:90,transparent:!0,opacity:.94})),this.coreRing=new N(new q(11.5,.18,12,80),new T({color:this.accent,transparent:!0,opacity:.24})),this.coreRing.rotation.x=Math.PI*.5,this.coreOuterRing=new N(new q(16.5,.12,12,96),new T({color:this.accent.clone().lerp(new x("#ffffff"),.2),transparent:!0,opacity:.12})),this.coreOuterRing.rotation.set(Math.PI*.5,.24,0),this.coreLight=new te(this.accent.getHex(),18,260,2),this.coreGroup.add(this.coreShell,this.coreRing,this.coreOuterRing,this.coreLight),this.coreGroup.position.set(0,12,0),this.scene.add(this.coreGroup),this.scene.add(this.visualGroup),this.composer=new se(this.renderer),this.composer.addPass(new ne(this.scene,this.camera)),this.composer.addPass(new ie(new oe(t,s),.48,.24,.4)),this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(e),window.addEventListener("resize",this.onResize),this.onResize()}setVariation(e){this.clearVisual(),this.applyAccent(e.accent),this.currentVisual=e.build(this.visualGroup,this.camera),this.triggerPulse()}triggerPulse(){var e;this.coreActivity=1,(e=this.currentVisual)==null||e.pulse()}tick(){var t;const e=Math.min(this.clock.getDelta(),.05);this.elapsed+=e,this.pulseTimer+=e,this.coreActivity=Math.max(0,this.coreActivity-e*.62),this.pulseTimer>=this.pulseInterval&&(this.pulseTimer=0,this.pulseInterval=2.3+Math.random()*1.5,this.triggerPulse()),this.controls.update(),this.background.tick(e),(t=this.currentVisual)==null||t.tick(e,this.elapsed),this.tickCore();try{this.composer.render()}catch{}}destroy(){this.resizeObserver.disconnect(),window.removeEventListener("resize",this.onResize),this.clearVisual(),this.background.dispose(),this.controls.dispose(),this.renderer.dispose(),this.renderer.domElement.remove(),this.coreShell.geometry.dispose(),this.coreShell.material.dispose(),this.coreRing.geometry.dispose(),this.coreRing.material.dispose(),this.coreOuterRing.geometry.dispose(),this.coreOuterRing.material.dispose()}applyAccent(e){this.accent.set(e);const t=this.coreShell.material,s=this.coreRing.material,n=this.coreOuterRing.material;t.emissive.copy(this.accent).multiplyScalar(.28),s.color.copy(this.accent),n.color.copy(this.accent).lerp(new x("#ffffff"),.2),this.coreLight.color.copy(this.accent)}tickCore(){const e=1+Math.sin(this.elapsed*.7)*.03,t=1+this.coreActivity*.18,s=this.coreShell.material,n=this.coreRing.material,i=this.coreOuterRing.material;this.coreShell.rotation.y+=.0024,this.coreShell.rotation.x=Math.sin(this.elapsed*.18)*.08,this.coreShell.scale.setScalar(e*t),this.coreRing.rotation.z+=.003+this.coreActivity*.01,this.coreRing.scale.setScalar(1+this.coreActivity*.1),this.coreOuterRing.rotation.y-=.0022,this.coreOuterRing.rotation.z=Math.sin(this.elapsed*.42)*.18,this.coreOuterRing.scale.setScalar(1+this.coreActivity*.16),s.emissiveIntensity=.96+this.coreActivity*.36,n.opacity=.18+this.coreActivity*.14,i.opacity=.08+this.coreActivity*.1,this.coreLight.intensity=14+this.coreActivity*12+Math.sin(this.elapsed*.55)*2}clearVisual(){this.currentVisual&&(this.currentVisual.dispose(),this.currentVisual=null)}}const d=new p(0,12,0),ge=new p(0,1,0),P=new x("#ffffff"),me=new x("#121a2d"),b=new he,f=new p,L=new p,I=new p,M=new x;function fe(o){return o-Math.floor(o)}function g(o){return fe(Math.sin(o*127.1+311.7)*43758.5453123)}function y(o){return g(o)*2-1}function H(o,e){const t=Math.atan2(Math.sin(o-e),Math.cos(o-e));return Math.abs(t)}function D(o,e,t=0,s=Math.PI*2){const n=[],i=o>1?s/(o-1):0,a=t-s*.5;for(let l=0;l<o;l++){const c=s>=Math.PI*2?t+l/o*Math.PI*2:a+i*l;n.push(new p(Math.cos(c),e,Math.sin(c)).normalize())}return n}function A(o,e,t,s=1){const n=o.clone().sub(d);return n.lengthSq()<1e-4?n.set(0,1,0):n.normalize(),{home:o.clone(),position:o.clone(),normal:n,state:"dormant",energy:0,carrierNode:null,meta:e,phase:g(t*3+1)*Math.PI*2,driftAmplitude:s*(.45+g(t*3+2)*.55),driftFrequency:.6+g(t*3+3)*.8}}function S(o,e,t){const s=[];for(let n=0;n<o.length;n++){const i=o[n];i.state==="dormant"&&s.push({index:n,score:t(i)})}return s.sort((n,i)=>n.score-i.score),s.slice(0,e).map(n=>n.index)}function v(o,e){return S(o,e,t=>t.home.distanceToSquared(d))}function ye(){const o=[];for(let e=0;e<84;e++){const t=g(e*13+1)*Math.PI*2,s=16+g(e*13+2)*18,n=.7+g(e*13+3)*.35,i=Math.cos(t)*s*n,a=6+Math.pow(g(e*13+4),.72)*22,l=Math.sin(t)*s*n;o.push(A(new p(d.x+i,d.y+a,d.z+l),{angle:t},e,1))}return o}function be(){const o=[];for(let e=0;e<76;e++){const t=-1+e/75*2+y(e*17+1)*.04,s=14+g(e*17+2)*26,n=t*38,i=6+(1-Math.abs(t)*.7)*14+y(e*17+3)*5,a=y(e*17+4)*(4+s*.12);o.push(A(new p(d.x+n,d.y+i,d.z+a),{sweep:t},e+100,.85))}return o}function xe(){const o=[];for(let e=0;e<82;e++){const t=e%2,s=t===0?-26:26,n=t===0?-7:7,i=s+y(e*19+1)*14,a=7+g(e*19+2)*20,l=n+y(e*19+3)*12;o.push(A(new p(d.x+i,d.y+a,d.z+l),{lobe:t},e+200,.95))}return o}function we(){const o=[];for(let e=0;e<88;e++){const t=e/88*Math.PI*2+y(e*23+1)*.08,s=28+y(e*23+2)*4.8,n=Math.cos(t)*s,i=10+Math.sin(t*2.2)*4+y(e*23+3)*2.4,a=Math.sin(t)*s;o.push(A(new p(d.x+n,d.y+i,d.z+a),{angle:t},e+300,.9))}return o}function Me(){const o=[];for(let t=0;t<80;t++){const s=t%4,n=g(t*29+1)*Math.PI*2,i=8+s*3.8+g(t*29+2)*6,a=Math.cos(n)*i,l=6+s*8.5+y(t*29+3)*2.4,c=Math.sin(n)*i*.82;o.push(A(new p(d.x+a,d.y+l,d.z+c),{angle:n,layer:s},t+400,1.05))}return o}function Se(o,e){const t=g(e*31+1)*Math.PI*2,s=18+g(e*31+2)*10,n=10+g(e*31+3)*18;I.set(d.x+Math.cos(t)*s,d.y+n,d.z+Math.sin(t)*s);const i=S(o,12,a=>a.home.distanceToSquared(I));return i.length?i:v(o,12)}function ve(o,e){const t=-1+e%7/6*2,s=S(o,11,n=>Math.abs((n.meta.sweep??0)-t)*100+Math.abs(n.home.y-(d.y+16)));return s.length?s:v(o,11)}function Pe(o,e){const t=e%2;I.set(d.x+(t===0?-28:28)+y(e*37+1)*6,d.y+10+g(e*37+2)*18,d.z+(t===0?-7:7)+y(e*37+3)*4);const s=S(o,12,n=>((n.meta.lobe??-1)===t?0:1e4)+n.home.distanceToSquared(I));return s.length?s:v(o,12)}function Re(o,e){const t=e*.72,s=S(o,14,n=>H(n.meta.angle??0,t)*180);return s.length?s:v(o,14)}function Ae(o,e){const t=e%4,s=g(e*41+1)*Math.PI*2,n=S(o,10,i=>{const a=(i.meta.layer??-1)===t?0:1e4,l=H(i.meta.angle??0,s)*90;return a+l});return n.length?n:v(o,10)}class ke{constructor(e,t){this.blueprint=t,this.group=new O,this.branchGeometry=new re(1,1,1,6,1,!0),this.branchMaterial=new T({transparent:!0,opacity:.88,depthWrite:!1,blending:j}),this.nodeGeometry=new W(1,1),this.nodeMaterial=new T({transparent:!0,opacity:.96,depthWrite:!1,blending:j}),this.nodes=[],this.segments=[],this.segmentIndexByNode=[],this.pulses=[],this.pulseIndex=0,this.activity=0,this.pendingSteps=0,this.stepAccumulator=0,this.completionDelay=0,this.pulse=()=>{(!this.hasDormantAttractors()&&!this.hasArmedAttractors()||this.segments.length>=this.blueprint.maxSegments-this.blueprint.maxNewPerStep)&&this.reset();const a=this.blueprint.selectTargets(this.attractors,this.pulseIndex).filter(c=>{var r;return((r=this.attractors[c])==null?void 0:r.state)==="dormant"}),l=a.length?a:v(this.attractors,8);for(const c of l){const r=this.attractors[c];r.state==="dormant"&&(r.state="armed",r.energy=1.2)}this.pendingSteps=Math.min(this.pendingSteps+this.blueprint.stepsPerPulse,this.blueprint.stepsPerPulse*4),this.activity=1,this.completionDelay=0,this.pulseIndex+=1,this.spawnPulseBursts(Math.min(3,1+Math.floor(l.length/4)))},this.tick=(a,l)=>{this.activity=Math.max(0,this.activity-a*.46),this.updateAttractors(l,a),this.advanceGrowth(a),this.updatePulses(a,l),this.updateBranchInstances(),this.updateNodeInstances(l),!this.hasDormantAttractors()&&!this.hasArmedAttractors()?(this.completionDelay+=a,this.completionDelay>2.6&&(this.reset(),this.pulse())):this.completionDelay=0},this.dispose=()=>{this.clearPulses(),this.group.removeFromParent(),this.branchGeometry.dispose(),this.branchMaterial.dispose(),this.nodeGeometry.dispose(),this.nodeMaterial.dispose(),this.glowTexture.dispose()},this.accentColor=new x(t.accent),this.branchBaseColor=this.accentColor.clone().lerp(P,.14),this.dormantColor=this.accentColor.clone().lerp(me,.78);const[s,n,i]=ae(t.accent);this.glowTexture=ce(s,n,i,96),this.branchMesh=new G(this.branchGeometry,this.branchMaterial,t.maxSegments),this.branchMesh.instanceMatrix.setUsage(E),this.branchMesh.frustumCulled=!1,this.branchMesh.count=0,this.attractors=t.createAttractors(),this.nodeMesh=new G(this.nodeGeometry,this.nodeMaterial,this.attractors.length),this.nodeMesh.instanceMatrix.setUsage(E),this.nodeMesh.frustumCulled=!1,this.group.add(this.branchMesh,this.nodeMesh),e.add(this.group),this.reset()}reset(){this.clearPulses(),this.nodes=[],this.segments=[],this.segmentIndexByNode=[],this.activity=0,this.pendingSteps=0,this.stepAccumulator=0,this.completionDelay=0,this.pulseIndex=0;for(const e of this.attractors)e.position.copy(e.home),e.state="dormant",e.energy=0,e.carrierNode=null;this.nodes.push({position:d.clone(),parent:null,depth:0,radius:this.blueprint.rootRadius}),this.segmentIndexByNode[0]=-1;for(const e of this.blueprint.seedDirections){f.copy(e).normalize();const t=this.blueprint.stepLength*1.05,s=d.clone().addScaledVector(f,t);this.addNode(0,s,1)}this.updateBranchInstances(),this.updateNodeInstances(0)}updateAttractors(e,t){for(const s of this.attractors){s.energy=Math.max(0,s.energy-t*.72);const n=s.state==="captured"?.18:s.state==="armed"?.42:.1,i=Math.sin(e*s.driftFrequency+s.phase)*s.driftAmplitude*this.blueprint.drift*(n+s.energy*.3);s.position.copy(s.home).addScaledVector(s.normal,i)}}advanceGrowth(e){const s=this.hasArmedAttractors()?3.2:0,n=this.pendingSteps>0?18:s;if(!(n<=0))for(this.stepAccumulator+=e*n;this.stepAccumulator>=1;){this.stepAccumulator-=1;const i=this.growOneStep();if(this.pendingSteps>0&&(this.pendingSteps-=1),!i){this.pendingSteps=0,this.stepAccumulator=0;break}}}growOneStep(){const e=this.blueprint.influenceDistance*this.blueprint.influenceDistance,t=this.blueprint.killDistance*this.blueprint.killDistance,s=new Map,n=new Map;for(const c of this.attractors){if(c.state!=="armed")continue;let r=-1,u=e;for(let z=0;z<this.nodes.length;z++){const V=this.nodes[z].position.distanceToSquared(c.position);V<u&&(u=V,r=z)}if(r<0)continue;const m=this.nodes[r];if(f.copy(c.position).sub(m.position),f.lengthSq()<1e-4)continue;f.normalize();let k=s.get(r);k||(k=new p,s.set(r,k)),k.add(f),n.set(r,(n.get(r)??0)+1)}if(!s.size)return!1;const i=[...s.keys()].sort((c,r)=>(n.get(r)??0)-(n.get(c)??0)),a=[];for(const c of i.slice(0,this.blueprint.maxNewPerStep)){if(this.segments.length>=this.blueprint.maxSegments)break;const r=this.nodes[c],u=s.get(c);if(!u||(f.copy(u).add(this.blueprint.bias),f.lengthSq()<1e-4)||(f.normalize(),L.copy(r.position).addScaledVector(f,this.blueprint.stepLength),!this.isPositionAvailable(L)))continue;const m=this.addNode(c,L,r.depth+1);a.push(m)}if(!a.length)return!1;const l=[];for(const c of this.attractors)if(c.state==="armed"){for(const r of a)if(!(this.nodes[r].position.distanceToSquared(c.position)>t)){c.state="captured",c.energy=1.35,c.carrierNode=r,l.push(r);break}}return l.length&&this.spawnPulseTo(l[l.length-1]),!0}isPositionAvailable(e){const t=this.blueprint.stepLength*.58*(this.blueprint.stepLength*.58);for(const s of this.nodes)if(s.position.distanceToSquared(e)<t)return!1;return!0}addNode(e,t,s){const n=this.nodes[e],i=this.nodes.length,a=Math.max(this.blueprint.tipRadius,n.radius*.9);return this.nodes.push({position:t.clone(),parent:e,depth:s,radius:a}),this.segments.push({startNode:e,endNode:i,radius:Math.max(this.blueprint.tipRadius,a*.92),glow:1.18}),this.segmentIndexByNode[i]=this.segments.length-1,i}updatePulses(e,t){for(const s of this.segments)s.glow=Math.max(0,s.glow-e*.82);for(let s=this.pulses.length-1;s>=0;s--){const n=this.pulses[s];if(n.distance+=e*n.speed,n.distance>=n.totalDistance){this.removePulse(s);continue}let i=0;for(;i<n.distances.length-1&&n.distances[i+1]<n.distance;)i+=1;const a=n.distances[i],l=n.distances[i+1],c=le.clamp((n.distance-a)/Math.max(1e-4,l-a),0,1),r=this.nodes[n.path[i]],u=this.nodes[n.path[i+1]];n.sprite.position.lerpVectors(r.position,u.position,c),n.sprite.scale.setScalar(2.2+Math.sin(t*8+i)*.25+this.activity*.4),n.material.opacity=.8+this.activity*.18;const m=this.segmentIndexByNode[n.path[i+1]];m>=0&&(this.segments[m].glow=Math.max(this.segments[m].glow,1.25))}}updateBranchInstances(){this.branchMesh.count=this.segments.length;for(let e=0;e<this.segments.length;e++){const t=this.segments[e],s=this.nodes[t.startNode].position,n=this.nodes[t.endNode].position;f.copy(n).sub(s);const i=f.length();if(i<1e-4)continue;f.normalize(),b.position.copy(s).lerp(n,.5),b.quaternion.setFromUnitVectors(ge,f);const a=t.radius*(1+t.glow*.3);b.scale.set(a,i,a),b.updateMatrix(),this.branchMesh.setMatrixAt(e,b.matrix),M.copy(this.branchBaseColor).lerp(P,.08+Math.min(t.glow,1.4)*.34),this.branchMesh.setColorAt(e,M)}this.branchMesh.instanceMatrix.needsUpdate=!0,this.branchMesh.instanceColor&&(this.branchMesh.instanceColor.needsUpdate=!0)}updateNodeInstances(e){for(let t=0;t<this.attractors.length;t++){const s=this.attractors[t],n=s.state==="captured"?1.12:s.state==="armed"?.96:.72,i=1+s.energy*.4+Math.sin(e*s.driftFrequency+s.phase)*.04,a=this.blueprint.nodeScale*n*i;b.position.copy(s.position),b.quaternion.identity(),b.scale.setScalar(a),b.updateMatrix(),this.nodeMesh.setMatrixAt(t,b.matrix),s.state==="captured"?M.copy(this.accentColor).lerp(P,.32+s.energy*.14):s.state==="armed"?M.copy(this.accentColor).lerp(P,.16+s.energy*.1):M.copy(this.dormantColor).lerp(this.accentColor,.08),this.nodeMesh.setColorAt(t,M)}this.nodeMesh.instanceMatrix.needsUpdate=!0,this.nodeMesh.instanceColor&&(this.nodeMesh.instanceColor.needsUpdate=!0)}spawnPulseBursts(e){const t=this.attractors.filter(s=>s.state==="captured"&&s.carrierNode!==null);if(t.length)for(let s=0;s<e;s++){const n=t[Math.floor(Math.random()*t.length)];n.carrierNode!==null&&this.spawnPulseTo(n.carrierNode)}}spawnPulseTo(e){if(e<=0||this.pulses.length>=8)return;const t=[];let s=e;for(;s!==null;)t.unshift(s),s=this.nodes[s].parent;if(t.length<2)return;const n=[0];let i=0;for(let c=1;c<t.length;c++){const r=this.nodes[t[c-1]].position,u=this.nodes[t[c]].position;i+=r.distanceTo(u),n.push(i)}const a=new de({map:this.glowTexture,color:P,transparent:!0,opacity:.92,depthWrite:!1,blending:j}),l=new pe(a);l.frustumCulled=!1,l.position.copy(this.nodes[t[0]].position),l.scale.setScalar(2.4),this.group.add(l),this.pulses.push({path:t,distances:n,totalDistance:i,distance:0,speed:24+Math.random()*10,sprite:l,material:a})}removePulse(e){const t=this.pulses[e];t&&(t.sprite.removeFromParent(),t.material.dispose(),this.pulses.splice(e,1))}clearPulses(){for(let e=this.pulses.length-1;e>=0;e--)this.removePulse(e)}hasDormantAttractors(){return this.attractors.some(e=>e.state==="dormant")}hasArmedAttractors(){return this.attractors.some(e=>e.state==="armed")}}function R(o){return{name:o.name,accent:o.accent,layout:o.layout,eventModel:o.eventModel,useCase:o.useCase,description:o.description,build(e){return new ke(e,o)}}}const C=[R({name:"Pocket Canopy",accent:"#7ec8ff",layout:"dome cluster",eventModel:"arm a local neighborhood per event",useCase:"compact session burst around a selected cluster",description:"Closest to the live-node use case: each event wakes a nearby pocket of nodes, and the scaffold grows the smallest readable canopy that still feels organic.",influenceDistance:24,killDistance:4.8,stepLength:3.3,stepsPerPulse:12,maxNewPerStep:5,maxSegments:320,rootRadius:1.18,tipRadius:.22,nodeScale:.92,drift:1.05,bias:new p(0,.18,0),seedDirections:D(5,.9,.15),createAttractors:ye,selectTargets:Se}),R({name:"Ribbon Fan",accent:"#67ddff",layout:"flattened 2.5D fan",eventModel:"events paint narrow sweep bands",useCase:"sidebar card, minimap, or inspector-scale activity view",description:"Same SCA core, but flattened into a shallow fan so you get branching legibility without spending much screen depth.",influenceDistance:22,killDistance:4.4,stepLength:3.2,stepsPerPulse:11,maxNewPerStep:4,maxSegments:280,rootRadius:1.08,tipRadius:.2,nodeScale:.84,drift:.82,bias:new p(0,.1,0),seedDirections:D(5,.55,0,Math.PI*1.05),createAttractors:be,selectTargets:ve}),R({name:"Split Relay",accent:"#a9a0ff",layout:"dual semantic lobes",eventModel:"alternate between left and right node groups",useCase:"tool-vs-agent, request-vs-response, or two-channel routing",description:"Useful when your node field already has two semantic camps. Each event pulls the scaffold into one side, so the branching itself explains the grouping.",influenceDistance:25,killDistance:4.7,stepLength:3.4,stepsPerPulse:12,maxNewPerStep:5,maxSegments:320,rootRadius:1.14,tipRadius:.22,nodeScale:.88,drift:.95,bias:new p(0,.14,0),seedDirections:D(6,.5,Math.PI*.2),createAttractors:xe,selectTargets:Pe}),R({name:"Halo Wreath",accent:"#7cf3e2",layout:"orbital ring",eventModel:"wake a moving arc around a focus target",useCase:"selection halo, focus ring, or surround-state animation",description:"A good fit when the animation should stay compact around one node or cluster. Events wake only one arc, so the ring reads like intent instead of noise.",influenceDistance:27,killDistance:4.5,stepLength:3.25,stepsPerPulse:13,maxNewPerStep:5,maxSegments:340,rootRadius:1.12,tipRadius:.2,nodeScale:.86,drift:.9,bias:new p(0,.04,0),seedDirections:D(7,.22),createAttractors:we,selectTargets:Re}),R({name:"Signal Stack",accent:"#ffb48e",layout:"layered vertical tiers",eventModel:"events climb through stacked bands",useCase:"compact timeline or event ladder with branching memory",description:"This keeps the same attractor logic but turns it into a vertical meter. The result reads more like a time stack than a cloud, while still branching naturally.",influenceDistance:21,killDistance:4.2,stepLength:3.15,stepsPerPulse:10,maxNewPerStep:4,maxSegments:280,rootRadius:1.12,tipRadius:.2,nodeScale:.82,drift:1.08,bias:new p(0,.26,0),seedDirections:[new p(0,1,0).normalize(),new p(.28,.96,.08).normalize(),new p(-.28,.96,-.08).normalize(),new p(.18,.92,-.22).normalize()],createAttractors:Me,selectTargets:Ae})];function F(){return window.innerWidth<920}function Ce(){const o=w.useRef(null),e=w.useRef(null),t=w.useRef(0),[s,n]=w.useState(0),[i,a]=w.useState(()=>F());w.useEffect(()=>{const r=()=>a(F());return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),w.useEffect(()=>{if(!o.current)return;const r=new ue(o.current);e.current=r,r.setVariation(C[0]);function u(){r.tick(),t.current=requestAnimationFrame(u)}return t.current=requestAnimationFrame(u),()=>{cancelAnimationFrame(t.current),r.destroy(),e.current=null}},[]);function l(r){var u;n(r),(u=e.current)==null||u.setVariation(C[r])}const c=C[s];return h.jsxs("div",{style:{width:"100vw",height:"100vh",background:"#04050b",position:"relative",overflow:"hidden"},children:[h.jsx("div",{ref:o,style:{position:"absolute",inset:0}}),h.jsxs("div",{style:{position:"absolute",top:i?"auto":0,right:0,bottom:0,width:i?"100%":392,height:i?"48vh":"100%",maxHeight:i?420:"100%",background:"linear-gradient(180deg, rgba(6,8,18,0.97) 0%, rgba(5,7,16,0.9) 100%)",borderLeft:i?"none":"1px solid rgba(255,255,255,0.07)",borderTop:i?"1px solid rgba(255,255,255,0.07)":"none",display:"flex",flexDirection:"column",fontFamily:"'Inter', 'SF Pro Display', system-ui, sans-serif",color:"#c8d1df",overflowY:"auto",backdropFilter:"blur(20px)"},children:[h.jsxs("div",{style:{padding:"20px 20px 16px",borderBottom:"1px solid rgba(255,255,255,0.06)",background:`linear-gradient(180deg, ${c.accent}18 0%, rgba(255,255,255,0) 100%)`},children:[h.jsx("div",{style:{fontSize:10,letterSpacing:"0.18em",color:"#6f7b90",textTransform:"uppercase",marginBottom:8},children:"Space Colonization Lab"}),h.jsx("div",{style:{fontSize:22,fontWeight:680,letterSpacing:"-0.03em",color:"#eef4ff"},children:"5 compact event-animation mappings"}),h.jsx("div",{style:{fontSize:12,lineHeight:1.65,color:"#96a4bc",marginTop:10},children:"Treat nodes as attractors. Each event arms a small pocket of them, the scaffold grows from the core, and pulses travel back through the new branch path."}),h.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[h.jsx("span",{style:{padding:"4px 8px",borderRadius:999,fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase",color:c.accent,border:`1px solid ${c.accent}44`,background:`${c.accent}16`},children:c.layout}),h.jsx("span",{style:{fontSize:11,color:"#7f8ca4",alignSelf:"center"},children:c.eventModel})]})]}),h.jsx("div",{style:{padding:"14px 14px 8px",display:"flex",flexDirection:"column",gap:10,flex:1},children:C.map((r,u)=>{const m=u===s;return h.jsxs("button",{onClick:()=>l(u),style:{textAlign:"left",borderRadius:12,border:`1px solid ${m?r.accent:"rgba(255,255,255,0.07)"}`,background:m?`linear-gradient(135deg, ${r.accent}18 0%, rgba(255,255,255,0.03) 100%)`:"rgba(255,255,255,0.025)",padding:"14px 15px",color:"inherit",cursor:"pointer",transition:"border-color 0.2s ease, background 0.2s ease"},children:[h.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12},children:h.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10},children:[h.jsx("div",{style:{width:28,height:28,borderRadius:8,display:"grid",placeItems:"center",fontSize:12,fontWeight:700,color:m?r.accent:"#7d889d",background:m?`${r.accent}18`:"rgba(255,255,255,0.03)",border:`1px solid ${m?`${r.accent}33`:"rgba(255,255,255,0.06)"}`,flexShrink:0},children:u+1}),h.jsxs("div",{children:[h.jsx("div",{style:{fontSize:14,fontWeight:650,color:m?"#eff4ff":"#cbd5e5"},children:r.name}),h.jsx("div",{style:{fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase",color:m?r.accent:"#6d7890",marginTop:4},children:r.useCase})]})]})}),h.jsx("div",{style:{fontSize:11,color:"#7f8aa0",lineHeight:1.55,marginTop:10},children:r.description})]},r.name)})}),h.jsxs("div",{style:{padding:"14px 18px 16px",borderTop:"1px solid rgba(255,255,255,0.06)"},children:[h.jsx("button",{onClick:()=>{var r;return(r=e.current)==null?void 0:r.triggerPulse()},style:{width:"100%",padding:"11px 0",borderRadius:10,border:`1px solid ${c.accent}44`,background:`linear-gradient(135deg, ${c.accent}22 0%, rgba(255,255,255,0.03) 100%)`,color:"#eef4ff",fontSize:12,fontWeight:650,letterSpacing:"0.08em",textTransform:"uppercase",cursor:"pointer"},children:"Trigger event pulse"}),h.jsxs("div",{style:{display:"grid",gap:6,marginTop:12},children:[h.jsxs("div",{style:{fontSize:10,color:"#5f6980",lineHeight:1.5},children:["Drag to orbit, scroll to zoom. Route: ",h.jsx("code",{children:"#/colonization-demo"})]}),h.jsx("div",{style:{fontSize:10,color:"#5f6980",lineHeight:1.5},children:"Suggested product mapping: keep the node field fixed, arm only event-relevant attractors, and let the scaffold persist as a compact memory of recent flow."})]})]})]}),h.jsx("a",{href:"#/three",style:{position:"absolute",top:16,left:16,padding:"7px 12px",borderRadius:999,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(8,10,18,0.55)",color:"#a8b3c8",textDecoration:"none",fontFamily:"'Inter', system-ui, sans-serif",fontSize:11,letterSpacing:"0.04em",backdropFilter:"blur(12px)"},children:"← back to live view"})]})}export{Ce as ColonizationDemoScene};
1
+ import{C as U,G as O,c as x,W as $,a6 as _,aj as Y,S as X,P as Z,O as J,B as K,a9 as Q,ab as B,d as N,I as W,ak as ee,al as q,M as T,ac as te,E as se,R as ne,U as ie,V as oe,a as p,am as re,A as j,an as ae,ao as ce,Y as G,X as E,v as le,$ as he,a5 as de,_ as pe,r as w,l as h}from"./index-cWLk4rCz.js";class ue{constructor(e){this.clock=new U,this.elapsed=0,this.visualGroup=new O,this.currentVisual=null,this.pulseTimer=0,this.pulseInterval=2.6,this.coreActivity=0,this.accent=new x("#7ec8ff"),this.coreGroup=new O,this.onResize=()=>{const a=this.renderer.domElement.parentElement;if(!a)return;const l=Math.max(1,a.clientWidth),c=Math.max(1,a.clientHeight);this.camera.aspect=l/c,this.camera.updateProjectionMatrix(),this.renderer.setSize(l,c),this.composer.setSize(l,c)},this.renderer=new $({antialias:!0}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(e.clientWidth,e.clientHeight),this.renderer.setClearColor(263435),this.renderer.outputColorSpace=_,this.renderer.toneMapping=Y,this.renderer.toneMappingExposure=1.08,e.appendChild(this.renderer.domElement),this.scene=new X;const t=Math.max(1,e.clientWidth),s=Math.max(1,e.clientHeight);this.camera=new Z(44,t/s,1,3e3),this.camera.position.set(0,60,164),this.controls=new J(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.06,this.controls.autoRotate=!0,this.controls.autoRotateSpeed=.18,this.controls.target.set(0,18,0),this.controls.minDistance=58,this.controls.maxDistance=320,this.background=new K,this.scene.add(this.background.group),this.scene.add(new Q(13424639,1.2));const n=new B(16777215,.75);n.position.set(90,120,100),this.scene.add(n);const i=new B(8959999,.42);i.position.set(-100,40,-80),this.scene.add(i),this.coreShell=new N(new W(6.4,1),new ee({color:new x("#0b1120"),emissive:this.accent.clone().multiplyScalar(.28),emissiveIntensity:1,specular:new x("#ffffff"),shininess:90,transparent:!0,opacity:.94})),this.coreRing=new N(new q(11.5,.18,12,80),new T({color:this.accent,transparent:!0,opacity:.24})),this.coreRing.rotation.x=Math.PI*.5,this.coreOuterRing=new N(new q(16.5,.12,12,96),new T({color:this.accent.clone().lerp(new x("#ffffff"),.2),transparent:!0,opacity:.12})),this.coreOuterRing.rotation.set(Math.PI*.5,.24,0),this.coreLight=new te(this.accent.getHex(),18,260,2),this.coreGroup.add(this.coreShell,this.coreRing,this.coreOuterRing,this.coreLight),this.coreGroup.position.set(0,12,0),this.scene.add(this.coreGroup),this.scene.add(this.visualGroup),this.composer=new se(this.renderer),this.composer.addPass(new ne(this.scene,this.camera)),this.composer.addPass(new ie(new oe(t,s),.48,.24,.4)),this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(e),window.addEventListener("resize",this.onResize),this.onResize()}setVariation(e){this.clearVisual(),this.applyAccent(e.accent),this.currentVisual=e.build(this.visualGroup,this.camera),this.triggerPulse()}triggerPulse(){var e;this.coreActivity=1,(e=this.currentVisual)==null||e.pulse()}tick(){var t;const e=Math.min(this.clock.getDelta(),.05);this.elapsed+=e,this.pulseTimer+=e,this.coreActivity=Math.max(0,this.coreActivity-e*.62),this.pulseTimer>=this.pulseInterval&&(this.pulseTimer=0,this.pulseInterval=2.3+Math.random()*1.5,this.triggerPulse()),this.controls.update(),this.background.tick(e),(t=this.currentVisual)==null||t.tick(e,this.elapsed),this.tickCore();try{this.composer.render()}catch{}}destroy(){this.resizeObserver.disconnect(),window.removeEventListener("resize",this.onResize),this.clearVisual(),this.background.dispose(),this.controls.dispose(),this.renderer.dispose(),this.renderer.domElement.remove(),this.coreShell.geometry.dispose(),this.coreShell.material.dispose(),this.coreRing.geometry.dispose(),this.coreRing.material.dispose(),this.coreOuterRing.geometry.dispose(),this.coreOuterRing.material.dispose()}applyAccent(e){this.accent.set(e);const t=this.coreShell.material,s=this.coreRing.material,n=this.coreOuterRing.material;t.emissive.copy(this.accent).multiplyScalar(.28),s.color.copy(this.accent),n.color.copy(this.accent).lerp(new x("#ffffff"),.2),this.coreLight.color.copy(this.accent)}tickCore(){const e=1+Math.sin(this.elapsed*.7)*.03,t=1+this.coreActivity*.18,s=this.coreShell.material,n=this.coreRing.material,i=this.coreOuterRing.material;this.coreShell.rotation.y+=.0024,this.coreShell.rotation.x=Math.sin(this.elapsed*.18)*.08,this.coreShell.scale.setScalar(e*t),this.coreRing.rotation.z+=.003+this.coreActivity*.01,this.coreRing.scale.setScalar(1+this.coreActivity*.1),this.coreOuterRing.rotation.y-=.0022,this.coreOuterRing.rotation.z=Math.sin(this.elapsed*.42)*.18,this.coreOuterRing.scale.setScalar(1+this.coreActivity*.16),s.emissiveIntensity=.96+this.coreActivity*.36,n.opacity=.18+this.coreActivity*.14,i.opacity=.08+this.coreActivity*.1,this.coreLight.intensity=14+this.coreActivity*12+Math.sin(this.elapsed*.55)*2}clearVisual(){this.currentVisual&&(this.currentVisual.dispose(),this.currentVisual=null)}}const d=new p(0,12,0),ge=new p(0,1,0),P=new x("#ffffff"),me=new x("#121a2d"),b=new he,f=new p,L=new p,I=new p,M=new x;function fe(o){return o-Math.floor(o)}function g(o){return fe(Math.sin(o*127.1+311.7)*43758.5453123)}function y(o){return g(o)*2-1}function H(o,e){const t=Math.atan2(Math.sin(o-e),Math.cos(o-e));return Math.abs(t)}function D(o,e,t=0,s=Math.PI*2){const n=[],i=o>1?s/(o-1):0,a=t-s*.5;for(let l=0;l<o;l++){const c=s>=Math.PI*2?t+l/o*Math.PI*2:a+i*l;n.push(new p(Math.cos(c),e,Math.sin(c)).normalize())}return n}function A(o,e,t,s=1){const n=o.clone().sub(d);return n.lengthSq()<1e-4?n.set(0,1,0):n.normalize(),{home:o.clone(),position:o.clone(),normal:n,state:"dormant",energy:0,carrierNode:null,meta:e,phase:g(t*3+1)*Math.PI*2,driftAmplitude:s*(.45+g(t*3+2)*.55),driftFrequency:.6+g(t*3+3)*.8}}function S(o,e,t){const s=[];for(let n=0;n<o.length;n++){const i=o[n];i.state==="dormant"&&s.push({index:n,score:t(i)})}return s.sort((n,i)=>n.score-i.score),s.slice(0,e).map(n=>n.index)}function v(o,e){return S(o,e,t=>t.home.distanceToSquared(d))}function ye(){const o=[];for(let e=0;e<84;e++){const t=g(e*13+1)*Math.PI*2,s=16+g(e*13+2)*18,n=.7+g(e*13+3)*.35,i=Math.cos(t)*s*n,a=6+Math.pow(g(e*13+4),.72)*22,l=Math.sin(t)*s*n;o.push(A(new p(d.x+i,d.y+a,d.z+l),{angle:t},e,1))}return o}function be(){const o=[];for(let e=0;e<76;e++){const t=-1+e/75*2+y(e*17+1)*.04,s=14+g(e*17+2)*26,n=t*38,i=6+(1-Math.abs(t)*.7)*14+y(e*17+3)*5,a=y(e*17+4)*(4+s*.12);o.push(A(new p(d.x+n,d.y+i,d.z+a),{sweep:t},e+100,.85))}return o}function xe(){const o=[];for(let e=0;e<82;e++){const t=e%2,s=t===0?-26:26,n=t===0?-7:7,i=s+y(e*19+1)*14,a=7+g(e*19+2)*20,l=n+y(e*19+3)*12;o.push(A(new p(d.x+i,d.y+a,d.z+l),{lobe:t},e+200,.95))}return o}function we(){const o=[];for(let e=0;e<88;e++){const t=e/88*Math.PI*2+y(e*23+1)*.08,s=28+y(e*23+2)*4.8,n=Math.cos(t)*s,i=10+Math.sin(t*2.2)*4+y(e*23+3)*2.4,a=Math.sin(t)*s;o.push(A(new p(d.x+n,d.y+i,d.z+a),{angle:t},e+300,.9))}return o}function Me(){const o=[];for(let t=0;t<80;t++){const s=t%4,n=g(t*29+1)*Math.PI*2,i=8+s*3.8+g(t*29+2)*6,a=Math.cos(n)*i,l=6+s*8.5+y(t*29+3)*2.4,c=Math.sin(n)*i*.82;o.push(A(new p(d.x+a,d.y+l,d.z+c),{angle:n,layer:s},t+400,1.05))}return o}function Se(o,e){const t=g(e*31+1)*Math.PI*2,s=18+g(e*31+2)*10,n=10+g(e*31+3)*18;I.set(d.x+Math.cos(t)*s,d.y+n,d.z+Math.sin(t)*s);const i=S(o,12,a=>a.home.distanceToSquared(I));return i.length?i:v(o,12)}function ve(o,e){const t=-1+e%7/6*2,s=S(o,11,n=>Math.abs((n.meta.sweep??0)-t)*100+Math.abs(n.home.y-(d.y+16)));return s.length?s:v(o,11)}function Pe(o,e){const t=e%2;I.set(d.x+(t===0?-28:28)+y(e*37+1)*6,d.y+10+g(e*37+2)*18,d.z+(t===0?-7:7)+y(e*37+3)*4);const s=S(o,12,n=>((n.meta.lobe??-1)===t?0:1e4)+n.home.distanceToSquared(I));return s.length?s:v(o,12)}function Re(o,e){const t=e*.72,s=S(o,14,n=>H(n.meta.angle??0,t)*180);return s.length?s:v(o,14)}function Ae(o,e){const t=e%4,s=g(e*41+1)*Math.PI*2,n=S(o,10,i=>{const a=(i.meta.layer??-1)===t?0:1e4,l=H(i.meta.angle??0,s)*90;return a+l});return n.length?n:v(o,10)}class ke{constructor(e,t){this.blueprint=t,this.group=new O,this.branchGeometry=new re(1,1,1,6,1,!0),this.branchMaterial=new T({transparent:!0,opacity:.88,depthWrite:!1,blending:j}),this.nodeGeometry=new W(1,1),this.nodeMaterial=new T({transparent:!0,opacity:.96,depthWrite:!1,blending:j}),this.nodes=[],this.segments=[],this.segmentIndexByNode=[],this.pulses=[],this.pulseIndex=0,this.activity=0,this.pendingSteps=0,this.stepAccumulator=0,this.completionDelay=0,this.pulse=()=>{(!this.hasDormantAttractors()&&!this.hasArmedAttractors()||this.segments.length>=this.blueprint.maxSegments-this.blueprint.maxNewPerStep)&&this.reset();const a=this.blueprint.selectTargets(this.attractors,this.pulseIndex).filter(c=>{var r;return((r=this.attractors[c])==null?void 0:r.state)==="dormant"}),l=a.length?a:v(this.attractors,8);for(const c of l){const r=this.attractors[c];r.state==="dormant"&&(r.state="armed",r.energy=1.2)}this.pendingSteps=Math.min(this.pendingSteps+this.blueprint.stepsPerPulse,this.blueprint.stepsPerPulse*4),this.activity=1,this.completionDelay=0,this.pulseIndex+=1,this.spawnPulseBursts(Math.min(3,1+Math.floor(l.length/4)))},this.tick=(a,l)=>{this.activity=Math.max(0,this.activity-a*.46),this.updateAttractors(l,a),this.advanceGrowth(a),this.updatePulses(a,l),this.updateBranchInstances(),this.updateNodeInstances(l),!this.hasDormantAttractors()&&!this.hasArmedAttractors()?(this.completionDelay+=a,this.completionDelay>2.6&&(this.reset(),this.pulse())):this.completionDelay=0},this.dispose=()=>{this.clearPulses(),this.group.removeFromParent(),this.branchGeometry.dispose(),this.branchMaterial.dispose(),this.nodeGeometry.dispose(),this.nodeMaterial.dispose(),this.glowTexture.dispose()},this.accentColor=new x(t.accent),this.branchBaseColor=this.accentColor.clone().lerp(P,.14),this.dormantColor=this.accentColor.clone().lerp(me,.78);const[s,n,i]=ae(t.accent);this.glowTexture=ce(s,n,i,96),this.branchMesh=new G(this.branchGeometry,this.branchMaterial,t.maxSegments),this.branchMesh.instanceMatrix.setUsage(E),this.branchMesh.frustumCulled=!1,this.branchMesh.count=0,this.attractors=t.createAttractors(),this.nodeMesh=new G(this.nodeGeometry,this.nodeMaterial,this.attractors.length),this.nodeMesh.instanceMatrix.setUsage(E),this.nodeMesh.frustumCulled=!1,this.group.add(this.branchMesh,this.nodeMesh),e.add(this.group),this.reset()}reset(){this.clearPulses(),this.nodes=[],this.segments=[],this.segmentIndexByNode=[],this.activity=0,this.pendingSteps=0,this.stepAccumulator=0,this.completionDelay=0,this.pulseIndex=0;for(const e of this.attractors)e.position.copy(e.home),e.state="dormant",e.energy=0,e.carrierNode=null;this.nodes.push({position:d.clone(),parent:null,depth:0,radius:this.blueprint.rootRadius}),this.segmentIndexByNode[0]=-1;for(const e of this.blueprint.seedDirections){f.copy(e).normalize();const t=this.blueprint.stepLength*1.05,s=d.clone().addScaledVector(f,t);this.addNode(0,s,1)}this.updateBranchInstances(),this.updateNodeInstances(0)}updateAttractors(e,t){for(const s of this.attractors){s.energy=Math.max(0,s.energy-t*.72);const n=s.state==="captured"?.18:s.state==="armed"?.42:.1,i=Math.sin(e*s.driftFrequency+s.phase)*s.driftAmplitude*this.blueprint.drift*(n+s.energy*.3);s.position.copy(s.home).addScaledVector(s.normal,i)}}advanceGrowth(e){const s=this.hasArmedAttractors()?3.2:0,n=this.pendingSteps>0?18:s;if(!(n<=0))for(this.stepAccumulator+=e*n;this.stepAccumulator>=1;){this.stepAccumulator-=1;const i=this.growOneStep();if(this.pendingSteps>0&&(this.pendingSteps-=1),!i){this.pendingSteps=0,this.stepAccumulator=0;break}}}growOneStep(){const e=this.blueprint.influenceDistance*this.blueprint.influenceDistance,t=this.blueprint.killDistance*this.blueprint.killDistance,s=new Map,n=new Map;for(const c of this.attractors){if(c.state!=="armed")continue;let r=-1,u=e;for(let z=0;z<this.nodes.length;z++){const V=this.nodes[z].position.distanceToSquared(c.position);V<u&&(u=V,r=z)}if(r<0)continue;const m=this.nodes[r];if(f.copy(c.position).sub(m.position),f.lengthSq()<1e-4)continue;f.normalize();let k=s.get(r);k||(k=new p,s.set(r,k)),k.add(f),n.set(r,(n.get(r)??0)+1)}if(!s.size)return!1;const i=[...s.keys()].sort((c,r)=>(n.get(r)??0)-(n.get(c)??0)),a=[];for(const c of i.slice(0,this.blueprint.maxNewPerStep)){if(this.segments.length>=this.blueprint.maxSegments)break;const r=this.nodes[c],u=s.get(c);if(!u||(f.copy(u).add(this.blueprint.bias),f.lengthSq()<1e-4)||(f.normalize(),L.copy(r.position).addScaledVector(f,this.blueprint.stepLength),!this.isPositionAvailable(L)))continue;const m=this.addNode(c,L,r.depth+1);a.push(m)}if(!a.length)return!1;const l=[];for(const c of this.attractors)if(c.state==="armed"){for(const r of a)if(!(this.nodes[r].position.distanceToSquared(c.position)>t)){c.state="captured",c.energy=1.35,c.carrierNode=r,l.push(r);break}}return l.length&&this.spawnPulseTo(l[l.length-1]),!0}isPositionAvailable(e){const t=this.blueprint.stepLength*.58*(this.blueprint.stepLength*.58);for(const s of this.nodes)if(s.position.distanceToSquared(e)<t)return!1;return!0}addNode(e,t,s){const n=this.nodes[e],i=this.nodes.length,a=Math.max(this.blueprint.tipRadius,n.radius*.9);return this.nodes.push({position:t.clone(),parent:e,depth:s,radius:a}),this.segments.push({startNode:e,endNode:i,radius:Math.max(this.blueprint.tipRadius,a*.92),glow:1.18}),this.segmentIndexByNode[i]=this.segments.length-1,i}updatePulses(e,t){for(const s of this.segments)s.glow=Math.max(0,s.glow-e*.82);for(let s=this.pulses.length-1;s>=0;s--){const n=this.pulses[s];if(n.distance+=e*n.speed,n.distance>=n.totalDistance){this.removePulse(s);continue}let i=0;for(;i<n.distances.length-1&&n.distances[i+1]<n.distance;)i+=1;const a=n.distances[i],l=n.distances[i+1],c=le.clamp((n.distance-a)/Math.max(1e-4,l-a),0,1),r=this.nodes[n.path[i]],u=this.nodes[n.path[i+1]];n.sprite.position.lerpVectors(r.position,u.position,c),n.sprite.scale.setScalar(2.2+Math.sin(t*8+i)*.25+this.activity*.4),n.material.opacity=.8+this.activity*.18;const m=this.segmentIndexByNode[n.path[i+1]];m>=0&&(this.segments[m].glow=Math.max(this.segments[m].glow,1.25))}}updateBranchInstances(){this.branchMesh.count=this.segments.length;for(let e=0;e<this.segments.length;e++){const t=this.segments[e],s=this.nodes[t.startNode].position,n=this.nodes[t.endNode].position;f.copy(n).sub(s);const i=f.length();if(i<1e-4)continue;f.normalize(),b.position.copy(s).lerp(n,.5),b.quaternion.setFromUnitVectors(ge,f);const a=t.radius*(1+t.glow*.3);b.scale.set(a,i,a),b.updateMatrix(),this.branchMesh.setMatrixAt(e,b.matrix),M.copy(this.branchBaseColor).lerp(P,.08+Math.min(t.glow,1.4)*.34),this.branchMesh.setColorAt(e,M)}this.branchMesh.instanceMatrix.needsUpdate=!0,this.branchMesh.instanceColor&&(this.branchMesh.instanceColor.needsUpdate=!0)}updateNodeInstances(e){for(let t=0;t<this.attractors.length;t++){const s=this.attractors[t],n=s.state==="captured"?1.12:s.state==="armed"?.96:.72,i=1+s.energy*.4+Math.sin(e*s.driftFrequency+s.phase)*.04,a=this.blueprint.nodeScale*n*i;b.position.copy(s.position),b.quaternion.identity(),b.scale.setScalar(a),b.updateMatrix(),this.nodeMesh.setMatrixAt(t,b.matrix),s.state==="captured"?M.copy(this.accentColor).lerp(P,.32+s.energy*.14):s.state==="armed"?M.copy(this.accentColor).lerp(P,.16+s.energy*.1):M.copy(this.dormantColor).lerp(this.accentColor,.08),this.nodeMesh.setColorAt(t,M)}this.nodeMesh.instanceMatrix.needsUpdate=!0,this.nodeMesh.instanceColor&&(this.nodeMesh.instanceColor.needsUpdate=!0)}spawnPulseBursts(e){const t=this.attractors.filter(s=>s.state==="captured"&&s.carrierNode!==null);if(t.length)for(let s=0;s<e;s++){const n=t[Math.floor(Math.random()*t.length)];n.carrierNode!==null&&this.spawnPulseTo(n.carrierNode)}}spawnPulseTo(e){if(e<=0||this.pulses.length>=8)return;const t=[];let s=e;for(;s!==null;)t.unshift(s),s=this.nodes[s].parent;if(t.length<2)return;const n=[0];let i=0;for(let c=1;c<t.length;c++){const r=this.nodes[t[c-1]].position,u=this.nodes[t[c]].position;i+=r.distanceTo(u),n.push(i)}const a=new de({map:this.glowTexture,color:P,transparent:!0,opacity:.92,depthWrite:!1,blending:j}),l=new pe(a);l.frustumCulled=!1,l.position.copy(this.nodes[t[0]].position),l.scale.setScalar(2.4),this.group.add(l),this.pulses.push({path:t,distances:n,totalDistance:i,distance:0,speed:24+Math.random()*10,sprite:l,material:a})}removePulse(e){const t=this.pulses[e];t&&(t.sprite.removeFromParent(),t.material.dispose(),this.pulses.splice(e,1))}clearPulses(){for(let e=this.pulses.length-1;e>=0;e--)this.removePulse(e)}hasDormantAttractors(){return this.attractors.some(e=>e.state==="dormant")}hasArmedAttractors(){return this.attractors.some(e=>e.state==="armed")}}function R(o){return{name:o.name,accent:o.accent,layout:o.layout,eventModel:o.eventModel,useCase:o.useCase,description:o.description,build(e){return new ke(e,o)}}}const C=[R({name:"Pocket Canopy",accent:"#7ec8ff",layout:"dome cluster",eventModel:"arm a local neighborhood per event",useCase:"compact session burst around a selected cluster",description:"Closest to the live-node use case: each event wakes a nearby pocket of nodes, and the scaffold grows the smallest readable canopy that still feels organic.",influenceDistance:24,killDistance:4.8,stepLength:3.3,stepsPerPulse:12,maxNewPerStep:5,maxSegments:320,rootRadius:1.18,tipRadius:.22,nodeScale:.92,drift:1.05,bias:new p(0,.18,0),seedDirections:D(5,.9,.15),createAttractors:ye,selectTargets:Se}),R({name:"Ribbon Fan",accent:"#67ddff",layout:"flattened 2.5D fan",eventModel:"events paint narrow sweep bands",useCase:"sidebar card, minimap, or inspector-scale activity view",description:"Same SCA core, but flattened into a shallow fan so you get branching legibility without spending much screen depth.",influenceDistance:22,killDistance:4.4,stepLength:3.2,stepsPerPulse:11,maxNewPerStep:4,maxSegments:280,rootRadius:1.08,tipRadius:.2,nodeScale:.84,drift:.82,bias:new p(0,.1,0),seedDirections:D(5,.55,0,Math.PI*1.05),createAttractors:be,selectTargets:ve}),R({name:"Split Relay",accent:"#a9a0ff",layout:"dual semantic lobes",eventModel:"alternate between left and right node groups",useCase:"tool-vs-agent, request-vs-response, or two-channel routing",description:"Useful when your node field already has two semantic camps. Each event pulls the scaffold into one side, so the branching itself explains the grouping.",influenceDistance:25,killDistance:4.7,stepLength:3.4,stepsPerPulse:12,maxNewPerStep:5,maxSegments:320,rootRadius:1.14,tipRadius:.22,nodeScale:.88,drift:.95,bias:new p(0,.14,0),seedDirections:D(6,.5,Math.PI*.2),createAttractors:xe,selectTargets:Pe}),R({name:"Halo Wreath",accent:"#7cf3e2",layout:"orbital ring",eventModel:"wake a moving arc around a focus target",useCase:"selection halo, focus ring, or surround-state animation",description:"A good fit when the animation should stay compact around one node or cluster. Events wake only one arc, so the ring reads like intent instead of noise.",influenceDistance:27,killDistance:4.5,stepLength:3.25,stepsPerPulse:13,maxNewPerStep:5,maxSegments:340,rootRadius:1.12,tipRadius:.2,nodeScale:.86,drift:.9,bias:new p(0,.04,0),seedDirections:D(7,.22),createAttractors:we,selectTargets:Re}),R({name:"Signal Stack",accent:"#ffb48e",layout:"layered vertical tiers",eventModel:"events climb through stacked bands",useCase:"compact timeline or event ladder with branching memory",description:"This keeps the same attractor logic but turns it into a vertical meter. The result reads more like a time stack than a cloud, while still branching naturally.",influenceDistance:21,killDistance:4.2,stepLength:3.15,stepsPerPulse:10,maxNewPerStep:4,maxSegments:280,rootRadius:1.12,tipRadius:.2,nodeScale:.82,drift:1.08,bias:new p(0,.26,0),seedDirections:[new p(0,1,0).normalize(),new p(.28,.96,.08).normalize(),new p(-.28,.96,-.08).normalize(),new p(.18,.92,-.22).normalize()],createAttractors:Me,selectTargets:Ae})];function F(){return window.innerWidth<920}function Ce(){const o=w.useRef(null),e=w.useRef(null),t=w.useRef(0),[s,n]=w.useState(0),[i,a]=w.useState(()=>F());w.useEffect(()=>{const r=()=>a(F());return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),w.useEffect(()=>{if(!o.current)return;const r=new ue(o.current);e.current=r,r.setVariation(C[0]);function u(){r.tick(),t.current=requestAnimationFrame(u)}return t.current=requestAnimationFrame(u),()=>{cancelAnimationFrame(t.current),r.destroy(),e.current=null}},[]);function l(r){var u;n(r),(u=e.current)==null||u.setVariation(C[r])}const c=C[s];return h.jsxs("div",{style:{width:"100vw",height:"100vh",background:"#04050b",position:"relative",overflow:"hidden"},children:[h.jsx("div",{ref:o,style:{position:"absolute",inset:0}}),h.jsxs("div",{style:{position:"absolute",top:i?"auto":0,right:0,bottom:0,width:i?"100%":392,height:i?"48vh":"100%",maxHeight:i?420:"100%",background:"linear-gradient(180deg, rgba(6,8,18,0.97) 0%, rgba(5,7,16,0.9) 100%)",borderLeft:i?"none":"1px solid rgba(255,255,255,0.07)",borderTop:i?"1px solid rgba(255,255,255,0.07)":"none",display:"flex",flexDirection:"column",fontFamily:"'Inter', 'SF Pro Display', system-ui, sans-serif",color:"#c8d1df",overflowY:"auto",backdropFilter:"blur(20px)"},children:[h.jsxs("div",{style:{padding:"20px 20px 16px",borderBottom:"1px solid rgba(255,255,255,0.06)",background:`linear-gradient(180deg, ${c.accent}18 0%, rgba(255,255,255,0) 100%)`},children:[h.jsx("div",{style:{fontSize:10,letterSpacing:"0.18em",color:"#6f7b90",textTransform:"uppercase",marginBottom:8},children:"Space Colonization Lab"}),h.jsx("div",{style:{fontSize:22,fontWeight:680,letterSpacing:"-0.03em",color:"#eef4ff"},children:"5 compact event-animation mappings"}),h.jsx("div",{style:{fontSize:12,lineHeight:1.65,color:"#96a4bc",marginTop:10},children:"Treat nodes as attractors. Each event arms a small pocket of them, the scaffold grows from the core, and pulses travel back through the new branch path."}),h.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[h.jsx("span",{style:{padding:"4px 8px",borderRadius:999,fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase",color:c.accent,border:`1px solid ${c.accent}44`,background:`${c.accent}16`},children:c.layout}),h.jsx("span",{style:{fontSize:11,color:"#7f8ca4",alignSelf:"center"},children:c.eventModel})]})]}),h.jsx("div",{style:{padding:"14px 14px 8px",display:"flex",flexDirection:"column",gap:10,flex:1},children:C.map((r,u)=>{const m=u===s;return h.jsxs("button",{onClick:()=>l(u),style:{textAlign:"left",borderRadius:12,border:`1px solid ${m?r.accent:"rgba(255,255,255,0.07)"}`,background:m?`linear-gradient(135deg, ${r.accent}18 0%, rgba(255,255,255,0.03) 100%)`:"rgba(255,255,255,0.025)",padding:"14px 15px",color:"inherit",cursor:"pointer",transition:"border-color 0.2s ease, background 0.2s ease"},children:[h.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12},children:h.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10},children:[h.jsx("div",{style:{width:28,height:28,borderRadius:8,display:"grid",placeItems:"center",fontSize:12,fontWeight:700,color:m?r.accent:"#7d889d",background:m?`${r.accent}18`:"rgba(255,255,255,0.03)",border:`1px solid ${m?`${r.accent}33`:"rgba(255,255,255,0.06)"}`,flexShrink:0},children:u+1}),h.jsxs("div",{children:[h.jsx("div",{style:{fontSize:14,fontWeight:650,color:m?"#eff4ff":"#cbd5e5"},children:r.name}),h.jsx("div",{style:{fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase",color:m?r.accent:"#6d7890",marginTop:4},children:r.useCase})]})]})}),h.jsx("div",{style:{fontSize:11,color:"#7f8aa0",lineHeight:1.55,marginTop:10},children:r.description})]},r.name)})}),h.jsxs("div",{style:{padding:"14px 18px 16px",borderTop:"1px solid rgba(255,255,255,0.06)"},children:[h.jsx("button",{onClick:()=>{var r;return(r=e.current)==null?void 0:r.triggerPulse()},style:{width:"100%",padding:"11px 0",borderRadius:10,border:`1px solid ${c.accent}44`,background:`linear-gradient(135deg, ${c.accent}22 0%, rgba(255,255,255,0.03) 100%)`,color:"#eef4ff",fontSize:12,fontWeight:650,letterSpacing:"0.08em",textTransform:"uppercase",cursor:"pointer"},children:"Trigger event pulse"}),h.jsxs("div",{style:{display:"grid",gap:6,marginTop:12},children:[h.jsxs("div",{style:{fontSize:10,color:"#5f6980",lineHeight:1.5},children:["Drag to orbit, scroll to zoom. Route: ",h.jsx("code",{children:"#/colonization-demo"})]}),h.jsx("div",{style:{fontSize:10,color:"#5f6980",lineHeight:1.5},children:"Suggested product mapping: keep the node field fixed, arm only event-relevant attractors, and let the scaffold persist as a compact memory of recent flow."})]})]})]}),h.jsx("a",{href:"#/three",style:{position:"absolute",top:16,left:16,padding:"7px 12px",borderRadius:999,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(8,10,18,0.55)",color:"#a8b3c8",textDecoration:"none",fontFamily:"'Inter', system-ui, sans-serif",fontSize:11,letterSpacing:"0.04em",backdropFilter:"blur(12px)"},children:"← back to live view"})]})}export{Ce as ColonizationDemoScene};
@@ -1,4 +1,4 @@
1
- import{C as K,G as L,W as X,S as Y,P as J,O as Q,B as Z,E as ee,R as te,U as oe,V as ae,L as W,a as u,b as H,M as F,A as M,c as S,d as B,e as re,D as ne,T as ie,f as U,g as N,h as E,i as z,j as se,s as le,k as R,r as _,l as g}from"./index-zmiMo1Db.js";const j=new Map;let $=U;function ce(r,t){j.set(r,t),$=(o,i,s)=>{const d=j.get(o);return d?d(i,s):U(o,i,s)}}class ue{constructor(t){this.clock=new K,this.nodeGroup=new L,this.currentNode=null,this.respawnTimer=0,this.currentVariation=null,this.axisGroup=new L,this._onResize=()=>{const i=this.renderer.domElement.parentElement;if(!i)return;const s=i.clientWidth,d=i.clientHeight;this.camera.aspect=s/d,this.camera.updateProjectionMatrix(),this.renderer.setSize(s,d),this.composer.setSize(s,d)},this.renderer=new X({antialias:!0}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(t.clientWidth,t.clientHeight),this.renderer.setClearColor(197384),t.appendChild(this.renderer.domElement),this.scene=new Y,this.camera=new J(55,t.clientWidth/t.clientHeight,1,2e3),this.camera.position.set(0,60,200),this.controls=new Q(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.06,this.controls.autoRotate=!1,this.controls.target.set(-40,5,-15),this.controls.minDistance=50,this.controls.maxDistance=600,this.background=new Z,this.scene.add(this.background.group),this.scene.add(this.nodeGroup),this.scene.add(this.axisGroup),this._buildAxis(),this._buildCoreGlow(),this.composer=new ee(this.renderer),this.composer.addPass(new te(this.scene,this.camera));const o=new oe(new ae(t.clientWidth,t.clientHeight),.7,.4,.75);this.composer.addPass(o),window.addEventListener("resize",this._onResize),this._onResize()}_buildAxis(){const t=new W({color:2236996,transparent:!0,opacity:.4}),o=(i,s)=>{const d=new N().setFromPoints([i,s]);return new E(d,t)};this.axisGroup.add(o(new u(-120,0,0),new u(20,0,0))),this.axisGroup.add(o(new u(0,-20,0),new u(0,30,0))),this.axisGroup.add(o(new u(0,0,-60),new u(0,0,20)))}_buildCoreGlow(){const t=new H(3,16,16),o=new F({color:new S("#22ff88"),transparent:!0,opacity:.15,blending:M});this.scene.add(new B(t,o));const i=new re(5,6,32),s=new F({color:new S("#4ade80"),transparent:!0,opacity:.2,blending:M,side:ne});this.scene.add(new B(i,s));const d=new u(-80,10,-30),v=new H(2,12,12),h=new F({color:new S("#4ade80"),transparent:!0,opacity:.3,blending:M}),m=new B(v,h);m.position.copy(d),this.scene.add(m)}setVariation(t){if(this.currentVariation=t,t.buildCustomEffect){const o=t.spawnParams()._tool??"";ce(o,t.buildCustomEffect)}this._clearNode(),this._spawnNode()}_clearNode(){this.currentNode&&(this.nodeGroup.remove(this.currentNode.group),this.currentNode.dispose(),this.currentNode=null)}_spawnNode(){if(!this.currentVariation)return;const t=this.currentVariation.spawnParams(this.camera.position),o=new ie(t,$);this.nodeGroup.add(o.group),this.currentNode=o,this.respawnTimer=0}tick(){const t=Math.min(this.clock.getDelta(),.05);this.controls.update(),this.background.tick(t),this.currentNode?(this.currentNode.tick(t),this.currentNode.done&&(this._clearNode(),this.respawnTimer=0)):(this.respawnTimer+=t,this.respawnTimer>1&&this.currentVariation&&this._spawnNode()),this.composer.render()}destroy(){window.removeEventListener("resize",this._onResize),this.renderer.dispose(),this._clearNode(),j.clear()}}const q=new u(0,0,0);function x(r,t){return Math.random()*(t-r)+r}function de(){return{origin:new u(-120,15,-60),target:q.clone().add(new u(x(-2,2),x(-2,2),x(-2,2))),color:new S("#b0c8f0"),colorEnd:new S("#ffffff"),travelTime:3,trailLength:0,trailBrightness:0,trailFadeTime:4,headSize:0,pathConfig:{type:"linear",easing:"easeInCubic"},_tool:"prompt:custom"}}function pe(){const r=Math.random()*Math.PI*2,t=Math.acos(x(-1,1)),o=x(250,400);return new u(Math.sin(t)*Math.cos(r)*o,Math.sin(t)*Math.sin(r)*o,Math.cos(t)*o)}function O(r){const t=de();t._tool=r,t.origin=pe(),t.travelTime=x(4,5.5),t.trailFadeTime=1.8;const o=t.origin.clone().add(q).multiplyScalar(.5);return t.pathConfig={type:"quadratic",easing:"easeInOut",c1:new u(o.x+x(-40,40),o.y+x(20,60),o.z+x(-30,30))},t}function he(r,t){return{f1:1.2+Math.random()*1.5,f2:3.5+Math.random()*3,ph1:Math.random()*Math.PI*2,ph2:Math.random()*Math.PI*2,amp:4+Math.random()*6,perp:new u(Math.random()-.5,Math.random()-.5,Math.random()-.5).normalize(),scatter:new u((Math.random()-.5)*400,(Math.random()-.5)*400,(Math.random()-.5)*400),windowStart:-(r/t)*3.5-Math.random()*.2,rollSpeed:.8+Math.random()*.6}}function fe(r,t,o,i,s){const d=se(t.pathConfig.easing,o),v=le(t.pathConfig,t.origin,t.target,d),h=Math.max(0,1-o/.5),m=Math.min(1,o/.5),l=1-Math.pow(o,8),e=(Math.sin(o*r.f1*Math.PI*2+r.ph1+i*s)*r.amp+Math.sin(o*r.f2*Math.PI*2+r.ph2+i*s*1.4)*r.amp*.3)*m*l;return new u(v.x+r.scatter.x*h+r.perp.x*e,v.y+r.scatter.y*h+r.perp.y*e,v.z+r.scatter.z*h+r.perp.z*e)}function P(r,t,o,i,s){const d=Array.from({length:i},(h,m)=>{const l=he(m,i),e=new Float32Array(o*3),n=new N;n.setAttribute("position",new z(e,3));const c=new Float32Array(o);for(let T=0;T<o;T++)c[T]=T/(o-1);n.setAttribute("aT",new z(c,1));const{mat:a,setOpacity:p,setTime:w}=s(m,n);return r.add(new E(n,a)),{...l,posArr:e,geo:n,mat:a,window:l.windowStart,setOpacity:p,setTime:w}}),v={entries:d.map(h=>({obj:new E(h.geo,h.mat),mat:h.mat,meta:{}})),suppressDefaultTrail:!0,trailTick(h,m,l){var c;const e=2.5+l*.1;let n=!0;for(const a of d){const p=a.window>=1?1/(1.5*a.rollSpeed):(1-a.windowStart)/t.travelTime;a.window=Math.min(2,a.window+m*p);const w=a.window;if(w<=0){a.geo.setDrawRange(0,0),n=!1;continue}if(w>=2){a.setOpacity(0),a.geo.setDrawRange(0,0);continue}n=!1;const T=Math.round(Math.min(1,w)*(o-1)),y=Math.round(Math.max(0,w-1)*(o-1)),A=T-y;if(A<1){a.geo.setDrawRange(0,0);continue}for(let b=y;b<=T;b++){const C=fe(a,t,b/(o-1),l,e);a.posArr[b*3]=C.x,a.posArr[b*3+1]=C.y,a.posArr[b*3+2]=C.z}a.geo.attributes.position.needsUpdate=!0,a.geo.setDrawRange(y,A),a.setOpacity(.7),(c=a.setTime)==null||c.call(a,l)}n&&(v.shouldMarkDone=!0)},tick(){},onLand(){},applyFade(h){},shouldMarkDone:!1};return v}function ge(r,t){return P(r,t,120,8,o=>{const i=new W({color:new S().setHSL(.55+o/8*.15,.9,.6+o%2*.2),transparent:!0,opacity:0,blending:M,depthWrite:!1});return{mat:i,setOpacity:s=>{i.opacity=s}}})}const me=`
1
+ import{C as K,G as L,W as X,S as Y,P as J,O as Q,B as Z,E as ee,R as te,U as oe,V as ae,L as W,a as u,b as H,M as F,A as M,c as S,d as B,e as re,D as ne,T as ie,f as U,g as N,h as E,i as z,j as se,s as le,k as R,r as _,l as g}from"./index-cWLk4rCz.js";const j=new Map;let $=U;function ce(r,t){j.set(r,t),$=(o,i,s)=>{const d=j.get(o);return d?d(i,s):U(o,i,s)}}class ue{constructor(t){this.clock=new K,this.nodeGroup=new L,this.currentNode=null,this.respawnTimer=0,this.currentVariation=null,this.axisGroup=new L,this._onResize=()=>{const i=this.renderer.domElement.parentElement;if(!i)return;const s=i.clientWidth,d=i.clientHeight;this.camera.aspect=s/d,this.camera.updateProjectionMatrix(),this.renderer.setSize(s,d),this.composer.setSize(s,d)},this.renderer=new X({antialias:!0}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(t.clientWidth,t.clientHeight),this.renderer.setClearColor(197384),t.appendChild(this.renderer.domElement),this.scene=new Y,this.camera=new J(55,t.clientWidth/t.clientHeight,1,2e3),this.camera.position.set(0,60,200),this.controls=new Q(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.06,this.controls.autoRotate=!1,this.controls.target.set(-40,5,-15),this.controls.minDistance=50,this.controls.maxDistance=600,this.background=new Z,this.scene.add(this.background.group),this.scene.add(this.nodeGroup),this.scene.add(this.axisGroup),this._buildAxis(),this._buildCoreGlow(),this.composer=new ee(this.renderer),this.composer.addPass(new te(this.scene,this.camera));const o=new oe(new ae(t.clientWidth,t.clientHeight),.7,.4,.75);this.composer.addPass(o),window.addEventListener("resize",this._onResize),this._onResize()}_buildAxis(){const t=new W({color:2236996,transparent:!0,opacity:.4}),o=(i,s)=>{const d=new N().setFromPoints([i,s]);return new E(d,t)};this.axisGroup.add(o(new u(-120,0,0),new u(20,0,0))),this.axisGroup.add(o(new u(0,-20,0),new u(0,30,0))),this.axisGroup.add(o(new u(0,0,-60),new u(0,0,20)))}_buildCoreGlow(){const t=new H(3,16,16),o=new F({color:new S("#22ff88"),transparent:!0,opacity:.15,blending:M});this.scene.add(new B(t,o));const i=new re(5,6,32),s=new F({color:new S("#4ade80"),transparent:!0,opacity:.2,blending:M,side:ne});this.scene.add(new B(i,s));const d=new u(-80,10,-30),v=new H(2,12,12),h=new F({color:new S("#4ade80"),transparent:!0,opacity:.3,blending:M}),m=new B(v,h);m.position.copy(d),this.scene.add(m)}setVariation(t){if(this.currentVariation=t,t.buildCustomEffect){const o=t.spawnParams()._tool??"";ce(o,t.buildCustomEffect)}this._clearNode(),this._spawnNode()}_clearNode(){this.currentNode&&(this.nodeGroup.remove(this.currentNode.group),this.currentNode.dispose(),this.currentNode=null)}_spawnNode(){if(!this.currentVariation)return;const t=this.currentVariation.spawnParams(this.camera.position),o=new ie(t,$);this.nodeGroup.add(o.group),this.currentNode=o,this.respawnTimer=0}tick(){const t=Math.min(this.clock.getDelta(),.05);this.controls.update(),this.background.tick(t),this.currentNode?(this.currentNode.tick(t),this.currentNode.done&&(this._clearNode(),this.respawnTimer=0)):(this.respawnTimer+=t,this.respawnTimer>1&&this.currentVariation&&this._spawnNode()),this.composer.render()}destroy(){window.removeEventListener("resize",this._onResize),this.renderer.dispose(),this._clearNode(),j.clear()}}const q=new u(0,0,0);function x(r,t){return Math.random()*(t-r)+r}function de(){return{origin:new u(-120,15,-60),target:q.clone().add(new u(x(-2,2),x(-2,2),x(-2,2))),color:new S("#b0c8f0"),colorEnd:new S("#ffffff"),travelTime:3,trailLength:0,trailBrightness:0,trailFadeTime:4,headSize:0,pathConfig:{type:"linear",easing:"easeInCubic"},_tool:"prompt:custom"}}function pe(){const r=Math.random()*Math.PI*2,t=Math.acos(x(-1,1)),o=x(250,400);return new u(Math.sin(t)*Math.cos(r)*o,Math.sin(t)*Math.sin(r)*o,Math.cos(t)*o)}function O(r){const t=de();t._tool=r,t.origin=pe(),t.travelTime=x(4,5.5),t.trailFadeTime=1.8;const o=t.origin.clone().add(q).multiplyScalar(.5);return t.pathConfig={type:"quadratic",easing:"easeInOut",c1:new u(o.x+x(-40,40),o.y+x(20,60),o.z+x(-30,30))},t}function he(r,t){return{f1:1.2+Math.random()*1.5,f2:3.5+Math.random()*3,ph1:Math.random()*Math.PI*2,ph2:Math.random()*Math.PI*2,amp:4+Math.random()*6,perp:new u(Math.random()-.5,Math.random()-.5,Math.random()-.5).normalize(),scatter:new u((Math.random()-.5)*400,(Math.random()-.5)*400,(Math.random()-.5)*400),windowStart:-(r/t)*3.5-Math.random()*.2,rollSpeed:.8+Math.random()*.6}}function fe(r,t,o,i,s){const d=se(t.pathConfig.easing,o),v=le(t.pathConfig,t.origin,t.target,d),h=Math.max(0,1-o/.5),m=Math.min(1,o/.5),l=1-Math.pow(o,8),e=(Math.sin(o*r.f1*Math.PI*2+r.ph1+i*s)*r.amp+Math.sin(o*r.f2*Math.PI*2+r.ph2+i*s*1.4)*r.amp*.3)*m*l;return new u(v.x+r.scatter.x*h+r.perp.x*e,v.y+r.scatter.y*h+r.perp.y*e,v.z+r.scatter.z*h+r.perp.z*e)}function P(r,t,o,i,s){const d=Array.from({length:i},(h,m)=>{const l=he(m,i),e=new Float32Array(o*3),n=new N;n.setAttribute("position",new z(e,3));const c=new Float32Array(o);for(let T=0;T<o;T++)c[T]=T/(o-1);n.setAttribute("aT",new z(c,1));const{mat:a,setOpacity:p,setTime:w}=s(m,n);return r.add(new E(n,a)),{...l,posArr:e,geo:n,mat:a,window:l.windowStart,setOpacity:p,setTime:w}}),v={entries:d.map(h=>({obj:new E(h.geo,h.mat),mat:h.mat,meta:{}})),suppressDefaultTrail:!0,trailTick(h,m,l){var c;const e=2.5+l*.1;let n=!0;for(const a of d){const p=a.window>=1?1/(1.5*a.rollSpeed):(1-a.windowStart)/t.travelTime;a.window=Math.min(2,a.window+m*p);const w=a.window;if(w<=0){a.geo.setDrawRange(0,0),n=!1;continue}if(w>=2){a.setOpacity(0),a.geo.setDrawRange(0,0);continue}n=!1;const T=Math.round(Math.min(1,w)*(o-1)),y=Math.round(Math.max(0,w-1)*(o-1)),A=T-y;if(A<1){a.geo.setDrawRange(0,0);continue}for(let b=y;b<=T;b++){const C=fe(a,t,b/(o-1),l,e);a.posArr[b*3]=C.x,a.posArr[b*3+1]=C.y,a.posArr[b*3+2]=C.z}a.geo.attributes.position.needsUpdate=!0,a.geo.setDrawRange(y,A),a.setOpacity(.7),(c=a.setTime)==null||c.call(a,l)}n&&(v.shouldMarkDone=!0)},tick(){},onLand(){},applyFade(h){},shouldMarkDone:!1};return v}function ge(r,t){return P(r,t,120,8,o=>{const i=new W({color:new S().setHSL(.55+o/8*.15,.9,.6+o%2*.2),transparent:!0,opacity:0,blending:M,depthWrite:!1});return{mat:i,setOpacity:s=>{i.opacity=s}}})}const me=`
2
2
  attribute float aT;
3
3
  varying float vT;
4
4
  void main() { vT = aT; gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); }
@@ -1,4 +1,4 @@
1
- import{m as Oe,n as Le,H as Ve,N as qt,o as He,p as qe,q as Ze,t as Xe,k as mt,F as Qe,c as H,u as kt,a as w,v as Rt,w as gt,x as st,g as ct,i as q,d as at,y as Pe,z as De,D as vt,J as it,K as At,X as bt,Y as _e,G as Bt,Z as Zt,_ as Lt,$ as Ye,a0 as Te,a1 as Vt,a2 as Ke,a3 as ze,A as It,a4 as Ae,a5 as ke,I as Je,L as to,h as eo,W as oo,a6 as no,a7 as so,S as io,a8 as ro,P as ao,O as lo,E as co,R as ho,U as uo,V as po,a9 as fo,aa as mo,ab as go,ac as Ut,ad as vo,b as yo,ae as xo,M as bo,r as P,l as S,af as wt,ag as wo,ah as Xt,ai as So}from"./index-zmiMo1Db.js";const St={defines:{DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tColor:{value:null},tDepth:{value:null},focus:{value:1},aspect:{value:1},aperture:{value:.025},maxblur:{value:.01},nearClip:{value:1},farClip:{value:1e3}},vertexShader:`
1
+ import{m as Oe,n as Le,H as Ve,N as qt,o as He,p as qe,q as Ze,t as Xe,k as mt,F as Qe,c as H,u as kt,a as w,v as Rt,w as gt,x as st,g as ct,i as q,d as at,y as Pe,z as De,D as vt,J as it,K as At,X as bt,Y as _e,G as Bt,Z as Zt,_ as Lt,$ as Ye,a0 as Te,a1 as Vt,a2 as Ke,a3 as ze,A as It,a4 as Ae,a5 as ke,I as Je,L as to,h as eo,W as oo,a6 as no,a7 as so,S as io,a8 as ro,P as ao,O as lo,E as co,R as ho,U as uo,V as po,a9 as fo,aa as mo,ab as go,ac as Ut,ad as vo,b as yo,ae as xo,M as bo,r as P,l as S,af as wt,ag as wo,ah as Xt,ai as So}from"./index-cWLk4rCz.js";const St={defines:{DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tColor:{value:null},tDepth:{value:null},focus:{value:1},aspect:{value:1},aperture:{value:.025},maxblur:{value:.01},nearClip:{value:1},farClip:{value:1e3}},vertexShader:`
2
2
 
3
3
  varying vec2 vUv;
4
4
 
@@ -1 +1 @@
1
- @import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&family=Oxanium:wght@400;600;700&display=swap";*{margin:0;padding:0;box-sizing:border-box}html,body,#root{width:100%;height:100%;overflow:hidden;background:#050507}#root{position:relative}#root:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");background-size:150px;opacity:.035;pointer-events:none;z-index:10}.hud-bar{position:fixed;top:14px;right:14px;z-index:50;display:flex;gap:8px;align-items:center;padding:5px 10px;border-radius:20px;background:#06070e8c;border:1px solid rgba(255,255,255,.06);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 4px 20px #0006;pointer-events:auto;font-family:IBM Plex Mono,monospace;animation:hud-fadein .5s ease-out}@keyframes hud-fadein{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.hud-chip{font-size:11px;color:#b0b4c4;font-variant-numeric:tabular-nums;display:flex;align-items:center;gap:3px;letter-spacing:.02em}.hud-chip-label{font-size:8px;color:#555;text-transform:uppercase;letter-spacing:.08em}.hud-panel{min-width:210px;padding:14px 14px 12px;border-radius:12px;background:linear-gradient(140deg,#10121cb8,#08090ed1),radial-gradient(120% 140% at 0% 0%,#5aa0ff24,#0000);border:1px solid rgba(255,255,255,.08);box-shadow:0 24px 60px #0000008c,inset 0 0 0 1px #ffffff05;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);font-family:IBM Plex Mono,monospace;animation:hud-fadein .6s ease-out}@keyframes hud-fadein{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.hud-title{display:flex;align-items:center;gap:6px;font-family:Oxanium,sans-serif;font-size:16px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:#e6e8f2;line-height:1}.hud-title-mark{font-size:12px;color:#7ee7d8;animation:mark-spin 12s linear infinite}@keyframes mark-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.hud-title-accent{color:#7ee7d8}.hud-divider{height:1px;margin:10px 0 8px;background:linear-gradient(90deg,#7ee7d899,#fff0);opacity:.5;position:relative;overflow:hidden}.hud-divider:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(90deg,transparent,rgba(126,231,216,.8),transparent);animation:divider-sweep 4s ease-in-out infinite}@keyframes divider-sweep{0%,to{transform:translate(-100%);opacity:0}50%{transform:translate(100%);opacity:1}}.hud-stats{display:grid;gap:6px}.hud-stat{display:grid;grid-template-columns:66px 1fr;align-items:center;column-gap:8px}.hud-label{font-size:9px;color:#7b7f8f;text-transform:uppercase;letter-spacing:1.4px}.hud-value{font-size:12px;color:#c8cbd7;display:flex;align-items:center;gap:6px;letter-spacing:.2px}.hud-value--mono{font-variant-numeric:tabular-nums}.hud-dot{width:7px;height:7px;border-radius:50%;transition:background .3s,box-shadow .3s}.hud-dot--on{background:#7ee7d8;box-shadow:0 0 8px #7ee7d899;animation:dot-breathe 2s ease-in-out infinite}.hud-dot--err{background:#f87171;box-shadow:0 0 8px #f8717180;animation:dot-breathe 1s ease-in-out infinite}.hud-dot--warn{background:#fbbf24;box-shadow:0 0 8px #fbbf2466;animation:dot-breathe 1.5s ease-in-out infinite}@keyframes dot-breathe{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.85)}}.hud-tool{font-weight:600;transition:color .2s ease}.tooltip{position:fixed;z-index:30;background:#08080ef0;border:1px solid rgba(255,255,255,.12);border-radius:6px;padding:10px 14px;pointer-events:none;transition:opacity .1s ease;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);min-width:160px;box-shadow:0 8px 32px #000000b3}.tooltip-label{font-family:IBM Plex Mono,monospace;font-size:12px;color:#fff;font-weight:500;margin-bottom:2px;white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis}.tooltip-type{font-family:IBM Plex Mono,monospace;font-size:9px;color:#888;text-transform:uppercase;letter-spacing:1px;margin-bottom:7px}.tooltip-meta{font-family:IBM Plex Mono,monospace;font-size:10px;color:#aaa;margin-bottom:3px}.tooltip-count{font-family:IBM Plex Mono,monospace;font-size:9px;color:#666}.sidebar{position:fixed;right:0;top:0;height:100%;width:280px;background:#06060bf5;border-left:1px solid rgba(255,255,255,.08);z-index:25;transform:translate(100%);transition:transform .25s cubic-bezier(.16,1,.3,1);-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);display:flex;flex-direction:column;overflow:hidden}.sidebar--open{transform:translate(0)}.sidebar-header{padding:24px 20px 16px;border-bottom:1px solid rgba(255,255,255,.06);position:relative}.sidebar-close{position:absolute;top:20px;right:16px;width:26px;height:26px;display:flex;align-items:center;justify-content:center;color:#666;cursor:pointer;font-size:18px;border-radius:4px;transition:color .15s,background .15s;pointer-events:all;line-height:1}.sidebar-close:hover{color:#fff;background:#ffffff14}.sidebar-title{font-family:Fira Code,monospace;font-size:13px;color:#fff;font-weight:500;margin-bottom:4px;padding-right:32px;word-break:break-all}.sidebar-type{font-family:Space Mono,monospace;font-size:9px;color:#666;text-transform:uppercase;letter-spacing:1px}.sidebar-section{padding:16px 20px;border-bottom:1px solid rgba(255,255,255,.05)}.sidebar-section-label{font-family:Space Mono,monospace;font-size:9px;color:#555;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px}.sidebar-action{font-family:Fira Code,monospace;font-size:15px;font-weight:500;margin-bottom:3px}.sidebar-time{font-family:Space Mono,monospace;font-size:10px;color:#777}.sidebar-count{font-family:Space Mono,monospace;font-size:24px;color:#ccc;font-weight:700}.sidebar-session{font-family:Fira Code,monospace;font-size:11px;color:#4ade80}.perm-badge{display:inline-flex;align-items:center;gap:5px;font-family:Space Mono,monospace;font-size:9px;color:#fbbf24;background:#fbbf241a;border:1px solid rgba(251,191,36,.3);border-radius:3px;padding:2px 6px;margin-top:6px}.perm-dot{width:5px;height:5px;border-radius:50%;background:#fbbf24;animation:perm-pulse 1s ease-in-out infinite}@keyframes perm-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.7)}}.elog{position:fixed;bottom:16px;left:16px;z-index:20;display:flex;flex-direction:column;gap:6px;pointer-events:none;max-width:320px;font-family:IBM Plex Mono,monospace}.elog>*{pointer-events:all}.elog-live{display:flex;flex-direction:column;gap:3px}.elog-row{display:flex;align-items:center;gap:5px;padding:2px 8px 2px 5px;border-radius:4px;background:#06070e40;border:1px solid rgba(255,255,255,.03);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:relative;overflow:hidden;animation:elog-slide .35s cubic-bezier(.16,1,.3,1);font-size:7px}.elog-row:after{content:"";position:absolute;top:0;bottom:0;left:-70%;width:70%;background:linear-gradient(90deg,transparent,var(--entry-color, #888) 60%,transparent);opacity:.15;animation:elog-sweep .5s ease-out forwards;pointer-events:none}@keyframes elog-slide{0%{opacity:0;transform:translate(-12px) scale(.97)}60%{opacity:1;transform:translate(2px) scale(1)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes elog-sweep{0%{left:-70%;opacity:.15}to{left:140%;opacity:0}}.elog-row--static{animation:none;background:#06070e4d;-webkit-backdrop-filter:none;backdrop-filter:none}.elog-row--static:after{display:none}.elog-row--static .elog-dot{animation:none}.elog-dot{width:4px;height:4px;border-radius:50%;flex-shrink:0;animation:elog-dot-pop .4s cubic-bezier(.34,1.56,.64,1)}@keyframes elog-dot-pop{0%{transform:scale(0)}70%{transform:scale(1.6)}to{transform:scale(1)}}.elog-tool{font-size:7px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;min-width:28px;flex-shrink:0}.elog-file{font-size:7px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100px}.elog-id{font-size:7px;color:#3a3a4a;margin-left:auto;flex-shrink:0;letter-spacing:.02em;opacity:.6}.elog-hist-btn{font-family:IBM Plex Mono,monospace;font-size:8px;color:#444;background:none;border:none;cursor:pointer;text-align:left;padding:2px 0 0 6px;letter-spacing:.06em;transition:color .15s}.elog-hist-btn:hover{color:#888}.elog-hist{position:fixed;left:16px;top:16px;bottom:16px;width:320px;border-radius:10px;background:#06070ee0;border:1px solid rgba(255,255,255,.07);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 8px 32px #00000080;overflow:hidden;display:flex;flex-direction:column;animation:hud-fadein .3s ease-out;z-index:30}.elog-hist-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgba(255,255,255,.06)}.elog-hist-title{font-size:9px;color:#666;text-transform:uppercase;letter-spacing:.1em}.elog-hist-close{font-family:IBM Plex Mono,monospace;font-size:14px;color:#555;background:none;border:none;cursor:pointer;padding:0 0 0 8px;line-height:1;transition:color .15s}.elog-hist-close:hover{color:#aaa}.elog-hist-count{font-size:9px;color:#7ee7d8;background:#7ee7d81a;padding:1px 6px;border-radius:8px;letter-spacing:.04em}.elog-hist-scroll{overflow-y:auto;padding:6px;display:flex;flex-direction:column;gap:2px;flex:1}.elog-hist-scroll::-webkit-scrollbar{width:4px}.elog-hist-scroll::-webkit-scrollbar-track{background:transparent}.elog-hist-scroll::-webkit-scrollbar-thumb{background:#ffffff14;border-radius:2px}.elog-hist-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff26}.help-btn{background:none;border:1px solid rgba(255,255,255,.1);border-radius:4px;color:#444;font-family:Space Mono,monospace;font-size:9px;padding:3px 8px;cursor:pointer;width:fit-content;transition:color .15s,border-color .15s;letter-spacing:.05em;text-transform:uppercase}.help-btn:hover{color:#999;border-color:#ffffff40}.hud-ctrl-sep{width:1px;height:16px;background:#ffffff14;margin:0 2px}.hud-ctrl-btn{width:30px;height:30px;background:transparent;border:1px solid transparent;border-radius:6px;color:#666;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;transition:color .2s,background .2s,border-color .2s;padding:0}.hud-ctrl-btn svg{width:15px;height:15px;stroke:currentColor}.hud-ctrl-btn:hover{color:#c8cbd7;background:#ffffff0f;border-color:#ffffff1a}.hud-ctrl-btn:active{background:#ffffff1a;transform:scale(.95)}.hud-button{width:32px;height:32px;background:#ffffff14;border:1px solid rgba(255,255,255,.12);border-radius:4px;color:#666;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;transition:color .2s}.hud-button:hover{color:#aaa}.help-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;background:#0000008c;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.help-panel{background:#08080efa;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:20px 24px;min-width:200px;box-shadow:0 16px 48px #000c}.help-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.help-panel-title{font-family:Space Mono,monospace;font-size:9px;color:#555;text-transform:uppercase;letter-spacing:1.5px}.legend-title{font-size:8px;color:#444;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:8px}.legend-items{display:flex;flex-direction:column;gap:5px}.legend-item{display:flex;align-items:center;gap:8px}.legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.legend-badge{width:14px;height:14px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:7px;font-weight:700;color:#000;flex-shrink:0}.legend-name{font-size:9px;color:#888}.legend-key{font-size:8px;color:#555;margin-left:auto;padding-left:8px}.legend-perm{display:flex;align-items:center;gap:8px;margin-top:4px;padding-top:6px;border-top:1px solid rgba(255,255,255,.04)}.legend-perm-ring{width:14px;height:14px;border-radius:50%;border:2px dashed #fbbf24;flex-shrink:0}.legend-perm-name{font-size:9px;color:#fbbf24}.debug-toggle{position:fixed;bottom:24px;right:24px;z-index:40;background:#fbbf241f;border:1px solid rgba(251,191,36,.4);border-radius:5px;color:#fbbf24e6;font-family:Space Mono,monospace;font-size:10px;font-weight:700;letter-spacing:.15em;padding:6px 12px;cursor:pointer;transition:color .15s,background .15s,border-color .15s}.debug-toggle:hover{background:#fbbf2438;border-color:#fbbf24b3;color:#fbbf24}.debug-panel{position:fixed;bottom:56px;right:24px;width:260px;background:#06060cf7;border:1px solid rgba(255,255,255,.1);border-radius:8px;z-index:40;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 16px 48px #000c;transform:translateY(8px) scale(.97);opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}.debug-panel--open{opacity:1;transform:translateY(0) scale(1);pointer-events:all}.debug-panel-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px 10px;border-bottom:1px solid rgba(255,255,255,.07)}.debug-panel-title{font-family:Space Mono,monospace;font-size:9px;color:#555;text-transform:uppercase;letter-spacing:1.5px}.debug-close{background:none;border:none;color:#555;font-size:16px;cursor:pointer;padding:0 2px;line-height:1;transition:color .15s}.debug-close:hover{color:#ccc}.debug-section{padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.05)}.debug-section:last-child{border-bottom:none}.debug-section-label{font-family:Space Mono,monospace;font-size:8px;color:#444;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:8px}.debug-session-row{display:flex;gap:6px}.debug-select{flex:1;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;color:#aaa;font-family:Fira Code,monospace;font-size:10px;padding:4px 7px;outline:none;cursor:pointer}.debug-new-btn{background:#ffffff0f;border:1px solid rgba(255,255,255,.12);border-radius:4px;color:#888;font-family:Space Mono,monospace;font-size:9px;padding:4px 8px;cursor:pointer;white-space:nowrap;transition:color .15s,background .15s}.debug-new-btn:hover{color:#ccc;background:#ffffff1a}.debug-tool-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.debug-tool-btn{background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:4px;color:var(--tool-color, #888);font-family:Space Mono,monospace;font-size:9px;padding:6px 4px;cursor:pointer;transition:background .15s,border-color .15s,opacity .15s;text-align:center}.debug-tool-btn:hover{background:color-mix(in srgb,var(--tool-color, #888) 15%,transparent);border-color:color-mix(in srgb,var(--tool-color, #888) 40%,transparent)}.debug-tool-btn:active{opacity:.6}.perm-notifications{position:fixed;left:24px;top:130px;display:flex;flex-direction:column;gap:6px;z-index:100;pointer-events:none;max-width:280px}.perm-notifications-title{font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:#fbbf24;text-align:left;margin-bottom:2px;opacity:.7}.perm-notification-item{display:flex;align-items:flex-start;gap:10px;background:#fbbf240f;border:1px solid rgba(251,191,36,.25);border-radius:3px;padding:8px 14px;animation:perm-fadein .3s ease}@keyframes perm-fadein{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.perm-notification-dot{width:6px;height:6px;border-radius:50%;background:#fbbf24;margin-top:3px;flex-shrink:0;animation:perm-pulse 1s ease-in-out infinite}.perm-notification-body{display:flex;flex-direction:column;gap:2px}.perm-notification-session{font-size:9px;letter-spacing:.15em;color:#fbbf2499;text-transform:uppercase}.perm-notification-msg{font-size:11px;color:#fbbf24e6;max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.panel-overlay{position:fixed;top:24px;right:24px;max-width:400px;max-height:calc(100vh - 48px);background:#020209f2;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:16px;overflow-y:auto;z-index:100;font-size:12px;line-height:1.6;color:#ccc}.panel-close,.panel-close-btn{position:absolute;top:8px;right:8px;background:none;border:none;color:#666;cursor:pointer;font-size:16px;padding:0;width:24px;height:24px}.panel-close:hover,.panel-close-btn:hover{color:#aaa}.panel-overlay h3{margin:0 0 12px;font-size:14px;font-weight:600;color:#fff}.panel-overlay h4{margin:8px 0 6px;font-size:12px;font-weight:600;color:#aaa;text-transform:uppercase;letter-spacing:.05em}.panel-section{margin-bottom:16px}.panel-section:last-child{margin-bottom:0}.node-types-grid{display:flex;flex-direction:column;gap:8px}.node-type-item{display:flex;align-items:center;gap:8px}.node-type-badge{width:28px;height:28px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#fff;flex-shrink:0}.node-type-info{display:flex;flex-direction:column;gap:2px}.node-type-name{font-size:12px;font-weight:500;color:#fff}.node-type-description{font-size:10px;color:#888}.animations-list{display:flex;flex-direction:column;gap:10px}.animation-item{font-size:11px}.animation-name{font-weight:500;color:#fff;margin-bottom:2px}.animation-description{font-size:10px;color:#888;padding-left:8px;border-left:2px solid rgba(255,255,255,.1)}
1
+ @import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&family=Oxanium:wght@400;600;700&display=swap";*{margin:0;padding:0;box-sizing:border-box}html,body,#root{width:100%;height:100%;overflow:hidden;background:#050507}#root{position:relative}#root:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");background-size:150px;opacity:.035;pointer-events:none;z-index:10}.hud-bar{position:fixed;top:14px;right:14px;z-index:50;display:flex;gap:8px;align-items:center;padding:5px 10px;border-radius:20px;background:#06070e8c;border:1px solid rgba(255,255,255,.06);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 4px 20px #0006;pointer-events:auto;font-family:IBM Plex Mono,monospace;animation:hud-fadein .5s ease-out}@keyframes hud-fadein{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.hud-chip{font-size:11px;color:#b0b4c4;font-variant-numeric:tabular-nums;display:flex;align-items:center;gap:3px;letter-spacing:.02em}.hud-chip-label{font-size:8px;color:#555;text-transform:uppercase;letter-spacing:.08em}.hud-panel{min-width:210px;padding:14px 14px 12px;border-radius:12px;background:linear-gradient(140deg,#10121cb8,#08090ed1),radial-gradient(120% 140% at 0% 0%,#5aa0ff24,#0000);border:1px solid rgba(255,255,255,.08);box-shadow:0 24px 60px #0000008c,inset 0 0 0 1px #ffffff05;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);font-family:IBM Plex Mono,monospace;animation:hud-fadein .6s ease-out}@keyframes hud-fadein{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.hud-title{display:flex;align-items:center;gap:6px;font-family:Oxanium,sans-serif;font-size:16px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:#e6e8f2;line-height:1}.hud-title-mark{font-size:12px;color:#7ee7d8;animation:mark-spin 12s linear infinite}@keyframes mark-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.hud-title-accent{color:#7ee7d8}.hud-divider{height:1px;margin:10px 0 8px;background:linear-gradient(90deg,#7ee7d899,#fff0);opacity:.5;position:relative;overflow:hidden}.hud-divider:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(90deg,transparent,rgba(126,231,216,.8),transparent);animation:divider-sweep 4s ease-in-out infinite}@keyframes divider-sweep{0%,to{transform:translate(-100%);opacity:0}50%{transform:translate(100%);opacity:1}}.hud-stats{display:grid;gap:6px}.hud-stat{display:grid;grid-template-columns:66px 1fr;align-items:center;column-gap:8px}.hud-label{font-size:9px;color:#7b7f8f;text-transform:uppercase;letter-spacing:1.4px}.hud-value{font-size:12px;color:#c8cbd7;display:flex;align-items:center;gap:6px;letter-spacing:.2px}.hud-value--mono{font-variant-numeric:tabular-nums}.hud-dot{width:7px;height:7px;border-radius:50%;transition:background .3s,box-shadow .3s}.hud-dot--on{background:#7ee7d8;box-shadow:0 0 8px #7ee7d899;animation:dot-breathe 2s ease-in-out infinite}.hud-dot--err{background:#f87171;box-shadow:0 0 8px #f8717180;animation:dot-breathe 1s ease-in-out infinite}.hud-dot--warn{background:#fbbf24;box-shadow:0 0 8px #fbbf2466;animation:dot-breathe 1.5s ease-in-out infinite}@keyframes dot-breathe{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.85)}}.hud-tool{font-weight:600;transition:color .2s ease}.tooltip{position:fixed;z-index:30;background:#08080ef0;border:1px solid rgba(255,255,255,.12);border-radius:6px;padding:10px 14px;pointer-events:none;transition:opacity .1s ease;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);min-width:160px;box-shadow:0 8px 32px #000000b3}.tooltip-label{font-family:IBM Plex Mono,monospace;font-size:12px;color:#fff;font-weight:500;margin-bottom:2px;white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis}.tooltip-type{font-family:IBM Plex Mono,monospace;font-size:9px;color:#888;text-transform:uppercase;letter-spacing:1px;margin-bottom:7px}.tooltip-meta{font-family:IBM Plex Mono,monospace;font-size:10px;color:#aaa;margin-bottom:3px}.tooltip-count{font-family:IBM Plex Mono,monospace;font-size:9px;color:#666}.sidebar{position:fixed;right:0;top:0;height:100%;width:280px;background:#06060bf5;border-left:1px solid rgba(255,255,255,.08);z-index:25;transform:translate(100%);transition:transform .25s cubic-bezier(.16,1,.3,1);-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);display:flex;flex-direction:column;overflow:hidden}.sidebar--open{transform:translate(0)}.sidebar-header{padding:24px 20px 16px;border-bottom:1px solid rgba(255,255,255,.06);position:relative}.sidebar-close{position:absolute;top:20px;right:16px;width:26px;height:26px;display:flex;align-items:center;justify-content:center;color:#666;cursor:pointer;font-size:18px;border-radius:4px;transition:color .15s,background .15s;pointer-events:all;line-height:1}.sidebar-close:hover{color:#fff;background:#ffffff14}.sidebar-title{font-family:Fira Code,monospace;font-size:13px;color:#fff;font-weight:500;margin-bottom:4px;padding-right:32px;word-break:break-all}.sidebar-type{font-family:Space Mono,monospace;font-size:9px;color:#666;text-transform:uppercase;letter-spacing:1px}.sidebar-section{padding:16px 20px;border-bottom:1px solid rgba(255,255,255,.05)}.sidebar-section-label{font-family:Space Mono,monospace;font-size:9px;color:#555;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px}.sidebar-action{font-family:Fira Code,monospace;font-size:15px;font-weight:500;margin-bottom:3px}.sidebar-time{font-family:Space Mono,monospace;font-size:10px;color:#777}.sidebar-count{font-family:Space Mono,monospace;font-size:24px;color:#ccc;font-weight:700}.sidebar-session{font-family:Fira Code,monospace;font-size:11px;color:#4ade80}.perm-badge{display:inline-flex;align-items:center;gap:5px;font-family:Space Mono,monospace;font-size:9px;color:#fbbf24;background:#fbbf241a;border:1px solid rgba(251,191,36,.3);border-radius:3px;padding:2px 6px;margin-top:6px}.perm-dot{width:5px;height:5px;border-radius:50%;background:#fbbf24;animation:perm-pulse 1s ease-in-out infinite}@keyframes perm-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.7)}}.elog{position:fixed;bottom:16px;left:16px;z-index:20;display:flex;flex-direction:column;gap:6px;pointer-events:none;max-width:320px;font-family:IBM Plex Mono,monospace}.elog>*{pointer-events:all}.elog-live{display:flex;flex-direction:column;gap:3px}.elog-row{display:flex;align-items:center;gap:5px;padding:2px 8px 2px 5px;border-radius:4px;background:#06070e40;border:1px solid rgba(255,255,255,.03);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:relative;overflow:hidden;animation:elog-slide .35s cubic-bezier(.16,1,.3,1);font-size:7px}.elog-row:after{content:"";position:absolute;top:0;bottom:0;left:-70%;width:70%;background:linear-gradient(90deg,transparent,var(--entry-color, #888) 60%,transparent);opacity:.15;animation:elog-sweep .5s ease-out forwards;pointer-events:none}@keyframes elog-slide{0%{opacity:0;transform:translate(-12px) scale(.97)}60%{opacity:1;transform:translate(2px) scale(1)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes elog-sweep{0%{left:-70%;opacity:.15}to{left:140%;opacity:0}}.elog-row--static{animation:none;background:#06070e4d;-webkit-backdrop-filter:none;backdrop-filter:none}.elog-row--static:after{display:none}.elog-row--static .elog-dot{animation:none}.elog-dot{width:4px;height:4px;border-radius:50%;flex-shrink:0;animation:elog-dot-pop .4s cubic-bezier(.34,1.56,.64,1)}@keyframes elog-dot-pop{0%{transform:scale(0)}70%{transform:scale(1.6)}to{transform:scale(1)}}.elog-tool{font-size:7px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;min-width:28px;flex-shrink:0}.elog-file{font-size:7px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100px}.elog-id{font-size:7px;color:#3a3a4a;margin-left:auto;flex-shrink:0;letter-spacing:.02em;opacity:.6}.elog-hist-btn{font-family:IBM Plex Mono,monospace;font-size:8px;color:#444;background:none;border:none;cursor:pointer;text-align:left;padding:2px 0 0 6px;letter-spacing:.06em;transition:color .15s}.elog-hist-btn:hover{color:#888}.elog-hist{position:fixed;left:16px;top:16px;bottom:16px;width:320px;border-radius:10px;background:#06070ee0;border:1px solid rgba(255,255,255,.07);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 8px 32px #00000080;overflow:hidden;display:flex;flex-direction:column;animation:hud-fadein .3s ease-out;z-index:30}.elog-hist-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgba(255,255,255,.06)}.elog-hist-title{font-size:9px;color:#666;text-transform:uppercase;letter-spacing:.1em}.elog-hist-close{font-family:IBM Plex Mono,monospace;font-size:14px;color:#555;background:none;border:none;cursor:pointer;padding:0 0 0 8px;line-height:1;transition:color .15s}.elog-hist-close:hover{color:#aaa}.elog-hist-count{font-size:9px;color:#7ee7d8;background:#7ee7d81a;padding:1px 6px;border-radius:8px;letter-spacing:.04em}.elog-hist-scroll{overflow-y:auto;padding:6px;display:flex;flex-direction:column;gap:2px;flex:1}.elog-hist-scroll::-webkit-scrollbar{width:4px}.elog-hist-scroll::-webkit-scrollbar-track{background:transparent}.elog-hist-scroll::-webkit-scrollbar-thumb{background:#ffffff14;border-radius:2px}.elog-hist-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff26}.help-btn{background:none;border:1px solid rgba(255,255,255,.1);border-radius:4px;color:#444;font-family:Space Mono,monospace;font-size:9px;padding:3px 8px;cursor:pointer;width:fit-content;transition:color .15s,border-color .15s;letter-spacing:.05em;text-transform:uppercase}.help-btn:hover{color:#999;border-color:#ffffff40}.hud-ctrl-sep{width:1px;height:16px;background:#ffffff14;margin:0 2px}.hud-ctrl-btn{width:30px;height:30px;background:transparent;border:1px solid transparent;border-radius:6px;color:#666;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;transition:color .2s,background .2s,border-color .2s;padding:0}.hud-ctrl-btn svg{width:15px;height:15px;stroke:currentColor}.hud-ctrl-btn:hover{color:#c8cbd7;background:#ffffff0f;border-color:#ffffff1a}.hud-ctrl-btn:active{background:#ffffff1a;transform:scale(.95)}.hud-button{width:32px;height:32px;background:#ffffff14;border:1px solid rgba(255,255,255,.12);border-radius:4px;color:#666;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;transition:color .2s}.hud-button:hover{color:#aaa}.help-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;background:#0000008c;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.help-panel{background:#08080efa;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:20px 24px;min-width:200px;box-shadow:0 16px 48px #000c}.help-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.help-panel-title{font-family:Space Mono,monospace;font-size:9px;color:#555;text-transform:uppercase;letter-spacing:1.5px}.legend-title{font-size:8px;color:#444;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:8px}.legend-items{display:flex;flex-direction:column;gap:5px}.legend-item{display:flex;align-items:center;gap:8px}.legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.legend-badge{width:14px;height:14px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:7px;font-weight:700;color:#000;flex-shrink:0}.legend-name{font-size:9px;color:#888}.legend-key{font-size:8px;color:#555;margin-left:auto;padding-left:8px}.legend-perm{display:flex;align-items:center;gap:8px;margin-top:4px;padding-top:6px;border-top:1px solid rgba(255,255,255,.04)}.legend-perm-ring{width:14px;height:14px;border-radius:50%;border:2px dashed #fbbf24;flex-shrink:0}.legend-perm-name{font-size:9px;color:#fbbf24}.debug-toggle{position:fixed;bottom:24px;right:24px;z-index:40;background:#fbbf241f;border:1px solid rgba(251,191,36,.4);border-radius:5px;color:#fbbf24e6;font-family:Space Mono,monospace;font-size:10px;font-weight:700;letter-spacing:.15em;padding:6px 12px;cursor:pointer;transition:color .15s,background .15s,border-color .15s}.debug-toggle:hover{background:#fbbf2438;border-color:#fbbf24b3;color:#fbbf24}.debug-panel{position:fixed;bottom:56px;right:24px;width:260px;background:#06060cf7;border:1px solid rgba(255,255,255,.1);border-radius:8px;z-index:40;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 16px 48px #000c;transform:translateY(8px) scale(.97);opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}.debug-panel--open{opacity:1;transform:translateY(0) scale(1);pointer-events:all}.debug-panel-header{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:8px}.debug-panel-title{font-family:Space Mono,monospace;font-size:9px;color:#555;text-transform:uppercase;letter-spacing:1.5px}.debug-close{background:none;border:none;color:#555;font-size:16px;cursor:pointer;padding:0 2px;line-height:1;transition:color .15s}.debug-close:hover{color:#ccc}.debug-section{padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.05)}.debug-section:last-child{border-bottom:none}.debug-section-label{font-family:Space Mono,monospace;font-size:8px;color:#444;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:8px}.debug-session-row{display:flex;gap:6px}.debug-select{flex:1;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;color:#aaa;font-family:Fira Code,monospace;font-size:10px;padding:4px 7px;outline:none;cursor:pointer}.debug-new-btn{background:#ffffff0f;border:1px solid rgba(255,255,255,.12);border-radius:4px;color:#888;font-family:Space Mono,monospace;font-size:9px;padding:4px 8px;cursor:pointer;white-space:nowrap;transition:color .15s,background .15s}.debug-new-btn:hover{color:#ccc;background:#ffffff1a}.debug-tool-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.debug-tool-btn{background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:4px;color:var(--tool-color, #888);font-family:Space Mono,monospace;font-size:8px;padding:4px 2px;cursor:pointer;transition:background .15s,border-color .15s,opacity .15s;text-align:center;line-height:1}.debug-tool-btn:hover{background:color-mix(in srgb,var(--tool-color, #888) 15%,transparent);border-color:color-mix(in srgb,var(--tool-color, #888) 40%,transparent)}.debug-tool-btn:active{opacity:.6}.debug-history-section{padding:10px 0 0;border-top:1px solid rgba(255,255,255,.05);display:flex;flex-direction:column;gap:4px}.debug-reload-btn{background:#ffffff0f;border:1px solid rgba(255,255,255,.12);border-radius:4px;color:#888;font-family:Space Mono,monospace;font-size:9px;padding:4px 8px;cursor:pointer;white-space:nowrap;transition:color .15s,background .15s}.debug-reload-btn:hover{color:#ccc;background:#ffffff1a}.debug-reload-btn:disabled{opacity:.5;cursor:not-allowed}.debug-history-list{display:flex;flex-direction:column;gap:2px}.debug-history-row{display:flex;justify-content:space-between;align-items:center;gap:4px;padding:2px 0}.debug-history-id{font-size:9px;color:#6a7a9a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-family:Space Mono,monospace}.debug-load-btn{background:#ffffff0f;border:1px solid rgba(255,255,255,.12);border-radius:4px;color:#888;font-family:Space Mono,monospace;font-size:8px;padding:2px 6px;cursor:pointer;white-space:nowrap;transition:color .15s,background .15s}.debug-load-btn:hover{color:#ccc;background:#ffffff1a}.debug-load-btn:disabled{opacity:.5;cursor:not-allowed}.perm-notifications{position:fixed;left:24px;top:130px;display:flex;flex-direction:column;gap:6px;z-index:100;pointer-events:none;max-width:280px}.perm-notifications-title{font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:#fbbf24;text-align:left;margin-bottom:2px;opacity:.7}.perm-notification-item{display:flex;align-items:flex-start;gap:10px;background:#fbbf240f;border:1px solid rgba(251,191,36,.25);border-radius:3px;padding:8px 14px;animation:perm-fadein .3s ease}@keyframes perm-fadein{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.perm-notification-dot{width:6px;height:6px;border-radius:50%;background:#fbbf24;margin-top:3px;flex-shrink:0;animation:perm-pulse 1s ease-in-out infinite}.perm-notification-body{display:flex;flex-direction:column;gap:2px}.perm-notification-session{font-size:9px;letter-spacing:.15em;color:#fbbf2499;text-transform:uppercase}.perm-notification-msg{font-size:11px;color:#fbbf24e6;max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.panel-overlay{position:fixed;top:24px;right:24px;width:280px;max-height:calc(100vh - 48px);background:#020209f2;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:12px;overflow-y:auto;z-index:100;font-size:12px;line-height:1.6;color:#ccc}.panel-close,.panel-close-btn{position:absolute;top:8px;right:8px;background:none;border:none;color:#666;cursor:pointer;font-size:16px;padding:0;width:24px;height:24px}.panel-close:hover,.panel-close-btn:hover{color:#aaa}.panel-overlay h3{margin:0 0 12px;font-size:14px;font-weight:600;color:#fff}.panel-overlay h4{margin:8px 0 6px;font-size:12px;font-weight:600;color:#aaa;text-transform:uppercase;letter-spacing:.05em}.panel-section{margin-bottom:16px}.panel-section:last-child{margin-bottom:0}.node-types-grid{display:flex;flex-direction:column;gap:8px}.node-type-item{display:flex;align-items:center;gap:8px}.node-type-badge{width:28px;height:28px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#fff;flex-shrink:0}.node-type-info{display:flex;flex-direction:column;gap:2px}.node-type-name{font-size:12px;font-weight:500;color:#fff}.node-type-description{font-size:10px;color:#888}.animations-list{display:flex;flex-direction:column;gap:10px}.animation-item{font-size:11px}.animation-name{font-weight:500;color:#fff;margin-bottom:2px}.animation-description{font-size:10px;color:#888;padding-left:8px;border-left:2px solid rgba(255,255,255,.1)}