2 lines
126 KiB
JavaScript
2 lines
126 KiB
JavaScript
import{d as Ml,y as jl,z as Pl,a0 as Dl,o as Tl,X as Fs,O as Rl,w as Bl,B as c,c as a,a as e,D as o,E as r,G as u,f as h,m as M,I as T,b as $,J as k,a1 as V,g as m,a3 as Ws,F as f,P as y,H as b,h as kt,i as ge,T as mo,v as Ct,a2 as po,u as $l,x as Vl,a4 as Sl,r as d,j,a5 as zl,l as Al,n as Os,q as n}from"./index-DnbYEqLr.js";import{u as Il}from"./web5Badge-C9_VaejO.js";import{P as Ul}from"./api-CHkUAu4g.js";const Nl={class:"pb-6"},Ll={class:"glass-card p-6 mb-6"},Hl={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-6 gap-4 stagger-grid"},El={"data-controller-container":"",tabindex:"0",class:"card-stagger flex flex-col gap-3 p-4 bg-white/5 rounded-lg min-w-0",style:{"--stagger-index":"0"}},Kl={class:"flex items-center gap-3 min-w-0"},Fl={class:"min-w-0"},Wl={class:"text-sm font-medium text-white"},Ol={class:"text-xs text-orange-500 font-medium"},ql={key:0,class:"text-xs text-white/40 space-y-0.5"},Jl={key:0},Ql={key:1},Gl={"data-controller-container":"",tabindex:"0",class:"card-stagger flex flex-col gap-3 p-4 bg-white/5 rounded-lg min-w-0",style:{"--stagger-index":"1"}},Xl={class:"flex items-center gap-3 min-w-0"},Yl={class:"relative shrink-0"},Zl={key:0,class:"absolute inset-0 w-3 h-3 rounded-full bg-green-400 animate-ping opacity-75"},en={class:"min-w-0 flex-1"},tn={class:"text-sm font-medium text-white"},sn=["title"],on={key:1,class:"text-xs text-white/60 capitalize"},ln={key:0,class:"flex gap-2"},nn=["disabled"],an={"data-controller-container":"",tabindex:"0",class:"card-stagger flex flex-col gap-3 p-4 bg-white/5 rounded-lg min-w-0",style:{"--stagger-index":"1.5"}},rn={class:"flex items-center gap-3 min-w-0"},dn={class:"relative shrink-0"},un={class:"min-w-0 flex-1"},cn=["title"],vn={key:1,class:"text-xs text-white/60"},xn={key:0,class:"flex gap-2"},hn=["disabled"],mn=["disabled"],pn={"data-controller-container":"",tabindex:"0",class:"card-stagger flex flex-col gap-3 p-4 bg-white/5 rounded-lg min-w-0",style:{"--stagger-index":"2"}},bn={class:"flex items-center gap-3 min-w-0"},wn={class:"relative shrink-0"},fn={key:0,class:"absolute inset-0 w-3 h-3 rounded-full bg-green-400 animate-ping opacity-75"},gn={class:"min-w-0"},yn={class:"text-sm font-medium text-white"},_n={class:"text-xs text-white/60"},kn=["disabled"],Cn={"data-controller-container":"",tabindex:"0",class:"card-stagger flex flex-col gap-3 p-4 bg-white/5 rounded-lg min-w-0",style:{"--stagger-index":"3"}},Mn={class:"flex items-center gap-3 min-w-0"},jn={class:"relative shrink-0"},Pn={key:0,class:"absolute inset-0 w-3 h-3 rounded-full bg-green-400 animate-ping opacity-75"},Dn={class:"min-w-0"},Tn={class:"text-sm font-medium text-white"},Rn={class:"text-xs text-white/60"},Bn={"data-controller-container":"",tabindex:"0",class:"card-stagger flex flex-col gap-3 p-4 bg-white/5 rounded-lg min-w-0",style:{"--stagger-index":"4"}},$n={class:"flex items-center gap-3 min-w-0"},Vn={class:"relative shrink-0"},Sn={key:0,class:"absolute inset-0 w-3 h-3 rounded-full bg-green-400 animate-pulse opacity-75"},zn={class:"min-w-0 flex-1"},An={class:"text-sm font-medium text-white"},In={class:"text-xs text-white/60"},Un={class:"flex gap-2"},Nn={key:0,class:"mb-6 p-4 bg-orange-500/10 border border-orange-500/20 rounded-xl flex items-center gap-3"},Ln={class:"flex-1 min-w-0"},Hn={class:"text-sm font-medium text-orange-400"},En={class:"text-xs text-white/60"},Kn={class:"glass-card p-6 max-w-2xl w-full max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"did-doc-title"},Fn={class:"flex items-center justify-between mb-4"},Wn={id:"did-doc-title",class:"text-lg font-semibold text-white"},On={class:"flex items-center gap-2"},qn={key:0,class:"text-xs text-green-400 flex items-center gap-1"},Jn={key:1,class:"text-xs text-red-400"},Qn={key:0,class:"text-white/60 text-sm"},Gn={key:1,class:"text-xs text-white/80 font-mono bg-black/30 rounded-lg p-4 overflow-x-auto whitespace-pre-wrap"},Xn={class:"flex gap-3 mt-4"},Yn={class:"text-lg font-semibold text-white mb-4"},Zn={class:"space-y-4"},ei={class:"block text-sm font-medium text-white/80 mb-2"},ti={value:""},si=["value"],oi={class:"block text-sm font-medium text-white/80 mb-2"},li=["placeholder"],ni={class:"flex gap-3 mt-6"},ii=["disabled"],ai={key:0,class:"mt-3 text-sm text-red-400"},ri={key:1,class:"mt-3 text-sm text-green-400"},di={class:"flex flex-col md:flex-row gap-6 mb-6"},ui={"data-controller-container":"",tabindex:"0",class:"glass-card card-stagger p-6 flex flex-col md:w-1/2",style:{"--stagger-index":"0"}},ci={class:"flex items-start gap-4 mb-4 shrink-0"},vi={class:"flex-1"},xi={class:"text-xl font-semibold text-white mb-2"},hi={class:"text-white/70 text-sm mb-4"},mi={class:"space-y-3 flex-1 min-h-0"},pi={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},bi={class:"flex items-center gap-3"},wi={class:"text-white/80 text-sm"},fi={class:"text-white/60 text-sm"},gi={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},yi={class:"flex items-center gap-3"},_i={class:"text-white/80 text-sm"},ki={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},Ci={class:"flex items-center gap-3"},Mi={class:"text-white/80 text-sm"},ji={class:"text-white/60 text-sm"},Pi={"data-controller-container":"",tabindex:"0",class:"glass-card card-stagger p-6 flex flex-col md:w-1/2",style:{"--stagger-index":"1"}},Di={class:"flex items-start gap-4 mb-4 shrink-0"},Ti={class:"flex-1 min-w-0"},Ri={class:"text-xl font-semibold text-white mb-2"},Bi={class:"text-white/70 text-sm mb-4"},$i={key:0,class:"mb-4 rounded-xl overflow-hidden border border-green-500/20"},Vi={class:"px-4 py-2.5 bg-green-500/10 border-b border-green-500/15 flex items-center justify-between"},Si={class:"divide-y divide-white/5"},zi=["onClick"],Ai={class:"flex items-center gap-3 min-w-0 flex-1"},Ii={class:"min-w-0 flex-1"},Ui={class:"flex items-center gap-2"},Ni={class:"text-sm font-medium text-green-400"},Li={class:"text-[11px] text-white/40 font-mono truncate mt-0.5"},Hi={class:"flex items-center gap-2 shrink-0"},Ei={class:"text-[11px] text-white/40"},Ki={class:"space-y-3 flex-1 min-h-0"},Fi={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},Wi={class:"flex items-center gap-3"},Oi={class:"text-white/80 text-sm"},qi={class:"text-orange-500 text-sm font-medium"},Ji={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},Qi={class:"flex items-center gap-3"},Gi={class:"text-white/80 text-sm"},Xi={class:"text-yellow-400 text-sm font-medium"},Yi={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},Zi={class:"flex items-center gap-3"},ea={class:"text-white/80 text-sm"},ta={class:"text-purple-400 text-sm font-medium"},sa={class:"grid grid-cols-2 gap-2 mt-auto pt-4 shrink-0"},oa=["disabled"],la={class:"flex flex-col md:flex-row gap-6 mb-8"},na={"data-controller-container":"",tabindex:"0",class:"glass-card card-stagger p-6 flex flex-col md:w-1/2",style:{"--stagger-index":"2"}},ia={class:"flex items-start gap-4 mb-4 shrink-0"},aa={class:"flex-1"},ra={class:"text-xl font-semibold text-white mb-2"},da={class:"text-white/70 text-sm mb-4"},ua={class:"space-y-3 flex-1 min-h-0"},ca={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},va={class:"flex items-center gap-3"},xa={class:"text-white/80 text-sm"},ha={class:"text-white/60 text-sm"},ma={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},pa={class:"flex items-center gap-3"},ba={class:"text-white/80 text-sm"},wa={class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},fa={class:"flex items-center gap-3"},ga={class:"text-white/80 text-sm"},ya={class:"text-white/60 text-sm"},_a={"data-controller-container":"",tabindex:"0",class:"glass-card card-stagger p-6 flex flex-col md:w-1/2",style:{"--stagger-index":"3"}},ka={class:"flex items-start gap-4 mb-4 shrink-0"},Ca={class:"flex-1"},Ma={class:"text-xl font-semibold text-white mb-2"},ja={class:"text-white/70 text-sm mb-4"},Pa={key:0,class:"shrink-0"},Da={class:"space-y-2 flex-1 min-h-0"},Ta=["onClick","disabled"],Ra={key:0,class:"w-1.5 h-1.5 rounded-full bg-green-400"},Ba={class:"min-w-0 flex-1"},$a={class:"text-sm font-medium"},Va={class:"text-xs text-white/50"},Sa={key:0,class:"mt-4 p-3 bg-white/5 rounded-lg"},za={class:"flex items-center justify-between gap-2"},Aa={class:"min-w-0"},Ia={class:"text-xs text-white/50 mb-1"},Ua=["title"],Na={key:1,class:"mt-3 text-xs text-amber-400/80"},La={class:"hidden md:flex items-start gap-4 mb-4"},Ha={class:"flex-1"},Ea={class:"text-xl font-semibold text-white mb-2"},Ka={class:"text-white/70 text-sm mb-4"},Fa={class:"flex gap-2 shrink-0"},Wa={class:"md:hidden mb-4"},Oa={class:"flex items-center gap-4 mb-2"},qa={class:"text-xl font-semibold text-white"},Ja={class:"text-white/70 text-sm mb-3"},Qa={class:"grid grid-cols-2 gap-2"},Ga={class:"flex gap-1 mb-4 border-b border-white/10"},Xa={key:0,class:"ml-1.5 text-xs text-white/50"},Ya={key:1,class:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"},Za={key:0,class:"ml-1.5 text-xs text-orange-400"},er={key:1,class:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"},tr={class:"space-y-2 max-h-48 overflow-y-auto"},sr={key:0,class:"p-4 text-center text-white/60 text-sm"},or={class:"flex items-center gap-3 min-w-0"},lr={class:"min-w-0"},nr={class:"text-sm font-mono text-white/90 truncate"},ir={class:"text-xs text-white/50 truncate"},ar=["onClick"],rr={class:"space-y-2 max-h-64 overflow-y-auto"},dr={key:0,class:"p-4 text-center text-white/60 text-sm"},ur={key:1,class:"p-4 text-center text-white/60 text-sm"},cr={class:"flex items-center justify-between gap-2 mb-1"},vr=["title"],xr={class:"text-xs text-white/40 shrink-0"},hr={class:"text-sm text-white/90 break-words"},mr={class:"space-y-2 max-h-64 overflow-y-auto"},pr={key:0,class:"p-4 text-center text-white/60 text-sm"},br={key:1,class:"p-4 text-center text-white/60 text-sm"},wr={class:"flex items-start justify-between gap-3"},fr={class:"min-w-0 flex-1"},gr=["title"],yr={key:0,class:"text-sm text-white/80 mt-1 break-words"},_r={class:"text-xs text-white/40 mt-1"},kr={class:"flex items-center gap-2 shrink-0"},Cr=["onClick","disabled"],Mr=["onClick","disabled"],jr=["disabled"],Pr=["disabled"],Dr=["disabled"],Tr={class:"glass-card p-6 mb-8"},Rr={class:"hidden md:flex items-center justify-between mb-4"},Br={class:"flex items-center gap-3"},$r={class:"text-lg font-semibold text-white"},Vr={class:"text-xs text-white/60"},Sr={key:0,class:"flex items-center gap-2"},zr=["disabled"],Ar={class:"md:hidden mb-4"},Ir={class:"flex items-center gap-3 mb-2"},Ur={class:"text-lg font-semibold text-white"},Nr={class:"text-xs text-white/60 mb-3"},Lr={key:0,class:"grid grid-cols-2 gap-2"},Hr=["disabled"],Er={class:"flex gap-1 mb-4 border-b border-white/10"},Kr={key:0,class:"ml-1.5 text-xs text-white/50"},Fr={key:0,class:"py-4 text-center"},Wr={class:"text-white/50 text-sm"},Or={key:1,class:"py-6 text-center"},qr={class:"text-white/60 text-sm mb-1"},Jr={class:"text-white/40 text-xs"},Qr={key:2,class:"space-y-3"},Gr={class:"flex items-start justify-between gap-3 mb-3"},Xr={class:"min-w-0 flex-1"},Yr={class:"text-sm font-medium text-white truncate"},Zr={key:0,class:"text-xs text-white/50 mt-0.5"},ed={class:"text-xs text-white/40 mt-0.5"},td=["onClick","disabled"],sd={class:"flex flex-wrap items-center gap-2 mb-2"},od=["onClick","disabled"],ld={key:0,class:"flex items-center gap-3 mt-2"},nd={class:"flex items-center gap-2 flex-1"},id=["value","onChange"],ad={class:"text-xs text-orange-400/80"},rd={key:1,class:"text-xs text-green-400/70 mt-1"},dd={key:2,class:"text-xs text-blue-400/70 mt-1"},ud={class:"mb-4"},cd={class:"flex items-center gap-3"},vd={value:""},xd=["value"],hd=["disabled"],md={key:0,class:"text-xs text-red-400 mt-2"},pd={key:0,class:"py-4 text-center"},bd={class:"text-white/50 text-sm"},wd={key:1,class:"py-6 text-center"},fd={class:"text-white/60 text-sm mb-1"},gd={class:"text-white/40 text-xs"},yd={key:2,class:"py-6 text-center"},_d={class:"text-white/60 text-sm"},kd={key:3,class:"space-y-2"},Cd={class:"w-8 h-8 rounded-lg bg-white/10 flex items-center justify-center shrink-0"},Md={key:0,class:"w-4 h-4 text-orange-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},jd={key:1,class:"w-4 h-4 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Pd={class:"flex-1 min-w-0"},Dd={class:"text-sm font-medium text-white truncate"},Td={key:0,class:"text-xs text-white/50 truncate"},Rd={class:"flex items-center gap-2 mt-0.5"},Bd={class:"text-xs text-white/40"},$d={class:"text-xs text-white/40"},Vd={key:0,class:"text-xs text-orange-400 ml-1"},Sd={key:1,class:"text-xs text-green-400/70 ml-1"},zd=["onClick"],Ad=["onClick"],Id={class:"glass-card p-0 w-full max-w-2xl overflow-hidden",role:"dialog","aria-modal":"true"},Ud={class:"flex items-center justify-between px-4 py-3 border-b border-white/10"},Nd={class:"min-w-0 flex-1"},Ld={class:"text-sm font-medium text-white truncate"},Hd={class:"text-xs text-white/50"},Ed={class:"flex items-center gap-3 shrink-0"},Kd={key:0,class:"flex items-center gap-1 px-2 py-1 rounded bg-orange-500/20"},Fd={class:"text-xs text-orange-400 font-medium"},Wd={class:"p-4"},Od={key:0},qd=["src"],Jd={key:1},Qd=["src"],Gd={key:2,class:"mt-3 p-3 bg-red-500/10 border border-red-500/20 rounded-lg"},Xd={class:"text-red-400 text-sm"},Yd={class:"flex items-center justify-between mt-3"},Zd={class:"text-xs text-white/40"},eu={key:0},tu={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"add-content-title"},su={id:"add-content-title",class:"text-lg font-bold text-white mb-4"},ou={class:"space-y-4"},lu={class:"flex gap-2"},nu=["onClick"],iu={key:0},au={key:0,class:"text-xs text-orange-400/80 mt-1"},ru={key:0,class:"mt-3 p-2 bg-red-500/20 border border-red-500/30 rounded-lg"},du={class:"text-red-300 text-xs"},uu={class:"flex gap-3 mt-6"},cu=["disabled"],vu={class:"glass-card p-6 mb-8"},xu={class:"hidden md:flex items-center justify-between mb-4"},hu={class:"flex items-center gap-3"},mu={class:"text-lg font-semibold text-white"},pu={class:"text-xs text-white/60"},bu={class:"md:hidden mb-4"},wu={class:"flex items-center gap-3 mb-2"},fu={class:"text-lg font-semibold text-white"},gu={class:"text-xs text-white/60 mb-3"},yu={key:0,class:"py-6 text-center"},_u={class:"text-white/50 text-sm"},ku={key:1,class:"py-6 text-center"},Cu={class:"text-white/60 text-sm mb-1"},Mu={class:"text-white/40 text-xs"},ju={key:2,class:"space-y-3"},Pu=["onClick"],Du=["src"],Tu={class:"flex-1 min-w-0"},Ru={class:"flex items-center gap-2"},Bu={class:"text-white font-medium text-sm"},$u={key:0,class:"text-yellow-400 text-xs",title:"Default identity"},Vu={class:"flex items-center gap-1 mt-0.5"},Su=["title"],zu=["onClick"],Au={key:0,class:"flex items-center gap-1 mt-0.5"},Iu=["title"],Uu=["onClick"],Nu={class:"flex items-center gap-1 shrink-0"},Lu=["onClick"],Hu=["onClick"],Eu=["onClick"],Ku={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"create-identity-title"},Fu={id:"create-identity-title",class:"text-lg font-bold text-white mb-4"},Wu={class:"space-y-4"},Ou={class:"grid grid-cols-3 gap-2"},qu=["onClick"],Ju={key:0,class:"mt-3 p-2 bg-red-500/20 border border-red-500/30 rounded-lg"},Qu={class:"text-red-300 text-xs"},Gu={class:"flex gap-3 mt-6"},Xu=["disabled"],Yu={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"delete-identity-title"},Zu={id:"delete-identity-title",class:"text-lg font-bold text-white mb-2"},ec={class:"text-white/60 text-sm mb-4"},tc={class:"flex gap-3"},sc=["disabled"],oc={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"key-viewer-title"},lc={class:"flex items-center gap-3 mb-5"},nc={id:"key-viewer-title",class:"text-lg font-bold text-white"},ic={class:"text-xs text-white/50 capitalize"},ac={class:"space-y-3 mb-5"},rc={class:"space-y-2"},dc={class:"bg-black/30 rounded-lg p-3"},uc={class:"flex items-center justify-between mb-1"},cc={class:"text-xs font-mono text-white/70 break-all"},vc={class:"bg-black/30 rounded-lg p-3"},xc={class:"flex items-center justify-between mb-1"},hc={class:"text-xs font-mono text-white/70 break-all"},mc={key:0,class:"bg-black/30 rounded-lg p-3"},pc={class:"flex items-center justify-between mb-1"},bc={class:"text-xs font-mono text-white/70 break-all"},wc={key:1,class:"bg-black/30 rounded-lg p-3"},fc={class:"flex items-center justify-between mb-1"},gc={class:"text-xs font-mono text-white/70 break-all"},yc={class:"border-t border-white/10 pt-5"},_c={key:0},kc={class:"flex gap-2"},Cc=["disabled"],Mc={key:0,class:"text-red-400 text-xs mt-2"},jc={key:1,class:"space-y-2"},Pc={class:"bg-red-500/5 border border-red-500/10 rounded-lg p-3"},Dc={class:"flex items-center justify-between mb-1"},Tc={class:"text-xs font-mono text-red-200/70 break-all"},Rc={key:0,class:"bg-red-500/5 border border-red-500/10 rounded-lg p-3"},Bc={class:"flex items-center justify-between mb-1"},$c={class:"text-xs font-mono text-red-200/70 break-all"},Vc={key:1,class:"bg-red-500/5 border border-red-500/10 rounded-lg p-3"},Sc={class:"flex items-center justify-between mb-1"},zc={class:"text-xs font-mono text-red-200/70 break-all"},Ac={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"profile-editor-title"},Ic={class:"flex items-center gap-3 mb-5"},Uc={class:"relative w-16 h-16 rounded-full overflow-hidden bg-white/10 shrink-0"},Nc=["src"],Lc={key:1,class:"w-full h-full flex items-center justify-center"},Hc={class:"text-2xl font-bold text-white/40"},Ec={class:"text-xs text-white/50"},Kc={class:"space-y-3"},Fc=["placeholder"],Wc={class:"grid grid-cols-2 gap-3"},Oc={key:0,class:"mt-3 p-2 bg-red-500/20 border border-red-500/30 rounded-lg"},qc={class:"text-red-300 text-xs"},Jc={key:1,class:"mt-3 p-2 bg-green-500/20 border border-green-500/30 rounded-lg"},Qc={class:"text-green-300 text-xs"},Gc={class:"flex gap-3 mt-5"},Xc=["disabled"],Yc=["disabled"],Zc={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"send-bitcoin-title"},e0={id:"send-bitcoin-title",class:"text-lg font-bold text-white mb-4"},t0={class:"flex gap-1 mb-4 p-1 bg-white/5 rounded-lg"},s0=["onClick"],o0={key:0,class:"mb-3 p-2 bg-white/5 rounded-lg"},l0={class:"mb-3"},n0={key:1,class:"mb-3"},i0={class:"text-white/60 text-sm block mb-1"},a0=["placeholder"],r0={key:2,class:"mb-3 p-2 bg-white/5 rounded-lg"},d0={class:"text-xs font-mono text-white/80 break-all"},u0={key:3,class:"mb-3 flex items-center gap-3 p-3 bg-white/5 rounded-lg"},c0={class:"relative inline-flex items-center cursor-pointer"},v0={class:"text-sm text-white"},x0={class:"text-xs text-white/40"},h0={key:4,class:"mb-3 space-y-2"},m0={class:"p-3 bg-white/5 rounded-lg"},p0=["value"],b0={class:"p-3 bg-white/5 rounded-lg"},w0={class:"flex gap-2 mt-2"},f0={class:"text-xs text-orange-400 hover:text-orange-300 cursor-pointer"},g0={key:5,class:"mb-3 p-2 bg-green-500/10 border border-green-500/20 rounded-lg"},y0={class:"text-green-400 text-xs"},_0={key:6,class:"mb-3 p-2 bg-green-500/10 border border-green-500/20 rounded-lg"},k0={class:"text-green-400 text-xs"},C0={key:7,class:"mb-3 text-xs text-red-400"},M0={class:"flex gap-3"},j0=["disabled"],P0=["disabled"],D0={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"receive-bitcoin-title"},T0={id:"receive-bitcoin-title",class:"text-lg font-bold text-white mb-4"},R0={class:"flex gap-1 mb-4 p-1 bg-white/5 rounded-lg"},B0=["onClick"],$0={key:0},V0={class:"mb-3"},S0={class:"mb-3"},z0={key:0,class:"mb-3 p-2 bg-white/5 rounded-lg"},A0={class:"text-xs font-mono text-white/80 break-all"},I0={key:1},U0={key:0,class:"mb-3 p-3 bg-white/5 rounded-lg text-center"},N0={class:"text-sm font-mono text-white/90 break-all"},L0={key:1,class:"mb-3 text-center"},H0={class:"text-white/50 text-sm mb-2"},E0={key:2},K0={class:"mb-3"},F0={key:0,class:"mb-3 text-xs text-green-400"},W0={key:3,class:"mb-3 text-xs text-red-400"},O0={class:"flex gap-3"},q0=["disabled"],J0={class:"glass-card p-6 mb-8"},Q0={class:"flex items-center justify-between mb-4"},G0={class:"flex items-center gap-3"},X0={class:"text-lg font-semibold text-white"},Y0={class:"text-xs text-white/60"},Z0={key:0,class:"py-6 text-center"},e1={class:"text-white/60 text-sm mb-4"},t1={class:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-4"},s1={class:"bg-white/5 rounded-lg p-3"},o1={class:"text-xs text-white/50 mb-1"},l1={class:"flex items-center gap-2"},n1={class:"text-sm text-white font-medium"},i1={class:"bg-white/5 rounded-lg p-3"},a1={class:"flex items-center gap-2"},r1={class:"text-sm text-white font-medium capitalize"},d1={class:"bg-white/5 rounded-lg p-3"},u1={class:"text-sm text-white font-medium"},c1={class:"bg-white/5 rounded-lg p-3"},v1={class:"text-sm text-white font-medium"},x1={class:"mb-4"},h1={class:"flex items-center justify-between mb-2"},m1={class:"text-xs text-white/50"},p1={key:0,class:"bg-white/5 rounded-lg p-3 mb-3"},b1={class:"flex gap-2 items-end"},w1={class:"flex-1"},f1={class:"flex items-center gap-1.5 text-xs text-white/60 cursor-pointer whitespace-nowrap pb-1.5"},g1=["disabled"],y1={key:1,class:"flex flex-wrap gap-2"},_1={key:0,class:"text-green-400/60",title:"Published"},k1=["onClick","disabled"],C1={key:2,class:"text-xs text-white/30 italic"},M1={key:0,class:"mb-4"},j1={class:"space-y-1"},P1={class:"truncate font-mono"},D1={class:"mb-4"},T1={class:"flex items-center justify-between mb-2"},R1={key:0},B1={key:0,class:"text-xs text-white/40 py-4 text-center"},$1={key:1,class:"text-xs text-white/30 italic py-2"},V1={key:2,class:"space-y-2 max-h-64 overflow-y-auto"},S1={class:"flex items-center justify-between mb-1"},z1=["title"],A1={class:"text-xs text-white/40"},I1={class:"flex flex-wrap gap-2 text-xs"},U1={class:"text-white/70"},N1={key:0,class:"text-blue-300/80"},L1={key:1,class:"text-purple-300/80"},H1={key:0,class:"mt-1 text-xs text-white/40 font-mono truncate"},E1={class:"flex items-center justify-between pt-3 border-t border-white/10"},K1={class:"text-xs text-white/40"},F1=["disabled"],W1={class:"glass-card p-6 mb-8"},O1={class:"hidden md:flex items-center justify-between mb-4"},q1={class:"flex items-center gap-3"},J1={class:"text-lg font-semibold text-white"},Q1={class:"text-xs text-white/60"},G1={class:"md:hidden mb-4"},X1={class:"flex items-center gap-3 mb-2"},Y1={class:"text-lg font-semibold text-white"},Z1={class:"text-xs text-white/60 mb-3"},ev={class:"grid grid-cols-3 gap-3 mb-4"},tv={class:"bg-white/5 rounded-lg p-3"},sv={class:"text-sm text-white font-medium"},ov={class:"bg-white/5 rounded-lg p-3"},lv={class:"text-sm text-green-400 font-medium"},nv={class:"bg-white/5 rounded-lg p-3"},iv={class:"text-sm text-white font-medium"},av={key:0,class:"space-y-2"},rv={class:"min-w-0 flex-1"},dv={class:"text-sm text-white font-medium"},uv={class:"text-xs text-white/50 truncate"},cv={key:1,class:"text-center text-white/40 text-sm py-4"},vv={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"domains-title"},xv={class:"flex items-center justify-between mb-4"},hv={id:"domains-title",class:"text-lg font-bold text-white"},mv={key:0,class:"space-y-2 mb-4"},pv={class:"text-sm text-white font-medium font-mono"},bv={class:"text-xs text-white/50 truncate max-w-[200px]"},wv={class:"flex items-center gap-2"},fv=["onClick"],gv={key:1,class:"text-center text-white/40 text-sm py-4 mb-4"},yv={class:"border-t border-white/10 pt-4"},_v={class:"text-sm font-semibold text-white mb-3"},kv={class:"grid grid-cols-2 gap-3 mb-3"},Cv={class:"mb-3"},Mv=["value"],jv={key:0,class:"text-xs text-red-400 mb-2"},Pv=["disabled"],Dv={class:"border-t border-white/10 pt-4 mt-4"},Tv={class:"text-sm font-semibold text-white mb-3"},Rv={class:"flex gap-2"},Bv=["disabled"],$v={key:0,class:"mt-2 p-3 bg-white/5 rounded-lg"},Vv={class:"flex items-center gap-2 mb-1"},Sv={class:"text-sm text-white font-medium"},zv={key:0,class:"text-xs text-white/50 font-mono truncate"},Av={class:"glass-card p-6 w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"relays-title"},Iv={class:"flex items-center justify-between mb-4"},Uv={id:"relays-title",class:"text-lg font-bold text-white"},Nv={key:0,class:"space-y-2 mb-4"},Lv={class:"flex items-center gap-3 min-w-0 flex-1"},Hv={class:"text-sm text-white font-mono truncate"},Ev={class:"flex items-center gap-2 flex-shrink-0"},Kv=["onClick"],Fv=["onClick"],Wv={key:1,class:"text-center text-white/40 text-sm py-4 mb-4"},Ov={class:"border-t border-white/10 pt-4"},qv={class:"text-sm font-semibold text-white mb-3"},Jv={class:"flex gap-2"},Qv=["placeholder"],Gv=["disabled"],Xv={key:0,class:"text-xs text-red-400 mt-2"},Yv={key:0,class:"fixed bottom-24 md:bottom-8 left-1/2 -translate-x-1/2 z-50 px-4 py-2 rounded-lg bg-black/80 backdrop-blur-md border border-white/10 text-white text-sm shadow-lg"},ox=Ml({__name:"Web5",setup(Zv){const qs=$l(),Mt=Vl(),{t:i}=jl(),bo=Sl(),ts=Il(),ss=Pl(),H=d(null),wo=j(()=>{if(!H.value)return"...";const l=H.value.total_sats;return l===0?"0 sats":l<1e5?`${l.toLocaleString()} sats`:`₿${(l/1e8).toFixed(8).replace(/0+$/,"").replace(/\.$/,"")}`});async function fo(){try{const l=await c.call({method:"wallet.networking-profits"});H.value=l}catch{H.value={total_sats:0,content_sales_sats:0,routing_fees_sats:0}}}const X=d([]),Fe=d(!1),ye=d(""),_e=d(""),de=d(""),We=d(""),jt=d(!1),Oe=d(""),Pt=d(!1),Y=d(null),os=j(()=>X.value.filter(l=>l.status==="active").length),Js=j(()=>X.value.filter(l=>l.status==="expired"||l.expires_at).length);async function ls(){try{const l=await c.call({method:"identity.list-names"});X.value=l.names||[]}catch{X.value=[]}}async function go(){if(!(!ye.value.trim()||!_e.value.trim()||!de.value)){jt.value=!0,We.value="";try{const l=we.value.find(t=>t.id===de.value);await c.call({method:"identity.register-name",params:{name:ye.value.trim(),domain:_e.value.trim(),identity_id:de.value,did:l?.did||""}}),ye.value="",_e.value="",de.value="",await ls()}catch(l){We.value=l instanceof Error?l.message:i("web5.registrationFailed")}finally{jt.value=!1}}}async function yo(l){try{await c.call({method:"identity.remove-name",params:{id:l}}),await ls()}catch(t){We.value=t instanceof Error?t.message:i("web5.removeFailed")}}async function _o(){if(Oe.value.trim()){Pt.value=!0,Y.value=null;try{const l=await c.call({method:"identity.resolve-name",params:{identifier:Oe.value.trim()}});Y.value=l}catch{Y.value={name:"",domain:"",nostr_pubkey:null,relays:[],verified:!1}}finally{Pt.value=!1}}}const Z=d([]);async function ko(){try{const l=await c.call({method:"identity.list-credentials"});Z.value=l.credentials||[]}catch{Z.value=[]}}async function Dt(){try{const[l,t]=await Promise.all([c.call({method:"nostr.list-relays"}),c.call({method:"nostr.get-stats"})]);It.value=l.relays||[],K.value=t}catch{It.value=[],K.value=null}}async function Qs(){if(Pe.value.trim()){De.value="";try{await c.call({method:"nostr.add-relay",params:{url:Pe.value.trim()}}),Pe.value="",await Dt()}catch(l){De.value=l instanceof Error?l.message:i("web5.failedToAddRelay")}}}async function Co(l){try{await c.call({method:"nostr.remove-relay",params:{url:l}}),await Dt()}catch(t){De.value=t instanceof Error?t.message:i("web5.failedToRemoveRelay")}}async function Mo(l,t){try{await c.call({method:"nostr.toggle-relay",params:{url:l,enabled:t}}),await Dt()}catch(v){De.value=v instanceof Error?v.message:i("web5.failedToToggleRelay")}}const ke=d(null);try{ke.value=localStorage.getItem("neode_did")||null}catch{}const ee=j(()=>ke.value),ns=j(()=>ee.value?"active":"inactive"),Tt=d(!1),is=d(!1);async function jo(){Tt.value=!0;try{const l=await c.call({method:"identity.create-did"});ke.value=l.did,localStorage.setItem("neode_did",l.did)}catch{if(crypto.subtle){const l=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),t=await crypto.subtle.exportKey("raw",l.publicKey),v=new Uint8Array(t),x=`did:key:z${Array.from(v).map(p=>p.toString(16).padStart(2,"0")).join("")}`;ke.value=x,localStorage.setItem("neode_did",x)}else{const l=new Uint8Array(32);crypto.getRandomValues(l);const v=`did:key:z${Array.from(l).map(s=>s.toString(16).padStart(2,"0")).join("")}`;ke.value=v,localStorage.setItem("neode_did",v)}}finally{Tt.value=!1}}const I=d(null),te=d(!1),as=d(!1);async function Po(){te.value=!0;try{const t=(await c.call({method:"identity.list"})).identities?.find(s=>s.is_default);if(!t)return;const v=await c.call({method:"identity.create-dht-did",params:{identity_id:t.id}});I.value=v.dht_did,localStorage.setItem("neode_dht_did",v.dht_did)}catch{const l=ke.value||localStorage.getItem("neode_did");if(l){const t=l.replace("did:key:","did:dht:");I.value=t,localStorage.setItem("neode_dht_did",t)}}finally{te.value=!1}}async function Do(){te.value=!0;try{const t=(await c.call({method:"identity.list"})).identities?.find(v=>v.is_default);if(!t)return;await c.call({method:"identity.refresh-dht-did",params:{identity_id:t.id}})}catch{}finally{te.value=!1}}async function To(){I.value&&(await z(I.value),as.value=!0,setTimeout(()=>{as.value=!1},2e3))}try{I.value=localStorage.getItem("neode_dht_did")||null}catch{}async function Ro(){ee.value&&(await z(ee.value),is.value=!0,setTimeout(()=>{is.value=!1},2e3))}const qe=d(!1),rs=d(!1),Rt=d(null),Bt=d(null),ds=d(!1),us=j(()=>Rt.value?JSON.stringify(Rt.value,null,2):"");async function Bo(){qe.value=!0,rs.value=!0,Bt.value=null;try{const l=await c.resolveDid();Rt.value=l;const t=await c.call({method:"identity.verify-did-document",params:{document:l}});Bt.value=t.valid}catch{Rt.value=null}finally{rs.value=!1}}async function $o(){us.value&&(await z(us.value),ds.value=!0,setTimeout(()=>{ds.value=!1},2e3))}const R=d(null),U=d("idle"),Je=j(()=>!!ss.packages.dwn),cs=j(()=>ss.packages.dwn?.state===Ul.Running),Qe=d(!1),Ge=d([]),$t=d([]),Xe=d(!1),vs=d(!1),Ye=d(!1),Ce=d(""),Vt=d(!1),Ze=d(!1),xs=d(null),Vo=j(()=>{if(!R.value)return"0 B";const l=R.value.storage_bytes;return l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:l<1024*1024*1024?`${(l/(1024*1024)).toFixed(1)} MB`:`${(l/(1024*1024*1024)).toFixed(2)} GB`});async function St(){try{const l=await c.call({method:"dwn.status"});R.value=l,U.value=l.sync_status||"idle"}catch{R.value=null,U.value="idle"}}const E=d(!1),zt=d(!1),hs=d(0),ms=d(0),ps=d([]),Me=d(!1),bs=j(()=>ps.value.filter(l=>l.direction==="incoming"&&l.num_confirmations<3)),Gs=j(()=>bs.value.length);async function Xs(){try{const l=await c.call({method:"lnd.gettransactions"});ps.value=l.transactions||[],(l.incoming_pending_count||0)>0&&!Me.value&&(Me.value=!0)}catch{ps.value=[]}}function So(l){if(!l)return"";const t=new Date(l*1e3),s=new Date().getTime()-t.getTime(),x=Math.floor(s/6e4);if(x<1)return"Just now";if(x<60)return`${x}m ago`;const p=Math.floor(x/60);if(p<24)return`${p}h ago`;const Ks=Math.floor(p/24);return Ks<7?`${Ks}d ago`:t.toLocaleDateString()}function zo(l){Mt.push({name:"app-session",params:{appId:"mempool"},query:{path:`/tx/${l}`}})}let At=null;const It=d([]),K=d(null),je=d(!1),Pe=d(""),De=d(""),F=d([]),Ut=d(!1),ws=d({}),Ao=j(()=>({...ss.peerHealth,...ws.value})),fs=j(()=>F.value.length),Nt=d([]);async function Io(){try{const l=await c.detectUsbDevices();Nt.value=l.devices||[]}catch{Nt.value=[]}}const Te=d(!1),Ys=d(null),Zs=d(null);function gs(){Zs.value?.focus?.(),Te.value=!1}Dl(Ys,Te,gs,{restoreFocusRef:Zs});const Re=d(""),Be=d(""),Lt=d(!1),Ht=d(""),et=d(""),Et=d(!1),ys=d(null),P=d("peers"),{receivedMessages:Kt,loadingMessages:_s,unreadCount:eo,loadReceivedMessages:ks,markAsRead:Cs}=bo;function to(l){try{const t=new Date(l),s=new Date().getTime()-t.getTime();return s<6e4?"Just now":s<36e5?`${Math.floor(s/6e4)}m ago`:s<864e5?`${Math.floor(s/36e5)}h ago`:t.toLocaleDateString()}catch{return l}}function Uo(){P.value="messages",Cs()}async function tt(){Ut.value=!0;try{const t=(await c.listPeers()).peers||[];try{const s=(await c.federationListNodes()).nodes||[];for(const x of s)x.onion&&!t.some(p=>p.onion===x.onion||p.pubkey===x.pubkey)&&t.push({onion:x.onion,pubkey:x.pubkey,name:x.name||`Federation: ${x.did?.slice(0,16)||"node"}`})}catch{}F.value=t;for(const v of F.value)try{const s=await c.checkPeerReachable(v.onion);ws.value[v.onion]=s.reachable}catch{ws.value[v.onion]=!1}}catch{}finally{Ut.value=!1}}async function No(){if(!(!Re.value||!Be.value.trim())){Lt.value=!0,Ht.value="",et.value="";try{await c.sendMessageToPeer(Re.value,Be.value.trim()),et.value=i("web5.messageSent"),Be.value="",setTimeout(()=>{Te.value=!1,et.value=""},1500)}catch(l){Ht.value=l instanceof Error?l.message:i("web5.failedToSend")}finally{Lt.value=!1}}}async function Lo(){Et.value=!0;try{const t=(await c.discoverNodes()).nodes||[];for(const v of t)if(v.onion&&v.pubkey)try{await c.addPeer({onion:v.onion,pubkey:v.pubkey})}catch{}await tt()}catch{}finally{Et.value=!1}}const Ft=d(0),so=d(0),oo=d(0),$e=d(""),Ve=d(""),Wt=d(""),Ms=d(!1),st=d("auto"),se=d(0),ue=d(""),S=d(!1),N=d(""),Se=d(""),ot=d(""),Ot=d(!1),W=d(""),lt=d("idle"),O=d(""),js=d(!1),q=d("lightning"),nt=d(0),Ps=d(""),it=d(""),at=d(""),lo=d(null),rt=d(!1),ce=d(""),ve=j(()=>{if(st.value!=="auto")return st.value;const l=se.value||0;return l<=0?"lightning":l<1e3?"ecash":l>5e5?"onchain":"lightning"});async function qt(){try{const l=await c.call({method:"wallet.ecash-balance"});Ft.value=l.balance_sats??0,so.value=l.token_count??0}catch{Ft.value=0,so.value=0}try{const l=await c.call({method:"wallet.ecash-history"});oo.value=l.transactions?.length??0}catch{oo.value=0}}function Ds(){Ms.value=!1,$e.value="",N.value="",Se.value="",ot.value="",W.value="",lt.value="idle",O.value=""}function Ts(){js.value=!1,it.value="",at.value="",Ve.value="",Wt.value="",ce.value=""}async function Ho(){if(!se.value||S.value)return;S.value=!0,N.value="",$e.value="",Se.value="",ot.value="";const l=ve.value;try{if(l==="ecash"){const t=await c.call({method:"wallet.ecash-send",params:{amount_sats:se.value}});$e.value=t.token}else if(l==="lightning"){if(!ue.value.trim()){N.value=i("web5.pasteInvoice");return}const t=await c.call({method:"lnd.payinvoice",params:{payment_request:ue.value.trim()}});ot.value=t.payment_hash}else{if(!ue.value.trim()){N.value=i("web5.enterBitcoinAddress");return}if(Ot.value){const v=await c.createPsbt({outputs:[{address:ue.value.trim(),amount_sats:se.value}]});W.value=v.psbt_base64,lt.value="created",O.value="",S.value=!1;return}const t=await c.call({method:"lnd.sendcoins",params:{addr:ue.value.trim(),amount:se.value}});Se.value=t.txid}await qt(),await _t()}catch(t){N.value=t instanceof Error?t.message:i("web5.sendFailed")}finally{S.value=!1}}async function Eo(){if(!(!O.value.trim()||S.value)){S.value=!0,N.value="";try{await c.finalizePsbt(O.value.trim()),lt.value="idle",W.value="",O.value="",Se.value=i("web5.broadcastViaHwWallet"),await _t()}catch(l){N.value=l instanceof Error?l.message:i("web5.broadcastFailed")}finally{S.value=!1}}}function Ko(){W.value&&(z(W.value),N.value=i("web5.psbtCopied"))}function Fo(){if(!W.value)return;const l=new Blob([W.value],{type:"text/plain"}),t=URL.createObjectURL(l),v=document.createElement("a");v.href=t,v.download="transaction.psbt",v.click(),URL.revokeObjectURL(t)}function Wo(l){const t=l.target,v=t.files?.[0];if(!v)return;const s=new FileReader;s.onload=x=>{O.value=x.target?.result||""},s.readAsText(v),t.value=""}async function Oo(){if(!rt.value){rt.value=!0,ce.value="";try{if(q.value==="lightning"){if(!nt.value||nt.value<1){ce.value=i("web5.enterAmount");return}const l=await c.call({method:"lnd.createinvoice",params:{amount_sats:nt.value,memo:Ps.value}});it.value=l.payment_request}else if(q.value==="onchain"){const l=await c.call({method:"lnd.newaddress"});at.value=l.address,Fs(()=>Jo(l.address,lo.value))}else{if(!Ve.value.trim()){ce.value=i("web5.pasteEcashToken");return}const l=await c.call({method:"wallet.ecash-receive",params:{token:Ve.value.trim()}});Wt.value=`Received ${l.received_sats} sats!`,Ve.value="",await qt()}}catch(l){ce.value=l instanceof Error?l.message:i("web5.receiveFailed")}finally{rt.value=!1}}}function qo(l){z(l),g(i("web5.ecashTokenCopied"))}async function z(l){if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(l);else{const t=document.createElement("textarea");t.value=l,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}function no(l,t){z(l),g(t)}async function Jo(l,t){if(!(!t||!l))try{await(await zl(()=>import("./browser-rpPU-9HU.js").then(s=>s.b),[])).toCanvas(t,`bitcoin:${l}`,{width:200,margin:2,color:{dark:"#000000",light:"#ffffff"}})}catch{}}const J=d([]),xe=d(!1),he=d(!1),ze=d(""),Jt=d("application/octet-stream"),Qt=d(""),me=d("free"),Ae=d(100),dt=d(!1),ut=d(""),Rs=d(null),ct=d(null),io=[{value:"free",label:"Free"},{value:"peers_only",label:"Peers Only"},{value:"paid",label:"Paid"}];function Gt(l){return typeof l.access=="string"?l.access==="peersonly"||l.access==="peers_only"?"peers_only":l.access==="paid"?"paid":"free":l.access&&typeof l.access=="object"&&"paid"in l.access?"paid":"free"}function Bs(l){return typeof l.access=="object"&&l.access&&"paid"in l.access?l.access.paid.price_sats:0}function $s(l){if(l===0)return"0 B";const t=["B","KB","MB","GB"],v=Math.min(Math.floor(Math.log(l)/Math.log(1024)),t.length-1);return`${(l/Math.pow(1024,v)).toFixed(v===0?0:1)} ${t[v]}`}async function Ie(){xe.value=!0;try{const l=await c.call({method:"content.list-mine"});J.value=l.items||[]}catch{J.value=[]}finally{xe.value=!1}}async function Qo(){if(!(dt.value||!ze.value.trim())){dt.value=!0,ut.value="";try{if(await c.call({method:"content.add",params:{filename:ze.value.trim(),mime_type:Jt.value.trim()||"application/octet-stream",description:Qt.value.trim()}}),me.value!=="free"){const l=(await c.call({method:"content.list-mine"})).items||[],t=l[l.length-1];t&&await c.call({method:"content.set-pricing",params:{id:t.id,access:me.value,...me.value==="paid"?{price_sats:Ae.value||100}:{}}})}he.value=!1,ze.value="",Jt.value="application/octet-stream",Qt.value="",me.value="free",Ae.value=100,await Ie(),g(i("web5.contentAdded"))}catch(l){ut.value=l instanceof Error?l.message:i("web5.failedToAddContent")}finally{dt.value=!1}}}async function Go(l){Rs.value=l;try{await c.call({method:"content.remove",params:{id:l}}),J.value=J.value.filter(t=>t.id!==l),g(i("web5.contentRemoved"))}catch{g(i("web5.failedToRemoveContent"))}finally{Rs.value=null}}async function Xo(l,t){ct.value=l.id;try{const v={id:l.id,access:t};t==="paid"&&(v.price_sats=Bs(l)||100),await c.call({method:"content.set-pricing",params:v}),await Ie()}catch{g(i("web5.failedToUpdatePricing"))}finally{ct.value=null}}async function Yo(l,t){const v=parseInt(t,10);if(!(!v||v<=0)){ct.value=l.id;try{await c.call({method:"content.set-pricing",params:{id:l.id,access:"paid",price_sats:v}}),await Ie()}catch{g(i("web5.failedToUpdatePrice"))}finally{ct.value=null}}}const oe=d("mine"),A=d(""),pe=d(!1),vt=d(""),Ue=d([]);function ao(l){return l.startsWith("audio/")||l.startsWith("video/")}function Vs(l){return typeof l.access=="object"&&l.access&&"paid"in l.access?l.access.paid.price_sats:0}async function Zo(){if(!(!A.value||pe.value)){pe.value=!0,vt.value="",Ue.value=[];try{const l=await c.call({method:"content.browse-peer",params:{onion:A.value}});Ue.value=l.items||[],Ue.value.length===0&&(vt.value="")}catch(l){vt.value=l instanceof Error?l.message:i("web5.failedToConnectPeer")}finally{pe.value=!1}}}const le=d(null),Ne=d(""),Ss=d(0),xt=d(0),ht=d(""),mt=d(null),pt=d(null);function el(l){A.value&&(le.value=l,Ne.value=`http://${A.value}/content/${l.id}`,Ss.value=Vs(l),xt.value=0,ht.value="")}function tl(l){if(!A.value)return;const t=`http://${A.value}/content/${l.id}`;g(i("web5.downloadUrlCopied")),z(t)}function zs(){mt.value&&(mt.value.pause(),mt.value.src=""),pt.value&&(pt.value.pause(),pt.value.src=""),le.value=null,Ne.value="",xt.value=0,ht.value=""}function ro(){const l=mt.value||pt.value;l&&l.duration>0&&(xt.value=l.currentTime/l.duration)}function uo(){ht.value=i("web5.playerError")}function sl(){Ne.value&&(z(Ne.value),g(i("web5.streamUrlCopied")))}const C=d([]),Le=d(!1),He=d(null);async function As(){Le.value=!0;try{const l=await c.call({method:"network.list-requests"});C.value=l.requests||[],ts.pendingRequestCount=C.value.length}catch{C.value=[]}finally{Le.value=!1}}function ol(){P.value="requests",C.value.length===0&&!Le.value&&As()}async function ll(l){He.value=l;try{await c.call({method:"network.accept-request",params:{request_id:l}}),C.value=C.value.filter(t=>t.id!==l),ts.pendingRequestCount=C.value.length,await tt(),g(i("web5.connectionAccepted"))}catch{g(i("web5.failedToAcceptRequest"))}finally{He.value=null}}async function nl(l){He.value=l;try{await c.call({method:"network.reject-request",params:{request_id:l}}),C.value=C.value.filter(t=>t.id!==l),ts.pendingRequestCount=C.value.length,g(i("web5.requestRejected"))}catch{g(i("web5.failedToRejectRequest"))}finally{He.value=null}}const co=d(""),Is=d(!1);let vo;function g(l){co.value=l,Is.value=!0,clearTimeout(vo),vo=setTimeout(()=>{Is.value=!1},2e3)}const Q=d("hidden"),ne=d(null),Us=d(!1),Xt=d(!1),il=[{value:"hidden",label:"Hidden",description:"Your node is not discoverable by others"},{value:"discoverable",label:"Discoverable",description:"Federated peers can find and connect to your node"},{value:"public",label:"Public",description:"Accepting connections from any Archipelago node"}];async function al(){Us.value=!0;try{const l=await c.call({method:"network.get-visibility"});Q.value=l.visibility||"hidden",ne.value=l.onion_address||null}catch{Q.value="hidden"}finally{Us.value=!1}}async function rl(l){if(!(Xt.value||Q.value===l)){Xt.value=!0;try{const t=await c.call({method:"network.set-visibility",params:{visibility:l}});Q.value=t.visibility||l,ne.value=t.onion_address||ne.value,g(i("web5.visibilitySetTo",{level:l}))}catch{g(i("web5.failedToUpdateVisibility"))}finally{Xt.value=!1}}}function dl(){ne.value&&(z(ne.value),g(i("web5.onionAddressCopied")))}const w=d(null),D=d(null),ie=d(""),bt=d(!1),Ee=d(""),G=d(null);function ul(l){w.value=l,D.value=null,ie.value="",Ee.value=""}function Ns(){D.value=null,ie.value="",Ee.value="",w.value=null}async function xo(){if(!(!w.value||!ie.value||bt.value)){bt.value=!0,Ee.value="";try{const l=await c.call({method:"identity.export-keys",params:{id:w.value.id,password:ie.value}});D.value={ed25519_secret_hex:l.ed25519_secret_hex,nostr_secret_hex:l.nostr_secret_hex||"",nostr_nsec:l.nostr_nsec||""},ie.value=""}catch(l){Ee.value=l instanceof Error?l.message:"Failed to unlock keys"}finally{bt.value=!1}}}function be(l,t){z(t),G.value=l,setTimeout(()=>{G.value=null},2e3)}const B=d(null),_=d({}),wt=d(!1),ft=d(!1),ae=d(""),L=d("");function cl(l){B.value=l,_.value={...l.profile},ae.value="",L.value=""}function Ls(){B.value=null,_.value={},ae.value="",L.value=""}async function vl(){if(!(!B.value||wt.value)){wt.value=!0,ae.value="",L.value="";try{await c.call({method:"identity.update-profile",params:{id:B.value.id,..._.value}}),await Ke(),L.value="Profile saved",setTimeout(()=>{L.value=""},3e3)}catch(l){ae.value=l instanceof Error?l.message:"Failed to save"}finally{wt.value=!1}}}async function xl(){if(!(!B.value||ft.value)){ft.value=!0,ae.value="",L.value="";try{await c.call({method:"identity.update-profile",params:{id:B.value.id,..._.value}});const l=await c.call({method:"identity.publish-profile",params:{id:B.value.id}});await Ke(),L.value=`Published to relay (${l.event_id.slice(0,12)}...)`,setTimeout(()=>{L.value=""},5e3)}catch(l){ae.value=l instanceof Error?l.message:"Failed to publish"}finally{ft.value=!1}}}const we=d([]),Hs=d(!1),fe=d(!1),Yt=d("Personal"),Zt=d("personal"),gt=d(!1),es=d(null),re=d(null),yt=d(!1);async function Ke(){Hs.value=!0;try{const l=await c.call({method:"identity.list"});we.value=l.identities||[]}catch{we.value=[]}finally{Hs.value=!1}}async function hl(){if(!gt.value){es.value=null,gt.value=!0;try{await c.call({method:"identity.create",params:{name:Yt.value.trim()||"Personal",purpose:Zt.value}}),fe.value=!1,Yt.value="Personal",Zt.value="personal",await Ke(),g(i("web5.identityCreated"))}catch(l){es.value=l instanceof Error?l.message:i("web5.failedToCreateIdentity")}finally{gt.value=!1}}}function ho(l){z(l),g(i("web5.didCopied"))}async function ml(l){try{await c.call({method:"identity.set-default",params:{id:l}}),await Ke(),g(i("web5.defaultIdentityUpdated"))}catch{g(i("web5.failedToSetDefault"))}}function pl(l){re.value=l}async function bl(){if(!(!re.value||yt.value)){yt.value=!0;try{await c.call({method:"identity.delete",params:{id:re.value.id}}),re.value=null,await Ke(),g(i("web5.identityDeleted"))}catch{g(i("web5.failedToDeleteIdentity"))}finally{yt.value=!1}}}Tl(()=>{tt(),ks(),Ke(),al(),As(),qt(),Ie(),fo(),St(),Es(),ls(),Dt(),ko(),_t(),Xs(),Io(),At=setInterval(()=>{_t(),Xs(),qt()},3e4),qs.query.tab==="messages"&&(P.value="messages",Cs(),Fs(()=>{ys.value?.scrollIntoView({behavior:"smooth",block:"center"})}))}),Rl(()=>{At&&(clearInterval(At),At=null)}),Bl(()=>qs.query.tab,l=>{l==="messages"&&(P.value="messages",Cs(),Fs(()=>{ys.value?.scrollIntoView({behavior:"smooth",block:"center"})}))});async function wl(){Qe.value=!0,U.value="syncing";try{const l=await c.call({method:"dwn.sync"});U.value=l.sync_status||"synced",await St()}catch{U.value="error"}finally{Qe.value=!1}}async function Es(){try{const l=await c.call({method:"dwn.list-protocols"});Ge.value=l.protocols||[]}catch{Ge.value=[]}}async function fl(){if(!(Ze.value||!Ce.value.trim())){Ze.value=!0;try{await c.call({method:"dwn.register-protocol",params:{protocol:Ce.value.trim(),published:Vt.value}}),Ce.value="",Vt.value=!1,Ye.value=!1,await Es(),await St()}catch{}finally{Ze.value=!1}}}async function gl(l){xs.value=l;try{await c.call({method:"dwn.remove-protocol",params:{protocol:l}}),await Es(),await St()}catch{}finally{xs.value=null}}async function yl(){Xe.value=!Xe.value,Xe.value&&await _l()}async function _l(){vs.value=!0;try{const l=await c.call({method:"dwn.query-messages",params:{limit:50}});$t.value=l.messages||[]}catch{$t.value=[]}finally{vs.value=!1}}async function _t(){try{const l=await c.call({method:"lnd.getinfo"});hs.value=l.balance_sats||0,ms.value=l.channel_balance_sats||0,E.value=!0}catch{E.value=!1,hs.value=0,ms.value=0}}async function kl(){E.value?E.value=!1:(zt.value=!0,await _t(),zt.value=!1)}function Cl(){je.value=!0}return(l,t)=>{const v=Al("router-link");return n(),a("div",Nl,[e("div",Ll,[e("div",Hl,[e("div",El,[e("div",Kl,[t[82]||(t[82]=e("div",{class:"relative shrink-0"},[e("span",{class:"text-2xl text-orange-500 font-bold"},"₿")],-1)),e("div",Fl,[e("p",Wl,o(r(i)("web5.networkingProfits")),1),e("p",Ol,o(wo.value),1)])]),H.value?(n(),a("div",ql,[H.value.content_sales_sats>0?(n(),a("p",Jl,"Content: "+o(H.value.content_sales_sats.toLocaleString())+" sats",1)):u("",!0),H.value.routing_fees_sats>0?(n(),a("p",Ql,"Routing: "+o(H.value.routing_fees_sats.toLocaleString())+" sats",1)):u("",!0)])):u("",!0)]),e("div",Gl,[e("div",Xl,[e("div",Yl,[e("div",{class:h(["w-3 h-3 rounded-full",ns.value==="active"?"bg-green-400":"bg-yellow-400"])},null,2),ns.value==="active"?(n(),a("div",Zl)):u("",!0)]),e("div",en,[e("p",tn,o(r(i)("web5.didStatus")),1),ee.value?(n(),a("p",{key:0,class:"text-xs text-white/60 font-mono truncate",title:ee.value},o(ee.value),9,sn)):(n(),a("p",on,o(ns.value),1))])]),ee.value?(n(),a("div",ln,[e("button",{onClick:Ro,class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(is.value?r(i)("common.copiedBang"):r(i)("web5.copyDid")),1),e("button",{onClick:Bo,class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(r(i)("web5.viewDidDocument")),1)])):(n(),a("button",{key:1,onClick:jo,disabled:Tt.value,class:"w-fit px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(Tt.value?r(i)("web5.creatingDid"):r(i)("web5.createDid")),9,nn))]),e("div",an,[e("div",rn,[e("div",dn,[e("div",{class:h(["w-3 h-3 rounded-full",I.value?"bg-blue-400":"bg-gray-500"])},null,2)]),e("div",un,[t[83]||(t[83]=e("p",{class:"text-sm font-medium text-white"},"DHT Identity",-1)),I.value?(n(),a("p",{key:0,class:"text-xs text-white/60 font-mono truncate",title:I.value},o(I.value),9,cn)):(n(),a("p",vn,"Not published"))])]),I.value?(n(),a("div",xn,[e("button",{onClick:To,class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(as.value?"Copied!":"Copy"),1),e("button",{onClick:Do,disabled:te.value,class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(te.value?"Refreshing...":"Refresh DHT"),9,hn)])):ee.value?(n(),a("button",{key:1,onClick:Po,disabled:te.value,class:"w-fit px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(te.value?"Publishing...":"Publish to DHT"),9,mn)):u("",!0)]),e("div",pn,[e("div",bn,[e("div",wn,[e("div",{class:h(["w-3 h-3 rounded-full",E.value?"bg-green-400":"bg-red-400"])},null,2),E.value?(n(),a("div",fn)):u("",!0)]),e("div",gn,[e("p",yn,o(r(i)("web5.wallet")),1),e("p",_n,o(E.value?r(i)("common.connected"):r(i)("common.disconnected")),1)])]),e("button",{onClick:kl,class:"w-fit px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50",disabled:zt.value},o(zt.value?r(i)("common.connecting"):E.value?r(i)("common.disconnect"):r(i)("common.connect")),9,kn)]),e("div",Cn,[e("div",Mn,[e("div",jn,[e("div",{class:h(["w-3 h-3 rounded-full",(K.value?.connected_count??0)>0?"bg-green-400":"bg-red-400"])},null,2),(K.value?.connected_count??0)>0?(n(),a("div",Pn)):u("",!0)]),e("div",Dn,[e("p",Tn,o(r(i)("web5.nostrRelays")),1),e("p",Rn,o(r(i)("web5.relaysConnected",{count:K.value?.connected_count??0})),1)])]),e("button",{onClick:Cl,class:"w-fit px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(r(i)("common.manage")),1)]),e("div",Bn,[e("div",$n,[e("div",Vn,[e("div",{class:h(["w-3 h-3 rounded-full",fs.value>0?"bg-green-400":"bg-amber-400"])},null,2),fs.value>0?(n(),a("div",Sn)):u("",!0)]),e("div",zn,[e("p",An,o(r(i)("web5.connectedNodes")),1),e("p",In,o(r(i)("web5.peersKnown",{count:fs.value})),1)])]),e("div",Un,[e("button",{onClick:t[0]||(t[0]=s=>r(Mt).push("/dashboard/server/federation")),class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(r(i)("web5.findNodes")),1),e("button",{onClick:t[1]||(t[1]=s=>Te.value=!0),class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(r(i)("web5.sendMessage")),1)])])])]),Nt.value.length>0?(n(),a("div",Nn,[t[84]||(t[84]=e("div",{class:"w-8 h-8 rounded-lg bg-orange-500/20 flex items-center justify-center flex-shrink-0"},[e("svg",{class:"w-5 h-5 text-orange-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})])],-1)),e("div",Ln,[e("p",Hn,o(r(i)("web5.hardwareWalletDetected")),1),e("p",En,o(Nt.value.map(s=>`${s.type}${s.product?" ("+s.product+")":""}`).join(", ")),1)])])):u("",!0),(n(),M(V,{to:"body"},[qe.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",onClick:t[3]||(t[3]=$(s=>qe.value=!1,["self"])),onKeydown:t[4]||(t[4]=T(s=>qe.value=!1,["escape"]))},[e("div",Kn,[e("div",Fn,[e("h3",Wn,o(r(i)("web5.didDocument")),1),e("div",On,[Bt.value===!0?(n(),a("span",qn,[t[85]||(t[85]=e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),k(" "+o(r(i)("web5.verified")),1)])):Bt.value===!1?(n(),a("span",Jn,o(r(i)("web5.invalid")),1)):u("",!0)])]),rs.value?(n(),a("div",Qn,o(r(i)("common.loading")),1)):(n(),a("pre",Gn,o(us.value),1)),e("div",Xn,[e("button",{onClick:$o,class:"flex-1 px-4 py-2 glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors"},o(ds.value?r(i)("common.copiedBang"):r(i)("common.copy")),1),e("button",{onClick:t[2]||(t[2]=s=>qe.value=!1),class:"px-4 py-2 rounded-lg bg-white/10 text-white font-medium hover:bg-white/20 transition-colors"},o(r(i)("common.close")),1)])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[Te.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",onClick:t[8]||(t[8]=$(s=>gs(),["self"]))},[e("div",{ref_key:"sendMessageModalRef",ref:Ys,class:"glass-card p-6 max-w-2xl w-full max-h-[90vh] overflow-y-auto"},[e("h3",Yn,o(r(i)("web5.sendMessageTitle")),1),t[86]||(t[86]=e("p",{class:"text-white/70 text-sm mb-4"},"Messages are sent over the Tor network to the selected peer.",-1)),e("div",Zn,[e("div",null,[e("label",ei,o(r(i)("web5.to")),1),m(e("select",{"onUpdate:modelValue":t[5]||(t[5]=s=>Re.value=s),class:"w-full px-3 py-2 rounded-lg bg-white/10 text-white border border-white/20 focus:border-orange-500 focus:ring-1 focus:ring-orange-500"},[e("option",ti,o(r(i)("web5.selectPeer")),1),(n(!0),a(f,null,y(F.value,s=>(n(),a("option",{key:s.pubkey,value:s.onion},o(s.name||s.onion||(s.pubkey||"").slice(0,12)+"..."),9,si))),128))],512),[[Ws,Re.value]])]),e("div",null,[e("label",oi,o(r(i)("web5.message")),1),m(e("textarea",{"onUpdate:modelValue":t[6]||(t[6]=s=>Be.value=s),rows:"3",class:"w-full px-3 py-2 rounded-lg bg-white/10 text-white border border-white/20 focus:border-orange-500 focus:ring-1 focus:ring-orange-500",placeholder:r(i)("web5.messagePlaceholder")},null,8,li),[[b,Be.value]])])]),e("div",ni,[e("button",{onClick:No,disabled:!Re.value||!Be.value.trim()||Lt.value,class:"flex-1 px-4 py-2 rounded-lg bg-orange-500 text-white font-medium hover:bg-orange-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"},o(Lt.value?r(i)("common.sending"):r(i)("common.send")),9,ii),e("button",{onClick:t[7]||(t[7]=s=>gs()),class:"px-4 py-2 rounded-lg bg-white/10 text-white font-medium hover:bg-white/20 transition-colors"},o(r(i)("common.cancel")),1)]),Ht.value?(n(),a("p",ai,o(Ht.value),1)):u("",!0),et.value?(n(),a("p",ri,o(et.value),1)):u("",!0)],512)])):u("",!0)])),e("div",di,[e("div",ui,[e("div",ci,[t[87]||(t[87]=e("div",{class:"flex-shrink-0 w-12 h-12 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-6 h-6 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"})])],-1)),e("div",vi,[e("h2",xi,o(r(i)("web5.bitcoinDomains")),1),e("p",hi,o(r(i)("web5.domainsSubtitle")),1)])]),e("div",mi,[e("div",pi,[e("div",bi,[t[88]||(t[88]=e("svg",{class:"w-5 h-5 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"})],-1)),e("span",wi,o(r(i)("web5.namesRegistered")),1)]),e("span",fi,o(X.value.length)+" "+o(X.value.length===1?"name":"names"),1)]),e("div",gi,[e("div",yi,[t[89]||(t[89]=e("svg",{class:"w-5 h-5 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})],-1)),e("span",_i,o(r(i)("common.status")),1)]),e("span",{class:h([os.value>0?"text-green-400":"text-white/60","text-sm font-medium"])},o(os.value>0?`${os.value} Active`:"None"),3)]),e("div",ki,[e("div",Ci,[t[90]||(t[90]=e("svg",{class:"w-5 h-5 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("span",Mi,o(r(i)("web5.expiringSoon")),1)]),e("span",ji,o(Js.value)+" "+o(Js.value===1?"name":"names"),1)])]),e("button",{onClick:t[9]||(t[9]=s=>Fe.value=!0),class:"mt-6 w-full px-4 py-2 glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors shrink-0"},o(r(i)("web5.manageDomains")),1)]),e("div",Pi,[e("div",Di,[t[93]||(t[93]=e("div",{class:"flex-shrink-0 w-12 h-12 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-6 h-6 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z"})])],-1)),e("div",Ti,[e("h2",Ri,o(r(i)("web5.wallet")),1),e("p",Bi,o(r(i)("web5.walletSubtitle")),1)]),Gs.value>0?(n(),a("button",{key:0,onClick:t[10]||(t[10]=s=>Me.value=!Me.value),class:"incoming-tx-badge shrink-0"},[t[91]||(t[91]=e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 14l-7 7m0 0l-7-7m7 7V3"})],-1)),e("span",null,"Incoming "+o(Gs.value),1),t[92]||(t[92]=e("span",{class:"incoming-tx-ping"},null,-1))])):u("",!0)]),kt(mo,{name:"incoming-tx-slide"},{default:ge(()=>[Me.value&&bs.value.length>0?(n(),a("div",$i,[e("div",Vi,[t[95]||(t[95]=e("span",{class:"text-xs font-medium text-green-400 uppercase tracking-wide"},"Incoming Transactions",-1)),e("button",{onClick:t[11]||(t[11]=s=>Me.value=!1),class:"text-white/40 hover:text-white/70 transition-colors"},[...t[94]||(t[94]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("div",Si,[(n(!0),a(f,null,y(bs.value,s=>(n(),a("div",{key:s.tx_hash,class:"incoming-tx-row",onClick:x=>zo(s.tx_hash)},[e("div",Ai,[e("div",{class:h(["incoming-tx-icon",s.num_confirmations===0?"incoming-tx-icon-pending":"incoming-tx-icon-confirmed"])},[...t[96]||(t[96]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 14l-7 7m0 0l-7-7m7 7V3"})],-1)])],2),e("div",Ii,[e("div",Ui,[e("span",Ni,"+"+o(s.amount_sats.toLocaleString())+" sats",1),e("span",{class:h(["text-[10px] px-1.5 py-0.5 rounded-full font-medium",s.num_confirmations===0?"bg-yellow-500/15 text-yellow-400":"bg-green-500/15 text-green-400"])},o(s.num_confirmations===0?"Unconfirmed":s.num_confirmations+" conf"),3)]),e("p",Li,o(s.tx_hash),1)])]),e("div",Hi,[e("span",Ei,o(So(s.time_stamp)),1),t[97]||(t[97]=e("svg",{class:"w-3.5 h-3.5 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1))])],8,zi))),128))])])):u("",!0)]),_:1}),e("div",Ki,[e("div",Fi,[e("div",Wi,[t[98]||(t[98]=e("span",{class:"text-lg text-orange-500 font-bold"},"₿",-1)),e("span",Oi,o(r(i)("web5.onChain")),1)]),e("span",qi,o(hs.value.toLocaleString())+" sats",1)]),e("div",Ji,[e("div",Qi,[t[99]||(t[99]=e("svg",{class:"w-5 h-5 text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)),e("span",Gi,o(r(i)("web5.lightning")),1)]),e("span",Xi,o(ms.value.toLocaleString())+" sats",1)]),e("div",Yi,[e("div",Zi,[t[100]||(t[100]=e("svg",{class:"w-5 h-5 text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("span",ea,o(r(i)("web5.ecash")),1)]),e("span",ta,o(Ft.value.toLocaleString())+" sats",1)])]),e("div",sa,[e("button",{onClick:t[12]||(t[12]=s=>Ms.value=!0),disabled:!E.value&&Ft.value<=0,class:"px-3 py-2 glass-button rounded-lg text-xs font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(r(i)("common.send")),9,oa),e("button",{onClick:t[13]||(t[13]=s=>js.value=!0),class:"px-3 py-2 glass-button rounded-lg text-xs font-medium text-white/90 hover:text-white transition-colors"},o(r(i)("web5.receiveBitcoin")),1)])])]),e("div",la,[e("div",na,[e("div",ia,[t[101]||(t[101]=e("div",{class:"flex-shrink-0 w-12 h-12 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-6 h-6 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"})])],-1)),e("div",aa,[e("h2",ra,o(r(i)("web5.nostrRelays")),1),e("p",da,o(r(i)("web5.nostrRelaysDesc")),1)])]),e("div",ua,[e("div",ca,[e("div",va,[t[102]||(t[102]=e("svg",{class:"w-5 h-5 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})],-1)),e("span",xa,o(r(i)("web5.relaysConnectedLabel")),1)]),e("span",ha,o(K.value?.connected_count??0)+" active",1)]),e("div",ma,[e("div",pa,[t[103]||(t[103]=e("svg",{class:"w-5 h-5 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})],-1)),e("span",ba,o(r(i)("web5.totalRelays")),1)]),e("span",{class:h([(K.value?.total_relays??0)>0?"text-green-400":"text-white/60","text-sm font-medium"])},o(K.value?.total_relays??0)+" configured ",3)]),e("div",wa,[e("div",fa,[t[104]||(t[104]=e("svg",{class:"w-5 h-5 text-white/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)),e("span",ga,o(r(i)("common.enabled")),1)]),e("span",ya,o(K.value?.enabled_count??0)+" relays",1)])]),e("button",{onClick:t[14]||(t[14]=s=>je.value=!0),class:"mt-6 w-full px-4 py-2 glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors shrink-0"},o(r(i)("web5.relays")),1)]),e("div",_a,[e("div",ka,[t[106]||(t[106]=e("div",{class:"flex-shrink-0 w-12 h-12 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-6 h-6 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})])],-1)),e("div",Ca,[e("h2",Ma,o(r(i)("web5.nodeVisibility")),1),e("p",ja,o(r(i)("web5.nodeVisibilityDesc")),1)]),Us.value?(n(),a("div",Pa,[...t[105]||(t[105]=[e("svg",{class:"animate-spin h-5 w-5 text-white/40",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):u("",!0)]),e("div",Da,[(n(),a(f,null,y(il,s=>e("button",{key:s.value,onClick:x=>rl(s.value),disabled:Xt.value,class:h(["w-full flex items-center gap-3 p-3 rounded-lg border transition-colors text-left",Q.value===s.value?"bg-white/10 border-white/25 text-white":"bg-white/5 border-white/10 text-white/60 hover:bg-white/8 hover:text-white/80"])},[e("div",{class:h(["w-3 h-3 rounded-full shrink-0 border-2 flex items-center justify-center",Q.value===s.value?"border-green-400":"border-white/30"])},[Q.value===s.value?(n(),a("div",Ra)):u("",!0)],2),e("div",Ba,[e("p",$a,o(s.label),1),e("p",Va,o(s.description),1)])],10,Ta)),64))]),Q.value!=="hidden"&&ne.value?(n(),a("div",Sa,[e("div",za,[e("div",Aa,[e("p",Ia,o(r(i)("web5.yourTorAddress")),1),e("p",{class:"text-xs font-mono text-white/80 truncate",title:ne.value},o(ne.value),9,Ua)]),e("button",{onClick:dl,class:"shrink-0 p-2 rounded-lg text-white/50 hover:text-white hover:bg-white/10 transition-colors",title:"Copy"},[...t[107]||(t[107]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)])])])])):u("",!0),Q.value!=="hidden"?(n(),a("p",Na,o(r(i)("web5.discoverableWarning")),1)):u("",!0)])]),e("div",{ref_key:"nodesContainerRef",ref:ys,"data-controller-container":"",tabindex:"0",class:"glass-card p-6 mb-8 scroll-mt-24"},[e("div",La,[t[108]||(t[108]=e("div",{class:"flex-shrink-0 w-12 h-12 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-6 h-6 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})])],-1)),e("div",Ha,[e("h2",Ea,o(r(i)("web5.connectedNodes")),1),e("p",Ka,o(r(i)("web5.peerNodesDescription")),1)]),e("div",Fa,[e("button",{onClick:t[15]||(t[15]=s=>r(Mt).push("/dashboard/server/federation")),class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(r(i)("web5.findNodes")),1),e("button",{onClick:tt,class:"px-3 py-1.5 glass-button glass-button-sm rounded text-xs font-medium text-white/90 hover:text-white transition-colors"},o(Ut.value?"...":r(i)("common.refresh")),1)])]),e("div",Wa,[e("div",Oa,[t[109]||(t[109]=e("div",{class:"flex-shrink-0 w-12 h-12 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-6 h-6 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})])],-1)),e("h2",qa,o(r(i)("web5.connectedNodes")),1)]),e("p",Ja,o(r(i)("web5.peerNodesDescription")),1),e("div",Qa,[e("button",{onClick:t[16]||(t[16]=s=>r(Mt).push("/dashboard/server/federation")),class:"min-h-[44px] glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors flex items-center justify-center"},o(r(i)("web5.findNodes")),1),e("button",{onClick:tt,class:"min-h-[44px] glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors flex items-center justify-center"},o(Ut.value?"...":r(i)("common.refresh")),1)])]),e("div",Ga,[e("button",{onClick:t[17]||(t[17]=s=>P.value="peers"),class:h(["px-4 py-2 text-sm font-medium rounded-t-lg transition-colors",P.value==="peers"?"bg-white/10 text-white":"text-white/60 hover:text-white/80 hover:bg-white/5"])},[k(o(r(i)("web5.peers"))+" ",1),F.value.length>0?(n(),a("span",Xa,"("+o(F.value.length)+")",1)):u("",!0)],2),e("button",{onClick:Uo,class:h(["px-4 py-2 text-sm font-medium rounded-t-lg transition-colors flex items-center gap-1.5",P.value==="messages"?"bg-white/10 text-white":"text-white/60 hover:text-white/80 hover:bg-white/5"])},[k(o(r(i)("web5.messages"))+" ",1),r(Kt).length>0?(n(),a("span",{key:0,class:h(["ml-1.5 text-xs",r(eo)>0?"text-orange-400":"text-white/50"])},"("+o(r(Kt).length)+")",3)):u("",!0),r(eo)>0?(n(),a("span",Ya)):u("",!0)],2),e("button",{onClick:ol,class:h(["px-4 py-2 text-sm font-medium rounded-t-lg transition-colors flex items-center gap-1.5",P.value==="requests"?"bg-white/10 text-white":"text-white/60 hover:text-white/80 hover:bg-white/5"])},[k(o(r(i)("web5.requests"))+" ",1),C.value.length>0?(n(),a("span",Za,"("+o(C.value.length)+")",1)):u("",!0),C.value.length>0?(n(),a("span",er)):u("",!0)],2)]),m(e("div",tr,[F.value.length===0?(n(),a("div",sr,o(r(i)("web5.noPeers")),1)):u("",!0),(n(!0),a(f,null,y(F.value,s=>(n(),a("div",{key:s.pubkey,class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},[e("div",or,[e("div",{class:h(["w-2 h-2 rounded-full shrink-0",Ao.value[s.onion]?"bg-green-400":"bg-amber-400"])},null,2),e("div",lr,[e("p",nr,o(s.name||s.onion||(s.pubkey||"").slice(0,16)+"..."),1),e("p",ir,o(s.onion),1)])]),e("button",{onClick:x=>{Te.value=!0,Re.value=s.onion},class:"px-2 py-1 text-xs rounded bg-orange-500/20 text-orange-400 hover:bg-orange-500/30 transition-colors shrink-0"},o(r(i)("web5.message")),9,ar)]))),128))],512),[[Ct,P.value==="peers"]]),m(e("div",rr,[r(_s)?(n(),a("div",dr,o(r(i)("common.loading")),1)):r(Kt).length===0?(n(),a("div",ur,o(r(i)("web5.noMessages")),1)):u("",!0),(n(!0),a(f,null,y(r(Kt),(s,x)=>(n(),a("div",{key:x,class:"p-3 bg-white/5 rounded-lg border-l-2 border-orange-500/50"},[e("div",cr,[e("p",{class:"text-xs font-mono text-white/60 truncate",title:s.from_pubkey},o((s.from_pubkey||"").slice(0,16))+"...",9,vr),e("span",xr,o(to(s.timestamp)),1)]),e("p",hr,o(s.message),1)]))),128))],512),[[Ct,P.value==="messages"]]),m(e("div",mr,[Le.value?(n(),a("div",pr,o(r(i)("common.loading")),1)):C.value.length===0?(n(),a("div",br,o(r(i)("web5.noRequests")),1)):u("",!0),(n(!0),a(f,null,y(C.value,s=>(n(),a("div",{key:s.id,class:"p-3 bg-white/5 rounded-lg border-l-2 border-blue-500/50"},[e("div",wr,[e("div",fr,[e("p",{class:"text-xs font-mono text-white/70 truncate",title:s.from_did},o(s.from_did),9,gr),s.message?(n(),a("p",yr,o(s.message),1)):u("",!0),e("p",_r,o(to(s.created_at)),1)]),e("div",kr,[e("button",{onClick:x=>ll(s.id),disabled:He.value===s.id,class:"px-3 py-1.5 text-xs rounded-lg bg-green-500/20 text-green-400 hover:bg-green-500/30 transition-colors disabled:opacity-50"},o(r(i)("web5.accept")),9,Cr),e("button",{onClick:x=>nl(s.id),disabled:He.value===s.id,class:"px-3 py-1.5 text-xs rounded-lg bg-red-500/20 text-red-400 hover:bg-red-500/30 transition-colors disabled:opacity-50"},o(r(i)("web5.reject")),9,Mr)])])]))),128))],512),[[Ct,P.value==="requests"]]),P.value==="peers"?(n(),a("button",{key:0,onClick:Lo,disabled:Et.value,class:"mt-4 w-full px-4 py-2 glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(Et.value?r(i)("web5.discovering"):r(i)("web5.discoverNodes")),9,jr)):P.value==="messages"?(n(),a("button",{key:1,onClick:t[18]||(t[18]=(...s)=>r(ks)&&r(ks)(...s)),disabled:r(_s),class:"mt-4 w-full px-4 py-2 glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(r(_s)?r(i)("common.loading"):r(i)("web5.refreshMessages")),9,Pr)):(n(),a("button",{key:2,onClick:As,disabled:Le.value,class:"mt-4 w-full px-4 py-2 glass-button rounded-lg text-sm font-medium text-white/90 hover:text-white transition-colors disabled:opacity-50"},o(Le.value?r(i)("common.loading"):r(i)("web5.refreshRequests")),9,Dr))],512),e("div",Tr,[e("div",Rr,[e("div",Br,[t[110]||(t[110]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 20h16a1 1 0 001-1V5a1 1 0 00-1-1H4a1 1 0 00-1 1v14a1 1 0 001 1z"})])],-1)),e("div",null,[e("h2",$r,o(r(i)("web5.content")),1),e("p",Vr,o(r(i)("web5.contentDesc")),1)])]),oe.value==="mine"?(n(),a("div",Sr,[e("button",{onClick:Ie,disabled:xe.value,class:"glass-button glass-button-sm px-3 rounded-lg text-sm font-medium"},o(xe.value?"...":"Refresh"),9,zr),e("button",{onClick:t[19]||(t[19]=s=>he.value=!0),class:"glass-button glass-button-sm px-3 rounded-lg text-sm font-medium flex items-center gap-2"},[...t[111]||(t[111]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),k(" Add ",-1)])])])):u("",!0)]),e("div",Ar,[e("div",Ir,[t[112]||(t[112]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 20h16a1 1 0 001-1V5a1 1 0 00-1-1H4a1 1 0 00-1 1v14a1 1 0 001 1z"})])],-1)),e("h2",Ur,o(r(i)("web5.content")),1)]),e("p",Nr,o(r(i)("web5.contentDesc")),1),oe.value==="mine"?(n(),a("div",Lr,[e("button",{onClick:Ie,disabled:xe.value,class:"glass-button min-h-[44px] rounded-lg text-sm font-medium flex items-center justify-center"},o(xe.value?"...":"Refresh"),9,Hr),e("button",{onClick:t[20]||(t[20]=s=>he.value=!0),class:"glass-button min-h-[44px] rounded-lg text-sm font-medium flex items-center justify-center gap-2"},[...t[113]||(t[113]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),k(" Add ",-1)])])])):u("",!0)]),e("div",Er,[e("button",{onClick:t[21]||(t[21]=s=>oe.value="mine"),class:h(["px-4 py-2 text-sm font-medium rounded-t-lg transition-colors",oe.value==="mine"?"bg-white/10 text-white":"text-white/60 hover:text-white/80 hover:bg-white/5"])},[k(o(r(i)("web5.myContent"))+" ",1),J.value.length>0?(n(),a("span",Kr,"("+o(J.value.length)+")",1)):u("",!0)],2),e("button",{onClick:t[22]||(t[22]=s=>oe.value="browse"),class:h(["px-4 py-2 text-sm font-medium rounded-t-lg transition-colors",oe.value==="browse"?"bg-white/10 text-white":"text-white/60 hover:text-white/80 hover:bg-white/5"])},o(r(i)("web5.browsePeers")),3)]),m(e("div",null,[xe.value&&J.value.length===0?(n(),a("div",Fr,[t[114]||(t[114]=e("svg",{class:"animate-spin h-6 w-6 text-blue-400 mx-auto mb-2",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),e("p",Wr,o(r(i)("common.loading")),1)])):J.value.length===0?(n(),a("div",Or,[t[115]||(t[115]=e("svg",{class:"w-12 h-12 text-white/20 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 20h16a1 1 0 001-1V5a1 1 0 00-1-1H4a1 1 0 00-1 1v14a1 1 0 001 1z"})],-1)),e("p",qr,o(r(i)("web5.noSharedContent")),1),e("p",Jr,o(r(i)("web5.addFilesToShare")),1)])):(n(),a("div",Qr,[(n(!0),a(f,null,y(J.value,(s,x)=>(n(),a("div",{key:s.id,class:"card-stagger p-4 bg-white/5 rounded-lg",style:Os({"--stagger-index":x})},[e("div",Gr,[e("div",Xr,[e("p",Yr,o(s.filename),1),s.description?(n(),a("p",Zr,o(s.description),1)):u("",!0),e("p",ed,o(s.mime_type)+" · "+o($s(s.size_bytes)),1)]),e("button",{onClick:p=>Go(s.id),disabled:Rs.value===s.id,class:"p-2 rounded-lg text-white/40 hover:text-red-400 hover:bg-white/10 transition-colors shrink-0",title:"Remove"},[...t[116]||(t[116]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,td)]),e("div",sd,[(n(),a(f,null,y(io,p=>e("button",{key:p.value,onClick:Ks=>Xo(s,p.value),disabled:ct.value===s.id,class:h(["px-3 py-1 text-xs rounded-lg border transition-colors",Gt(s)===p.value?"bg-white/15 border-white/30 text-white":"bg-white/5 border-white/10 text-white/50 hover:bg-white/10 hover:text-white/70"])},o(p.label),11,od)),64))]),Gt(s)==="paid"?(n(),a("div",ld,[e("div",nd,[e("input",{value:Bs(s),onChange:p=>Yo(s,p.target.value),type:"number",min:"1",placeholder:"100",class:"w-24 px-2 py-1 text-xs rounded-lg bg-white/5 border border-white/10 text-white focus:outline-none focus:border-white/30"},null,40,id),t[117]||(t[117]=e("span",{class:"text-xs text-white/50"},"sats",-1))]),e("p",ad,"Peers will pay "+o(Bs(s)||0)+" sats to access this",1)])):Gt(s)==="free"?(n(),a("p",rd,o(r(i)("web5.freeAccessDesc")),1)):Gt(s)==="peers_only"?(n(),a("p",dd,o(r(i)("web5.peersOnlyAccessDesc")),1)):u("",!0)],4))),128))]))],512),[[Ct,oe.value==="mine"]]),m(e("div",null,[e("div",ud,[e("div",cd,[m(e("select",{"onUpdate:modelValue":t[23]||(t[23]=s=>A.value=s),class:"flex-1 px-3 py-2 rounded-lg bg-white/10 text-white text-sm border border-white/20 focus:border-orange-500 focus:ring-1 focus:ring-orange-500"},[e("option",vd,o(r(i)("web5.selectPeer")),1),(n(!0),a(f,null,y(F.value,s=>(n(),a("option",{key:s.pubkey,value:s.onion},o(s.name||s.onion||(s.pubkey||"").slice(0,12)+"..."),9,xd))),128))],512),[[Ws,A.value]]),e("button",{onClick:Zo,disabled:!A.value||pe.value,class:"glass-button glass-button-sm px-4 py-2 rounded-lg text-sm font-medium disabled:opacity-50"},o(pe.value?r(i)("common.loading"):r(i)("web5.browse")),9,hd)]),vt.value?(n(),a("p",md,o(vt.value),1)):u("",!0)]),pe.value?(n(),a("div",pd,[t[118]||(t[118]=e("svg",{class:"animate-spin h-6 w-6 text-blue-400 mx-auto mb-2",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),e("p",bd,o(r(i)("web5.connectingToPeer")),1)])):!A.value&&Ue.value.length===0?(n(),a("div",wd,[t[119]||(t[119]=e("svg",{class:"w-12 h-12 text-white/20 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),e("p",fd,o(r(i)("web5.selectPeerToBrowse")),1),e("p",gd,o(r(i)("web5.choosePeerDesc")),1)])):Ue.value.length===0&&A.value&&!pe.value?(n(),a("div",yd,[e("p",_d,o(r(i)("web5.peerNoContent")),1)])):(n(),a("div",kd,[(n(!0),a(f,null,y(Ue.value,(s,x)=>(n(),a("div",{key:s.id,class:"card-stagger flex items-center gap-4 p-3 bg-white/5 rounded-lg",style:Os({"--stagger-index":x})},[e("div",Cd,[ao(s.mime_type)?(n(),a("svg",Md,[...t[120]||(t[120]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"},null,-1),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])):(n(),a("svg",jd,[...t[121]||(t[121]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},null,-1)])]))]),e("div",Pd,[e("p",Dd,o(s.filename),1),s.description?(n(),a("p",Td,o(s.description),1)):u("",!0),e("div",Rd,[e("span",Bd,o(s.mime_type),1),t[122]||(t[122]=e("span",{class:"text-xs text-white/30"},"·",-1)),e("span",$d,o($s(s.size_bytes)),1),Vs(s)>0?(n(),a("span",Vd,o(Vs(s))+" sats",1)):(n(),a("span",Sd,"Free"))])]),ao(s.mime_type)?(n(),a("button",{key:0,onClick:p=>el(s),class:"px-3 py-1.5 text-xs rounded-lg bg-orange-500/20 text-orange-400 hover:bg-orange-500/30 transition-colors shrink-0"},o(r(i)("web5.stream")),9,zd)):(n(),a("button",{key:1,onClick:p=>tl(s),class:"px-3 py-1.5 text-xs rounded-lg bg-blue-500/20 text-blue-400 hover:bg-blue-500/30 transition-colors shrink-0"},o(r(i)("web5.download")),9,Ad))],4))),128))]))],512),[[Ct,oe.value==="browse"]])]),(n(),M(V,{to:"body"},[le.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",onClick:$(zs,["self"]),onKeydown:T(zs,["escape"])},[e("div",Id,[e("div",Ud,[e("div",Nd,[e("p",Ld,o(le.value.filename),1),e("p",Hd,o(le.value.mime_type),1)]),e("div",Ed,[Ss.value>0?(n(),a("div",Kd,[e("span",Fd,o(Ss.value)+" sats",1)])):u("",!0),e("button",{onClick:zs,class:"p-2 rounded-lg text-white/50 hover:text-white hover:bg-white/10 transition-colors"},[...t[123]||(t[123]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])]),e("div",Wd,[le.value.mime_type.startsWith("audio/")?(n(),a("div",Od,[e("audio",{ref_key:"audioPlayerRef",ref:mt,src:Ne.value,controls:"",class:"w-full",onTimeupdate:ro,onError:uo},null,40,qd)])):le.value.mime_type.startsWith("video/")?(n(),a("div",Jd,[e("video",{ref_key:"videoPlayerRef",ref:pt,src:Ne.value,controls:"",class:"w-full rounded-lg max-h-[60vh]",onTimeupdate:ro,onError:uo},null,40,Qd)])):u("",!0),ht.value?(n(),a("div",Gd,[e("p",Xd,o(ht.value),1),t[124]||(t[124]=e("p",{class:"text-white/50 text-xs mt-1"},"This may be a Tor-only resource. Copy the URL to use with a Tor-enabled media player.",-1))])):u("",!0),e("div",Yd,[e("div",Zd,[k(o($s(le.value.size_bytes))+" ",1),xt.value>0?(n(),a("span",eu," · "+o(Math.round(xt.value*100))+"% streamed",1)):u("",!0)]),e("button",{onClick:sl,class:"text-xs text-white/50 hover:text-white transition-colors"}," Copy URL ")])])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[he.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:t[29]||(t[29]=$(s=>he.value=!1,["self"])),onKeydown:t[30]||(t[30]=T(s=>he.value=!1,["escape"]))},[e("div",tu,[e("h2",su,o(r(i)("web5.addContentTitle")),1),e("div",ou,[e("div",null,[t[125]||(t[125]=e("label",{class:"text-white/60 text-sm block mb-1"},"Filename",-1)),m(e("input",{"onUpdate:modelValue":t[24]||(t[24]=s=>ze.value=s),type:"text",placeholder:"my-file.mp3",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,ze.value]])]),e("div",null,[t[126]||(t[126]=e("label",{class:"text-white/60 text-sm block mb-1"},"MIME Type",-1)),m(e("input",{"onUpdate:modelValue":t[25]||(t[25]=s=>Jt.value=s),type:"text",placeholder:"audio/mpeg",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Jt.value]])]),e("div",null,[t[127]||(t[127]=e("label",{class:"text-white/60 text-sm block mb-1"},"Description (optional)",-1)),m(e("input",{"onUpdate:modelValue":t[26]||(t[26]=s=>Qt.value=s),type:"text",placeholder:"A short description",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Qt.value]])]),e("div",null,[t[128]||(t[128]=e("label",{class:"text-white/60 text-sm block mb-2"},"Access",-1)),e("div",lu,[(n(),a(f,null,y(io,s=>e("button",{key:s.value,onClick:x=>me.value=s.value,class:h(["px-3 py-1.5 text-xs rounded-lg border transition-colors",me.value===s.value?"bg-white/15 border-white/30 text-white":"bg-white/5 border-white/10 text-white/50 hover:bg-white/10"])},o(s.label),11,nu)),64))])]),me.value==="paid"?(n(),a("div",iu,[t[129]||(t[129]=e("label",{class:"text-white/60 text-sm block mb-1"},"Price (sats)",-1)),m(e("input",{"onUpdate:modelValue":t[27]||(t[27]=s=>Ae.value=s),type:"number",min:"1",placeholder:"100",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Ae.value,void 0,{number:!0}]]),Ae.value>0?(n(),a("p",au,"Peers will pay "+o(Ae.value)+" sats to access this",1)):u("",!0)])):u("",!0)]),ut.value?(n(),a("div",ru,[e("p",du,o(ut.value),1)])):u("",!0),e("div",uu,[e("button",{onClick:t[28]||(t[28]=s=>{he.value=!1,ut.value=""}),class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm"},o(r(i)("common.cancel")),1),e("button",{onClick:Qo,disabled:dt.value||!ze.value.trim(),class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-orange-500/20 border-orange-500/30 disabled:opacity-50"},o(dt.value?"Adding...":"Add"),9,cu)])])],32)):u("",!0)])),e("div",vu,[e("div",xu,[e("div",hu,[t[130]||(t[130]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V8a2 2 0 00-2-2h-5m-4 0V5a2 2 0 114 0v1m-4 0a2 2 0 104 0m-5 8a2 2 0 100-4 2 2 0 000 4zm0 0c1.306 0 2.417.835 2.83 2M9 14a3.001 3.001 0 00-2.83 2M15 11h3m-3 4h2"})])],-1)),e("div",null,[e("h2",mu,o(r(i)("web5.identities")),1),e("p",pu,o(r(i)("web5.identitiesDesc")),1)])]),e("button",{onClick:t[31]||(t[31]=s=>fe.value=!0),class:"glass-button glass-button-sm px-3 rounded-lg text-sm font-medium flex items-center gap-2"},[...t[131]||(t[131]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),k(" Create ",-1)])])]),e("div",bu,[e("div",wu,[t[132]||(t[132]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V8a2 2 0 00-2-2h-5m-4 0V5a2 2 0 114 0v1m-4 0a2 2 0 104 0m-5 8a2 2 0 100-4 2 2 0 000 4zm0 0c1.306 0 2.417.835 2.83 2M9 14a3.001 3.001 0 00-2.83 2M15 11h3m-3 4h2"})])],-1)),e("h2",fu,o(r(i)("web5.identities")),1)]),e("p",gu,o(r(i)("web5.identitiesDesc")),1),e("button",{onClick:t[32]||(t[32]=s=>fe.value=!0),class:"w-full min-h-[44px] glass-button rounded-lg text-sm font-medium flex items-center justify-center gap-2"},[...t[133]||(t[133]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),k(" Create ",-1)])])]),Hs.value?(n(),a("div",yu,[t[134]||(t[134]=e("svg",{class:"animate-spin h-6 w-6 text-blue-400 mx-auto mb-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),e("p",_u,o(r(i)("common.loading")),1)])):we.value.length===0?(n(),a("div",ku,[t[135]||(t[135]=e("svg",{class:"w-12 h-12 text-white/20 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1)),e("p",Cu,o(r(i)("web5.noIdentities")),1),e("p",Mu,o(r(i)("web5.createFirstIdentity")),1)])):(n(),a("div",ju,[(n(!0),a(f,null,y(we.value,(s,x)=>(n(),a("div",{key:s.id,class:"card-stagger flex items-center gap-4 p-4 bg-white/5 rounded-lg",style:Os({"--stagger-index":x})},[e("button",{onClick:p=>cl(s),class:"relative flex-shrink-0 w-10 h-10 rounded-full overflow-hidden group",title:"Edit profile"},[s.profile?.picture?(n(),a("img",{key:0,src:s.profile.picture,class:"w-full h-full object-cover",onError:t[33]||(t[33]=p=>p.target.style.display="none")},null,40,Du)):u("",!0),s.profile?.picture?u("",!0):(n(),a("div",{key:1,class:h(["w-full h-full flex items-center justify-center",{"bg-blue-500/20":s.purpose==="personal","bg-orange-500/20":s.purpose==="business","bg-purple-500/20":s.purpose==="anonymous"}])},[e("span",{class:h(["text-sm font-bold",{"text-blue-400":s.purpose==="personal","text-orange-400":s.purpose==="business","text-purple-400":s.purpose==="anonymous"}])},o(s.name.charAt(0).toUpperCase()),3)],2)),t[136]||(t[136]=e("div",{class:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center"},[e("svg",{class:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})])],-1))],8,Pu),e("div",Tu,[e("div",Ru,[e("span",Bu,o(s.name),1),s.is_default?(n(),a("span",$u,"★")):u("",!0),e("span",{class:h(["text-xs px-2 py-0.5 rounded-full capitalize",{"bg-blue-500/20 text-blue-300":s.purpose==="personal","bg-orange-500/20 text-orange-300":s.purpose==="business","bg-purple-500/20 text-purple-300":s.purpose==="anonymous"}])},o(s.purpose),3)]),e("div",Vu,[e("p",{class:"text-white/50 text-xs font-mono truncate",title:s.did},o(s.did),9,Su),e("button",{onClick:p=>ho(s.did),class:"shrink-0 p-0.5 rounded text-white/30 hover:text-white/70 transition-colors",title:"Copy DID"},[...t[137]||(t[137]=[e("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)])],8,zu)]),s.nostr_npub?(n(),a("div",Au,[e("p",{class:"text-white/40 text-xs font-mono truncate",title:s.nostr_npub},o(s.nostr_npub),9,Iu),e("button",{onClick:p=>ho(s.nostr_npub||""),class:"shrink-0 p-0.5 rounded text-white/30 hover:text-white/70 transition-colors",title:"Copy npub"},[...t[138]||(t[138]=[e("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)])],8,Uu)])):u("",!0)]),e("div",Nu,[e("button",{onClick:p=>ul(s),class:"p-2 rounded-lg text-white/50 hover:text-white hover:bg-white/10 transition-colors",title:"View keys"},[...t[139]||(t[139]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})],-1)])],8,Lu),s.is_default?u("",!0):(n(),a("button",{key:0,onClick:p=>ml(s.id),class:"p-2 rounded-lg text-white/50 hover:text-yellow-400 hover:bg-white/10 transition-colors",title:"Set as default"},[...t[140]||(t[140]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})],-1)])],8,Hu)),e("button",{onClick:p=>pl(s),class:"p-2 rounded-lg text-white/50 hover:text-red-400 hover:bg-white/10 transition-colors",title:"Delete"},[...t[141]||(t[141]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,Eu)])],4))),128))]))]),(n(),M(V,{to:"body"},[fe.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:t[36]||(t[36]=$(s=>fe.value=!1,["self"])),onKeydown:t[37]||(t[37]=T(s=>fe.value=!1,["escape"]))},[e("div",Ku,[e("h2",Fu,o(r(i)("web5.createIdentityTitle")),1),e("div",Wu,[e("div",null,[t[142]||(t[142]=e("label",{class:"text-white/60 text-sm block mb-1"},"Name",-1)),m(e("input",{"onUpdate:modelValue":t[34]||(t[34]=s=>Yt.value=s),type:"text",placeholder:"Personal",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Yt.value]])]),e("div",null,[t[143]||(t[143]=e("label",{class:"text-white/60 text-sm block mb-1"},"Purpose",-1)),e("div",Ou,[(n(),a(f,null,y(["personal","business","anonymous"],s=>e("button",{key:s,onClick:x=>Zt.value=s,class:h(["px-3 py-2 rounded-lg text-sm capitalize transition-colors border",Zt.value===s?"bg-white/15 border-white/30 text-white":"bg-white/5 border-white/10 text-white/60 hover:bg-white/10"])},o(s),11,qu)),64))])])]),es.value?(n(),a("div",Ju,[e("p",Qu,o(es.value),1)])):u("",!0),e("div",Gu,[e("button",{onClick:t[35]||(t[35]=s=>fe.value=!1),class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm"},o(r(i)("common.cancel")),1),e("button",{onClick:hl,disabled:gt.value,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-blue-500/20 border-blue-500/30"},o(gt.value?r(i)("web5.creatingDid"):r(i)("web5.createIdentity")),9,Xu)])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[re.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:t[39]||(t[39]=$(s=>re.value=null,["self"])),onKeydown:t[40]||(t[40]=T(s=>re.value=null,["escape"]))},[e("div",Yu,[e("h2",Zu,o(r(i)("web5.deleteIdentityTitle")),1),e("p",ec,o(r(i)("web5.deleteIdentityConfirm")),1),e("div",tc,[e("button",{onClick:t[38]||(t[38]=s=>re.value=null),class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm"},o(r(i)("common.cancel")),1),e("button",{onClick:bl,disabled:yt.value,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-red-500/20 border-red-500/30"},o(yt.value?r(i)("web5.deleting"):r(i)("common.delete")),9,sc)])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[w.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:$(Ns,["self"]),onKeydown:T(Ns,["escape"])},[e("div",oc,[e("div",lc,[e("div",{class:h(["w-10 h-10 rounded-full flex items-center justify-center",{"bg-blue-500/20":w.value.purpose==="personal","bg-orange-500/20":w.value.purpose==="business","bg-purple-500/20":w.value.purpose==="anonymous"}])},[(n(),a("svg",{class:h(["w-5 h-5",{"text-blue-400":w.value.purpose==="personal","text-orange-400":w.value.purpose==="business","text-purple-400":w.value.purpose==="anonymous"}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[144]||(t[144]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])],2))],2),e("div",null,[e("h2",nc,o(w.value.name),1),e("p",ic,o(w.value.purpose)+" identity",1)])]),e("div",ac,[t[149]||(t[149]=e("h3",{class:"text-sm font-semibold text-white/80 flex items-center gap-2"},[e("svg",{class:"w-4 h-4 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),k(" Public Keys ")],-1)),e("div",rc,[e("div",dc,[e("div",uc,[t[145]||(t[145]=e("span",{class:"text-xs text-white/50"},"DID (Ed25519)",-1)),e("button",{onClick:t[41]||(t[41]=s=>be("did",w.value.did)),class:"text-xs text-white/40 hover:text-white/80 transition-colors flex items-center gap-1"},o(G.value==="did"?"Copied!":"Copy"),1)]),e("p",cc,o(w.value.did),1)]),e("div",vc,[e("div",xc,[t[146]||(t[146]=e("span",{class:"text-xs text-white/50"},"Ed25519 Public Key (hex)",-1)),e("button",{onClick:t[42]||(t[42]=s=>be("pubkey",w.value.pubkey)),class:"text-xs text-white/40 hover:text-white/80 transition-colors flex items-center gap-1"},o(G.value==="pubkey"?"Copied!":"Copy"),1)]),e("p",hc,o(w.value.pubkey),1)]),w.value.nostr_npub?(n(),a("div",mc,[e("div",pc,[t[147]||(t[147]=e("span",{class:"text-xs text-white/50"},"Nostr npub (NIP-19)",-1)),e("button",{onClick:t[43]||(t[43]=s=>be("npub",w.value.nostr_npub)),class:"text-xs text-white/40 hover:text-white/80 transition-colors flex items-center gap-1"},o(G.value==="npub"?"Copied!":"Copy"),1)]),e("p",bc,o(w.value.nostr_npub),1)])):u("",!0),w.value.nostr_pubkey?(n(),a("div",wc,[e("div",fc,[t[148]||(t[148]=e("span",{class:"text-xs text-white/50"},"Nostr Public Key (hex)",-1)),e("button",{onClick:t[44]||(t[44]=s=>be("nostr_hex",w.value.nostr_pubkey)),class:"text-xs text-white/40 hover:text-white/80 transition-colors flex items-center gap-1"},o(G.value==="nostr_hex"?"Copied!":"Copy"),1)]),e("p",gc,o(w.value.nostr_pubkey),1)])):u("",!0)])]),e("div",yc,[t[154]||(t[154]=e("h3",{class:"text-sm font-semibold text-red-300/80 flex items-center gap-2 mb-3"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})]),k(" Private Keys ")],-1)),D.value?(n(),a("div",jc,[e("div",Pc,[e("div",Dc,[t[151]||(t[151]=e("span",{class:"text-xs text-red-300/60"},"Ed25519 Secret Key (hex)",-1)),e("button",{onClick:t[46]||(t[46]=s=>be("ed25519_secret",D.value.ed25519_secret_hex)),class:"text-xs text-red-300/40 hover:text-red-300/80 transition-colors"},o(G.value==="ed25519_secret"?"Copied!":"Copy"),1)]),e("p",Tc,o(D.value.ed25519_secret_hex),1)]),D.value.nostr_nsec?(n(),a("div",Rc,[e("div",Bc,[t[152]||(t[152]=e("span",{class:"text-xs text-red-300/60"},"Nostr nsec (NIP-19)",-1)),e("button",{onClick:t[47]||(t[47]=s=>be("nsec",D.value.nostr_nsec)),class:"text-xs text-red-300/40 hover:text-red-300/80 transition-colors"},o(G.value==="nsec"?"Copied!":"Copy"),1)]),e("p",$c,o(D.value.nostr_nsec),1)])):u("",!0),D.value.nostr_secret_hex?(n(),a("div",Vc,[e("div",Sc,[t[153]||(t[153]=e("span",{class:"text-xs text-red-300/60"},"Nostr Secret Key (hex)",-1)),e("button",{onClick:t[48]||(t[48]=s=>be("nostr_secret",D.value.nostr_secret_hex)),class:"text-xs text-red-300/40 hover:text-red-300/80 transition-colors"},o(G.value==="nostr_secret"?"Copied!":"Copy"),1)]),e("p",zc,o(D.value.nostr_secret_hex),1)])):u("",!0),e("button",{onClick:t[49]||(t[49]=s=>D.value=null),class:"mt-2 text-xs text-white/40 hover:text-white/60 transition-colors"}," Lock private keys ")])):(n(),a("div",_c,[t[150]||(t[150]=e("p",{class:"text-xs text-white/40 mb-3"},"Enter your login password to reveal private keys. Never share these with anyone.",-1)),e("div",kc,[m(e("input",{"onUpdate:modelValue":t[45]||(t[45]=s=>ie.value=s),type:"password",placeholder:"Password",class:"flex-1 bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30",onKeydown:T(xo,["enter"])},null,544),[[b,ie.value]]),e("button",{onClick:xo,disabled:!ie.value||bt.value,class:"glass-button px-4 py-2 rounded-lg text-sm font-medium bg-red-500/10 border-red-500/20 hover:bg-red-500/20 disabled:opacity-50"},o(bt.value?"Verifying...":"Unlock"),9,Cc)]),Ee.value?(n(),a("p",Mc,o(Ee.value),1)):u("",!0)]))]),e("div",{class:"flex justify-end mt-5"},[e("button",{onClick:Ns,class:"glass-button px-6 py-2 rounded-lg text-sm"},"Close")])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[B.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:$(Ls,["self"]),onKeydown:T(Ls,["escape"])},[e("div",Ac,[e("div",Ic,[e("div",Uc,[_.value.picture?(n(),a("img",{key:0,src:_.value.picture,class:"w-full h-full object-cover",onError:t[50]||(t[50]=s=>s.target.style.display="none")},null,40,Nc)):(n(),a("div",Lc,[e("span",Hc,o(B.value.name.charAt(0).toUpperCase()),1)]))]),e("div",null,[t[155]||(t[155]=e("h2",{id:"profile-editor-title",class:"text-lg font-bold text-white"},"Edit Profile",-1)),e("p",Ec,o(B.value.name)+" · "+o(B.value.purpose),1)])]),e("div",Kc,[e("div",null,[t[156]||(t[156]=e("label",{class:"text-white/60 text-xs block mb-1"},"Display Name",-1)),m(e("input",{"onUpdate:modelValue":t[51]||(t[51]=s=>_.value.display_name=s),type:"text",placeholder:B.value.name,class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,8,Fc),[[b,_.value.display_name]])]),e("div",null,[t[157]||(t[157]=e("label",{class:"text-white/60 text-xs block mb-1"},"About / Bio",-1)),m(e("textarea",{"onUpdate:modelValue":t[52]||(t[52]=s=>_.value.about=s),rows:"3",placeholder:"A short bio...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30 resize-none"},null,512),[[b,_.value.about]])]),e("div",null,[t[158]||(t[158]=e("label",{class:"text-white/60 text-xs block mb-1"},"Profile Picture URL",-1)),m(e("input",{"onUpdate:modelValue":t[53]||(t[53]=s=>_.value.picture=s),type:"url",placeholder:"https://...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,_.value.picture]])]),e("div",null,[t[159]||(t[159]=e("label",{class:"text-white/60 text-xs block mb-1"},"Banner Image URL",-1)),m(e("input",{"onUpdate:modelValue":t[54]||(t[54]=s=>_.value.banner=s),type:"url",placeholder:"https://...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,_.value.banner]])]),e("div",null,[t[160]||(t[160]=e("label",{class:"text-white/60 text-xs block mb-1"},"Website",-1)),m(e("input",{"onUpdate:modelValue":t[55]||(t[55]=s=>_.value.website=s),type:"url",placeholder:"https://...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,_.value.website]])]),e("div",Wc,[e("div",null,[t[161]||(t[161]=e("label",{class:"text-white/60 text-xs block mb-1"},"NIP-05 (Nostr address)",-1)),m(e("input",{"onUpdate:modelValue":t[56]||(t[56]=s=>_.value.nip05=s),type:"text",placeholder:"you@domain.com",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,_.value.nip05]])]),e("div",null,[t[162]||(t[162]=e("label",{class:"text-white/60 text-xs block mb-1"},"Lightning Address (LUD-16)",-1)),m(e("input",{"onUpdate:modelValue":t[57]||(t[57]=s=>_.value.lud16=s),type:"text",placeholder:"you@getalby.com",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,_.value.lud16]])])])]),ae.value?(n(),a("div",Oc,[e("p",qc,o(ae.value),1)])):u("",!0),L.value?(n(),a("div",Jc,[e("p",Qc,o(L.value),1)])):u("",!0),e("div",Gc,[e("button",{onClick:Ls,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm"},"Cancel"),e("button",{onClick:vl,disabled:wt.value,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium"},o(wt.value?"Saving...":"Save"),9,Xc),e("button",{onClick:xl,disabled:ft.value,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-orange-500/20 border-orange-500/30"},o(ft.value?"Publishing...":"Save & Publish"),9,Yc)])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[Ms.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:$(Ds,["self"]),onKeydown:T(Ds,["escape"])},[e("div",Zc,[e("h2",e0,o(r(i)("web5.sendBitcoinTitle")),1),e("div",t0,[(n(),a(f,null,y(["auto","lightning","onchain","ecash"],s=>e("button",{key:s,onClick:x=>st.value=s,class:h(["flex-1 px-2 py-1.5 rounded text-xs font-medium capitalize transition-colors",st.value===s?"bg-white/15 text-white":"text-white/50 hover:text-white/80"])},o(s==="onchain"?"On-chain":s),11,s0)),64))]),st.value==="auto"?(n(),a("div",o0,[...t[163]||(t[163]=[e("p",{class:"text-xs text-white/50"},"Auto-selects method based on amount: ecash < 1k sats, Lightning 1k–500k, on-chain > 500k",-1)])])):u("",!0),e("div",l0,[t[164]||(t[164]=e("label",{class:"text-white/60 text-sm block mb-1"},"Amount (sats)",-1)),m(e("input",{"onUpdate:modelValue":t[58]||(t[58]=s=>se.value=s),type:"number",min:"1",placeholder:"1000",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,se.value,void 0,{number:!0}]])]),ve.value!=="ecash"?(n(),a("div",n0,[e("label",i0,o(ve.value==="lightning"?"Lightning Invoice (BOLT11)":"Bitcoin Address"),1),m(e("textarea",{"onUpdate:modelValue":t[59]||(t[59]=s=>ue.value=s),rows:"2",placeholder:ve.value==="lightning"?"lnbc...":"bc1...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm font-mono focus:outline-none focus:border-white/30"},null,8,a0),[[b,ue.value]])])):u("",!0),$e.value&&ve.value==="ecash"?(n(),a("div",r0,[t[165]||(t[165]=e("p",{class:"text-white/50 text-xs mb-1"},"Token (share with recipient):",-1)),e("p",d0,o($e.value),1),e("button",{onClick:t[60]||(t[60]=s=>qo($e.value)),class:"mt-2 text-xs text-orange-400 hover:text-orange-300"},"Copy")])):u("",!0),ve.value==="onchain"?(n(),a("div",u0,[e("label",c0,[m(e("input",{type:"checkbox","onUpdate:modelValue":t[61]||(t[61]=s=>Ot.value=s),class:"sr-only peer"},null,512),[[po,Ot.value]]),t[166]||(t[166]=e("div",{class:"w-9 h-5 bg-white/10 peer-focus:outline-none rounded-full peer peer-checked:bg-orange-500/40 transition-colors after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:after:translate-x-full"},null,-1))]),e("div",null,[e("p",v0,o(r(i)("web5.signWithHwWallet")),1),e("p",x0,o(r(i)("web5.createsPsbt")),1)])])):u("",!0),lt.value==="created"&&W.value?(n(),a("div",h0,[e("div",m0,[t[167]||(t[167]=e("p",{class:"text-xs text-white/50 mb-1"},"Unsigned PSBT (copy or download):",-1)),e("textarea",{readonly:"",value:W.value,rows:"3",class:"w-full bg-black/20 border border-white/10 rounded px-2 py-1 text-xs font-mono text-white/80 focus:outline-none"},null,8,p0),e("div",{class:"flex gap-2 mt-2"},[e("button",{onClick:Ko,class:"text-xs text-orange-400 hover:text-orange-300"},"Copy PSBT"),e("button",{onClick:Fo,class:"text-xs text-orange-400 hover:text-orange-300"},"Download .psbt")])]),e("div",b0,[t[169]||(t[169]=e("p",{class:"text-xs text-white/50 mb-1"},"Paste signed PSBT or upload file:",-1)),m(e("textarea",{"onUpdate:modelValue":t[62]||(t[62]=s=>O.value=s),rows:"3",placeholder:"Paste signed PSBT base64 here...",class:"w-full bg-black/20 border border-white/10 rounded px-2 py-1 text-xs font-mono text-white/80 focus:outline-none focus:border-white/30"},null,512),[[b,O.value]]),e("div",w0,[e("label",f0,[t[168]||(t[168]=k(" Upload .psbt ",-1)),e("input",{type:"file",accept:".psbt,.txt",class:"hidden",onChange:Wo},null,32)])])])])):u("",!0),Se.value?(n(),a("div",g0,[e("p",y0,"Sent! TX: "+o(Se.value),1)])):u("",!0),ot.value?(n(),a("div",_0,[e("p",k0,"Paid! Hash: "+o(ot.value),1)])):u("",!0),N.value?(n(),a("div",C0,o(N.value),1)):u("",!0),e("div",M0,[e("button",{onClick:Ds,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm"},o(r(i)("common.close")),1),lt.value==="created"?(n(),a("button",{key:0,onClick:Eo,disabled:S.value||!O.value.trim(),class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-orange-500/20 border-orange-500/30 disabled:opacity-50"},o(S.value?"Broadcasting...":"Broadcast"),9,j0)):(n(),a("button",{key:1,onClick:Ho,disabled:S.value||!se.value,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-orange-500/20 border-orange-500/30 disabled:opacity-50"},o(S.value?"Sending...":Ot.value&&ve.value==="onchain"?"Create PSBT":"Send"),9,P0))])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[js.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:$(Ts,["self"]),onKeydown:T(Ts,["escape"])},[e("div",D0,[e("h2",T0,o(r(i)("web5.receiveBitcoinTitle")),1),e("div",R0,[(n(),a(f,null,y(["lightning","onchain","ecash"],s=>e("button",{key:s,onClick:x=>q.value=s,class:h(["flex-1 px-2 py-1.5 rounded text-xs font-medium capitalize transition-colors",q.value===s?"bg-white/15 text-white":"text-white/50 hover:text-white/80"])},o(s==="onchain"?"On-chain":s),11,B0)),64))]),q.value==="lightning"?(n(),a("div",$0,[e("div",V0,[t[170]||(t[170]=e("label",{class:"text-white/60 text-sm block mb-1"},"Amount (sats)",-1)),m(e("input",{"onUpdate:modelValue":t[63]||(t[63]=s=>nt.value=s),type:"number",min:"1",placeholder:"1000",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,nt.value,void 0,{number:!0}]])]),e("div",S0,[t[171]||(t[171]=e("label",{class:"text-white/60 text-sm block mb-1"},"Memo (optional)",-1)),m(e("input",{"onUpdate:modelValue":t[64]||(t[64]=s=>Ps.value=s),type:"text",placeholder:"Payment for...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Ps.value]])]),it.value?(n(),a("div",z0,[t[172]||(t[172]=e("p",{class:"text-white/50 text-xs mb-1"},"Invoice (share with sender):",-1)),e("p",A0,o(it.value),1),e("button",{onClick:t[65]||(t[65]=s=>no(it.value,"Invoice copied")),class:"mt-2 text-xs text-orange-400 hover:text-orange-300"},"Copy")])):u("",!0)])):u("",!0),q.value==="onchain"?(n(),a("div",I0,[at.value?(n(),a("div",U0,[e("canvas",{ref_key:"onchainQrCanvas",ref:lo,class:"mx-auto mb-3 rounded-lg",style:{"image-rendering":"pixelated"}},null,512),t[173]||(t[173]=e("p",{class:"text-white/50 text-xs mb-2"},"Your Bitcoin address:",-1)),e("p",N0,o(at.value),1),e("button",{onClick:t[66]||(t[66]=s=>no(at.value,"Address copied")),class:"mt-2 text-xs text-orange-400 hover:text-orange-300"},"Copy")])):(n(),a("div",L0,[e("p",H0,o(r(i)("web5.generateFreshAddress")),1)]))])):u("",!0),q.value==="ecash"?(n(),a("div",E0,[e("div",K0,[t[174]||(t[174]=e("label",{class:"text-white/60 text-sm block mb-1"},"Paste ecash token",-1)),m(e("textarea",{"onUpdate:modelValue":t[67]||(t[67]=s=>Ve.value=s),rows:"3",placeholder:"cashuSend_...",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Ve.value]])]),Wt.value?(n(),a("div",F0,o(Wt.value),1)):u("",!0)])):u("",!0),ce.value?(n(),a("div",W0,o(ce.value),1)):u("",!0),e("div",O0,[e("button",{onClick:Ts,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm"},o(r(i)("common.close")),1),e("button",{onClick:Oo,disabled:rt.value,class:"flex-1 glass-button px-4 py-2 rounded-lg text-sm font-medium bg-green-500/20 border-green-500/30 disabled:opacity-50"},o(rt.value?"Processing...":q.value==="onchain"?"Generate Address":q.value==="lightning"?"Create Invoice":"Receive"),9,q0)])])],32)):u("",!0)])),e("div",J0,[e("div",Q0,[e("div",G0,[t[175]||(t[175]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})])],-1)),e("div",null,[e("h2",X0,o(r(i)("web5.decentralizedWebNode")),1),e("p",Y0,o(r(i)("web5.dwnDescription")),1)])]),Je.value&&cs.value?(n(),M(v,{key:0,to:"/apps/dwn",class:"glass-button glass-button-sm px-3 rounded-lg text-sm font-medium inline-flex items-center gap-2 no-underline"},{default:ge(()=>[k(o(r(i)("web5.manageDwn")),1)]),_:1})):u("",!0)]),!Je.value||!cs.value?(n(),a("div",Z0,[e("p",e1,o(Je.value?"The DWN container is not running.":"The DWN container is not installed.")+" "+o(Je.value?"Start it from the App Store to enable decentralized data storage and sync.":"Install it from the App Store to enable decentralized data storage and sync."),1),kt(v,{to:"/dashboard/marketplace",class:"glass-button px-4 py-2 rounded-lg text-sm font-medium inline-flex items-center gap-2 no-underline"},{default:ge(()=>[...t[176]||(t[176]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 100 4 2 2 0 000-4z"})],-1),k(" Open App Store ",-1)])]),_:1})])):u("",!0),Je.value&&cs.value?(n(),a(f,{key:1},[e("div",t1,[e("div",s1,[e("div",o1,o(r(i)("common.status")),1),e("div",l1,[e("div",{class:h(["w-2 h-2 rounded-full",R.value?.running?"bg-green-400":"bg-red-400"])},null,2),e("span",n1,o(R.value?.running?r(i)("common.running"):r(i)("common.stopped")),1)])]),e("div",i1,[t[177]||(t[177]=e("div",{class:"text-xs text-white/50 mb-1"},"Sync",-1)),e("div",a1,[e("div",{class:h(["w-2 h-2 rounded-full",{"bg-green-400":U.value==="synced","bg-yellow-400 animate-pulse":U.value==="syncing","bg-red-400":U.value==="error","bg-white/30":U.value==="idle"}])},null,2),e("span",r1,o(U.value),1)])]),e("div",d1,[t[178]||(t[178]=e("div",{class:"text-xs text-white/50 mb-1"},"Storage",-1)),e("span",u1,o(Vo.value),1)]),e("div",c1,[t[179]||(t[179]=e("div",{class:"text-xs text-white/50 mb-1"},"Messages",-1)),e("span",v1,o(R.value?.message_count??0),1)])]),e("div",x1,[e("div",h1,[e("div",m1,"Registered Protocols ("+o(Ge.value.length)+")",1),e("button",{onClick:t[68]||(t[68]=s=>Ye.value=!Ye.value),class:"text-xs text-blue-400 hover:text-blue-300 transition-colors"},o(Ye.value?"Cancel":"+ Register"),1)]),Ye.value?(n(),a("div",p1,[e("div",b1,[e("div",w1,[t[180]||(t[180]=e("label",{class:"text-xs text-white/50 block mb-1"},"Protocol URI",-1)),m(e("input",{"onUpdate:modelValue":t[69]||(t[69]=s=>Ce.value=s),type:"text",placeholder:"https://example.com/protocol",class:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-1.5 text-sm text-white placeholder-white/30 focus:outline-none focus:border-blue-500/50"},null,512),[[b,Ce.value]])]),e("label",f1,[m(e("input",{"onUpdate:modelValue":t[70]||(t[70]=s=>Vt.value=s),type:"checkbox",class:"rounded bg-black/30 border-white/20"},null,512),[[po,Vt.value]]),t[181]||(t[181]=k(" Published ",-1))]),e("button",{onClick:fl,disabled:Ze.value||!Ce.value.trim(),class:"glass-button glass-button-sm px-3 rounded-lg text-xs font-medium disabled:opacity-50 whitespace-nowrap"},o(Ze.value?"Registering...":"Register"),9,g1)])])):u("",!0),Ge.value.length?(n(),a("div",y1,[(n(!0),a(f,null,y(Ge.value,s=>(n(),a("div",{key:s.protocol,class:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-blue-500/15 border border-blue-500/20 text-xs text-blue-300 group"},[e("span",null,o(s.protocol),1),s.published?(n(),a("span",_1,"•")):u("",!0),e("button",{onClick:x=>gl(s.protocol),disabled:xs.value===s.protocol,class:"opacity-0 group-hover:opacity-100 text-red-400/60 hover:text-red-400 transition-all ml-1",title:"Remove"}," × ",8,k1)]))),128))])):(n(),a("div",C1,"No protocols registered"))]),R.value?.peer_sync_targets?.length?(n(),a("div",M1,[t[183]||(t[183]=e("div",{class:"text-xs text-white/50 mb-2"},"Peer Sync Targets",-1)),e("div",j1,[(n(!0),a(f,null,y(R.value.peer_sync_targets,s=>(n(),a("div",{key:s,class:"flex items-center gap-2 text-xs text-white/70 bg-white/5 rounded-lg px-3 py-2"},[t[182]||(t[182]=e("svg",{class:"w-3 h-3 text-green-400 flex-shrink-0",fill:"currentColor",viewBox:"0 0 24 24"},[e("circle",{cx:"12",cy:"12",r:"4"})],-1)),e("span",P1,o(s),1)]))),128))])])):u("",!0),e("div",D1,[e("div",T1,[t[184]||(t[184]=e("div",{class:"text-xs text-white/50"},"Messages",-1)),e("button",{onClick:yl,class:"text-xs text-blue-400 hover:text-blue-300 transition-colors"},o(Xe.value?"Hide":"Browse"),1)]),Xe.value?(n(),a("div",R1,[vs.value?(n(),a("div",B1,"Loading messages...")):$t.value.length===0?(n(),a("div",$1,"No messages stored")):(n(),a("div",V1,[(n(!0),a(f,null,y($t.value,s=>(n(),a("div",{key:s.record_id,class:"bg-white/5 rounded-lg p-3"},[e("div",S1,[e("span",{class:"text-xs font-mono text-white/50 truncate max-w-[200px]",title:s.record_id},o((s.record_id||"").slice(0,8))+"...",9,z1),e("span",A1,o(new Date(s.date_created).toLocaleString()),1)]),e("div",I1,[e("span",U1,o(s.author),1),s.descriptor.protocol?(n(),a("span",N1,o(s.descriptor.protocol),1)):u("",!0),s.descriptor.schema?(n(),a("span",L1,o(s.descriptor.schema),1)):u("",!0)]),s.data?(n(),a("div",H1,o(JSON.stringify(s.data).slice(0,120)),1)):u("",!0)]))),128))]))])):u("",!0)]),e("div",E1,[e("div",K1,o(R.value?.last_sync?`Last sync: ${new Date(R.value.last_sync).toLocaleString()}`:"Never synced"),1),e("button",{onClick:wl,disabled:Qe.value||!R.value?.running,class:"glass-button glass-button-sm px-3 rounded-lg text-sm font-medium flex items-center gap-2 disabled:opacity-50"},[(n(),a("svg",{class:h(["w-4 h-4",{"animate-spin":Qe.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[185]||(t[185]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2)),k(" "+o(Qe.value?r(i)("web5.syncing"):r(i)("web5.syncNow")),1)],8,F1)])],64)):u("",!0)]),e("div",W1,[e("div",O1,[e("div",q1,[t[186]||(t[186]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})])],-1)),e("div",null,[e("h2",J1,o(r(i)("web5.verifiableCredentials")),1),e("p",Q1,o(r(i)("web5.verifiableCredentialsDesc")),1)])]),kt(v,{to:"/dashboard/web5/credentials",class:"glass-button glass-button-sm px-3 rounded-lg text-sm font-medium flex items-center gap-2"},{default:ge(()=>[...t[187]||(t[187]=[k(" Manage → ",-1)])]),_:1})]),e("div",G1,[e("div",X1,[t[188]||(t[188]=e("div",{class:"flex-shrink-0 w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center"},[e("svg",{class:"w-5 h-5 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})])],-1)),e("h2",Y1,o(r(i)("web5.verifiableCredentials")),1)]),e("p",Z1,o(r(i)("web5.verifiableCredentialsDesc")),1),kt(v,{to:"/dashboard/web5/credentials",class:"w-full min-h-[44px] glass-button rounded-lg text-sm font-medium flex items-center justify-center gap-2"},{default:ge(()=>[...t[189]||(t[189]=[k(" Manage → ",-1)])]),_:1})]),e("div",ev,[e("div",tv,[t[190]||(t[190]=e("div",{class:"text-xs text-white/50 mb-1"},"Total",-1)),e("span",sv,o(Z.value.length),1)]),e("div",ov,[t[191]||(t[191]=e("div",{class:"text-xs text-white/50 mb-1"},"Active",-1)),e("span",lv,o(Z.value.filter(s=>s.status==="active").length),1)]),e("div",nv,[t[192]||(t[192]=e("div",{class:"text-xs text-white/50 mb-1"},"Identities",-1)),e("span",iv,o(we.value.length),1)])]),Z.value.length?(n(),a("div",av,[(n(!0),a(f,null,y(Z.value.slice(0,3),s=>(n(),a("div",{key:s.id,class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},[e("div",rv,[e("div",dv,o(s.type),1),e("div",uv,"To: "+o((s.subject||"").slice(0,30))+"...",1)]),e("span",{class:h([{"text-green-400":s.status==="active","text-red-400":s.status==="revoked","text-yellow-400":s.status==="expired"},"text-xs font-medium capitalize"])},o(s.status),3)]))),128)),Z.value.length>3?(n(),M(v,{key:0,to:"/dashboard/web5/credentials",class:"block text-center text-xs text-white/50 hover:text-white/70 py-2 transition-colors"},{default:ge(()=>[k(" View all "+o(Z.value.length)+" credentials → ",1)]),_:1})):u("",!0)])):(n(),a("div",cv,o(r(i)("web5.noCredentials")),1))]),(n(),M(V,{to:"body"},[Fe.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:t[76]||(t[76]=$(s=>Fe.value=!1,["self"])),onKeydown:t[77]||(t[77]=T(s=>Fe.value=!1,["escape"]))},[e("div",vv,[e("div",xv,[e("h2",hv,o(r(i)("web5.domainsTitle")),1),e("button",{onClick:t[71]||(t[71]=s=>Fe.value=!1),class:"text-white/40 hover:text-white/80 transition-colors"},[...t[193]||(t[193]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),X.value.length?(n(),a("div",mv,[(n(!0),a(f,null,y(X.value,s=>(n(),a("div",{key:s.id,class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},[e("div",null,[e("div",pv,o(s.nip05),1),e("div",bv,"DID: "+o(s.did),1)]),e("div",wv,[e("span",{class:h([{"text-green-400":s.status==="active","text-yellow-400":s.status==="pending","text-red-400":s.status==="expired"||s.status==="failed"},"text-xs font-medium capitalize"])},o(s.status),3),e("button",{onClick:x=>yo(s.id),class:"text-white/30 hover:text-red-400 transition-colors p-1"},[...t[194]||(t[194]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,fv)])]))),128))])):(n(),a("div",gv,o(r(i)("web5.noDomains")),1)),e("div",yv,[e("h3",_v,o(r(i)("web5.registerNewName")),1),e("div",kv,[e("div",null,[t[195]||(t[195]=e("label",{class:"text-white/60 text-xs block mb-1"},"Username",-1)),m(e("input",{"onUpdate:modelValue":t[72]||(t[72]=s=>ye.value=s),type:"text",placeholder:"satoshi",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,ye.value]])]),e("div",null,[t[196]||(t[196]=e("label",{class:"text-white/60 text-xs block mb-1"},"Domain",-1)),m(e("input",{"onUpdate:modelValue":t[73]||(t[73]=s=>_e.value=s),type:"text",placeholder:"example.com",class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,_e.value]])])]),e("div",Cv,[t[198]||(t[198]=e("label",{class:"text-white/60 text-xs block mb-1"},"Link to Identity",-1)),m(e("select",{"onUpdate:modelValue":t[74]||(t[74]=s=>de.value=s),class:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},[t[197]||(t[197]=e("option",{value:"",disabled:""},"Select identity...",-1)),(n(!0),a(f,null,y(we.value,s=>(n(),a("option",{key:s.id,value:s.id},o(s.name)+" ("+o((s.did||"").slice(0,24))+"...)",9,Mv))),128))],512),[[Ws,de.value]])]),We.value?(n(),a("div",jv,o(We.value),1)):u("",!0),e("button",{onClick:go,disabled:jt.value||!ye.value.trim()||!_e.value.trim()||!de.value,class:"w-full glass-button px-4 py-2 rounded-lg text-sm font-medium disabled:opacity-50"},o(jt.value?"Registering...":"Register Name"),9,Pv)]),e("div",Dv,[e("h3",Tv,o(r(i)("web5.verifyNip05")),1),e("div",Rv,[m(e("input",{"onUpdate:modelValue":t[75]||(t[75]=s=>Oe.value=s),type:"text",placeholder:"user@domain.com",class:"flex-1 bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30"},null,512),[[b,Oe.value]]),e("button",{onClick:_o,disabled:Pt.value||!Oe.value.trim(),class:"glass-button px-4 py-2 rounded-lg text-sm font-medium disabled:opacity-50"},o(Pt.value?"...":"Verify"),9,Bv)]),Y.value?(n(),a("div",$v,[e("div",Vv,[e("div",{class:h(["w-2 h-2 rounded-full",Y.value.verified?"bg-green-400":"bg-red-400"])},null,2),e("span",Sv,o(Y.value.verified?"Verified":"Not Found"),1)]),Y.value.nostr_pubkey?(n(),a("div",zv,"Pubkey: "+o(Y.value.nostr_pubkey),1)):u("",!0)])):u("",!0)])])],32)):u("",!0)])),(n(),M(V,{to:"body"},[je.value?(n(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md",onClick:t[80]||(t[80]=$(s=>je.value=!1,["self"])),onKeydown:t[81]||(t[81]=T(s=>je.value=!1,["escape"]))},[e("div",Av,[e("div",Iv,[e("h2",Uv,o(r(i)("web5.nostrRelays")),1),e("button",{onClick:t[78]||(t[78]=s=>je.value=!1),class:"text-white/40 hover:text-white/80 transition-colors"},[...t[199]||(t[199]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),It.value.length?(n(),a("div",Nv,[(n(!0),a(f,null,y(It.value,s=>(n(),a("div",{key:s.url,class:"flex items-center justify-between p-3 bg-white/5 rounded-lg"},[e("div",Lv,[e("div",{class:h(["w-2 h-2 rounded-full flex-shrink-0",s.connected?"bg-green-400":"bg-white/30"])},null,2),e("span",Hv,o(s.url),1)]),e("div",Ev,[e("button",{onClick:x=>Mo(s.url,!s.enabled),class:h(["text-xs px-2 py-1 rounded",s.enabled?"bg-green-500/20 text-green-400":"bg-white/5 text-white/40"])},o(s.enabled?"On":"Off"),11,Kv),e("button",{onClick:x=>Co(s.url),class:"text-white/30 hover:text-red-400 transition-colors p-1"},[...t[200]||(t[200]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Fv)])]))),128))])):(n(),a("div",Wv,o(r(i)("web5.noRelays")),1)),e("div",Ov,[e("h3",qv,o(r(i)("web5.addRelay")),1),e("div",Jv,[m(e("input",{"onUpdate:modelValue":t[79]||(t[79]=s=>Pe.value=s),type:"text",placeholder:r(i)("web5.relayUrlPlaceholder"),class:"flex-1 bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-white/30",onKeyup:T(Qs,["enter"])},null,40,Qv),[[b,Pe.value]]),e("button",{onClick:Qs,disabled:!Pe.value.trim(),class:"glass-button px-4 py-2 rounded-lg text-sm font-medium disabled:opacity-50"}," Add ",8,Gv)]),De.value?(n(),a("div",Xv,o(De.value),1)):u("",!0)])])],32)):u("",!0)])),kt(mo,{name:"content-fade"},{default:ge(()=>[Is.value?(n(),a("div",Yv,o(co.value),1)):u("",!0)]),_:1})])}}});export{ox as default};
|