import{_ as K,a as U}from"./IosArrowForward.js";import{ay as z,aw as b,aJ as w,ax as m,b6 as J,b7 as Q,aA as H,D as O,az as W,aL as X,E as q,b as G,j as M,aD as Y,I as p,A as Z,c as A,bn as ee,r as C,u as oe,w as re,bR as V,bS as i,bQ as _,bT as s,bV as I,b_ as S,bM as r,F as T,bU as N,bX as L,bW as le,i as te,bm as ne,bo as se,k as ie}from"./_plugin-vue_export-helper.js";import{b3 as ae,b1 as de,S as ce,_ as ue,b4 as ve,D as be}from"./main.js";const me=z([b("list",`
 --n-merged-border-color: var(--n-border-color);
 --n-merged-color: var(--n-color);
 --n-merged-color-hover: var(--n-color-hover);
 margin: 0;
 font-size: var(--n-font-size);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 padding: 0;
 list-style-type: none;
 color: var(--n-text-color);
 background-color: var(--n-merged-color);
 `,[w("show-divider",[b("list-item",[z("&:not(:last-child)",[m("divider",`
 background-color: var(--n-merged-border-color);
 `)])])]),w("clickable",[b("list-item",`
 cursor: pointer;
 `)]),w("bordered",`
 border: 1px solid var(--n-merged-border-color);
 border-radius: var(--n-border-radius);
 `),w("hoverable",[b("list-item",`
 border-radius: var(--n-border-radius);
 `,[z("&:hover",`
 background-color: var(--n-merged-color-hover);
 `,[m("divider",`
 background-color: transparent;
 `)])])]),w("bordered, hoverable",[b("list-item",`
 padding: 12px 20px;
 `),m("header, footer",`
 padding: 12px 20px;
 `)]),m("header, footer",`
 padding: 12px 0;
 box-sizing: border-box;
 transition: border-color .3s var(--n-bezier);
 `,[z("&:not(:last-child)",`
 border-bottom: 1px solid var(--n-merged-border-color);
 `)]),b("list-item",`
 position: relative;
 padding: 12px 0; 
 box-sizing: border-box;
 display: flex;
 flex-wrap: nowrap;
 align-items: center;
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `,[m("prefix",`
 margin-right: 20px;
 flex: 0;
 `),m("suffix",`
 margin-left: 20px;
 flex: 0;
 `),m("main",`
 flex: 1;
 `),m("divider",`
 height: 1px;
 position: absolute;
 bottom: 0;
 left: 0;
 right: 0;
 background-color: transparent;
 transition: background-color .3s var(--n-bezier);
 pointer-events: none;
 `)])]),J(b("list",`
 --n-merged-color-hover: var(--n-color-hover-modal);
 --n-merged-color: var(--n-color-modal);
 --n-merged-border-color: var(--n-border-color-modal);
 `)),Q(b("list",`
 --n-merged-color-hover: var(--n-color-hover-popover);
 --n-merged-color: var(--n-color-popover);
 --n-merged-border-color: var(--n-border-color-popover);
 `))]),pe=Object.assign(Object.assign({},H.props),{size:{type:String,default:"medium"},bordered:Boolean,clickable:Boolean,hoverable:Boolean,showDivider:{type:Boolean,default:!0}}),F=Z("n-list"),_e=O({name:"List",props:pe,setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:l,mergedRtlRef:v}=W(e),c=X("List",v,o),t=H("List","-list",me,ae,e,o);q(F,{showDividerRef:G(e,"showDivider"),mergedClsPrefixRef:o});const f=M(()=>{const{common:{cubicBezierEaseInOut:g},self:{fontSize:R,textColor:n,color:d,colorModal:D,colorPopover:B,borderColor:$,borderColorModal:P,borderColorPopover:j,borderRadius:k,colorHover:y,colorHoverModal:E,colorHoverPopover:h}}=t.value;return{"--n-font-size":R,"--n-bezier":g,"--n-text-color":n,"--n-color":d,"--n-border-radius":k,"--n-border-color":$,"--n-border-color-modal":P,"--n-border-color-popover":j,"--n-color-modal":D,"--n-color-popover":B,"--n-color-hover":y,"--n-color-hover-modal":E,"--n-color-hover-popover":h}}),u=l?Y("list",void 0,f,e):void 0;return{mergedClsPrefix:o,rtlEnabled:c,cssVars:l?void 0:f,themeClass:u==null?void 0:u.themeClass,onRender:u==null?void 0:u.onRender}},render(){var e;const{$slots:o,mergedClsPrefix:l,onRender:v}=this;return v==null||v(),p("ul",{class:[`${l}-list`,this.rtlEnabled&&`${l}-list--rtl`,this.bordered&&`${l}-list--bordered`,this.showDivider&&`${l}-list--show-divider`,this.hoverable&&`${l}-list--hoverable`,this.clickable&&`${l}-list--clickable`,this.themeClass],style:this.cssVars},o.header?p("div",{class:`${l}-list__header`},o.header()):null,(e=o.default)===null||e===void 0?void 0:e.call(o),o.footer?p("div",{class:`${l}-list__footer`},o.footer()):null)}}),fe=O({name:"ListItem",setup(){const e=A(F,null);return e||ee("list-item","`n-list-item` must be placed in `n-list`."),{showDivider:e.showDividerRef,mergedClsPrefix:e.mergedClsPrefixRef}},render(){const{$slots:e,mergedClsPrefix:o}=this;return p("li",{class:`${o}-list-item`},e.prefix?p("div",{class:`${o}-list-item__prefix`},e.prefix()):null,e.default?p("div",{class:`${o}-list-item__main`},e):null,e.suffix?p("div",{class:`${o}-list-item__suffix`},e.suffix()):null,this.showDivider&&p("div",{class:`${o}-list-item__divider`}))}}),ge={style:{"text-align":"center",margin:"0"}},Ce={__name:"DebugConsole",setup(e){const o=A("axios"),l=C([]),v=C(""),c=C([]),t=C(0),f=C(null);oe(()=>{o.get("/debug/log").then(({data:n})=>{l.value=n}),u("runtime.log")});function u(n){v.value=n,o.get(`/debug/log/${n}`).then(({data:d})=>{t.value=0,c.value=d,t.value=c.value.length-1})}const g=M(()=>{var n;return(n=c.value[t.value])==null?void 0:n.screenshot}),R=M(()=>`/debug/screenshot/${g.value}`);return re(t,()=>{var n;(n=f.value)==null||n.scrollTo({top:0})}),(n,d)=>{const D=fe,B=_e,$=ce,P=ue,j=ve,k=ne,y=se,E=be,h=de;return _(),V(h,{style:{width:"100%",height:"100%",gap:"0","overflow-y":"hidden"}},{default:i(()=>[s($,{style:{width:"220px"}},{default:i(()=>[s(B,{hoverable:"",clickable:"",bordered:""},{default:i(()=>[(_(!0),I(T,null,S(r(l),a=>(_(),V(D,{onClick:x=>u(a)},{default:i(()=>[ie(L(a),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1}),s(h,{vertical:"",style:{flex:"1",height:"100%",overflow:"hidden"}},{default:i(()=>[N("h2",ge,L(r(v)),1),r(g)?(_(),V(P,{key:0,src:r(R),alt:r(g),width:"100%",style:{"max-height":"50%"},"object-fit":"scale-down"},null,8,["src","alt"])):le("",!0),s($,{ref_key:"log_scroll",ref:f,style:{width:"100%"},"content-style":"font-size: 16px; user-select: text; padding: 0 12px"},{default:i(()=>{var a;return[(_(!0),I(T,null,S((a=r(c)[r(t)])==null?void 0:a.log,x=>(_(),I("div",null,[N("code",null,L(x),1)]))),256))]}),_:1},512),s(h,{align:"center",style:{padding:"0 12px 6px"}},{default:i(()=>[s(j,{style:{flex:"1"},"show-tooltip":"",value:r(t),"onUpdate:value":d[0]||(d[0]=a=>te(t)?t.value=a:null),min:0,max:r(c).length-1,"format-tooltip":a=>{var x;return(x=r(c)[a])==null?void 0:x.time}},null,8,["value","max","format-tooltip"]),s(E,null,{default:i(()=>[s(y,{disabled:r(t)==0,onClick:d[1]||(d[1]=a=>t.value--)},{icon:i(()=>[s(k,null,{default:i(()=>[s(r(K))]),_:1})]),_:1},8,["disabled"]),s(y,{disabled:r(t)==r(c).length-1,onClick:d[2]||(d[2]=a=>t.value++)},{icon:i(()=>[s(k,null,{default:i(()=>[s(r(U))]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1})}}};export{Ce as default};
