System.register(["./index-legacy-BGUFxny_.js","./style-legacy-Dq2e2uFG.js","./index-legacy-CwkvHJvM.js","./ImageWithError-legacy-y8dqCaBH.js","./icon-legacy-fy54up3n.js","./helper-legacy-Dnduz_aE.js"],function(e,t){"use strict";var r,n,o,i,l,a,s,c,u,g,d,b,h,p,m,j,f,y,x,$,w,v,k,C,I,_;return{setters:[e=>{r=e.bU,n=e.P,o=e.D,i=e.q,l=e.aE,a=e.aM,s=e.j,c=e.ah,u=e.aR,g=e.S,d=e.dR,b=e.a_,h=e.aL,p=e.aQ,m=e.ag,j=e.bT,f=e.$,y=e.ab,x=e.av},e=>{$=e.b},e=>{w=e.J},e=>{v=e.I},e=>{k=e.g,C=e.O},e=>{I=e.I,_=e.u}],execute:function(){e("G",e=>{const{isHide:t}=r();if(t(e.obj))return null;const{setPathAs:z}=n(),E=o(a,{get color(){return l()},get boxSize(){return parseInt(i.grid_item_size)-30+"px"},get as(){return k(e.obj)}}),{show:K}=$({id:1}),{pushHref:M,to:S}=s(),{openWithDoubleClick:P,toggleWithClick:A,restoreSelectionCache:D}=_();return o(x.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},style:{width:"100%"},get children(){return o(c,{get classList(){return{selected:!!e.obj.selected}},class:"grid-item viselect-item",get"data-index"(){return e.index},w:"$full",p:"$1",spacing:"$1",rounded:"$lg",transition:"all 0.3s",get _hover(){return{transform:"scale(1.06)",bgColor:f()}},as:w,get href(){return e.obj.name},get cursor(){return P()||A()?"default":"pointer"},get bgColor(){return y(()=>!!e.obj.selected)()?f():void 0},"on:dblclick":()=>{P()&&(d(e.index,!0,!0),S(M(e.obj.name)))},"on:click":t=>{if(t.preventDefault(),!P()&&!(t.ctrlKey||t.metaKey||t.shiftKey)&&D())return A()?d(e.index,!e.obj.selected):void S(M(e.obj.name))},onMouseEnter:()=>{z(e.obj.name,e.obj.is_dir,!0)},onContextMenu:t=>{j(()=>{d(e.index,!0,!0)}),K(t,{props:e.obj})},get children(){return[o(u,{class:"item-thumbnail",get h(){return`${parseInt(i.grid_item_size)}px`},w:"$full",get cursor(){return e.obj.type!==C.IMAGE?"inherit":"pointer"},"on:click":t=>{e.obj.type===C.IMAGE&&(t.ctrlKey||t.metaKey||t.shiftKey||D()&&(p.emit("gallery",e.obj.name),t.preventDefault(),t.stopPropagation()))},pos:"relative",get children(){return[o(g,{get when(){return b()},get children(){return o(I,{pos:"absolute",left:"$1",top:"$1","on:mousedown":e=>{e.stopPropagation()},"on:click":e=>{e.stopPropagation()},get checked(){return e.obj.selected},onChange:t=>{d(e.index,t.target.checked)}})}}),o(g,{get when(){return e.obj.thumb},fallback:E,get children(){return o(v,{maxH:"$full",maxW:"$full",rounded:"$lg",shadow:"$md",get fallback(){return o(h,{size:"lg"})},fallbackErr:E,get src(){return e.obj.thumb},loading:"lazy"})}})]}}),o(m,{css:{whiteSpace:"nowrap",textOverflow:"ellipsis"},w:"$full",overflow:"hidden",textAlign:"center",fontSize:"$sm",get title(){return e.obj.name},get children(){return e.obj.name}})]}})}})})}}});
