UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

34 lines • 92.6 kB
import{a as w1,b as y1,c as T1,d as B1}from"./chunk-EO7FPNYX.js";import{a as U2}from"./chunk-FGIK2URP.js";import{a as Q2}from"./chunk-IZOMIYRD.js";import{a as G2}from"./chunk-PVS3PBYN.js";import{a as R2}from"./chunk-CQNLQN7A.js";import"./chunk-BN33DLGQ.js";import{a as k2,b as b2}from"./chunk-SQBBDTZO.js";import{a as z2}from"./chunk-N25P6SZB.js";import"./chunk-KLZILXP3.js";import{c as E2,d as D2,h as I2,i as W2,j as N2}from"./chunk-CYCQOADG.js";import"./chunk-DCOXSL4B.js";import"./chunk-IDORGLM3.js";import{a as T2,b as b1}from"./chunk-VQDF6UGR.js";import{a as t2,c as i2,d as o2,e as x1}from"./chunk-OTFMRDKW.js";import{a as B2,c as g1}from"./chunk-3QQZQR3D.js";import{a as A2,b as n2,c as _2,e as k1}from"./chunk-TEXSADK3.js";import{a as O1,b as q}from"./chunk-AN7C4JCR.js";import{c as F2,d as f1}from"./chunk-5ONGW7JF.js";import{a as p2,d as l2,e as x2,h as v2,i as Z2,j as Z1}from"./chunk-AN3YSLKY.js";import"./chunk-6J2GCUHA.js";import{b as c1,f as S1,g as s2,h as c2,i as S2,j as h2,k as O2,m as g2,v as h1,w as f2}from"./chunk-ICUC3WIE.js";import{a as P2}from"./chunk-YA4NX3C4.js";import{a as u2,b as u1,c as s1,d as r1,e as t1}from"./chunk-VMTBY4VN.js";import{a as w2,b as M1,c as e1}from"./chunk-HFDIHHHN.js";import{c as d2,g as m2}from"./chunk-7JNYLOAK.js";import{$a as G,Bb as n,Cb as f,Da as S,Db as B,Hb as I1,Ia as z,Ib as W1,Jb as N1,Jc as a2,Ld as V1,Nd as v1,Pd as L1,Qd as y2,Rd as K,Tb as n1,U as C1,Wa as A1,Xa as p,Y as a1,Ya as l,Zb as H1,_ as J1,_a as R1,ab as Q,ba as x,bb as c,ca as v,cb as e,db as i,eb as g,ja as Y1,jb as h,ka as l1,lb as d,na as X,nb as a,oa as C2,oc as U,qc as e2,ra as H2,rb as L2,sb as E1,tb as D1,tc as r2,wa as V2,x as X1,xa as o,xb as T,yb as M2,zb as O}from"./chunk-KQUCMSSK.js";import{a as a3}from"./chunk-SJB4WMV2.js";import"./chunk-FCVD6SGJ.js";import{g as o3,h as y}from"./chunk-O7S4L63H.js";var K2=[{path:"info",loadComponent:()=>import("./chunk-WIP3PJ2V.js").then(L=>L.InfoComponent)},{path:"settings",loadComponent:()=>import("./chunk-ZN7TBYTW.js").then(L=>L.SettingsComponent)},{path:"database",loadComponent:()=>import("./chunk-KWCT45LK.js").then(L=>L.DatabaseComponent),children:[{path:"statistics",loadComponent:()=>import("./chunk-46QNSBWA.js").then(L=>L.StatisticsComponent)},{path:"key/:key",loadComponent:()=>import("./chunk-JCXOPBVC.js").then(L=>L.DatabaseKeyComponent)},{path:"",redirectTo:"statistics",pathMatch:"full"}]},{path:"search",loadComponent:()=>import("./chunk-VWYREY65.js").then(L=>L.SearchComponent)},{path:"monitoring",loadComponent:()=>import("./chunk-HZ4O56U6.js").then(L=>L.MonitoringShellComponent),children:[{path:"",loadComponent:()=>import("./chunk-3LRS4KN7.js").then(L=>L.MonitoringComponent)},{path:"profiler",loadComponent:()=>import("./chunk-AAVYOQ4C.js").then(L=>L.ProfilerComponent)},{path:"pubsub",loadComponent:()=>import("./chunk-ZRPLFLHH.js").then(L=>L.PubsubComponent)},{path:"analysis",loadComponent:()=>import("./chunk-WHYH2KYH.js").then(L=>L.MemoryAnalysisComponent)}]},{path:"",redirectTo:"settings",pathMatch:"full"},{path:"**",redirectTo:"settings"}];var P1="p3xr-auth-token";function A3(){return""}var _1=(()=>{class L{authRequired=X(!1);isAuthenticated=X(!1);authChecked=X(!1);loginError=X("");apiBase=A3();checkAuthStatus(){return y(this,null,function*(){try{let H=yield(yield fetch(`${this.apiBase}/api/auth-status`)).json();if(this.authRequired.set(H.enabled),!H.enabled)this.isAuthenticated.set(!0);else{let V=this.getToken();if(V){let r=yield(yield fetch(`${this.apiBase}/api/verify-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:V})})).json();this.isAuthenticated.set(r.valid),r.valid||localStorage.removeItem(P1)}}}catch(C){this.isAuthenticated.set(!0)}this.authChecked.set(!0)})}login(C,H){return y(this,null,function*(){this.loginError.set("");try{let M=yield(yield fetch(`${this.apiBase}/api/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:C,password:H})})).json();return M.status==="ok"&&M.token?(localStorage.setItem(P1,M.token),this.isAuthenticated.set(!0),!0):(this.loginError.set(M.error||"login_failed"),!1)}catch(V){return this.loginError.set("network_error"),!1}})}getToken(){try{return localStorage.getItem(P1)}catch(C){return null}}logout(){try{localStorage.removeItem(P1)}catch(C){}location.reload()}static \u0275fac=function(H){return new(H||L)};static \u0275prov=C1({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();var q2="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z";var j2="M3,3H21V7H3V3M4,8H20V21H4V8M9.5,11A0.5,0.5 0 0,0 9,11.5V13H15V11.5A0.5,0.5 0 0,0 14.5,11H9.5Z";var $2="M22,3H7C6.31,3 5.77,3.35 5.41,3.88L0,12L5.41,20.11C5.77,20.64 6.31,21 7,21H22A2,2 0 0,0 24,19V5A2,2 0 0,0 22,3M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12";var X2="M19 2L14 6.5V17.5L19 13V2M6.5 5C4.55 5 2.45 5.4 1 6.5V21.16C1 21.41 1.25 21.66 1.5 21.66C1.6 21.66 1.65 21.59 1.75 21.59C3.1 20.94 5.05 20.5 6.5 20.5C8.45 20.5 10.55 20.9 12 22C13.35 21.15 15.8 20.5 17.5 20.5C19.15 20.5 20.85 20.81 22.25 21.56C22.35 21.61 22.4 21.59 22.5 21.59C22.75 21.59 23 21.34 23 21.09V6.5C22.4 6.05 21.75 5.75 21 5.5V19C19.9 18.65 18.7 18.5 17.5 18.5C15.8 18.5 13.35 19.15 12 20V6.5C10.55 5.4 8.45 5 6.5 5Z";var J2="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z";var z1="M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z";var Y2="M16,11.78L20.24,4.45L21.97,5.45L16.74,14.5L10.23,10.75L5.46,19H22V21H2V3H4V17.54L9.5,8L16,11.78Z";var C5="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z";var H5="M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z";var V5="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";var G1="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z";var L5="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z";var Q1="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";var M5="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z";var e5="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";var r5="M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M6,6V18H10V16H8V8H10V6H6M16,16H14V18H18V6H14V8H16V16Z";var t5="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z";var i5="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M5,5V7H19V5H5M5,9V11H13V9H5M5,13V15H15V13H5Z";var o5="M20,19V7H4V19H20M20,3A2,2 0 0,1 22,5V19A2,2 0 0,1 20,21H4A2,2 0 0,1 2,19V5C2,3.89 2.9,3 4,3H20M13,17V15H18V17H13M9.58,13L5.57,9H8.4L11.7,12.3C12.09,12.69 12.09,13.33 11.7,13.72L8.42,17H5.59L9.58,13Z";var a5="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z";var A5="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z";var n5="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z";var d5="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8.46,11.88L9.87,10.47L12,12.59L14.12,10.47L15.53,11.88L13.41,14L15.53,16.12L14.12,17.53L12,15.41L9.88,17.53L8.47,16.12L10.59,14L8.46,11.88M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z";var m5="M15,16H19V18H15V16M15,8H22V10H15V8M15,12H21V14H15V12M3,18A2,2 0 0,0 5,20H11A2,2 0 0,0 13,18V8H3V18M14,5H11L10,4H6L5,5H2V7H14V5Z";var p5="M7,9A2,2 0 0,1 5,7A2,2 0 0,1 7,5A2,2 0 0,1 9,7A2,2 0 0,1 7,9M20,3H4A1,1 0 0,0 3,4V10A1,1 0 0,0 4,11H20A1,1 0 0,0 21,10V4A1,1 0 0,0 20,3M7,19A2,2 0 0,1 5,17A2,2 0 0,1 7,15A2,2 0 0,1 9,17A2,2 0 0,1 7,19M20,13H4A1,1 0 0,0 3,14V20A1,1 0 0,0 4,21H20A1,1 0 0,0 21,20V14A1,1 0 0,0 20,13Z";var U1="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z";var l5="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z";var x5="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";var v5="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z";var Z5="M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z";var u5="M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z";var s5="M10,13H22V11H10M10,19H22V17H10M10,7H22V5H10M6,7H8.5L5,3.5L1.5,7H4V17H1.5L5,20.5L8.5,17H6V7Z";var c5="M17,12V3A1,1 0 0,0 16,2H3A1,1 0 0,0 2,3V17L6,13H16A1,1 0 0,0 17,12M21,6H19V15H6V17A1,1 0 0,0 7,18H18L22,22V7A1,1 0 0,0 21,6Z";var S5="M19.5 17C19.37 17 19.24 17 19.11 17.04L17.5 13.79C17.95 13.34 18.25 12.71 18.25 12C18.25 10.62 17.13 9.5 15.75 9.5C15.62 9.5 15.5 9.5 15.36 9.54L13.73 6.29C14.21 5.84 14.5 5.21 14.5 4.5C14.5 3.12 13.38 2 12 2S9.5 3.12 9.5 4.5C9.5 5.21 9.79 5.84 10.26 6.29L8.64 9.54C8.5 9.5 8.38 9.5 8.25 9.5C6.87 9.5 5.75 10.62 5.75 12C5.75 12.71 6.05 13.34 6.5 13.79L4.89 17.04C4.76 17 4.63 17 4.5 17C3.12 17 2 18.12 2 19.5C2 20.88 3.12 22 4.5 22S7 20.88 7 19.5C7 18.8 6.71 18.16 6.24 17.71L7.86 14.46C8 14.5 8.12 14.5 8.25 14.5C8.38 14.5 8.5 14.5 8.64 14.46L10.27 17.71C9.8 18.16 9.5 18.8 9.5 19.5C9.5 20.88 10.62 22 12 22S14.5 20.88 14.5 19.5C14.5 18.12 13.38 17 12 17C11.87 17 11.74 17 11.61 17.04L10 13.79C10.46 13.34 10.75 12.71 10.75 12S10.46 10.66 10 10.21L11.61 6.96C11.74 7 11.87 7 12 7S12.26 7 12.39 6.96L14 10.21C13.55 10.66 13.25 11.3 13.25 12C13.25 13.38 14.37 14.5 15.75 14.5C15.88 14.5 16 14.5 16.14 14.46L17.77 17.71C17.3 18.16 17 18.8 17 19.5C17 20.88 18.12 22 19.5 22S22 20.88 22 19.5C22 18.12 20.88 17 19.5 17Z";var h5="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z";var O5="M7.5,4A5.5,5.5 0 0,0 2,9.5C2,10 2.09,10.5 2.22,11H6.3L7.57,7.63C7.87,6.83 9.05,6.75 9.43,7.63L11.5,13L12.09,11.58C12.22,11.25 12.57,11 13,11H21.78C21.91,10.5 22,10 22,9.5A5.5,5.5 0 0,0 16.5,4C14.64,4 13,4.93 12,6.34C11,4.93 9.36,4 7.5,4V4M3,12.5A1,1 0 0,0 2,13.5A1,1 0 0,0 3,14.5H5.44L11,20C12,20.9 12,20.9 13,20L18.56,14.5H21A1,1 0 0,0 22,13.5A1,1 0 0,0 21,12.5H13.4L12.47,14.8C12.07,15.81 10.92,15.67 10.55,14.83L8.5,9.5L7.54,11.83C7.39,12.21 7.05,12.5 6.6,12.5H3Z";var g5="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z";var f5="M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";var k5="M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z";var b5="M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z";var w5="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";var y5="M19,13H5V11H19V13Z";var T5="M14,10H19.5L14,4.5V10M5,3H15L21,9V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3M5,12V14H19V12H5M5,16V18H14V16H5Z";var B5="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z";var P5="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z";var _5="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",F5="M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";var R5="M5.41,21L6.12,17H2.12L2.47,15H6.47L7.53,9H3.53L3.88,7H7.88L8.59,3H10.59L9.88,7H15.88L16.59,3H18.59L17.88,7H21.88L21.53,9H17.53L16.47,15H20.47L20.12,17H16.12L15.41,21H13.41L14.12,17H8.12L7.41,21H5.41M9.53,9L8.47,15H14.47L15.53,9H9.53Z";var E5="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13";var D5="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";var I5="M16,18H18V6H16M6,18L14.5,12L6,6V18Z";var W5="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z";var N5="M9,3L5,7H8V14H10V7H13M16,17V10H14V17H11L15,21L19,17H16Z";var z5="M19.03 7.39L20.45 5.97C20 5.46 19.55 5 19.04 4.56L17.62 6C16.07 4.74 14.12 4 12 4C7.03 4 3 8.03 3 13S7.03 22 12 22C17 22 21 17.97 21 13C21 10.88 20.26 8.93 19.03 7.39M13 14H11V7H13V14M15 1H9V3H15V1Z";var G5="M6,2H18V8H18V8L14,12L18,16V16H18V22H6V16H6V16L10,12L6,8V8H6V2M16,16.5L12,12.5L8,16.5V20H16V16.5M12,11.5L16,7.5V4H8V7.5L12,11.5M10,6H14V6.75L12,8.75L10,6.75V6Z";var Q5="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z";var U5="M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z";var K5="M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z";var K1="M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z";var q5="M21,5H3V7H21V5M3,19H10V17H3V19M3,13H18C19,13 20,13.43 20,15C20,16.57 19,17 18,17H16V15L12,18L16,21V19H18C20.95,19 22,17.73 22,15C22,12.28 21,11 18,11H3V13Z";var n3={account_tree:Z5,add:_5,add_box:F5,analytics:z1,archive:j2,auto_graph:S5,backspace:$2,bar_chart:z1,cancel:J2,check_box:V5,check_box_outline_blank:H5,chevron_right:Q1,close:e5,color_lens:B5,content_copy:a5,data_array:r5,delete:n5,delete_forever:d5,delete_sweep:m5,description:v5,difference:N5,done:C5,download:U1,edit:P5,expand_more:G1,favorite:h5,file_download:U1,file_upload:K1,fingerprint:u5,format_line_spacing:s5,forum:c5,hourglass_empty:G5,image:g5,info:f5,keyboard_arrow_down:G1,keyboard_arrow_left:L5,keyboard_arrow_right:Q1,keyboard_arrow_up:M5,login:k5,logout:b5,menu_book:X2,mode_comment:i5,monitor_heart:O5,notes:T5,numbers:R5,person:q2,power:E5,refresh:D5,remove:y5,save:A5,search:w5,settings:t5,show_chart:Y2,skip_next:I5,skip_previous:W5,storage:p5,terminal:o5,timer:z5,undo:Q5,unfold_less:U5,unfold_more:K5,upload:K1,visibility:l5,visibility_off:x5,wrap_text:q5},j5=(()=>{class L{iconRegistry;sanitizer;constructor(C,H){this.iconRegistry=C,this.sanitizer=H}registerAll(){for(let[C,H]of Object.entries(n3)){let V=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="${H}" fill="currentColor"/></svg>`;this.iconRegistry.addSvgIconLiteral(C,this.sanitizer.bypassSecurityTrustHtml(V))}}static \u0275fac=function(H){return new(H||L)(a1(w2),a1(r2))};static \u0275prov=C1({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();function p3(L,t){if(L&1&&(e(0,"div",18),n(1),i()),L&2){let C=a();o(),B(" ",C.getErrorMessage(C.auth.loginError())," ")}}var J5=(()=>{class L{i18n;auth;username="";password="";loading=!1;hidePassword=!0;currentGui="ng";constructor(C,H){this.i18n=C,this.auth=H;try{this.currentGui=localStorage.getItem("p3xr-frontend")||"ng"}catch(V){}}onLogin(){return y(this,null,function*(){if(this.loading||!this.username||!this.password)return;this.loading=!0,(yield this.auth.login(this.username,this.password))&&location.reload(),this.loading=!1})}switchGui(C){this.currentGui=C,Q2(C)}getErrorMessage(C){return this.i18n.strings()?.confirm?.invalidCredentials}static \u0275fac=function(H){return new(H||L)(S(K),S(_1))};static \u0275cmp=z({type:L,selectors:[["p3xr-login"]],decls:42,vars:16,consts:[["guiMenu",""],[1,"p3xr-login-dialog-wrapper"],[1,"p3xr-login-dialog"],["novalidate","",3,"ngSubmit"],[1,"p3xr-dialog-toolbar","p3xr-mat-layout-strong"],[1,"p3xr-layout-spacer"],["mat-button","","type","button",2,"color","rgba(255,255,255,0.87)",3,"matMenuTriggerFor"],[2,"margin-right","4px"],["mat-menu-item","",3,"click"],[1,"fab","fa-angular",2,"font-size","18px","width","24px","text-align","center","margin-right","8px","color","#dd0031"],[1,"fab","fa-react",2,"font-size","18px","width","24px","text-align","center","margin-right","8px","color","#61dafb"],[1,"fab","fa-vuejs",2,"font-size","18px","width","24px","text-align","center","margin-right","8px","color","#42b883"],[1,"p3xr-dialog-content"],[1,"full-width"],["matPrefix",""],["matInput","","name","username","type","text","autocomplete","username",3,"ngModelChange","ngModel"],["matInput","","name","password","autocomplete","current-password",3,"ngModelChange","keydown.enter","type","ngModel"],["mat-icon-button","","matSuffix","","type","button",3,"click"],[1,"p3xr-login-error"],[1,"p3xr-dialog-actions",2,"display","flex","justify-content","flex-end","padding","8px","gap","8px"],["mat-raised-button","","type","submit",1,"btn-primary",3,"disabled"]],template:function(H,V){if(H&1){let M=h();e(0,"div",1)(1,"div",2)(2,"form",3),d("ngSubmit",function(){return V.onLogin()}),e(3,"mat-toolbar",4),g(4,"span",5),e(5,"button",6)(6,"mat-icon",7),n(7,"desktop_windows"),i(),n(8," GUI "),i(),e(9,"mat-menu",null,0)(11,"button",8),d("click",function(){return V.switchGui("ng")}),g(12,"i",9),n(13," Angular "),i(),e(14,"button",8),d("click",function(){return V.switchGui("react")}),g(15,"i",10),n(16," React "),i(),e(17,"button",8),d("click",function(){return V.switchGui("vue")}),g(18,"i",11),n(19," Vue "),i()()(),e(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),n(23),i(),e(24,"mat-icon",14),n(25,"person"),i(),e(26,"input",15),N1("ngModelChange",function(A){return x(M),W1(V.username,A)||(V.username=A),v(A)}),i()(),e(27,"mat-form-field",13)(28,"mat-label"),n(29),i(),e(30,"mat-icon",14),n(31,"lock"),i(),e(32,"input",16),N1("ngModelChange",function(A){return x(M),W1(V.password,A)||(V.password=A),v(A)}),d("keydown.enter",function(){return V.onLogin()}),i(),e(33,"button",17),d("click",function(){return V.hidePassword=!V.hidePassword}),e(34,"mat-icon"),n(35),i()()(),p(36,p3,2,1,"div",18),i(),e(37,"div",19)(38,"button",20)(39,"mat-icon"),n(40,"login"),i(),n(41),i()()()()()}if(H&2){let M,r,A,Z=T(10);o(5),c("matMenuTriggerFor",Z),o(6),O("p3xr-mat-menu-item-selected",V.currentGui==="ng"),o(3),O("p3xr-mat-menu-item-selected",V.currentGui==="react"),o(3),O("p3xr-mat-menu-item-selected",V.currentGui==="vue"),o(6),f((M=V.i18n.strings().form)==null||M.connection==null||M.connection.label==null?null:M.connection.label.username),o(3),I1("ngModel",V.username),o(3),f((r=V.i18n.strings().form)==null||r.connection==null||r.connection.label==null?null:r.connection.label.password),o(3),c("type",V.hidePassword?"password":"text"),I1("ngModel",V.password),o(3),f(V.hidePassword?"visibility_off":"visibility"),o(),l(V.auth.loginError()?36:-1),o(2),c("disabled",V.loading||!V.username||!V.password),o(3),B(" ",(A=V.i18n.strings().intention)==null?null:A.ok," ")}},dependencies:[U,h1,O2,c1,S1,s2,h2,c2,Z1,Z2,p2,l2,x2,f1,F2,L1,v1,V1,e1,M1,t1,r1,B1,y1,w1,T1],styles:[".p3xr-login-dialog-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 96px)}.p3xr-login-dialog[_ngcontent-%COMP%]{width:400px;max-width:calc(100vw - 32px);border-radius:4px;overflow:hidden;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.full-width[_ngcontent-%COMP%]{width:100%}.p3xr-login-error[_ngcontent-%COMP%]{color:#f44336;font-size:13px;margin:4px 0 8px}.p3xr-layout-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"],changeDetection:0})}return L})();var Y5=(()=>{class L{dialog;constructor(C){this.dialog=C}show(){return y(this,null,function*(){let{AiCheatsheetDialogComponent:C}=yield import("./chunk-M2SA53SH.js"),H=this.dialog.open(C,P2({width:"720px",maxWidth:"95vw",maxHeight:"90vh"}));return new Promise(V=>{H.afterClosed().subscribe(M=>V(M))})})}static \u0275fac=function(H){return new(H||L)(a1(d2))};static \u0275prov=C1({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();var P=o3(a3());var x3=(L,t)=>t.group,v3=(L,t)=>t.name;function Z3(L,t){if(L&1){let C=h();e(0,"span",22),d("click",function(){x(C);let V=a(2);return v(V.aiAutoDetect=!V.aiAutoDetect)}),e(1,"span",23),n(2),i(),e(3,"span"),n(4,"Auto AI"),i()()}if(L&2){let C=a(2);o(2),f(C.aiAutoDetect?"check_box":"check_box_outline_blank")}}function u3(L,t){if(L&1){let C=h();e(0,"span",15),n(1,"terminal"),i(),e(2,"span",16),n(3),i(),g(4,"span",17),e(5,"span",18),p(6,Z3,5,1,"span",19),e(7,"p3xr-ng-button",20),d("click",function(V){x(C);let M=a();return v(M.openCommands(V))}),i(),e(8,"p3xr-ng-button",21),d("click",function(){x(C);let V=a();return v(V.clearConsole())}),i()()}if(L&2){let C,H,V,M=a();o(3),f((C=M.strings().label)==null?null:C.console),o(3),l(M.isAiGloballyEnabled()?6:-1),o(),c("label",(H=M.strings().label)==null?null:H.redisCommandsReference),o(),c("label",(V=M.strings().intention)==null?null:V.clear)}}function s3(L,t){if(L&1){let C=h();e(0,"span",22),d("click",function(){x(C);let V=a(2);return v(V.aiAutoDetect=!V.aiAutoDetect)}),e(1,"span",23),n(2),i(),e(3,"span"),n(4,"Auto AI"),i()()}if(L&2){let C=a(2);o(2),f(C.aiAutoDetect?"check_box":"check_box_outline_blank")}}function c3(L,t){if(L&1){let C=h();e(0,"p3xr-ng-button",26),d("click",function(){x(C);let V=a(2);return v(V.closeConsole())}),i()}if(L&2){let C,H=a(2);c("label",(C=H.strings().intention)==null?null:C.close)}}function S3(L,t){if(L&1){let C=h();e(0,"button",27),d("click",function(){x(C);let V=a(2);return v(V.requestClose())}),e(1,"mat-icon"),n(2,"keyboard_arrow_down"),i()()}if(L&2){let C,H,V=a(2);c("matTooltip",((C=V.strings().label)==null||C.consoleDrawer==null?null:C.consoleDrawer.closeTooltip)??((C=V.strings().intention)==null?null:C.close)??""),A1("aria-label",((H=V.strings().label)==null||H.consoleDrawer==null?null:H.consoleDrawer.closeTooltip)??((H=V.strings().intention)==null?null:H.close)??"")}}function h3(L,t){if(L&1){let C=h();e(0,"span",15),n(1,"terminal"),i(),e(2,"span",16),n(3),i(),g(4,"span",17),e(5,"span",18),p(6,s3,5,1,"span",19),e(7,"p3xr-ng-button",20),d("click",function(V){x(C);let M=a();return v(M.openCommands(V))}),i(),e(8,"p3xr-ng-button",21),d("click",function(){x(C);let V=a();return v(V.clearConsole())}),i(),p(9,c3,1,1,"p3xr-ng-button",24),p(10,S3,3,2,"button",25),i()}if(L&2){let C,H,V,M=a();o(3),f(M.embedded?(C=M.strings().label)==null?null:C.console:(C=M.strings().intention)==null?null:C.quickConsole),o(3),l(M.isAiGloballyEnabled()?6:-1),o(),c("label",(H=M.strings().label)==null?null:H.redisCommandsReference),o(),c("label",(V=M.strings().intention)==null?null:V.clear),o(),l(M.embedded?-1:9),o(),l(M.showCloseButton?10:-1)}}function O3(L,t){if(L&1){let C=h();e(0,"div",28),d("mousedown",function(){x(C);let V=a();return v(V.dragStart())})("mouseup",function(){x(C);let V=a();return v(V.dragEnd())}),i()}}function g3(L,t){L&1&&g(0,"div",8)}function f3(L,t){if(L&1&&(e(0,"div",10),n(1),i()),L&2){let C=a();o(),f(C.currentHint)}}function k3(L,t){if(L&1){let C=h();e(0,"button",29),d("click",function(){x(C);let V=a();return v(V.stopAi())}),e(1,"mat-icon"),n(2,"stop_circle"),i()()}if(L&2){let C,H=a();c("matTooltip",(C=H.strings().intention)==null?null:C.cancel)}}function b3(L,t){if(L&1&&(e(0,"span",32),n(1),i()),L&2){let C=a().$implicit;o(),f(C.syntax)}}function w3(L,t){if(L&1&&(e(0,"mat-option",30)(1,"span",31),n(2),i(),p(3,b3,2,1,"span",32),i()),L&2){let C=t.$implicit;c("value",C.name),o(2),f(C.name),o(),l(C.syntax?3:-1)}}function y3(L,t){if(L&1&&(e(0,"mat-optgroup",14),G(1,w3,4,3,"mat-option",30,v3),i()),L&2){let C=t.$implicit;c("label",C.group),o(),Q(C.commands)}}var j1="p3xr-console-output-v1",$1=10*1024*1024,_=-1,C3=(()=>{class L{ngZone;elementRef;i18n;common;socket;redisParser;cmd;state;cheatsheet;cdr;type="";embedded=!1;showCloseButton=!1;closeRequest=new Y1;requestClose(){this.closeRequest.emit()}searchText="";searchControl=new S2("");filteredCommands=[];currentHint="";aiLoading=!1;aiRequestSeq=0;get aiAutoDetect(){try{return localStorage.getItem("p3xr-ai-auto-detect")!=="false"}catch(C){return!0}}set aiAutoDetect(C){try{localStorage.setItem("p3xr-ai-auto-detect",String(C))}catch(H){}}strings;contentClicked=!1;unsubs=[];index=0;singleLineHeight=0;aiCommandPending=!1;containerEl=null;headerEl=null;footerEl=null;consoleHeaderEl=null;outputEl=null;autocompleteEl=null;inputEl=null;scrollers=null;persistOutputDebounced;inputFocusHandler;inputResizeHandler;inputBlurHandler;resizeFn;constructor(C,H,V,M,r,A,Z,s,u,m){this.ngZone=C,this.elementRef=H,this.i18n=V,this.common=M,this.socket=r,this.redisParser=A,this.cmd=Z,this.state=s,this.cheatsheet=u,this.cdr=m,this.strings=this.i18n.strings}ngOnInit(){this.searchControl.valueChanges.subscribe(C=>{this.searchText=C||"",this.autoResizeTextarea();let H=this.state.commands(),V=this.state.commandsMeta(),M=(C||"").trim().split(/\s+/)[0]?.toUpperCase();if(M&&V[M]?.syntax?this.currentHint=M+" "+V[M].syntax:this.currentHint="",C&&C.length>0&&H?.length>0){let r=C.toUpperCase(),A=H.filter(s=>s.toUpperCase().includes(r)).slice(0,20),Z=new Map;for(let s of A){let u=V[s.toUpperCase()],m=u?.group||"Other",b=u?.syntax||"";Z.has(m)||Z.set(m,[]),Z.get(m).push({name:s,syntax:b})}this.filteredCommands=Array.from(Z.entries()).map(([s,u])=>({group:s,commands:u}))}else this.filteredCommands=[]})}ngAfterViewInit(){this.ngZone.runOutsideAngular(()=>this.initJQuery())}ngOnDestroy(){this.elementRef.nativeElement.classList.remove("p3xr-console-embedded-collapsed"),this.persistOutputDebounced?.flush?this.persistOutputDebounced.flush():this.persistConsoleOutputNow(),this.inputEl&&(this.inputFocusHandler&&this.inputEl.removeEventListener("focus",this.inputFocusHandler),this.inputBlurHandler&&this.inputEl.removeEventListener("blur",this.inputBlurHandler),this.inputResizeHandler&&(this.inputEl.removeEventListener("focus",this.inputResizeHandler),this.inputEl.removeEventListener("blur",this.inputResizeHandler))),window.removeEventListener("resize",this.resizeFn),this.unsubs.forEach(C=>C())}emitToAngularJS(C,H){switch(C){case"p3xr-console-activate":this.cmd.consoleActivate$.next();break;case"p3xr-console-deactivate":this.cmd.consoleDeactivate$.next();break;case"p3xr-console-embedded-resize":this.cmd.consoleEmbeddedResize$.next();break;default:break}}isAiGloballyEnabled(){return this.state.cfg()?.aiEnabled!==!1}activate(){this.embedded&&(this.emitToAngularJS("p3xr-console-activate"),this.forceScrollToBottom())}onContentMouseDown(C){this.contentClicked=!0,setTimeout(()=>{this.contentClicked=!1},500)}aiExecuting=!1;actionEnter(){return y(this,null,function*(){let C=(this.searchText||"").trim();if(C&&!this.aiLoading)try{let H=C.split(`
`).map(r=>r.trim()).filter(r=>r.length>0);if(H.length===0)return;let V=H[0].split(/\s+/)[0].toUpperCase();if(H.length===1||V==="EVAL"||V==="EVALSHA")yield this.executeSingleLine(C);else for(let r of H)yield this.executeSingleLine(r)}finally{this.updateCommandHistory(C),this.currentHint="",this.aiCommandPending?this.aiCommandPending=!1:(this.searchText="",this.searchControl.setValue(""),setTimeout(()=>this.autoResizeTextarea(),0)),this.forceScrollToBottom(),(this.type==="quick"||this.embedded)&&this.cmd.refresh({withoutParent:!0}),this.inputEl?.focus()}})}executeSingleLine(C){return y(this,null,function*(){let H=C.trim();if(H){if(this.state.cfg()?.aiEnabled!==!1&&/^ai:\s*/i.test(H)){let V=H.replace(/^ai:\s*/i,"").trim();V&&(yield this.handleAiQuery(V,H));return}try{let V=yield this.socket.request({action:"redis/console",payload:{command:H}}),M=(0,P.htmlEncode)(String(this.redisParser.consoleParse(V.result)));this.aiExecuting?M.replace(/&nbsp;/g,"").trim().length>0&&this.outputEl&&(this.outputEl.insertAdjacentHTML("beforeend",`<span data-index="${this.index++}" class="p3xr-console-ai-result"><pre>${M}</pre><br/></span>`),this.persistOutputDebounced?.()):this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong><br/><pre>${M}</pre>`),V.hasOwnProperty("database")&&(this.state.currentDatabase.set(V.database),this.state.redisChanged.set(!0),this.socket.stateChanged$.next())}catch(V){console.error(V);let M=V.message||"";if(this.state.cfg()?.aiEnabled!==!1&&this.aiAutoDetect&&this.looksLikeNaturalLanguage(H,M)){if(yield this.handleAiQuery(H,H))return;this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong><br/><pre style="color: var(--p3xr-btn-warn-bg);">${this.i18n.strings().code?.[M]||M}</pre>`);return}this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong><br/><pre style="color: var(--p3xr-btn-warn-bg);">${this.i18n.strings().code?.[M]||M}</pre>`)}}})}looksLikeNaturalLanguage(C,H){if(!/unknown command|wrong number of arguments|ERR unknown|not_connected/i.test(H))return!1;let M=C.trim().split(/\s+/)[0].toUpperCase();return!this.state.commands()?.includes(M)}handleAiQuery(C,H){return y(this,null,function*(){if(C.length>4096)return this.common.toast(this.i18n.strings()?.error?.aiPromptTooLong),!1;let V=++this.aiRequestSeq;this.aiLoading=!0,this.cdr.markForCheck(),this.inputEl?.focus();try{let M=[];try{M=(yield this.socket.request({action:"search/list",payload:{}})).data||[]}catch(k){}let r=this.state.info()||{},A=r.server||{},Z=r.clients||{},s=r.memory||{},u=r.keyspace||{},m={indexes:M};A.redis_version&&(m.redisVersion=A.redis_version),A.redis_mode&&(m.redisMode=A.redis_mode),A.os&&(m.os=A.os),Z.connected_clients&&(m.connectedClients=Z.connected_clients),s.used_memory_human&&(m.usedMemory=s.used_memory_human);let b=Object.keys(u).filter(k=>/^db\d+$/.test(k));b.length>0&&(m.databases=b.map(k=>`${k}: ${u[k]}`)),this.state.modules()?.length>0&&(m.modules=this.state.modules()),m.uiLanguage=this.i18n.currentLang(),m.connectionState=this.state.connectionState(),m.currentPage=this.state.currentPage();let E=this.state.connection();E?.name&&(m.connectionName=E.name);let j=this.state.currentDatabase();j!==void 0&&(m.currentDatabase=j);let D=yield this.socket.request({action:"ai/redis-query",payload:{prompt:C,context:m}});if(V!==this.aiRequestSeq)return!1;let F=D.command||"",R=D.explanation||"",I=Array.isArray(D.toolTrail)?D.toolTrail:[];this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong>`),this.updateCommandHistory(H);for(let k of I){let m1=k.args&&Object.keys(k.args).length?"("+Object.entries(k.args).map(([Y,w])=>`${Y}=${JSON.stringify(w)}`).join(", ")+")":"()",p1=`<span style="opacity: 0.85;"><strong>tool:</strong> <code>${(0,P.htmlEncode)(k.name+m1)}</code> <span style="opacity: 0.6;">${k.ms??0}ms</span></span>`;if(k.ok){let Y=String(k.result??"").split(`
`).slice(0,12).join(`
`);this.outputAppend(`${p1}<br/><pre style="opacity: 0.85; margin: 2px 0 6px 0;">${(0,P.htmlEncode)(Y)}</pre>`)}else this.outputAppend(`${p1}<br/><span style="color: var(--p3xr-btn-warn-bg);">${(0,P.htmlEncode)(k.error||"tool error")}</span>`)}let J=I.length>0;if(F){let k=`<strong style="color: var(--p3xr-btn-primary-bg);">AI &rarr;</strong> <code>${(0,P.htmlEncode)(F)}</code>`;R&&(k+=`<pre>${(0,P.htmlEncode)(R)}</pre>`),this.outputAppend(k),J||(this.searchText=F,this.searchControl.setValue(F,{emitEvent:!1}),this.filteredCommands=[],this.aiCommandPending=!0,setTimeout(()=>this.autoResizeTextarea(),0))}else R&&this.outputAppend(`<pre>${(0,P.htmlEncode)(R)}</pre>`);return!0}catch(M){if(V!==this.aiRequestSeq)return!1;console.error("ai-redis-query failed",M);let r=M.message||String(M);return this.outputAppend(`<span style="color: var(--p3xr-btn-warn-bg);">AI error: ${(0,P.htmlEncode)(r)}</span>`),r.includes("429")||r.includes("rate_limit")||r.includes("Rate limit")?this.common.toast(this.i18n.strings().page?.key?.label?.aiRateLimited):this.common.toast(this.i18n.strings().page?.key?.label?.aiError+": "+r),!1}finally{V===this.aiRequestSeq&&(this.aiLoading=!1,this.cdr.markForCheck(),this.forceScrollToBottom(),this.inputEl?.focus())}})}stopAi(){this.aiRequestSeq++,this.aiLoading=!1,this.searchText="",this.searchControl.setValue("",{emitEvent:!1}),this.filteredCommands=[],this.cdr.markForCheck(),setTimeout(()=>{this.autoResizeTextarea(),this.inputEl?.focus()},0)}onKeyDown(C){if(C.key==="Enter"){if(C.shiftKey){setTimeout(()=>this.autoResizeTextarea(),0);return}C.preventDefault(),this.actionEnter();return}if(this.filteredCommands.length>0&&(C.key==="ArrowDown"||C.key==="ArrowUp"))return;if(C.key!=="ArrowUp"&&C.key!=="ArrowDown"){_=-1;return}if(!C.shiftKey)return;let H=this.getActionHistory();if(H.length<1)return;C.preventDefault(),C.stopPropagation(),C.key==="ArrowDown"?(_===-1&&(_=H.length),_--,_<0&&(_=H.length-1)):(_++,_>=H.length&&(_=0));let V=H[_]??"";this.searchText=V,this.searchControl.setValue(V,{emitEvent:!1}),setTimeout(()=>{let M=this.inputEl;M&&(M.blur(),M.focus()),this.autoResizeTextarea()},0)}onAutocompleteSelected(C){this.searchText=C.option.value}clearConsole(){if(!this.outputEl)return;this.outputEl.innerHTML="";let C=this.i18n.strings();this.outputAppend("<strong>"+(C?.label?.welcomeConsole??"Welcome to the Redis Console")+"</strong>"),this.outputAppend((C?.label?.welcomeConsoleInfo??"SHIFT + Cursor UP or DOWN history is enabled")+"<br/>"),this.persistConsoleOutputNow(),this.forceScrollToBottom(),this.inputEl?.focus()}openCommands(C){return y(this,null,function*(){let H=yield this.cheatsheet.show();H&&(this.searchText=H,this.searchControl.setValue(H,{emitEvent:!1}),setTimeout(()=>{this.inputEl?.focus(),this.autoResizeTextarea()},0))})}closeConsole(){this.emitToAngularJS("p3xr-quick-console-quit")}dragStart(){this.embedded||this.emitToAngularJS("p3xr-quick-console",{start:!0})}dragEnd(){this.embedded||this.emitToAngularJS("p3xr-quick-console",{start:!1})}initJQuery(){let C=this.elementRef.nativeElement;this.containerEl=C.querySelector("#p3xr-console-content"),this.headerEl=document.getElementById("p3xr-layout-header-container"),this.footerEl=document.getElementById("p3xr-layout-footer-container"),this.consoleHeaderEl=C.querySelector("#p3xr-console-header"),this.outputEl=C.querySelector("#p3xr-console-content-output"),this.autocompleteEl=C.querySelector("#p3xr-console-autocomplete"),this.scrollers=this.containerEl,this.resizeFn=()=>this.rawResize(),window.addEventListener("resize",this.resizeFn),this.rawResize(),this.persistOutputDebounced=y2(()=>this.persistConsoleOutputNow(),100);let H=this.cmd.consoleEmbeddedResize$.subscribe(()=>{this.embedded&&this.rawResize()});this.unsubs.push(()=>H.unsubscribe()),setTimeout(()=>{this.inputEl=C.querySelector("#p3xr-console-input"),this.setInputTheme(),this.restoreConsoleOutput()?this.forceScrollToBottom():this.clearConsole(),this.rawResize(),this.inputEl?.addEventListener("paste",()=>{setTimeout(()=>this.autoResizeTextarea(),0)}),this.inputResizeHandler=()=>setTimeout(()=>this.autoResizeTextarea(),0),this.inputEl?.addEventListener("focus",this.inputResizeHandler),this.inputEl?.addEventListener("blur",this.inputResizeHandler),this.embedded&&(this.inputFocusHandler=()=>{this.emitToAngularJS("p3xr-console-activate")},this.inputBlurHandler=()=>{setTimeout(()=>{if(this.contentClicked)return;let V=document.activeElement;if(V?.id==="p3xr-console-input")return;let M=this.elementRef.nativeElement;if(M&&V&&M.contains(V))return;let r=window.getSelection();if(r&&r.toString().length>0){let A=r.getRangeAt?.(0);if(A&&M?.contains(A.commonAncestorContainer))return}this.emitToAngularJS("p3xr-console-deactivate")},0)},this.inputEl?.addEventListener("focus",this.inputFocusHandler),this.inputEl?.addEventListener("blur",this.inputBlurHandler))})}setInputTheme(){this.inputEl&&(this.inputEl.style.borderColor="var(--p3xr-input-border-color, var(--p3xr-border-color))",this.inputEl.style.backgroundColor="var(--p3xr-input-bg)",this.inputEl.style.color="var(--p3xr-input-color)")}rawResize(){if(!this.containerEl)return;if(this.embedded){let r=this.elementRef.nativeElement,Z=r?.getBoundingClientRect()?.height||Math.floor(window.innerHeight*.33),s=this.consoleHeaderEl?.offsetHeight||0,u=this.autocompleteEl?.offsetHeight||44,m=Z<=120;r.classList.toggle("p3xr-console-embedded-collapsed",m);let b=m?0:Math.max(Z-s-u,0);this.containerEl.style.height=b+"px",this.containerEl.style.maxHeight=b+"px",this.containerEl.style.overflow=m?"hidden":"auto",this.containerEl.style.display=m?"none":"block",this.outputEl&&(this.outputEl.style.display=m?"none":"block");return}let C=this.containerEl.getBoundingClientRect().top,H=this.footerEl?.getBoundingClientRect().top??window.innerHeight,V=this.autocompleteEl?.offsetHeight||28,M=Math.max(H-C-V,0);this.containerEl.style.height=M+"px",this.containerEl.style.maxHeight=M+"px"}autoResizeTextarea(){let C=this.inputEl;if(!C)return;if(this.singleLineHeight||(this.singleLineHeight=C.offsetHeight),!(document.activeElement===C)&&(C.value||"").includes(`
`)){C.style.height=this.singleLineHeight+"px",C.style.overflowY="hidden",this.rawResize();return}if(C.style.height=this.singleLineHeight+"px",C.style.overflowY="hidden",(C.value||"").includes(`
`)&&C.scrollHeight>C.clientHeight){let V=this.singleLineHeight*3,M=C.offsetHeight-C.clientHeight,r=C.scrollHeight+M;r>V?(C.style.height=V+"px",C.style.overflowY="auto"):C.style.height=r+"px"}this.rawResize()}outputAppend(C){!this.outputEl||!(C||"").replace(/<[^>]*>/g,"").replace(/&[a-z]+;/g,"").trim()||(this.outputEl.insertAdjacentHTML("beforeend",`<span data-index="${this.index++}" class="p3xr-console-content-output-item">${C}<br/></span>`),this.trimOutputToLimit($1),this.persistOutputDebounced?.(),this.scrollOutputToBottom())}scrollOutputToBottom(){setTimeout(()=>{if(!this.scrollers)return;this.scrollers.scrollHeight-this.scrollers.scrollTop-this.scrollers.clientHeight<100&&(this.scrollers.scrollTop=this.scrollers.scrollHeight,this.outputEl&&(this.outputEl.scrollTop=this.outputEl.scrollHeight))},0)}forceScrollToBottom(){let C=()=>{this.scrollers&&(this.scrollers.scrollTop=this.scrollers.scrollHeight,this.outputEl&&(this.outputEl.scrollTop=this.outputEl.scrollHeight))};requestAnimationFrame(()=>{requestAnimationFrame(C)}),setTimeout(C,120)}trimOutputToLimit(C){if(!this.outputEl)return;let H=this.outputEl.innerHTML||"";for(;this.getByteSize(H)>C&&this.dropOldestOutputChunk();)H=this.outputEl.innerHTML||""}dropOldestOutputChunk(){if(!this.outputEl)return!1;let C=this.outputEl.querySelectorAll(".p3xr-console-content-output-item");if(C.length<1)return!1;let H=Math.max(Math.floor(C.length*.1),1);for(let V=0;V<H;V++)C[V].remove();return!0}getByteSize(C){try{return new Blob([C||""]).size}catch(H){return(C||"").length}}persistConsoleOutputNow(){if(this.outputEl)for(this.trimOutputToLimit($1);;){let C=this.outputEl.innerHTML||"";try{localStorage.setItem(j1,C);return}catch(H){if(!this.dropOldestOutputChunk()){try{localStorage.removeItem(j1)}catch(V){}return}}}}restoreConsoleOutput(){if(!this.outputEl)return!1;let C="";try{C=localStorage.getItem(j1)||""}catch(M){C=""}if(!C)return!1;this.outputEl.innerHTML=C,this.trimOutputToLimit($1),this.persistConsoleOutputNow();let H=this.outputEl.querySelectorAll(".p3xr-console-content-output-item"),V=H.length>0?H[H.length-1]:null;if(V){let M=Number(V.getAttribute("data-index"));Number.isFinite(M)&&(this.index=M+1)}return!0}getActionHistory(){try{return JSON.parse(localStorage.getItem("console-history")||"[]")}catch(C){return[]}}updateCommandHistory(C){let H=this.getActionHistory(),V=H.indexOf(C);V>-1&&H.splice(V,1),H.unshift(C),H.length>20&&(H=H.slice(0,20)),localStorage.setItem("console-history",JSON.stringify(H)),_=-1}static \u0275fac=function(H){return new(H||L)(S(l1),S(H2),S(K),S(k1),S(g1),S(_2),S(b1),S(q),S(Y5),S(H1))};static \u0275cmp=z({type:L,selectors:[["p3xr-console"]],inputs:{type:"type",embedded:"embedded",showCloseButton:"showCloseButton"},outputs:{closeRequest:"closeRequest"},decls:18,vars:29,consts:[["auto","matAutocomplete"],[1,"p3xr-console-root",3,"click"],["id","p3xr-console-header",1,"p3xr-console-toolbar","p3xr-accordion-toolbar"],[1,"p3xr-console-toolbar-tools"],["id","p3xr-console-content",3,"click","mousedown"],[2,"display","flex","flex-direction","row","align-items","stretch","min-height","100%"],["id","p3xr-console-content-resizer"],["id","p3xr-console-content-output",2,"flex-grow","1"],["id","p3xr-console-content-output"],["id","p3xr-console-autocomplete"],[1,"p3xr-console-hint"],["id","p3xr-console-input","rows","1","autocomplete","off",1,"p3xr-input",3,"keydown","formControl","matAutocomplete","readonly","placeholder"],["type","button",1,"p3xr-console-stop",3,"matTooltip"],["position","above",1,"p3xr-console-autocomplete-panel",3,"optionSelected"],[3,"label"],[1,"material-icons",2,"margin-right","6px"],[1,"p3xr-console-title"],[1,"p3xr-toolbar-spacer"],[1,"p3xr-console-toolbar-actions"],[1,"p3xr-console-ai-toggle"],["mdIcon","menu_book",3,"click","label"],["mdIcon","backspace",3,"click","label"],[1,"p3xr-console-ai-toggle",3,"click"],[1,"material-icons"],["mdIcon","close",3,"label"],["mat-icon-button","","matTooltipPosition","above",1,"p3xr-console-drawer-close",3,"matTooltip"],["mdIcon","close",3,"click","label"],["mat-icon-button","","matTooltipPosition","above",1,"p3xr-console-drawer-close",3,"click","matTooltip"],["id","p3xr-console-content-resizer",3,"mousedown","mouseup"],["type","button",1,"p3xr-console-stop",3,"click","matTooltip"],[3,"value"],[1,"p3xr-autocomplete-cmd"],[1,"p3xr-autocomplete-syntax"]],template:function(H,V){if(H&1&&(e(0,"div",1),d("click",function(){return V.activate()}),e(1,"mat-toolbar",2)(2,"div",3),p(3,u3,9,4)(4,h3,11,6),i()(),e(5,"div",4),d("click",function(r){return r.stopPropagation()})("mousedown",function(r){return V.onContentMouseDown(r)}),e(6,"div",5),p(7,O3,1,0,"div",6),g(8,"div",7),i(),p(9,g3,1,0,"div",8),i(),e(10,"div",9),p(11,f3,2,1,"div",10),e(12,"textarea",11),d("keydown",function(r){return V.onKeyDown(r)}),i(),p(13,k3,3,1,"button",12),e(14,"mat-autocomplete",13,0),d("optionSelected",function(r){return V.onAutocompleteSelected(r)}),G(16,y3,3,1,"mat-optgroup",14,x3),i()()()),H&2){let M,r=T(15);O("p3xr-console-root-embedded",V.embedded),o(3),l(V.type!=="quick"?3:4),o(2),O("p3xr-content-border-fixed",V.type!=="quick")("layout-padding",V.type!=="quick"),o(2),l(V.type==="quick"&&!V.embedded?7:-1),o(2),l(V.type!=="quick"?9:-1),o(),O("p3xr-console-autocomplete-quick",V.type==="quick")("p3xr-console-autocomplete-embedded",V.embedded),o(),l(V.currentHint?11:-1),o(),M2("background","var(--p3xr-input-bg)")("color","var(--p3xr-input-color)")("border-color",V.aiLoading?"var(--mat-sys-primary, var(--p3xr-input-border-color))":"var(--p3xr-input-border-color, var(--p3xr-border-color))")("padding-right",V.aiLoading?"40px":null),O("p3xr-input-ai-loading",V.aiLoading),c("formControl",V.searchControl)("matAutocomplete",r)("readonly",V.aiLoading)("placeholder",V.aiLoading?(M=V.strings().label)==null?null:M.aiTranslating:""),o(),l(V.aiLoading?13:-1),o(3),Q(V.filteredCommands)}},dependencies:[U,h1,c1,S1,f2,g2,t1,r1,s1,u1,N2,I2,D2,E2,W2,f1,Z1,L1,V1,e1,M1,G2],styles:[`p3xr-console{display:block;width:100%;height:100%}.p3xr-console-root{display:flex;flex-direction:column;width:100%;height:100%}.p3xr-console-root-embedded{overflow:hidden}.p3xr-console-root-embedded #p3xr-console-content{flex:1 1 auto;min-height:0}p3xr-console .mat-toolbar{min-height:48px;height:48px;position:relative;z-index:2;padding:0}p3xr-console .mat-toolbar *{color:inherit}p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base){color:inherit!important;letter-spacing:.1px!important;text-transform:uppercase!important;height:36px!important;min-height:36px!important;min-width:auto!important;padding:0 8px!important;margin:0 8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base):hover{background-color:#00000014!important}p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base) *,p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base) .mdc-button__label{color:inherit!important;letter-spacing:.1px!important}p3xr-console .mat-toolbar mat-icon,p3xr-console .mat-toolbar .material-icons{font-size:24px;width:24px;height:24px}.p3xr-console-toolbar-tools{display:flex;align-items:center;width:100%;height:100%;padding:0 3px}.p3xr-console-toolbar-actions{display:inline-flex;align-items:center}p3xr-console .mat-toolbar .p3xr-console-ai-toggle{display:inline-flex;align-items:center;gap:2px;margin:0 8px;padding:0 8px;height:36px;cursor:pointer;color:inherit!important;font-size:13px;letter-spacing:.1px;text-transform:uppercase;border-radius:4px;-webkit-user-select:none;user-select:none}p3xr-console .mat-toolbar .p3xr-console-ai-toggle:hover{background-color:#00000014}p3xr-console .mat-toolbar .p3xr-console-ai-toggle .material-icons{font-size:20px;width:20px;height:20px}.p3xr-console-title{font-size:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.p3xr-toolbar-spacer{flex:1 1 auto}#p3xr-console-content{font-family:Roboto Mono,monospace;font-size:13px;text-align:center;padding-left:4px}#p3xr-console-content #p3xr-console-content-resizer{cursor:ew-resize;position:relative;left:-10px;width:20px!important}#p3xr-console-content #p3xr-console-content-output{min-width:calc(100% - 20px);text-align:left;overflow:auto}#p3xr-console-content #p3xr-console-content-output pre{font-family:Roboto Mono,monospace;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}.p3xr-console-content-output-item:before{content:"> ";opacity:.5}.p3xr-console-ai-result{display:block}#p3xr-console-autocomplete{position:relative;overflow:hidden;width:100%}.p3xr-input-ai-loading{opacity:.55;cursor:not-allowed!important}.p3xr-console-stop{position:absolute;top:50%;right:6px;transform:translateY(-50%);background:transparent;border:none;padding:2px;margin:0;cursor:pointer;color:var(--p3xr-btn-primary-bg);display:flex;align-items:center;justify-content:center;z-index:3;line-height:1}.p3xr-console-stop:hover{opacity:.8}.p3xr-console-stop mat-icon,.p3xr-console-stop .mat-icon{color:var(--p3xr-btn-primary-bg)!important;font-size:24px;width:24px;height:24px;line-height:24px}#p3xr-console-autocomplete.p3xr-console-autocomplete-embedded{position:relative;width:100%;min-width:0;overflow-x:hidden}#p3xr-console-autocomplete.p3xr-console-autocomplete-embedded #p3xr-console-input{min-width:100%;width:100%;position:relative;box-sizing:border-box;overflow:hidden}p3xr-console.p3xr-console-embedded-collapsed #p3xr-console-autocomplete.p3xr-console-autocomplete-embedded #p3xr-console-input{min-width:calc(100% - 1px);width:calc(100% - 1px)}p3xr-console.p3xr-console-embedded-collapsed .p3xr-console-hint{display:none}#p3xr-console-input{display:block;width:100%;box-sizing:border-box;padding:3px;border-style:solid;border-width:3px;margin:0;font-family:Roboto Mono,monospace;resize:none;overflow-y:hidden;outline:none;max-height:90px}.p3xr-console-hint{font-family:Roboto Mono,monospace;font-size:12px;padding:2px 6px;opacity:.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.p3xr-console-autocomplete-panel.mat-mdc-autocomplete-panel{font-family:Roboto Mono,monospace;font-size:13px;max-height:350px}.p3xr-console-autocomplete-panel.mat-mdc-autocomplete-panel .mat-mdc-optgroup-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;min-height:28px;opacity:.7}.p3xr-console-autocomplete-panel.mat-mdc-autocomplete-panel .mat-mdc-option{min-height:32px;font-size:13px;font-family:Roboto Mono,monospace}.p3xr-autocomplete-cmd{font-weight:700;margin-right:8px}.p3xr-autocomplete-syntax{opacity:.5;font-size:11px}@media(max-width:959px){.p3xr-console-root-embedded #p3xr-console-content-output{overflow-x:hidden}.p3xr-console-root-embedded #p3xr-console-content-output pre{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}}
`],encapsulation:2,changeDetection:0})}return L})();var H3=(()=>{class L{i18n;state;cdr;static HEIGHT_KEY="p3xr-console-drawer-height";static MIN_VH=15;static MAX_VH=66;static FOOTER_HEIGHT=48;strings;isOpen=n1(()=>this.state.consoleDrawerOpen());isConnected=n1(()=>this.state.connectionState()==="connected");isConnecting=n1(()=>this.state.connectionState()==="connecting");connectionName=n1(()=>this.state.connection()?.name??"");resizeClicked=X(!1);drawerResizeObserver;constructor(C,H,V){this.i18n=C,this.state=H,this.cdr=V,this.strings=this.i18n.strings}ngAfterViewInit(){document.addEventListener("mousedown",this.boundResizeClick),document.addEventListener("mouseup",this.boundResizeClick),document.addEventListener("mousemove",this.boundDocumentMousemove);let C=document.getElementById("p3xr-console-drawer");C&&typeof ResizeObserver<"u"&&(this.drawerResizeObserver=new ResizeObserver(()=>{window.dispatchEvent(new Event("resize"))}),this.drawerResizeObserver.observe(C))}ngOnDestroy(){document.removeEventListener("mousedown",this.boundResizeClick),document.removeEventListener("mouseup",this.boundResizeClick),document.removeEventListener("mousemove",this.boundDocumentMousemove),this.drawerResizeObserver?.disconnect()}close(){this.state.setConsoleDrawerOpen(!1),this.cdr.markForCheck()}computeBounds(){return{minPx:L.MIN_VH/100*window.innerHeight,maxPx:L.MAX_VH/100*window.innerHeight}}boundResizeClick=C=>this.resizeClick(C);boundDocumentMousemove=C=>this.documentMousemove(C);resizeClick(C){let H=C.target;if(C.type==="mousedown"){if(!H||H.id!=="p3xr-console-drawer-sizer")return;this.resizeClicked.set(!0),this.applyBoundCursor(!1),document.body.classList.add("p3xr-not-selectable"),document.documentElement.classList.add("p3xr-console-drawer-resizing"),C.stopPropagation(),C.preventDefault()}else if(C.type==="mouseup"){if(!this.resizeClicked())return;this.resizeClicked.set(!1),this.clearBoundCursor(),document.body.classList.remove("p3xr-not-selectable"),document.documentElement.classList.remove("p3xr-console-drawer-resizing");let V=document.documentElement.style.getPropertyValue("--p3xr-console-drawer-height");V&&V.endsWith("px")&&localStorage.setItem(L.HEIGHT_KEY,V),C.stopPropagation()}}documentMousemove(C){if(!this.resizeClicked())return;let{minPx:H,maxPx:V}=this.computeBounds(),M=window.innerHeight-C.clientY-L.FOOTER_HEIGHT,r=M<H||M>V;M<H&&(M=H),M>V&&(M=V),this.applyBoundCursor(r),document.documentElement.style.setProperty("--p3xr-console-drawer-height",`${Math.round(M)}px`)}applyBoundCursor(C){let H=document.getElementById("p3xr-console-drawer-sizer");C?(document.documentElement.style.setProperty("cursor","not-allowed","important"),document.body.style.setProperty("cursor","not-allowed","important"),H?.style.setProperty("cursor","not-allowed","important")):(document.documentElement.style.setProperty("cursor","ns-resize","important"),document.body.style.setProperty("cursor","ns-resize","important"),H?.style.removeProperty("cursor"))}clearBoundCursor(){let C=document.getElementById("p3xr-console-drawer-sizer");document.documentElement.style.removeProperty("cursor"),document.body.style.removeProperty("cursor"),C?.style.removeProperty("cursor")}static \u0275fac=function(H){return new(H||L)(S(K),S(q),S(H1))};static \u0275cmp=z({type:L,selectors:[["p3xr-console-drawer"]],decls:4,vars:6,consts:[["id","p3xr-console-drawer"],["id","p3xr-console-drawer-sizer","role","separator","aria-orientation","horizontal","aria-label","Resize console drawer"],["id","p3xr-console-drawer-body"],["type","quick",3,"closeRequest","embedded","showCloseButton"]],template:function(H,V){H&1&&(e(0,"div",0),g(1,"div",1),e(2,"div",2)(3,"p3xr-console",3),d("closeRequest",function(){return V.close()}),i()()()),H&2&&(O("p3xr-drawer-open",V.isOpen()),o(),O("p3xr-resizer-active",V.resizeClicked()),o(2),c("embedded",!0)("showCloseButton",!0))},dependencies:[U,C3],styles:[`:root{--p3xr-console-drawer-height: 30vh}#p3xr-console-drawer{position:fixed;left:5px;right:calc(5px + var(--p3xr-scroll-gutter, 0px));bottom:var(--p3xr-layout-footer-height, 48px);height:0;overflow:hidden;background:var(--p3xr-content-bg, var(--mat-app-background-color));color:var(--mat-app-text-color, inherit);border:0 solid var(--p3xr-accordion-bg);border-radius:4px 4px 0 0;z-index:8;transition:height .15s ease-out;display:flex;flex-direction:column}#p3xr-console-drawer.p3xr-drawer-open{height:var(--p3xr-console-drawer-height);border-width:1px}#p3xr-console-drawer-sizer{position:absolute;top:0;left:0;right:0;height:5px;cursor:ns-resize;z-index:3;background-color:transparent;transition:background-color .15s ease,filter .15s ease}#p3xr-console-drawer-sizer:hover,#p3xr-console-drawer-sizer.p3xr-resizer-active{background-color:var(--p3xr-accordion-bg)}body.p3xr-theme-dark #p3xr-console-drawer-sizer:hover{filter:brightness(1.5)}body.p3xr-theme-dark #p3xr-console-drawer-sizer.p3xr-resizer-active{filter:brightness(2)}body.p3xr-theme-light #p3xr-console-drawer-sizer:hover{filter:brightness(.75)}body.p3xr-theme-light #p3xr-console-drawer-sizer.p3xr-resizer-active{filter:brightness(.5)}html.p3xr-console-drawer-resizing #p3xr-console-drawer.p3xr-drawer-open{transition:none}#p3xr-console-drawer-body{flex:1 1 auto;min-height:0;overflow:hidden;position:relative}#p3xr-console-drawer-body p3xr-console{display:block;height:100%;width:100%}.p3xr-console-drawer-empty{padding:16px 20px;font-size:13px;line-height:1.6;display:flex;flex-direction:column;gap:6px}.p3xr-console-drawer-empty .p3xr-console-drawer-empty-row{white-space:pre-wrap}.p3xr-console-drawer-empty .p3xr-console-drawer-empty-title{font-size:15px;font-weight:500;margin-bottom:4px}.p3xr-console-drawer-empty .p3xr-console-drawer-empty-hint{opacity:.7;font-size:12px}html.p3xr-console-drawer-open{--p3xr-console-drawer-height-active: var(--p3xr-console-drawer-height)}html:not(.p3xr-console-drawer-open){--p3xr-console-drawer-height-active: 0px}
`],encapsulation:2,changeDetection:0})}return L})();var V3=!1;function T3(){if(V3)return;V3=!0;let L=document.createElement("style");L.setAttribute("data-p3xr-overlay-scroll",""),L.textContent=`
        .p3xr-os-viewport { scrollbar-width: none !important; -ms-overflow-style: none !important; }
        .p3xr-os-viewport::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
        .p3xr-os-thumb {
            position: fixed;
            width: 8px;
            border-radius: 4px;
            background-color: rgba(128, 128, 128, 0.5);
            opacity: 0;
            transition: opacity 0.25s ease, background-color 0.15s ease;
            pointer-events: auto;
            z-index: 2147483647;
            /* will-change was creating a GPU layer that composited BEHIND
               Angular Material cdk-overlay-container subtree on some themes,
               even though the thumb z-index is higher than the container.
               Without it, the thumb paints in normal document order and
               respects z-index. Removed. */
            isolation: isolate;
        }
        .p3xr-os-thumb:hover { background-color: rgba(128, 128, 128, 0.75); }
        body.p3xr-theme-dark .p3xr-os-thumb { background-color: rgba(255, 255, 255, 0.35); }
        body.p3xr-theme-dark .p3xr-os-thumb:hover { background-color: rgba(255, 255, 255, 0.6); }
        body.p3xr-theme-light .p3xr-os-thumb { background-color: rgba(0, 0, 0, 0.35); }
        body.p3xr-theme-light .p3xr-os-thumb:hover { background-color: rgba(0, 0, 0, 0.6); }
    `,document.head.appendChild(L)}function B3(L){T3(),L.classList.add("p3xr-os-viewport");let t=document.createElement("div");t.className="p3xr-os-thumb";let C=L.closest(".mat-mdc-dialog-surface, .mat-mdc-menu-panel, .mat-mdc-autocomplete-panel, .mat-mdc-select-panel"),H=L.closest(".cdk-overlay-container");(C||H||document.body).appendChild(t);let V=null,M=!1,r=0,A=0,Z=30,s=C?16:10,u=()=>{t.style.opacity="1",V&&clearTimeout(V),V=setTimeout(()=>{M||(t.style.opacity="0")},1200)},m=4,b=()=>{let w=L.getBoundingClientRect(),{scrollTop:N,scrollHeight:W,clientHeight:$}=L;if(W<=$+1){t.style.display="none";return}t.style.display="block",Z=Math.max(30,$/W*$);let o1=W-$,F1=$-Z-m*2,i3=o1>0?N/o1*F1:0;t.style.left=`${w.right-s}px`,t.style.top=`${w.top+m+i3}px`,t.style.height=`${Z}px`},E=()=>{b(),u()},j=()=>u(),D=w=>{w.preventDefault(),M=!0,r=w.clientY,A=L.scrollTop,document.addEventListener("mousemove",F),document.addEventListener("mouseup",R)},F=w=>{if(!M)return;let{scrollHeight:N,clientHeight:W}=L,$=N-W,o1=W-Z,F1=w.clientY-r;L.scrollTop=A+(o1>0?F1/o1:0)*$,u()},R=()=>{M=!1,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",R),u()};L.addEventListener("scroll",E,{passive:!0}),L.addEventListener("mousemove",j),t.addEventListener("mousedown",D);let I=new ResizeObserver(b);I.observe(L);for(let w of Array.from(L.children))I.observe(w);let J=new MutationObserver(w=>{for(let N of w)N.addedNodes.forEach(W=>{W.nodeType===1&&I.observe(W)});b()});J.observe(L,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]}),window.addEventListener("resize",b);let k=!1,m1=0,p1=w=>{if(m1=Date.now()+w,k)return;k=!0;let N=()=>{b(),Date.now()<m1?requestAnimationFrame(N):k=!1};requestAnimationFrame(N)},Y=w=>{(w.target===L||w.target===L.parentElement)&&p1(250)};return window.addEventListener("transitionrun",Y),b(),{destroy(){L.removeEventListener("scroll",E),L.removeEventListener("mousemove",j),t.removeEventListener("mousedown",D),document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",R),window.removeEventListener("resize",b),window.removeEventListener("transitionrun",Y),I.disconnect(),J.disconnect(),V&&clearTimeout(V),t.remove(),L.classList.remove("p3xr-os-viewport")},update:b}}var P3=[".cm-scroller",".xterm-viewport",".monaco-scrollable-element"];function _3(L){let t=getComputedStyle(L),C=t.overflowY,H=t.overflowX;return!(!(C==="auto"||C==="scroll"||H==="auto"||H==="scroll")||L.clientHeight===0&&L.clientWidth===0)}function F3(L){if(L.classList.contains("p3xr-os-viewport"))return!0;for(let t of P3)if(L.matches(t)||L.closest(t))return!0;return!1}function L3(){let L=new Map,t=r=>{L.has(r)||F3(r)||_3(r)&&L.set(r,B3(r))},C=r=>{t(r),r.querySelectorAll("*").forEach(t)},H=()=>{for(let[r,A]of L)r.isConnected||(A.destroy(),L.delete(r))};C(document.body);let V=new MutationObserver(r=>{let A=!1,Z=[];for(let s of r)s.addedNodes.forEach(u=>{if(u.nodeType===1){let m=u;C(m),Z.push(m)}}),s.removedNodes.length>0&&(A=!0),s.type==="attributes"&&s.target.nodeType===1&&t(s.target);if(A&&H(),Z.length>0){let s=()=>{for(let u of Z)u.isConnected&&C(u)};requestAnimationFrame(s),setTimeout(s,150),setTimeout(s,350)}});V.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]});let M=setInterval(()=>{H(),C(document.body)},1e3);return()=>{V.disconnect(),clearInterval(M);for(let r of L.values())r.destroy();L.clear()}}var R3=["languageSearchInput"],E3=["languageMenuTrigger"],D3=(L,t)=>t.name,I3=(L,t)=>t.id;function W3(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a();return v(V.navigateTo(V.currentConnection?"database.statistics":"settings"))}),g(1,"i",23),e(2,"span"),n(3),i()()}if(L&2){let C,H=a();o(3),f((C=H.i18n.strings().title)==null?null:C.name)}}function N3(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a();return v(V.navigateTo(V.currentConnection?"database.statistics":"settings"))}),e(1,"mat-icon",25),g(2,"i",26),i()()}if(L&2){let C,H=a();c("matTooltip",(((C=H.i18n.strings().title)==null?null:C.name)??"")+(H.state.version()?" "+H.state.version():""))}}function z3(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a(3);return v(V.navigateTo("database.statistics"))}),e(1,"mat-icon"),n(2,"storage"),i(),e(3,"span"),n(4),i()()}if(L&2){let C,H=a(3);O("p3xr-nav-active",H.isActivePage("database")),o(4),f((C=H.i18n.strings().intention)==null?null:C.main)}}function G3(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a(3);return v(V.navigateTo("database.statistics"))}),e(1,"mat-icon"),n(2,"storage"),i()()}if(L&2){let C,H=a(3);O("p3xr-nav-active",H.isActivePage("database")),c("matTooltip",((C=H.i18n.strings().intention)==null?null:C.main)??"")}}function Q3(L,t){if(L&1&&p(0,z3,5,3,"button",27)(1,G3,3,3,"button",28),L&2){let C=a(2);l(C.isWide?0:1)}}function U3(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a(3);return v(V.navigateTo("monitoring"))}),e(1,"mat-icon"),n(2,"monitor_heart"),i(),e(3,"span"),n(4),i()()}if(L&2){let C,H=a(3);O("p3xr-nav-active",H.isActivePage("monitoring")),o(4),f((C=H.i18n.strings().page)==null||C.monitor==null?null:C.monitor.title)}}function K3(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a(3);return v(V.navigateTo("monitoring"))}),e(1,"mat-icon"),n(2,"monitor_heart"),i()()}if(L&2){let C,H=a(3);O("p3xr-nav-active",H.isActivePage("monitoring")),c("matTooltip",((C=H.i18n.strings().page)==null||C.monitor==null?null:C.monitor.title)??"Monitoring")}}function q3(L,t){if(L&1&&p(0,U3,5,3,"button",27)(1,K3,3,3,"button",28),L&2){let C=a(2);l(C.isWide?0:1)}}function j3(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a(3);return v(V.navigateTo("search"))}),e(1,"mat-icon"),n(2,"search"),i(),e(3,"span"),n(4),i()()}if(L&2){let C,H=a(3);O("p3xr-nav-active",H.isActivePage("search")),o(4),f((C=H.i18n.strings().page)==null||C.search==null?null:C.search.title)}}function $3(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a(3);return v(V.navigateTo("search"))}),e(1,"mat-icon"),n(2,"search"),i()()}if(L&2){let C,H=a(3);O("p3xr-nav-active",H.isActivePage("search")),c("matTooltip",((C=H.i18n.strings().page)==null||C.search==null?null:C.search.title)??"Search")}}function X3(L,t){if(L&1&&p(0,j3,5,3,"button",27)(1,$3,3,3,"button",28),L&2){let C=a(2);l(C.isWide?0:1)}}function J3(L,t){if(L&1&&(p(0,Q3,2,1),p(1,q3,2,1),p(2,X3,2,1)),L&2){let C=a();l(C.currentConnection?0:-1),o(),l(C.currentConnection?1:-1),o(),l(C.currentConnection&&C.hasRediSearch?2:-1)}}function Y3(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a(2);return v(V.navigateTo("info"))}),e(1,"mat-icon"),n(2,"info"),i(),e(3,"span"),n(4),i()()}if(L&2){let C,H=a(2);O("p3xr-nav-active",H.isActivePage("info")),o(4),f((C=H.i18n.strings().intention)==null?null:C.info)}}function C0(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a(2);return v(V.navigateTo("info"))}),e(1,"mat-icon"),n(2,"info"),i()()}if(L&2){let C,H=a(2);O("p3xr-nav-active",H.isActivePage("info")),c("matTooltip",((C=H.i18n.strings().intention)==null?null:C.info)??"Info")}}function H0(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a(2);return v(V.navigateTo("settings"))}),e(1,"mat-icon"),n(2,"settings"),i(),e(3,"span"),n(4),i()()}if(L&2){let C,H=a(2);O("p3xr-nav-active",H.isActivePage("settings")),o(4),f((C=H.i18n.strings().intention)==null?null:C.settings)}}function V0(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a(2);return v(V.navigateTo("settings"))}),e(1,"mat-icon"),n(2,"settings"),i()()}if(L&2){let C,H=a(2);O("p3xr-nav-active",H.isActivePage("settings")),c("matTooltip",((C=H.i18n.strings().intention)==null?null:C.settings)??"")}}function L0(L,t){if(L&1&&(p(0,Y3,5,3,"button",27)(1,C0,3,3,"button",28),p(2,H0,5,3,"button",27)(3,V0,3,3,"button",28)),L&2){let C=a();l(C.isWide?0:1),o(2),l(C.isWide?2:3)}}function M0(L,t){if(L&1){let C=h();e(0,"button",24),d("click",function(){x(C);let V=a();return v(V.logout())}),e(1,"mat-icon"),n(2,"logout"),i()()}if(L&2){let C,H=a();c("matTooltip",(C=H.i18n.strings().intention)==null?null:C.logout)}}function e0(L,t){if(L&1&&(e(0,"div",11),n(1),i()),L&2){let C=a();o(),B(" ",C.currentVersion," ")}}function r0(L,t){if(L&1&&(e(0,"button",13)(1,"mat-icon"),n(2,"power"),i(),e(3,"span"),n(4),i()()),L&2){a();let C=T(3),H=a(2);c("matMenuTriggerFor",C),o(4),f(H.connectionName)}}function t0(L,t){if(L&1&&(e(0,"button",14)(1,"mat-icon"),n(2,"power"),i()()),L&2){a();let C=T(3),H=a(2);c("matMenuTriggerFor",C)("matTooltip",H.connectionName)}}function i0(L,t){if(L&1&&(e(0,"div",29),n(1),i()),L&2){let C,H=a().$implicit,V=a(3);o(),B(" ",H.name||((C=V.i18n.strings().label)==null?null:C.ungrouped)," ")}}function o0(L,t){if(L&1){let C=h();e(0,"button",18),d("click",function(){let V=x(C).$implicit,M=a(4);return v(M.connect(V))}),n(1),i()}if(L&2){let C=t.$implicit,H=a(4);O("p3xr-mat-menu-item-selected",(H.currentConnection==null?null:H.currentConnection.id)===C.id),o(),B(" ",C.name," ")}}function a0(L,t){L&1&&g(0,"mat-divider")}function A0(L,t){if(L&1&&(p(0,i0,2,1,"div",29),G(1,o0,2,3,"button",20,I3),p(3,a0,1,0,"mat-divider")),L&2){let C=t.$implicit,H=t.$index,V=t.$count,M=a(3);l(M.groupedConnectionsList.length>1?0:-1),o(),Q(C.connections),o(2),l(H!==V-1&&M.groupedConnectionsList.length>1?3:-1)}}function n0(L,t){if(L&1&&(p(0,r0,5,2,"button",13)(1,t0,3,2,"button",14),e(2,"mat-menu",null,4),G(4,A0,4,2,null,null,D3),i()),L&2){let C=a(2);l(C.isWide?0:1),o(4),Q(C.groupedConnectionsList)}}function d0(L,t){if(L&1){let C=h();e(0,"button",22),d("click",function(){x(C);let V=a(3);return v(V.disconnect())}),g(1,"i",31),e(2,"span"),n(3),i()()}if(L&2){let C,H=a(3);o(3),f((C=H.i18n.strings().intention)==null?null:C.disconnect)}}function m0(L,t){if(L&1){let C=h();e(0,"button",32),d("click",function(){x(C);let V=a(3);return v(V.disconnect())}),g(1,"i",31),i()}if(L&2){let C,H=a(3);c("matTooltip",((C=H.i18n.strings().intention)==null?null:C.disconnect)??"")}}function p0(L,t){if(L&1&&p(0,d0,4,1,"button",8)(1,m0,2,1,"button",30),L&2){let C=a(2);l(C.isGtSm?0:1)}}function l0(L,t){if(L&1&&(p(0,n0,6,1),p(1,p0,2,1)),L&2){let C=a();l(C.connectionsList.length>0?0:-1),o(),l(C.currentConnection?1:-1)}}function x0(L,t){if(L&1){let C=h();e(0,"button",35),d("click",function(){x(C);let V=a(2);return v(V.toggleConsoleDrawer())}),e(1,"mat-icon"),n(2,"terminal"),i(),e(3,"span"),n(4),i()()}if(L&2){let C,H,V=a(2);O("p3xr-nav-active",V.state.consoleDrawerOpen()),c("matTooltip",((C=V.i18n.strings().label)==null||C.consoleDrawer==null?null:C.consoleDrawer.toggleTooltip)??""),A1("aria-pressed",V.state.consoleDrawerOpen()),o(4),f((H=V.i18n.strings().intention)==null?null:H.console)}}function v0(L,t){if(L&1){let C=h();e(0,"button",32),d("click",function(){x(C);let V=a(2);return v(V.toggleConsoleDrawer())}),e(1,"mat-icon"),n(2,"terminal"),i()()}if(L&2){let C,H=a(2);O("p3xr-nav-active",H.state.consoleDrawerOpen()),c("matTooltip",(((C=H.i18n.strings().intention)==null?null:C.console)??"")+"  \u2014  "+(((C=H.i18n.strings().label)==null||C.consoleDrawer==null?null:C.consoleDrawer.toggleTooltip)??"")),A1("aria-pressed",H.state.consoleDrawerOpen())}}function Z0(L,t){if(L&1&&p(0,x0,5,5,"button",33)(1,v0,3,4,"button",34),L&2){let C=a();l(C.isWide?0:1)}}function u0(L,t){if(L&1){let C=h();e(0,"button",36,5),d("menuOpened",function(){x(C);let V=a();return v(V.onLanguageMenuOpened())}),e(2,"mat-icon"),n(3,"language"),i(),e(4,"span"),n(5),i()()}if(L&2){let C,H=a(),V=T(17);c("matMenuTriggerFor",V),o(5),f((C=H.i18n.strings().intention)==null?null:C.language)}}function s0(L,t){if(L&1){let C=h();e(0,"button",37,5),d("menuOpened",function(){x(C);let V=a();return v(V.onLanguageMenuOpened())}),e(2,"mat-icon"),n(3,"language"),i()()}if(L&2){let C,H=a(),V=T(17);c("matMenuTriggerFor",V)("matTooltip",((C=H.i18n.strings().intention)==null?null:C.language)??"")}}function c0(L,t){if(L&1){let C=h();e(0,"button",18),d("click",function(){let V=x(C).$implicit,M=a();return v(M.setLanguage(V))}),n(1),i()}if(L&2){let C=t.$implicit,H=t.$index,V=a();O("p3xr-mat-menu-item-selected",!V.i18n.isAuto()&&V.i18n.currentLang()===C)("p3xr-language-highlighted",H===V.highlightedLanguageIndex),o(),B(" ",V.languageLabel(C)," ")}}function S0(L,t){if(L&1&&(e(0,"button",13)(1,"mat-icon"),n(2,"color_lens"),i(),e(3,"span"),n(4),i()()),L&2){let C,H=a(),V=T(29);c("matMenuTriggerFor",V),o(4),f((C=H.i18n.strings().intention)==null?null:C.theme)}}function h0(L,t){if(L&1&&(e(0,"button",14)(1,"mat-icon"),n(2,"color_lens"),i()()),L&2){let C,H=a(),V=T(29);c("matMenuTriggerFor",V)("matTooltip",((C=H.i18n.strings().intention)==null?null:C.theme)??"")}}function O0(L,t){if(L&1){let C=h();e(0,"button",18),d("click",function(){let V=x(C).$implicit,M=a();return v(M.setTheme(V))}),n(1),i()}if(L&2){let C=t.$implicit,H=a();O("p3xr-mat-menu-item-selected",!H.theme.isAuto()&&H.themeSelectedKey===C),o(),B(" ",H.themeLabel(C)," ")}}function g0(L,t){if(L&1&&(e(0,"button",13),g(1,"i",38),e(2,"span"),n(3),i()()),L&2){let C,H=a(),V=T(38);c("matMenuTriggerFor",V),o(3),f((C=H.i18n.strings().intention)==null?null:C.github)}}function f0(L,t){if(L&1&&(e(0,"button",14),g(1,"i",38),i()),L&2){let C,H=a(),V=T(38);c("matMenuTriggerFor",V)("matTooltip",((C=H.i18n.strings().intention)==null?null:C.github)??"")}}function k0(L,t){L&1&&g(0,"p3xr-login")}function b0(L,t){L&1&&g(0,"router-outlet")}function w0(L,t){L&1&&g(0,"p3xr-console-drawer")}var M3=(()=>{class L{ngZone;breakpointObserver;theme;i18n;state;socket;common;authDialog;nav;router;cmd;cdr;shortcuts;overlay;settings;auth;isWide=!0;isGtXs=!0;isGtSm=!0;isElectron=!1;isElectronInitialized=!1;unsubFns=[];constructor(C,H,V,M,r,A,Z,s,u,m,b,E,j,D,F,R,I){this.ngZone=C,this.breakpointObserver=H,this.theme=V,this.i18n=M,this.state=r,this.socket=A,this.common=Z,this.authDialog=s,this.nav=u,this.router=m,this.cmd=b,this.cdr=E,this.shortcuts=j,this.overlay=D,this.settings=F,this.auth=R,I.registerAll(),C2(()=>{let J=this.state.consoleDrawerOpen(),k=this.state.connectionState()==="connected";J&&k?document.documentElement.classList.add("p3xr-console-drawer-open"):document.documentElement.classList.remove("p3xr-console-drawer-open")})}onKeydown(C){if(C.key==="`"&&(C.ctrlKey||C.metaKey)&&!C.altKey&&!C.shiftKey){C.preventDefault(),this.toggleConsoleDrawer();return}this.shortcuts.handleKeydown(C)}toggleConsoleDrawer(){this.state.toggleConsoleDrawer(),this.cdr.markForCheck()}ngOnInit(){this.auth.checkAuthStatus().then(()=>{if(this.cdr.markForCheck(),this.auth.isAuthenticated()){let A=this.readConnectionFromStorage();A&&this.connect(A)}}),this.filterLanguages(),setTimeout(()=>{for(let A of["/react/","/vue/"])fetch(A).then(Z=>Z.text()).then(Z=>{new DOMParser().parseFromString(Z,"text/html").querySelectorAll('script[src], link[rel="stylesheet"]').forEach(u=>{let m=u.src||u.href;m&&fetch(m).catch(()=>{})})}).catch(()=>{})},3e3);let C=this.breakpointObserver.observe("(min-width: 720px)").subscribe(A=>{this.isWide=A.matches,this.cdr.markForCheck()}),H=this.breakpointObserver.observe("(min-width: 600px)").subscribe(A=>{this.isGtXs=A.matches,this.cdr.markForCheck()}),V=this.breakpointObserver.observe("(min-width: 960px)").subscribe(A=>{this.isGtSm=A.matches,this.cdr.markForCheck()});this.unsubFns.push(()=>{C.unsubscribe(),H.unsubscribe(),V.unsubscribe()}),this.isElectron=/electron/i.test(navigator.userAgent),this.subscribeSocketEvents(),this.setupRouteTracking();let M=this.cmd.connectRequest$.subscribe(A=>{this.connect(A.connection)}),r=this.cmd.disconnectRequest$.subscribe(()=>{this.disconnect()});if(this.unsubFns.push(()=>{M.unsubscribe(),r.unsubscribe()}),setTimeout(()=>this.setupElectronBridge(),3e3),window.location.hostname==="p3x.redis.patrikx3.com"){let A=0,Z=()=>{let b=A%3!==1?this.i18n.strings()?.promoMeeting:this.i18n.strings()?.promo;if(b?.toastMessage){let E=b.toastMessage+(b.disclaimer?" \xB7 "+b.disclaimer:"");this.common.toast({message:E,hideDelay:3e4})}A++},s=setTimeout(Z,5e3),u=setInterval(Z,420*1e3);this.unsubFns.push(()=>{clearTimeout(s),clearInterval(u)})}this.uninstallOverlayScrolls=L3()}uninstallOverlayScrolls=null;ngOnDestroy(){this.unsubFns.forEach(C=>C()),this.uninstallOverlayScrolls?.()}get connectionName(){let C=this.state.connection(),H=this.i18n.strings();if(C){let V=H?.label?.connected;return typeof V=="function"?V({name:C.name}):C.name??""}return H?.intention?.connect??"Connect"}sortedThemeKeys=["light","enterprise","dark","darkNeu","darkoBluo","matrix","redis"];get themeSelectedKey(){let C=this.theme.currentTheme();if(!C.startsWith("p3xrTheme"))return"";let H=C.slice(9);return H.charAt(0).toLowerCase()+H.slice(1)}get showLogin(){return this.auth.authChecked()&&this.auth.authRequired()&&!this.auth.isAuthenticated()}get hasRediSearch(){return!!this.state.hasRediSearch()}get reducedFunctions(){return!!this.state.reducedFunctions()}get currentVersion(){return this.state.version()}get connectionsList(){return this.state.connections()?.list??[]}get groupedConnectionsList(){let C=this.connectionsList,H=!1;try{H=localStorage.getItem("p3xr-connection-group-mode")==="true"}catch(r){}if(!H)return[{name:"",connections:C}];let V=new Map;for(let r of C){let A=r.group?.trim()||"";V.has(A)||V.set(A,[]),V.get(A).push(r)}let M=[];for(let[r,A]of V)M.push({name:r,connections:A});return M}get currentConnection(){return this.state.connection()}languageSearchInput;languageMenuTrigger;languageSearch="";filteredLanguages=[];highlightedLanguageIndex=0;get availableLanguages(){return Object.keys(this.i18n.strings()?.language??{})}onLanguageSearchInput(C){this.languageSearch=C,this.filterLanguages(),this.highlightedLanguageIndex=this.findCurrentLanguageIndex(),this.cdr.markForCheck()}onLanguageMenuOpened(){this.highlightedLanguageIndex=this.findCurrentLanguageIndex(),setTimeout(()=>{this.languageSearchInput?.nativeElement?.focus(),this.scrollHighlightedLanguageIntoView()})}findCurrentLanguageIndex(){let C=this.filteredLanguages.indexOf(this.i18n.currentLang());return C>=0?C:0}onLanguageMenuClosed(){this.languageSearch="",this.filterLanguages()}onLanguageSearchKeydown(C){if(C.key==="Escape"){this.languageMenuTrigger.closeMenu();return}if(C.key==="Enter"){C.preventDefault(),this.onLanguageSearchEnter();return}if(C.key==="ArrowDown"||C.key==="ArrowUp"){C.preventDefault();let H=this.filteredLanguages.length;if(H===0)return;C.key==="ArrowDown"?this.highlightedLanguageIndex=(this.highlightedLanguageIndex+1)%H:this.highlightedLanguageIndex=(this.highlightedLanguageIndex-1+H)%H,this.scrollHighlightedLanguageIntoView(),this.cdr.markForCheck();return}C.stopPropagation()}onLanguageSearchEnter(){this.filteredLanguages.length>0&&(this.setLanguage(this.filteredLanguages[this.highlightedLanguageIndex]),this.languageMenuTrigger.closeMenu())}scrollHighlightedLanguageIntoView(){setTimeout(()=>{let C=document.querySelector(".p3xr-language-menu .mat-mdc-menu-content");if(!C)return;C.querySelectorAll(".mat-mdc-menu-item")[this.highlightedLanguageIndex]?.scrollIntoView({block:"nearest"})})}filterLanguages(){let C=this.availableLanguages,H=this.languageSearch.trim().toLowerCase();if(!H){this.filteredLanguages=C;return}this.filteredLanguages=C.filter(V=>this.languageLabel(V).toLowerCase().includes(H)||V.toLowerCase().includes(H))}themeLabel(C){return this.i18n.strings()?.label?.theme?.[C]??C}languageLabel(C){return this.i18n.strings()?.language?.[C]??C}isActivePage(C){let H=this.nav.currentUrl;switch(C){case"database":return H.startsWith("/database");case"search":return H==="/search";case"monitoring":return H.startsWith("/monitoring");case"info":return H==="/info";case"settings":return H==="/settings";default:return!1}}navigateTo(C,H){this.nav.navigateTo(C,H)}reloadPage(){location.href="/ng/"}logout(){return y(this,null,function*(){try{yield this.common.confirm({message:this.i18n.strings()?.intention?.logout}),this.auth.logout()}catch(C){}})}setTheme(C){this.theme.setTheme(this.theme.generateThemeName(C))}setThemeAuto(){this.theme.setTheme("auto")}setLanguage(C){return y(this,null,function*(){try{this.i18n.setLanguage(C),this.isElectron&&(yield this.socket.request({action:"settings/language",payload:{key:C}}),this.isElectronInitialized=!0),this.filterLanguages(),this.cdr.markForCheck()}catch(H){this.common.generalHandleError(H)}})}connect(C){return y(this,null,function*(){console.time("connect"),C=this.cloneConnection(C);try{let H=this.settings.getStorageKeyCurrentDatabase(C.id),V=this.getStorageString(H);if(C.askAuth===!0){let m=yield this.authDialog.show();C.username=m.username||void 0,C.password=m.password||void 0}let M=this.i18n.strings();this.overlay.show({message:M?.title?.connectingRedis??"Connecting..."}),this.state.connectionState.set("connecting");let r=yield this.socket.request({action:"connection/connect",payload:{connection:C,db:V}});this.state.page.set(1),this.state.monitor.set(!1),this.state.dbsize.set(r.dbsize);let A=[],Z=0;for(;Z<r.databases;)A.push(Z++);this.state.databaseIndexes.set(A),this.state.connection.set(C);let s=[];Object.keys(r.commands??{}).forEach(m=>{s.push(r.commands[m][0])}),s.sort(),this.state.commands.set(s),this.state.commandsMeta.set(r.commandsMeta??{});let u=Array.isArray(r.modules)?r.modules:[];this.state.modules.set(u),this.state.hasReJSON.set(u.some(m=>m.name==="ReJSON")),this.state.hasRediSearch.set(u.some(m=>m.name==="search")),this.state.hasTimeSeries.set(u.some(m=>m.name==="timeseries"||m.name==="Timeseries")),this.state.hasBloom.set(u.some(m=>m.name==="bf")),yield this.common.loadRedisInfoResponse({response:r}),this.socket.stateChanged$.next(),this.setStorageObject(this.settings.connectInfoStorageKey,C),this.state.connectionState.set("connected")}catch(H){this.removeStorageItem(this.settings.connectInfoStorageKey),this.state.connection.set(void 0),this.state.connectionState.set("none"),this.common.generalHandleError(H)}finally{this.overlay.hide(),this.cdr.markForCheck()}console.timeEnd("connect")})}disconnect(){return y(this,null,function*(){yield this.cmd.disconnect(),this.cdr.markForCheck()})}reducedFunctionality(){let H=this.i18n.strings()?.label?.tooManyKeys,V=typeof H=="function"?H({count:this.state.keysRaw()?.length??0,maxLightKeysCount:this.settings.maxLightKeysCount}):"";this.common.confirm({disableCancel:!0,message:V}).catch(()=>{})}openLink(C){let H={github:"https://github.com/patrikx3/redis-ui",githubRelease:"https://github.com/patrikx3/redis-ui/releases",githubChangelog:"https://github.com/patrikx3/redis-ui/blob/master/change-log.md#change-log",donate:"https://www.paypal.me/patrikx3"};window.open(H[C],"_blank")}cloneConnection(C){return structuredClone(C)}readConnectionFromStorage(){return this.getStorageObject(this.settings.connectInfoStorageKey)}getStorageString(C){if(C)try{return localStorage.getItem(C)??void 0}catch(H){return}}getStorageObject(C){let H=this.getStorageString(C);if(H)try{return JSON.parse(H)}catch(V){return}}setStorageObject(C,H){if(C)try{localStorage.setItem(C,JSON.stringify(H))}catch(V){}}removeStorageItem(C){if(C)try{localStorage.removeItem(C)}catch(H){}}subscribeSocketEvents(){let C=this.socket.redisDisconnected$.subscribe(()=>{this.state.connection.set(void 0),this.state.connectionState.set("none"),this.nav.navigateTo("settings"),this.cdr.markForCheck()}),H=this.socket.socketError$.subscribe(()=>{this.cdr.markForCheck()}),V=this.socket.connections$.subscribe(()=>{this.cdr.markForCheck()}),M=this.socket.configuration$.subscribe(()=>{this.cdr.markForCheck()});this.unsubFns.push(()=>{C.unsubscribe(),H.unsubscribe(),V.unsubscribe(),M.unsubscribe()})}setupRouteTracking(){let C=this.router.events.pipe(X1(H=>H instanceof t2)).subscribe(H=>{if(this.state.currentPage.set(this.urlToPage(H.urlAfterRedirects)),!/spider|bot|yahoo|bing|google|yandex|crawl|slurp|curl/i.test(navigator.userAgent))try{let V=H.urlAfterRedirects.toLowerCase().startsWith("/database/key/")?"/database/key":H.urlAfterRedirects;globalThis.gtag?.("config",this.settings.googleAnalytics,{page_path:V})}catch(V){}});this.unsubFns.push(()=>C.unsubscribe())}urlToPage(C){let H=C.toLowerCase();return H.startsWith("/database")?"database":H.startsWith("/monitoring/profiler")?"profiler":H.startsWith("/monitoring/pubsub")?"pubsub":H.startsWith("/monitoring/memory-analysis")||H.startsWith("/monitoring/analysis")?"analysis":H.startsWith("/monitoring")?"pulse":H.startsWith("/search")?"search":H.startsWith("/timeseries")?"timeseries":H.startsWith("/info")?"info":H.startsWith("/settings")?"settings":"unknown"}setupElectronBridge(){this.isElectron&&window.addEventListener("message",C=>{let H=C.data;!H||typeof H.type!="string"||(H.type==="p3x-set-language"&&typeof H.translation=="string"?this.ngZone.run(()=>y(this,null,function*(){try{yield this.setLanguage(H.translation)}catch(V){console.warn("[LayoutComponent] p3x-set-language failed",V)}})):H.type==="p3x-menu"&&typeof H.action=="string"&&this.ngZone.run(()=>{try{this.nav.navigateTo(H.action)}catch(V){console.warn("[LayoutComponent] p3x-menu failed",V)}}))})}static \u0275fac=function(H){return new(H||L)(S(l1),S(a2),S(U2),S(K),S(q),S(g1),S(k1),S(z2),S(T2),S(o2),S(b1),S(H1),S(R2),S(B2),S(O1),S(_1),S(j5))};static \u0275cmp=z({type:L,selectors:[["p3xr-layout"]],viewQuery:function(H,V){if(H&1&&L2(R3,5)(E3,5),H&2){let M;E1(M=D1())&&(V.languageSearchInput=M.first),E1(M=D1())&&(V.languageMenuTrigger=M.first)}},hostBindings:function(H,V){H&1&&d("keydown",function(r){return V.onKeydown(r)},V2)},decls:49,vars:23,consts:[["languageMenu",""],["languageSearchInput",""],["themeMenu",""],["githubMenu",""],["connectionMenu",""],["languageMenuTrigger","matMenuTrigger"],["id","p3xr-layout-header-container"],[1,"p3xr-mat-layout"],["mat-button",""],["mat-icon-button","","matTooltipPosition","below",3,"matTooltip"],[1,"p3xr-layout-spacer"],["id","p3xr-layout-header-version"],["id","p3xr-layout-footer-container"],["mat-button","",3,"matMenuTriggerFor"],["mat-icon-button","","matTooltipPosition","above",3,"matMenuTriggerFor","matTooltip"],[1,"p3xr-language-menu",3,"closed"],[1,"p3xr-language-search-container",3,"click","keydown"],["autocomplete","off",1,"p3xr-language-search-input",3,"input","placeholder","value"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"p3xr-mat-menu-item-selected","p3xr-language-highlighted"],["mat-menu-item","",3,"p3xr-mat-menu-item-selected"],[1,"p3xr-layout-content"],["mat-button","",3,"click"],[1,"fas","fa-database"],["mat-icon-button","","matTooltipPosition","below",3,"click","matTooltip"],[2,"display","flex","align-items","center","justify-content","center"],[1,"fas","fa-database",2,"font-size","20px"],["mat-button","",3,"p3xr-nav-active"],["mat-icon-button","","matTooltipPosition","below",3,"p3xr-nav-active","matTooltip"],[1,"p3xr-connection-menu-group-label"],["mat-icon-button","","matTooltipPosition","above",3,"matTooltip"],[1,"fa","fa-power-off"],["mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["mat-button","","matTooltipPosition","above",3,"p3xr-nav-active","matTooltip"],["mat-icon-button","","matTooltipPosition","above",3,"p3xr-nav-active","matTooltip"],["mat-button","","matTooltipPosition","above",3,"click","matTooltip"],["mat-button","",3,"menuOpened","matMenuTriggerFor"],["mat-icon-button","","matTooltipPosition","above",3,"menuOpened","matMenuTriggerFor","matTooltip"],[1,"fab","fa-github"]],template:function(H,V){if(H&1){let M=h();e(0,"div",6)(1,"mat-toolbar",7),p(2,W3,4,1,"button",8)(3,N3,3,1,"button",9),p(4,J3,3,3),g(5,"span",10),p(6,L0,4,2),p(7,M0,3,1,"button",9),i()(),p(8,e0,2,1,"div",11),e(9,"div",12)(10,"mat-toolbar",7),p(11,l0,2,2),g(12,"span",10),p(13,Z0,2,1),p(14,u0,6,2,"button",13)(15,s0,4,2,"button",14),e(16,"mat-menu",15,0),d("closed",function(){return V.onLanguageMenuClosed()}),e(18,"div",16),d("click",function(A){return A.stopPropagation()})("keydown",function(A){return V.onLanguageSearchKeydown(A)}),e(19,"input",17,1),d("input",function(){x(M);let A=T(20);return v(V.onLanguageSearchInput(A.value))}),i()(),e(21,"button",18),d("click",function(){return V.setLanguage("auto")}),n(22),i(),g(23,"mat-divider"),G(24,c0,2,5,"button",19,R1),i(),p(26,S0,5,2,"button",13)(27,h0,3,2,"button",14),e(28,"mat-menu",null,2)(30,"button",18),d("click",function(){return V.setThemeAuto()}),n(31),i(),g(32,"mat-divider"),G(33,O0,2,3,"button",20,R1),i(),p(35,g0,4,2,"button",13)(36,f0,2,2,"button",14),e(37,"mat-menu",null,3)(39,"button",18),d("click",function(){return V.openLink("github")}),n(40),i(),e(41,"button",18),d("click",function(){return V.openLink("githubRelease")}),n(42),i(),e(43,"button",18),d("click",function(){return V.openLink("githubChangelog")}),n(44),i()()()(),e(45,"div",21),p(46,k0,1,0,"p3xr-login")(47,b0,1,0,"router-outlet"),i(),p(48,w0,1,0,"p3xr-console-drawer")}if(H&2){let M,r,A,Z,s,u;o(2),l(V.isWide?2:3),o(2),l(V.showLogin?-1:4),o(2),l(V.showLogin?-1:6),o(),l(V.auth.authRequired()&&V.auth.isAuthenticated()?7:-1),o(),l(V.currentVersion&&V.isWide?8:-1),o(3),l(V.showLogin?-1:11),o(2),l(V.state.connectionState()==="connected"?13:-1),o(),l(V.isGtSm?14:15),o(5),c("placeholder",(M=V.i18n.strings().label)==null?null:M.searchLanguage)("value",V.languageSearch),o(2),O("p3xr-mat-menu-item-selected",V.i18n.isAuto()),o(),B(" ",(r=V.i18n.strings().label)==null?null:r.languageAuto," "),o(2),Q(V.filteredLanguages),o(2),l(V.isGtXs?26:27),o(4),O("p3xr-mat-menu-item-selected",V.theme.isAuto()),o(),B(" ",(A=V.i18n.strings().label)==null?null:A.themeAuto," "),o(2),Q(V.sortedThemeKeys),o(2),l(V.isGtSm?35:36),o(5),B(" ",(Z=V.i18n.strings().intention)==null?null:Z.githubRepo," "),o(2),B(" ",(s=V.i18n.strings().intention)==null?null:s.githubRelease," "),o(2),B(" ",(u=V.i18n.strings().intention)==null?null:u.githubChangelog," "),o(2),l(V.showLogin?46:47),o(2),l(!V.showLogin&&V.state.connectionState()==="connected"?48:-1)}},dependencies:[U,x1,i2,t1,r1,L1,v1,V1,e1,M1,B1,y1,w1,T1,b2,k2,s1,u1,J5,H3],styles:[`:host{display:block}.p3xr-layout-spacer{flex:1 1 auto}.p3xr-layout-content,.p3xr-layout-content-electron{position:fixed;top:48px;left:0;right:0;bottom:calc(48px + var(--p3xr-console-drawer-height-active, 0px));overflow-y:auto;overflow-x:hidden;transition:bottom .15s ease-out}#p3xr-layout-header-version{position:fixed;top:35px;left:20px;width:120px;text-align:right;z-index:3;font-size:10px;line-height:1;opacity:.7;pointer-events:none}.p3xr-layout-content{padding:5px;padding-bottom:4px!important}.p3xr-layout-content:has(p3xr-monitoring-shell){padding-bottom:0!important}.p3xr-nav-active.mat-mdc-button{background-color:#ffffff1a!important}body.p3xr-mat-theme-matrix .p3xr-nav-active.mat-mdc-button{background-color:#00000026!important}.mat-toolbar .mat-mdc-icon-button{border-radius:4px!important}.mat-toolbar .mat-mdc-icon-button .mat-icon{margin:0!important}.mat-toolbar .mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:4px!important}.p3xr-nav-active{background-color:#ffffff1a!important;border-radius:4px!important}body.p3xr-mat-theme-matrix .p3xr-nav-active{background-color:#00000026!important}#p3xr-layout-header-container{top:0}#p3xr-layout-footer-container{bottom:0}#p3xr-layout-header-container,#p3xr-layout-footer-container{position:fixed;z-index:2;left:0;width:100%}.p3xr-connection-menu-group-label{padding:6px 16px 2px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;opacity:.6;pointer-events:none}.p3xr-kbd{display:inline-block;padding:2px 8px;font-family:Roboto Mono,monospace;font-size:12px;border:1px solid var(--p3xr-list-border, rgba(0, 0, 0, .12));border-radius:4px;background:var(--p3xr-input-bg, #f5f5f5);color:var(--p3xr-input-color, #333);min-width:70px;text-align:center;white-space:nowrap}.p3xr-kbd-small{min-width:50px;font-size:11px}
`],encapsulation:2,changeDetection:0})}return L})();var y0="p3xr-console-drawer-height";var d1=null;function e3(L){d1||(d1=document.createElement("style"),d1.setAttribute("data-p3xr-console-drawer-height-bootstrap",""),document.head.appendChild(d1)),d1.textContent=`:root { --p3xr-console-drawer-height: ${L}px; }`,document.documentElement.style.setProperty("--p3xr-console-drawer-height",`${L}px`)}function r3(){return{minPx:15/100*window.innerHeight,maxPx:66/100*window.innerHeight}}function T0(){let L=localStorage.getItem(y0);if(!L)return null;let t=parseInt(L,10);return Number.isFinite(t)?t:null}function t3(){let L=T0();if(L===null)return;let{minPx:t,maxPx:C}=r3();e3(Math.max(t,Math.min(C,L))),window.addEventListener("resize",()=>{let H=document.documentElement.style.getPropertyValue("--p3xr-console-drawer-height");if(!H||!H.endsWith("px"))return;let V=parseInt(H,10);if(!Number.isFinite(V))return;let{minPx:M,maxPx:r}=r3(),A=Math.max(M,Math.min(r,V));A!==V&&e3(A)})}t3();e2(M3,{providers:[J1(x1.forRoot(K2),n2,m2),{provide:v2,useValue:{appearance:"fill"}},{provide:u2,useValue:{position:"above"}}]}).then(L=>{globalThis.__p3xr_snackbar=L.injector.get(A2);let t=L.injector.get(q),C=L.injector.get(O1);globalThis.__p3xr_test={state:t,settings:C},console.info("Angular bootstrap complete")}).catch(L=>{console.error("Angular bootstrap error:",L)});