import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{at as n}from"./vendor-ui-CWUk2ulb.js";import{i as r,l as i,x as a}from"./api-DimikzPd.js";import{t as o}from"./use-transition-navigate-jMR-y4bs.js";import{t as s}from"./transition-nav-link-nVD3H66a.js";import{t as c}from"./get-error-message-Dk8elqEP.js";var l=e(t(),1),u=n(),d=`
  @keyframes readout-appear {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
  }
  @keyframes dot-pulse {
    0%, 100% { opacity: 1;   }
    50%       { opacity: 0.3; }
  }
  @keyframes login-glow-pulse {
    0%   { opacity: 0.75; transform: translate(-50%, -50%) scale(1);    }
    100% { opacity: 0.9;  transform: translate(-50%, -50%) scale(1.03); }
  }
  @keyframes live-dot {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 20%, transparent); }
    50%      { box-shadow: 0 0 0 2px transparent; }
  }
  @keyframes terminal-appear {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
  @keyframes terminal-line {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes cursor-blink {
    0%, 49% { opacity: 0.8; }
    50%, 100% { opacity: 0; }
  }
  @keyframes tree-line {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* ── Layout ───────────────────────────────── */
  .login-page {
    display: grid;
    min-height: 100svh;
    grid-template-columns: 1.2fr 1fr;
  }
  .login-left { display: block; order: -1; }

  @media (max-width: 1023px) {
    .login-page { grid-template-columns: 1fr; }
    .login-left { display: none !important; }
  }
  @media (max-width: 640px) {
    .login-card { padding: 1.75rem !important; }
    .login-form-area { padding: 2rem 1.25rem !important; }
    .login-header { padding: 1rem 1.25rem !important; }
    .login-footer { padding: 0.75rem 1.25rem !important; }
  }
  @media (max-width: 400px) {
    .login-card { padding: 1.5rem !important; }
    .login-form-area { padding: 1.5rem 1rem !important; }
    .login-header { padding: 0.85rem 1rem !important; }
    .login-footer { padding: 0.65rem 1rem !important; }
    .miravo-input { padding: 0.8rem 0.9rem !important; font-size: 1rem !important; }
    .miravo-btn { padding: 0.9rem !important; font-size: 0.95rem !important; }
  }
  @media (max-width: 1023px) {
    .login-form-panel {
      background-image:
        radial-gradient(ellipse 90% 50% at 50% 45%, color-mix(in srgb, var(--primary) 5%, transparent) 0%, transparent 65%),
        radial-gradient(circle, color-mix(in srgb, var(--primary) 6%, transparent) 1px, transparent 1px);
      background-size: auto, 70px 70px;
    }
  }

  /* ── Form elements ────────────────────────── */
  .miravo-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--secondary);
    border: 1px solid color-mix(in srgb, var(--tooltip-border) 45%, transparent);
    border-radius: 4px;
    color: var(--foreground);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
  }
  .miravo-input:focus {
    border-color: color-mix(in srgb, var(--ring) 55%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 15%, transparent);
  }
  .miravo-input::placeholder {
    color: color-mix(in srgb, var(--tooltip-border) 70%, transparent);
  }

  .miravo-btn {
    width: 100%;
    padding: 0.78rem;
    background: var(--primary);
    border: none;
    border-radius: var(--miravo-radius-pill);
    color: var(--primary-foreground);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: -0.01em;
    box-shadow:
      0 0 20px color-mix(in srgb, var(--primary) 15%, transparent),
      0 1px 3px color-mix(in srgb, var(--background) 30%, transparent);
    transition: filter 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1), transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .miravo-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow:
      0 0 30px color-mix(in srgb, var(--primary) 22%, transparent),
      0 2px 8px color-mix(in srgb, var(--background) 40%, transparent);
    transform: translateY(-1px);
  }
  .miravo-btn:active:not(:disabled) { transform: translateY(0); }
  .miravo-btn:disabled { opacity: 0.5; cursor: not-allowed; }

  .miravo-btn-ghost {
    background: transparent;
    border: none;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
  }
  .miravo-btn-ghost:hover {
    color: var(--foreground);
    text-decoration-color: var(--tooltip-border);
  }
`;function f({label:e,forId:t,children:n}){return(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`label`,{htmlFor:t,style:{fontFamily:`var(--font-mono)`,fontSize:`0.72rem`,letterSpacing:`0.03em`,color:`var(--muted-foreground)`,display:`block`,marginBottom:`0.5rem`},children:e}),n]})}function p({message:e}){return(0,u.jsx)(`p`,{role:`alert`,style:{fontSize:`0.82rem`,color:`var(--destructive)`,textAlign:`center`,padding:`0.55rem 0.9rem`,background:`color-mix(in srgb, var(--destructive) 6%, transparent)`,border:`1px solid color-mix(in srgb, var(--destructive) 12%, transparent)`,borderRadius:4,margin:`0 0 1rem`},children:e})}function m({onChangePassword:e}){let t=o(),[n,r]=(0,l.useState)(``),[s,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)(!1);async function v(r){r.preventDefault(),h(``),_(!0);try{(await i(n,s)).changePassword?e(n):(a.removeQueries({queryKey:[`bootstrap`]}),t(`/`,{replace:!0}))}catch(e){h(c(e,`Login failed`))}finally{_(!1)}}return(0,u.jsxs)(`form`,{onSubmit:v,children:[(0,u.jsx)(`div`,{style:{marginBottom:`2rem`},children:(0,u.jsx)(`h1`,{style:{fontFamily:`var(--font-heading)`,fontSize:`1.5rem`,fontWeight:800,color:`var(--foreground)`,letterSpacing:`-0.035em`,lineHeight:1.15,margin:0},children:`Log in`})}),m&&(0,u.jsx)(p,{message:m}),(0,u.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`1.15rem`},children:[(0,u.jsx)(f,{label:`Username`,forId:`username`,children:(0,u.jsx)(`input`,{id:`username`,type:`text`,className:`miravo-input`,autoComplete:`username`,required:!0,value:n,onChange:e=>r(e.target.value)})}),(0,u.jsx)(f,{label:`Password`,forId:`password`,children:(0,u.jsx)(`input`,{id:`password`,type:`password`,className:`miravo-input`,autoComplete:`current-password`,required:!0,value:s,onChange:e=>d(e.target.value)})}),(0,u.jsx)(`button`,{type:`submit`,className:`miravo-btn`,disabled:g,style:{marginTop:`0.5rem`},children:g?`Logging in…`:`Log in`})]})]})}function h({username:e}){let t=o(),[n,i]=(0,l.useState)(``),[s,d]=(0,l.useState)(``),[m,h]=(0,l.useState)(``),[g,_]=(0,l.useState)(!1);async function v(i){if(i.preventDefault(),h(``),n!==s){h(`Passwords do not match`);return}if(n.length<6){h(`Password must be at least 6 characters`);return}_(!0);try{await r(e,n),a.removeQueries({queryKey:[`bootstrap`]}),t(`/`,{replace:!0})}catch(e){h(c(e,`Password change failed`))}finally{_(!1)}}return(0,u.jsxs)(`form`,{onSubmit:v,children:[(0,u.jsxs)(`div`,{style:{marginBottom:`2rem`},children:[(0,u.jsx)(`h1`,{style:{fontFamily:`var(--font-heading)`,fontSize:`1.5rem`,fontWeight:800,color:`var(--foreground)`,letterSpacing:`-0.035em`,lineHeight:1.15,margin:0},children:`Update password`}),(0,u.jsxs)(`p`,{style:{fontSize:`0.82rem`,color:`var(--muted-foreground)`,marginTop:`0.4rem`,lineHeight:1.5},children:[`Default password detected.`,` `,(0,u.jsx)(`span`,{style:{color:`var(--warning)`},children:`Please set a new one.`})]})]}),m&&(0,u.jsx)(p,{message:m}),(0,u.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`1.1rem`},children:[(0,u.jsx)(f,{label:`New password`,forId:`new-password`,children:(0,u.jsx)(`input`,{id:`new-password`,type:`password`,className:`miravo-input`,autoComplete:`new-password`,required:!0,minLength:6,value:n,onChange:e=>i(e.target.value)})}),(0,u.jsx)(f,{label:`Confirm password`,forId:`confirm-password`,children:(0,u.jsx)(`input`,{id:`confirm-password`,type:`password`,className:`miravo-input`,autoComplete:`new-password`,required:!0,minLength:6,value:s,onChange:e=>d(e.target.value)})}),(0,u.jsx)(`button`,{type:`submit`,className:`miravo-btn`,disabled:g,style:{marginTop:`0.4rem`},children:g?`Setting password…`:`Set password`}),(0,u.jsx)(`div`,{style:{textAlign:`center`,marginTop:`0.15rem`},children:(0,u.jsx)(`button`,{type:`button`,className:`miravo-btn-ghost`,onClick:()=>{a.removeQueries({queryKey:[`bootstrap`]}),t(`/`,{replace:!0})},children:`Skip for now`})})]})]})}function g(){let e=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let t=e.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=t,i=n,a=getComputedStyle(document.documentElement).getPropertyValue(`--primary`).trim(),o=window.devicePixelRatio||1,s=0,c=0,l=0,u=0,d=[],f=[],p=[];function m(){d=[],f=[],p=[];let e=Math.max(15,Math.floor(s*c/35e3));for(let t=0;t<e;t++)d.push({x:0,y:0,bx:25+Math.random()*(s-50),by:25+Math.random()*(c-50),r:1+Math.random()*1.2,phase:Math.random()*Math.PI*2});for(let e=0;e<d.length;e++)for(let t=e+1;t<d.length;t++){let n=d[e],r=d[t];!n||!r||Math.hypot(n.bx-r.bx,n.by-r.by)<160&&Math.random()>.5&&f.push({from:e,to:t})}}function h(){s=r.offsetWidth,c=r.offsetHeight,r.width=s*o,r.height=c*o,i.setTransform(o,0,0,o,0,0),m()}function g(){l+=.016,i.clearRect(0,0,s,c);for(let e of d)e.x=e.bx+Math.sin(l*.15+e.phase)*5,e.y=e.by+Math.cos(l*.1+e.phase*1.3)*4;let e=new Set;for(let t of p)e.add(t.conn.from*256+t.conn.to);i.strokeStyle=a,i.lineWidth=.5;for(let t of f){let n=d[t.from],r=d[t.to];!n||!r||(i.globalAlpha=e.has(t.from*256+t.to)?.04:.012,i.beginPath(),i.moveTo(n.x,n.y),i.lineTo(r.x,r.y),i.stroke())}i.fillStyle=a;for(let e of d)i.globalAlpha=.08*(.6+Math.sin(l*.4+e.phase)*.4),i.beginPath(),i.arc(e.x,e.y,e.r,0,Math.PI*2),i.fill();if(Math.random()<.03&&f.length&&p.length<10){let e=f[Math.floor(Math.random()*f.length)];e&&p.push({conn:e,t:0,speed:.002+Math.random()*.003,alpha:.25+Math.random()*.35,size:1+Math.random()*1})}i.fillStyle=a;for(let e=p.length-1;e>=0;e--){let t=p[e];if(!t)continue;if(t.t+=t.speed,t.t>=1){p.splice(e,1);continue}let n=d[t.conn.from],r=d[t.conn.to];if(!n||!r)continue;let a=n.x+(r.x-n.x)*t.t,o=n.y+(r.y-n.y)*t.t;i.globalAlpha=t.alpha*.35,i.beginPath(),i.arc(a,o,t.size,0,Math.PI*2),i.fill()}i.globalAlpha=1,u=requestAnimationFrame(g)}let _=()=>{document.hidden?cancelAnimationFrame(u):u=requestAnimationFrame(g)},v,y=()=>{window.clearTimeout(v),v=window.setTimeout(h,250)};if(!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return document.addEventListener(`visibilitychange`,_),window.addEventListener(`resize`,y),h(),g(),()=>{cancelAnimationFrame(u),window.clearTimeout(v),document.removeEventListener(`visibilitychange`,_),window.removeEventListener(`resize`,y)}},[]),(0,u.jsx)(`canvas`,{ref:e,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`}})}var _=[{path:`pump-001/temp`,base:87.3,range:5,decimals:1,unit:`°C`,style:{left:`6%`,top:`18%`},delay:`1.4s`},{path:`comp/pressure`,base:4.21,range:.5,decimals:2,unit:`bar`,style:{right:`5%`,top:`12%`},delay:`1.7s`},{path:`motor/vibration`,base:2.14,range:.3,decimals:2,unit:`mm/s`,style:{left:`4%`,bottom:`18%`},delay:`2.0s`},{path:`gen/power`,base:482,range:20,decimals:0,unit:`kW`,style:{right:`4%`,bottom:`17%`},delay:`2.3s`},{path:`boiler/temp`,base:312,range:8,decimals:0,unit:`°C`,style:{left:`22%`,top:`8%`},delay:`2.6s`},{path:`turb/rpm`,base:1480,range:30,decimals:0,unit:`rpm`,style:{left:0,right:0,marginLeft:`auto`,marginRight:`auto`,width:`max-content`,bottom:`10%`},delay:`2.9s`}];function v(){let[e,t]=(0,l.useState)(()=>_.map(e=>({...e,displayValue:(e.base+(Math.random()-.5)*e.range).toFixed(e.decimals),flash:!1})));return(0,l.useEffect)(()=>{let e;function n(){document.hidden||(t(e=>e.map(e=>({...e,displayValue:(e.base+(Math.random()-.5)*e.range).toFixed(e.decimals),flash:!0}))),window.clearTimeout(e),e=window.setTimeout(()=>{t(e=>e.map(e=>({...e,flash:!1})))},400))}let r=window.setInterval(n,2200);return()=>{window.clearInterval(r),window.clearTimeout(e)}},[]),(0,u.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:3,pointerEvents:`none`},children:e.map(e=>(0,u.jsxs)(`div`,{style:{position:`absolute`,...e.style,display:`flex`,alignItems:`center`,gap:`0.45rem`,padding:`0.32rem 0.7rem`,background:`color-mix(in srgb, var(--background) 70%, transparent)`,backdropFilter:`blur(6px)`,WebkitBackdropFilter:`blur(6px)`,border:`1px solid color-mix(in srgb, var(--primary) 8%, transparent)`,borderRadius:4,fontFamily:`var(--font-mono)`,fontSize:`0.61rem`,letterSpacing:`0.02em`,opacity:0,animation:`readout-appear 0.6s cubic-bezier(0.22,1,0.36,1) ${e.delay} forwards`},children:[(0,u.jsx)(`span`,{style:{width:4,height:4,borderRadius:`50%`,background:`var(--primary)`,boxShadow:`0 0 3px color-mix(in srgb, var(--primary) 18%, transparent)`,animation:`dot-pulse 2.5s ease-in-out infinite`,flexShrink:0,display:`block`}}),(0,u.jsx)(`span`,{style:{color:`var(--tooltip-border)`},children:e.path}),(0,u.jsx)(`span`,{style:{color:e.flash?`var(--warning)`:`var(--primary)`,fontWeight:600,minWidth:`3em`,textAlign:`right`,transition:`color 0.4s`},children:e.displayValue}),(0,u.jsx)(`span`,{style:{color:`var(--tooltip-border)`,fontSize:`0.54rem`},children:e.unit})]},e.path))})}var y=`miravo start --template smart-factory`,b=6,x=[{id:`sf`,indent:``,label:`site`,text:`smart-factory`},{id:`l1`,indent:`   `,label:`area`,text:`line-1`},{id:`p001`,indent:`      `,label:`cell`,text:`pump-001`},{id:`p001-t`,indent:`         `,text:`temperature`,value:{base:87.3,range:5,decimals:1,unit:`°C`},protocol:`mqtt`},{id:`p001-p`,indent:`         `,text:`pressure`,value:{base:4.21,range:.5,decimals:2,unit:`bar`},protocol:`opcua`},{id:`p001-v`,indent:`         `,text:`vibration`,value:{base:2.14,range:.3,decimals:2,unit:`mm/s`},protocol:`modbus`},{id:`b002`,indent:`      `,label:`cell`,text:`boiler-002`},{id:`b002-t`,indent:`         `,text:`temperature`,value:{base:312,range:8,decimals:0,unit:`°C`},protocol:`mqtt`},{id:`c003`,indent:`      `,label:`cell`,text:`comp-003`},{id:`c003-r`,indent:`         `,text:`rpm`,value:{base:1480,range:30,decimals:0,unit:`rpm`},protocol:`modbus`},{id:`l2`,indent:`   `,label:`area`,text:`line-2`},{id:`t004`,indent:`      `,label:`cell`,text:`tank-004`},{id:`t004-l`,indent:`         `,text:`level`,value:{base:72.1,range:5,decimals:1,unit:`%`},protocol:`mqtt`},{id:`m005`,indent:`      `,label:`cell`,text:`motor-005`},{id:`m005-c`,indent:`         `,text:`current`,value:{base:12.4,range:1.5,decimals:1,unit:`A`},protocol:`opcua`}],S=14,C=x.flatMap((e,t)=>e.value?[t]:[]),w=4+x.length,T=.66,E=1.85,D=2.1+w*T*E+1.15*T,O=[{assetId:`p001`,name:`cavitation`,event:`fault:cavitation on pump-001: pressure drop`,resolve:`fault:resolved on pump-001: nominal`,overrides:[{tagId:`p001-t`,base:95.2,range:3},{tagId:`p001-p`,base:1.83,range:.3},{tagId:`p001-v`,base:8.71,range:1.5}]},{assetId:`c003`,name:`bearing-wear`,event:`lifecycle:degraded on comp-003: rpm declining`,resolve:`lifecycle:restored on comp-003: nominal`,overrides:[{tagId:`c003-r`,base:924,range:40}]},{assetId:`m005`,name:`overcurrent`,event:`fault:overcurrent on motor-005: current spike`,resolve:`fault:resolved on motor-005: nominal`,overrides:[{tagId:`m005-c`,base:24.8,range:3}]}],k=new Map(x.map((e,t)=>[e.id,t]));function A(){let[e,t]=(0,l.useState)(0),[n,r]=(0,l.useState)(0),[i,a]=(0,l.useState)(()=>x.map(e=>e.value?(e.value.base+(Math.random()-.5)*e.value.range).toFixed(e.value.decimals):``)),[o,s]=(0,l.useState)(new Set),[c,d]=(0,l.useState)(null),[f,p]=(0,l.useState)(`+231 tags streaming`),m=(0,l.useRef)(new Set);(0,l.useEffect)(()=>{let e={timers:[],typeInt:0,liveInt:0,flashT:0},n=(t,n)=>{e.timers.push(window.setTimeout(t,n))},i=0;return n(()=>{e.typeInt=window.setInterval(()=>{if(i++,t(i),i>=37){window.clearInterval(e.typeInt),n(()=>r(1),400),n(()=>r(2),750),n(()=>r(3),1150);for(let e=0;e<x.length;e++)n(()=>r(4+e),1300+e*110);let t=1300+x.length*110+250;n(()=>r(w),t),n(()=>{e.liveInt=window.setInterval(()=>{let t=2+Math.floor(Math.random()*2),n=[...C.filter(e=>!m.current.has(e))].sort(()=>Math.random()-.5).slice(0,t),r=new Set(n);a(e=>{let t=[...e];for(let e of r){let n=x[e]?.value;n&&(t[e]=(n.base+(Math.random()-.5)*n.range).toFixed(n.decimals))}return t}),s(r),window.clearTimeout(e.flashT),e.flashT=window.setTimeout(()=>s(new Set),350)},1600);let t=0,r=()=>{let e=O[t%O.length];if(!e)return;let i=new Set(e.overrides.map(e=>k.get(e.tagId)).filter(e=>e!==void 0));m.current=i,d({assetId:e.assetId,name:e.name,indices:i}),p(e.event),a(t=>{let n=[...t];for(let t of e.overrides){let e=k.get(t.tagId);if(e!==void 0){let r=x[e];n[e]=(t.base+(Math.random()-.5)*t.range).toFixed(r?.value?.decimals??1)}}return n}),n(()=>{m.current=new Set,d(null),p(e.resolve),a(t=>{let n=[...t];for(let t of e.overrides){let e=k.get(t.tagId);if(e!==void 0){let t=x[e];t?.value&&(n[e]=(t.value.base+(Math.random()-.5)*t.value.range).toFixed(t.value.decimals))}}return n}),n(()=>{p(`+231 tags streaming`),t++,n(r,8e3)},4e3)},1e4)};n(r,8e3)},t+500)}},32)},200),()=>{for(let t of e.timers)window.clearTimeout(t);window.clearInterval(e.typeInt),window.clearInterval(e.liveInt),window.clearTimeout(e.flashT)}},[]);let h=y.slice(0,Math.min(e,b)),g=e>b?y.slice(b,e):``;return(0,u.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,zIndex:5,pointerEvents:`none`},children:(0,u.jsxs)(`div`,{style:{border:`1px solid color-mix(in srgb, var(--primary) 10%, transparent)`,borderRadius:4,boxShadow:`none`,overflow:`hidden`,width:540},children:[(0,u.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`0.5rem 0.85rem`,background:`color-mix(in srgb, var(--sidebar) 50%, transparent)`,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,borderBottom:`1px solid color-mix(in srgb, var(--primary) 6%, transparent)`},children:[(0,u.jsx)(`span`,{style:{width:7,height:7,borderRadius:`50%`,background:`#ff5f57`,opacity:.5}}),(0,u.jsx)(`span`,{style:{width:7,height:7,borderRadius:`50%`,background:`#febc2e`,opacity:.5}}),(0,u.jsx)(`span`,{style:{width:7,height:7,borderRadius:`50%`,background:`#28c840`,opacity:.5}}),(0,u.jsx)(`span`,{style:{fontFamily:`var(--font-mono)`,fontSize:`0.5rem`,color:`var(--tooltip-foreground)`,marginLeft:`auto`,letterSpacing:`0.04em`,opacity:.5},children:`Build realistic industrial environments`})]}),(0,u.jsxs)(`div`,{style:{height:`min(${D}rem, calc(100vh - 11rem))`,overflowY:`auto`,overflowX:`hidden`,background:`color-mix(in srgb, var(--card) 60%, transparent)`,padding:`1rem 1.25rem 1.1rem`,fontFamily:`var(--font-mono)`,fontSize:`${T}rem`,lineHeight:E,whiteSpace:`pre`},children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`span`,{style:{color:`var(--muted-foreground)`},children:`$ `}),(0,u.jsx)(`span`,{style:{color:`var(--primary)`},children:h}),(0,u.jsx)(`span`,{style:{color:`var(--foreground)`,opacity:.9},children:g}),e>0&&e<37&&(0,u.jsx)(`span`,{style:{display:`inline-block`,width:5,height:10,background:`var(--primary)`,verticalAlign:`text-bottom`,marginLeft:1,animation:`cursor-blink 1s step-end infinite`}})]}),n>=1&&(0,u.jsxs)(`div`,{style:{opacity:0,animation:`terminal-line 0.4s ease forwards`},children:[(0,u.jsx)(`span`,{style:{color:`var(--primary)`},children:`✓`}),(0,u.jsx)(`span`,{style:{color:`var(--tooltip-foreground)`},children:` Loaded `}),(0,u.jsx)(`span`,{style:{color:`var(--primary)`},children:`smart-factory`}),(0,u.jsx)(`span`,{style:{color:`var(--muted-foreground)`},children:` · 10 assets · 240 tags`})]}),n>=2&&(0,u.jsxs)(`div`,{style:{opacity:0,animation:`terminal-line 0.4s ease 0.05s forwards`},children:[(0,u.jsx)(`span`,{style:{color:`var(--primary)`},children:`✓`}),(0,u.jsx)(`span`,{style:{color:`var(--tooltip-foreground)`},children:` Protocols `}),(0,u.jsx)(`span`,{style:{color:`var(--muted-foreground)`},children:`mqtt :1883 · opcua :4840 · modbus :1502`})]}),n>=3&&(0,u.jsx)(`div`,{style:{opacity:0,animation:`terminal-line 0.3s ease forwards`,marginTop:`0.6em`}}),x.map((e,t)=>{if(n<4+t)return null;let r=!!e.value;return(0,u.jsxs)(`div`,{style:{opacity:0,animation:`tree-line 0.3s ease forwards`},children:[(0,u.jsx)(`span`,{style:{color:`var(--tooltip-border)`},children:e.indent}),r&&e.value?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{style:{color:`var(--muted-foreground)`},children:e.text.padEnd(S)}),(0,u.jsx)(`span`,{style:{color:c?.indices.has(t)?`var(--destructive)`:o.has(t)?`var(--primary)`:`var(--foreground)`,transition:`color 0.3s`},children:(i[t]??``).padStart(7)}),(0,u.jsx)(`span`,{style:{color:`var(--tooltip-border)`},children:` ${e.value.unit.padEnd(5)}`}),e.protocol&&(0,u.jsx)(`span`,{style:{color:`var(--tooltip-border)`},children:e.protocol})]}):(0,u.jsxs)(u.Fragment,{children:[e.label&&(0,u.jsx)(`span`,{style:{color:`var(--tooltip-border)`},children:`${e.label}: `}),(0,u.jsx)(`span`,{style:{color:`var(--tooltip-foreground)`},children:e.text}),e.label===`cell`&&c?.assetId===e.id&&(0,u.jsxs)(`span`,{style:{marginLeft:`0.8em`,color:`var(--destructive)`,fontSize:`0.9em`},children:[`: `,c.name]})]})]},e.id)}),n>=w&&(0,u.jsx)(`div`,{style:{opacity:0,animation:`terminal-line 0.4s ease forwards`,marginTop:`0.55em`,textAlign:`right`},children:(0,u.jsx)(`span`,{style:{color:f.includes(`resolved`)||f.includes(`restored`)||f.includes(`fault:`)||f.includes(`lifecycle:`)?`var(--muted-foreground)`:`var(--tooltip-border)`,transition:`color 0.4s`},children:f})})]})]})})}function j(){let[e,t]=(0,l.useState)(!1),[n,r]=(0,l.useState)(``);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`style`,{children:d}),(0,u.jsxs)(`div`,{className:`login-page`,children:[(0,u.jsxs)(`div`,{className:`login-form-panel`,style:{background:`var(--background)`,backgroundImage:`radial-gradient(circle, color-mix(in srgb, var(--primary) 2.2%, transparent) 1px, transparent 1px)`,backgroundSize:`70px 70px`,display:`flex`,flexDirection:`column`,position:`relative`,overflow:`hidden`},children:[(0,u.jsx)(`div`,{style:{position:`absolute`,bottom:-80,right:-80,width:400,height:400,background:`radial-gradient(circle, color-mix(in srgb, var(--primary) 3.5%, transparent) 0%, transparent 65%)`,pointerEvents:`none`}}),(0,u.jsx)(`div`,{className:`login-header`,style:{padding:`1.25rem 2rem`,borderBottom:`1px solid var(--secondary)`,zIndex:1,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:(0,u.jsxs)(s,{to:`/`,style:{display:`inline-flex`,alignItems:`center`,gap:`0.5rem`,textDecoration:`none`},children:[(0,u.jsx)(`span`,{style:{display:`flex`,width:32,height:32,flexShrink:0,alignItems:`center`,justifyContent:`center`},children:(0,u.jsx)(`img`,{src:`/miravo-logo.webp`,alt:``,width:28,height:28,loading:`eager`,decoding:`async`,style:{display:`block`,width:`100%`,height:`100%`,objectFit:`contain`,transform:`translateY(1.5px)`}})}),(0,u.jsx)(`span`,{style:{fontFamily:`var(--font-heading)`,fontSize:`1.25rem`,fontWeight:600,color:`var(--foreground)`,letterSpacing:`-0.025em`,lineHeight:1},children:`Miravo`}),(0,u.jsx)(`span`,{style:{fontFamily:`var(--font-mono)`,fontSize:`0.52rem`,fontWeight:600,color:`var(--primary)`,background:`color-mix(in srgb, var(--primary) 6%, transparent)`,border:`1px solid color-mix(in srgb, var(--primary) 14%, transparent)`,padding:`0.2rem 0.5rem`,borderRadius:4,lineHeight:1,display:`inline-flex`,alignItems:`center`,alignSelf:`center`},children:`Console`})]})}),(0,u.jsx)(`div`,{className:`login-form-area`,style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`2.5rem 2rem`,zIndex:1},children:(0,u.jsx)(`div`,{style:{width:`100%`,maxWidth:370},children:(0,u.jsxs)(`div`,{className:`login-card`,style:{position:`relative`,background:`var(--card)`,border:`1px solid color-mix(in srgb, var(--secondary) 80%, transparent)`,borderRadius:4,overflow:`hidden`,padding:`2.25rem`},children:[(0,u.jsx)(`div`,{style:{position:`absolute`,top:0,left:14,right:14,height:1,background:`linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 35%, transparent) 20%, color-mix(in srgb, var(--primary) 35%, transparent) 80%, transparent)`}}),e?(0,u.jsx)(h,{username:n}):(0,u.jsx)(m,{onChangePassword:e=>{r(e),t(!0)}})]})})}),(0,u.jsxs)(`div`,{className:`login-footer`,style:{padding:`0.9rem 2rem`,borderTop:`1px solid var(--secondary)`,display:`flex`,justifyContent:`space-between`,alignItems:`center`,zIndex:1},children:[(0,u.jsx)(`span`,{style:{fontFamily:`var(--font-mono)`,fontSize:`0.6rem`,color:`var(--tooltip-border)`,letterSpacing:`0.04em`},children:`Miravo Console`}),(0,u.jsx)(`span`,{style:{fontFamily:`var(--font-mono)`,fontSize:`0.6rem`,color:`var(--tooltip-border)`,letterSpacing:`0.04em`},children:`© 2026`})]})]}),(0,u.jsxs)(`div`,{className:`login-left`,style:{position:`relative`,background:`var(--background)`,overflow:`hidden`,borderRight:`1px solid color-mix(in srgb, var(--primary) 8%, transparent)`},children:[(0,u.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:4,pointerEvents:`none`,opacity:.025,backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`,backgroundSize:`200px 200px`}}),(0,u.jsx)(g,{}),(0,u.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`radial-gradient(ellipse 75% 70% at 50% 50%, transparent 40%, color-mix(in srgb, var(--background) 55%, transparent) 100%)`,pointerEvents:`none`}}),(0,u.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,width:700,height:500,background:`radial-gradient(ellipse at center, color-mix(in srgb, var(--primary) 1.8%, transparent) 0%, transparent 65%)`,pointerEvents:`none`,zIndex:2,animation:`login-glow-pulse 8s ease-in-out infinite alternate`}}),(0,u.jsx)(v,{}),(0,u.jsx)(A,{})]})]})]})}export{j as LoginPage};