sd-webui-infinite-image-bro.../vue/dist/assets/fullScreenContextMenu-0e741...

4 lines
90 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{P as Ne,br as ci,a as L,d as se,b6 as Ct,u as et,c as g,bs as At,_ as Et,U as Ze,a8 as fe,Y as z,bc as Yt,af as qt,ad as Ot,h as G,bt as di,b as tt,ae as fi,bu as vi,av as Zt,bb as zn,r as _,b3 as Te,ai as je,aa as Kt,ap as mi,an as _n,bv as Dn,ab as ze,y as le,aI as gi,bw as pi,s as ve,bx as hi,by as xe,bz as Nn,e as vt,bA as yi,ac as Xt,bB as bi,W as q,bm as wi,bC as Si,bD as en,aA as Ci,bE as Ai,bF as Ei,aj as Pt,b4 as Ie,bG as Oi,bH as tn,bI as Pi,bJ as xi,aw as ki,bK as Ii,bL as $i,bM as Mi,a6 as xt,bN as Li,$ as mt,bO as zi,X as F,bP as kt,bQ as _i,x as nt,bR as Tn,bo as ae,am as Be,bS as me,bT as Di,bU as It,bV as nn,aJ as Bn,bj as rn,bk as Ni,bW as Ge,bX as Ti,bi as $t,bY as Bi,bZ as re,B as Mt,b_ as Fi,v as Fn,K as ji,b$ as jn,a0 as Qi,Z as st,c0 as Ri,c1 as Vi,c2 as Ui,c3 as Hi,c4 as Gi,c5 as Wi,a1 as Ji,a2 as Yi,o as T,z as Y,c6 as qi,c7 as Zi,c8 as Ki,c9 as Xi,ca as er,bd as tr,l as J,cb as Ue,J as ce,m as M,E as Lt,cc as an,cd as nr,ce as ir,cf as rr,N as Fe,C as Q,t as N,n as D,T as Qn,cg as ar,ch as lr,M as Rn,q as Z,V as Vn,ci as or,A as sr}from"./index-9fc801b7.js";import{e as ur,f as cr,t as dr,h as Un}from"./db-63f67577.js";import{t as ut,l as ke}from"./index-82db850c.js";import{b as fr}from"./_baseIteratee-429a7bd1.js";var Hn=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Ne.any,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},align:{type:Object},getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:{type:Object,default:void 0},forceRender:{type:Boolean,default:void 0},mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:void 0},onVisibleChange:{type:Function},"onUpdate:visible":{type:Function}}},ct=ci(),vr=function(){return L(L({},Hn()),{},{type:ct.type,size:String,htmlType:ct.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Ne.any,title:String,loading:ct.loading,onClick:{type:Function}})},mr=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],gr=Ze.Group;const Ke=se({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Ct(vr(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(e,n){var i=n.slots,r=n.attrs,s=n.emit,m=function(S){s("update:visible",S),s("visibleChange",S)},c=et("dropdown-button",e),p=c.prefixCls,h=c.direction,P=c.getPopupContainer;return function(){var C,S,b=L(L({},e),r),l=b.type,a=l===void 0?"default":l,o=b.disabled,d=b.loading,u=b.htmlType,A=b.class,f=A===void 0?"":A,O=b.overlay,y=O===void 0?(C=i.overlay)===null||C===void 0?void 0:C.call(i):O,x=b.trigger,E=b.align,w=b.visible;b.onVisibleChange;var v=b.placement,k=v===void 0?h.value==="rtl"?"bottomLeft":"bottomRight":v,I=b.href,$=b.title,j=b.icon,K=j===void 0?((S=i.icon)===null||S===void 0?void 0:S.call(i))||g(At,null,null):j,R=b.mouseEnterDelay,X=b.mouseLeaveDelay,oe=b.overlayClassName,de=b.overlayStyle,ye=b.destroyPopupOnHide,U=b.onClick;b["onUpdate:visible"];var W=Et(b,mr),ee={align:E,disabled:o,trigger:o?[]:x,placement:k,getPopupContainer:P.value,onVisibleChange:m,mouseEnterDelay:R,mouseLeaveDelay:X,visible:w,overlayClassName:oe,overlayStyle:de,destroyPopupOnHide:ye},te=g(Ze,{type:a,disabled:o,loading:d,onClick:U,htmlType:u,href:I,title:$},{default:i.default}),ne=g(Ze,{type:a,icon:K},null);return g(gr,L(L({},W),{},{class:fe(p.value,f)}),{default:function(){return[i.leftButton?i.leftButton({button:te}):te,g(Ae,ee,{default:function(){return[i.rightButton?i.rightButton({button:ne}):ne]},overlay:function(){return y}})]}})}}});var Gn=se({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Ct(Hn(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(e,n){var i=n.slots,r=n.attrs,s=n.emit,m=et("dropdown",e),c=m.prefixCls,p=m.rootPrefixCls,h=m.direction,P=m.getPopupContainer,C=z(function(){var a=e.placement,o=a===void 0?"":a,d=e.transitionName;return d!==void 0?d:o.indexOf("top")>=0?"".concat(p.value,"-slide-down"):"".concat(p.value,"-slide-up")}),S=function(){var o,d,u,A=e.overlay||((o=i.overlay)===null||o===void 0?void 0:o.call(i)),f=Array.isArray(A)?A[0]:A;if(!f)return null;var O=f.props||{};Yt(!O.mode||O.mode==="vertical","Dropdown",'mode="'.concat(O.mode,`" is not supported for Dropdown's Menu.`));var y=O.selectable,x=y===void 0?!1:y,E=O.expandIcon,w=E===void 0?(d=f.children)===null||d===void 0||(u=d.expandIcon)===null||u===void 0?void 0:u.call(d):E,v=typeof w<"u"&&Zt(w)?w:g("span",{class:"".concat(c.value,"-menu-submenu-arrow")},[g(zn,{class:"".concat(c.value,"-menu-submenu-arrow-icon")},null)]),k=Zt(f)?qt(f,{mode:"vertical",selectable:x,expandIcon:function(){return v}}):f;return k},b=z(function(){var a=e.placement;if(!a)return h.value==="rtl"?"bottomRight":"bottomLeft";if(a.includes("Center")){var o=a.slice(0,a.indexOf("Center"));return Yt(!a.includes("Center"),"Dropdown","You are using '".concat(a,"' placement in Dropdown, which is deprecated. Try to use '").concat(o,"' instead.")),o}return a}),l=function(o){s("update:visible",o),s("visibleChange",o)};return function(){var a,o,d=e.arrow,u=e.trigger,A=e.disabled,f=e.overlayClassName,O=(a=i.default)===null||a===void 0?void 0:a.call(i)[0],y=qt(O,Ot({class:fe(O==null||(o=O.props)===null||o===void 0?void 0:o.class,G({},"".concat(c.value,"-rtl"),h.value==="rtl"),"".concat(c.value,"-trigger"))},A?{disabled:A}:{})),x=fe(f,G({},"".concat(c.value,"-rtl"),h.value==="rtl")),E=A?[]:u,w;E&&E.indexOf("contextmenu")!==-1&&(w=!0);var v=di({arrowPointAtCenter:tt(d)==="object"&&d.pointAtCenter,autoAdjustOverflow:!0}),k=fi(L(L(L({},e),r),{},{builtinPlacements:v,overlayClassName:x,arrow:d,alignPoint:w,prefixCls:c.value,getPopupContainer:P.value,transitionName:C.value,trigger:E,onVisibleChange:l,placement:b.value}),["overlay","onUpdate:visible"]);return g(vi,k,{default:function(){return[y]},overlay:S})}}});Gn.Button=Ke;const Ae=Gn;Ae.Button=Ke;Ae.install=function(t){return t.component(Ae.name,Ae),t.component(Ke.name,Ke),t};function pr(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function Wn(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function hr(t){var e=_(null),n=Te(L({},t)),i=_([]),r=function(m){e.value===null&&(i.value=[],e.value=Kt(function(){var c;i.value.forEach(function(p){c=L(L({},c),p)}),Ot(n,c),e.value=null})),i.value.push(m)};return je(function(){e.value&&Kt.cancel(e.value)}),[n,r]}function ln(t,e,n,i){var r=e+n,s=(n-i)/2;if(n>i){if(e>0)return G({},t,s);if(e<0&&r<i)return G({},t,-s)}else if(e<0||r>i)return G({},t,e<0?s:-s);return{}}function yr(t,e,n,i){var r=pr(),s=r.width,m=r.height,c=null;return t<=s&&e<=m?c={x:0,y:0}:(t>s||e>m)&&(c=L(L({},ln("x",n,t,s)),ln("y",i,e,m))),c}var on=Symbol("previewGroupContext"),zt={provide:function(e){mi(on,e)},inject:function(){return _n(on,{isPreviewGroup:_(!1),previewUrls:z(function(){return new Map}),setPreviewUrls:function(){},current:_(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},br=se({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:function(){return{}}}},setup:function(e,n){var i=n.slots,r=z(function(){var E={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return tt(e.preview)==="object"?Zn(e.preview,E):E}),s=Te(new Map),m=_(),c=z(function(){return r.value.visible}),p=z(function(){return r.value.getContainer}),h=function(w,v){var k,I;(k=(I=r.value).onVisibleChange)===null||k===void 0||k.call(I,w,v)},P=Dn(!!c.value,{value:c,onChange:h}),C=ze(P,2),S=C[0],b=C[1],l=_(null),a=z(function(){return c.value!==void 0}),o=z(function(){return Array.from(s.keys())}),d=z(function(){return o.value[r.value.current]}),u=z(function(){return new Map(Array.from(s).filter(function(E){var w=ze(E,2),v=w[1].canPreview;return!!v}).map(function(E){var w=ze(E,2),v=w[0],k=w[1].url;return[v,k]}))}),A=function(w,v){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;s.set(w,{url:v,canPreview:k})},f=function(w){m.value=w},O=function(w){l.value=w},y=function(w,v){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,I=function(){s.delete(w)};return s.set(w,{url:v,canPreview:k}),I},x=function(w){w==null||w.stopPropagation(),b(!1),O(null)};return le(d,function(E){f(E)},{immediate:!0,flush:"post"}),gi(function(){S.value&&a.value&&f(d.value)},{flush:"post"}),zt.provide({isPreviewGroup:_(!0),previewUrls:u,setPreviewUrls:A,current:m,setCurrent:f,setShowPreview:b,setMousePosition:O,registerImage:y}),function(){var E=Ot({},(pi(r.value),r.value));return g(ve,null,[i.default&&i.default(),g(Yn,L(L({},E),{},{"ria-hidden":!S.value,visible:S.value,prefixCls:e.previewPrefixCls,onClose:x,mousePosition:l.value,src:u.value.get(m.value),icons:e.icons,getContainer:p.value}),null)])}}});const Jn=br;var Se={x:0,y:0},wr=L(L({},hi()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),Sr=se({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:wr,emits:["close","afterClose"],setup:function(e,n){var i=n.emit,r=n.attrs,s=Te(e.icons),m=s.rotateLeft,c=s.rotateRight,p=s.zoomIn,h=s.zoomOut,P=s.close,C=s.left,S=s.right,b=_(1),l=_(0),a=hr(Se),o=ze(a,2),d=o[0],u=o[1],A=function(){return i("close")},f=_(),O=Te({originX:0,originY:0,deltaX:0,deltaY:0}),y=_(!1),x=zt.inject(),E=x.previewUrls,w=x.current,v=x.isPreviewGroup,k=x.setCurrent,I=z(function(){return E.value.size}),$=z(function(){return Array.from(E.value.keys())}),j=z(function(){return $.value.indexOf(w.value)}),K=z(function(){return v.value?E.value.get(w.value):e.src}),R=z(function(){return v.value&&I.value>1}),X=_({wheelDirection:0}),oe=function(){b.value=1,l.value=0,u(Se),i("afterClose")},de=function(){b.value++,u(Se)},ye=function(){b.value>1&&b.value--,u(Se)},U=function(){l.value+=90},W=function(){l.value-=90},ee=function(B){B.preventDefault(),B.stopPropagation(),j.value>0&&k($.value[j.value-1])},te=function(B){B.preventDefault(),B.stopPropagation(),j.value<I.value-1&&k($.value[j.value+1])},ne=fe(G({},"".concat(e.prefixCls,"-moving"),y.value)),Qe="".concat(e.prefixCls,"-operations-operation"),Ee="".concat(e.prefixCls,"-operations-icon"),rt=[{icon:P,onClick:A,type:"close"},{icon:p,onClick:de,type:"zoomIn"},{icon:h,onClick:ye,type:"zoomOut",disabled:z(function(){return b.value===1})},{icon:c,onClick:U,type:"rotateRight"},{icon:m,onClick:W,type:"rotateLeft"}],$e=function(){if(e.visible&&y.value){var B=f.value.offsetWidth*b.value,ie=f.value.offsetHeight*b.value,be=Wn(f.value),ue=be.left,we=be.top,ge=l.value%180!==0;y.value=!1;var Oe=yr(ge?ie:B,ge?B:ie,ue,we);Oe&&u(L({},Oe))}},at=function(B){B.button===0&&(B.preventDefault(),B.stopPropagation(),O.deltaX=B.pageX-d.x,O.deltaY=B.pageY-d.y,O.originX=d.x,O.originY=d.y,y.value=!0)},Re=function(B){e.visible&&y.value&&u({x:B.pageX-O.deltaX,y:B.pageY-O.deltaY})},Ve=function(B){if(e.visible){B.preventDefault();var ie=B.deltaY;X.value={wheelDirection:ie}}},lt=function(B){!e.visible||!R.value||(B.preventDefault(),B.keyCode===Xt.LEFT?j.value>0&&k($.value[j.value-1]):B.keyCode===Xt.RIGHT&&j.value<I.value-1&&k($.value[j.value+1]))},ot=function(){e.visible&&(b.value!==1&&(b.value=1),(d.x!==Se.x||d.y!==Se.y)&&u(Se))},Me=function(){};return je(function(){le([function(){return e.visible},y],function(){Me();var H,B,ie=xe(window,"mouseup",$e,!1),be=xe(window,"mousemove",Re,!1),ue=xe(window,"wheel",Ve,{passive:!1}),we=xe(window,"keydown",lt,!1);try{window.top!==window.self&&(H=xe(window.top,"mouseup",$e,!1),B=xe(window.top,"mousemove",Re,!1))}catch{}Me=function(){ie.remove(),be.remove(),ue.remove(),we.remove(),H&&H.remove(),B&&B.remove()}},{flush:"post",immediate:!0}),le([X],function(){var H=X.value.wheelDirection;H>0?ye():H<0&&de()})}),Nn(function(){Me()}),function(){var H=e.visible,B=e.prefixCls,ie=e.rootClassName;return g(yi,L(L({},r),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:B,onClose:A,afterClose:oe,visible:H,wrapClassName:ne,rootClassName:ie,getContainer:e.getContainer}),{default:function(){return[g("ul",{class:"".concat(e.prefixCls,"-operations")},[rt.map(function(ue){var we=ue.icon,ge=ue.onClick,Oe=ue.type,Pe=ue.disabled;return g("li",{class:fe(Qe,G({},"".concat(e.prefixCls,"-operations-operation-disabled"),Pe&&(Pe==null?void 0:Pe.value))),onClick:ge,key:Oe},[vt(we,{class:Ee})])})]),g("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(d.x,"px, ").concat(d.y,"px, 0)")}},[g("img",{onMousedown:at,onDblclick:ot,ref:f,class:"".concat(e.prefixCls,"-img"),src:K.value,alt:e.alt,style:{transform:"scale3d(".concat(b.value,", ").concat(b.value,", 1) rotate(").concat(l.value,"deg)")}},null)]),R.value&&g("div",{class:fe("".concat(e.prefixCls,"-switch-left"),G({},"".concat(e.prefixCls,"-switch-left-disabled"),j.value<=0)),onClick:ee},[C]),R.value&&g("div",{class:fe("".concat(e.prefixCls,"-switch-right"),G({},"".concat(e.prefixCls,"-switch-right-disabled"),j.value>=I.value-1)),onClick:te},[S])]}})}}});const Yn=Sr;var Cr=["icons","maskClassName"],qn=function(){return{src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:Ne.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},Zn=function(e,n){var i=L({},e);return Object.keys(n).forEach(function(r){e[r]===void 0&&(i[r]=n[r])}),i},Ar=0,Kn=se({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:qn(),emits:["click","error"],setup:function(e,n){var i=n.attrs,r=n.slots,s=n.emit,m=z(function(){return e.prefixCls}),c=z(function(){return"".concat(m.value,"-preview")}),p=z(function(){var U={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return tt(e.preview)==="object"?Zn(e.preview,U):U}),h=z(function(){var U;return(U=p.value.src)!==null&&U!==void 0?U:e.src}),P=z(function(){return e.placeholder&&e.placeholder!==!0||r.placeholder}),C=z(function(){return p.value.visible}),S=z(function(){return p.value.getContainer}),b=z(function(){return C.value!==void 0}),l=function(W,ee){var te,ne;(te=(ne=p.value).onVisibleChange)===null||te===void 0||te.call(ne,W,ee)},a=Dn(!!C.value,{value:C,onChange:l}),o=ze(a,2),d=o[0],u=o[1];le(d,function(U,W){l(U,W)});var A=_(P.value?"loading":"normal");le(function(){return e.src},function(){A.value=P.value?"loading":"normal"});var f=_(null),O=z(function(){return A.value==="error"}),y=zt.inject(),x=y.isPreviewGroup,E=y.setCurrent,w=y.setShowPreview,v=y.setMousePosition,k=y.registerImage,I=_(Ar++),$=z(function(){return e.preview&&!O.value}),j=function(){A.value="normal"},K=function(W){A.value="error",s("error",W)},R=function(W){if(!b.value){var ee=Wn(W.target),te=ee.left,ne=ee.top;x.value?(E(I.value),v({x:te,y:ne})):f.value={x:te,y:ne}}x.value?w(!0):u(!0),s("click",W)},X=function(){u(!1),b.value||(f.value=null)},oe=_(null);le(function(){return oe},function(){A.value==="loading"&&oe.value.complete&&(oe.value.naturalWidth||oe.value.naturalHeight)&&j()});var de=function(){};je(function(){le([h,$],function(){if(de(),!x.value)return function(){};de=k(I.value,h.value,$.value),$.value||de()},{flush:"post",immediate:!0})}),Nn(function(){de()});var ye=function(W){return bi(W)?W+"px":W};return function(){var U=e.prefixCls,W=e.wrapperClassName,ee=e.fallback,te=e.src,ne=e.placeholder,Qe=e.wrapperStyle,Ee=e.rootClassName,rt=i.width,$e=i.height,at=i.crossorigin,Re=i.decoding,Ve=i.alt,lt=i.sizes,ot=i.srcset,Me=i.usemap,H=i.class,B=i.style,ie=p.value,be=ie.icons,ue=ie.maskClassName,we=Et(ie,Cr),ge=fe(U,W,Ee,G({},"".concat(U,"-error"),O.value)),Oe=O.value&&ee?ee:h.value,Pe={crossorigin:at,decoding:Re,alt:Ve,sizes:lt,srcset:ot,usemap:Me,class:fe("".concat(U,"-img"),G({},"".concat(U,"-img-placeholder"),ne===!0),H),style:L({height:$e},B)};return g(ve,null,[g("div",{class:ge,onClick:$.value?R:function(ui){s("click",ui)},style:L({width:ye(rt),height:ye($e)},Qe)},[g("img",L(L(L({},Pe),O.value&&ee?{src:ee}:{onLoad:j,onError:K,src:te}),{},{ref:oe}),null),A.value==="loading"&&g("div",{"aria-hidden":"true",class:"".concat(U,"-placeholder")},[ne||r.placeholder&&r.placeholder()]),r.previewMask&&$.value&&g("div",{class:["".concat(U,"-mask"),ue]},[r.previewMask()])]),!x.value&&$.value&&g(Yn,L(L({},we),{},{"aria-hidden":!d.value,visible:d.value,prefixCls:c.value,onClose:X,mousePosition:f.value,src:Oe,alt:Ve,getContainer:S.value,icons:be,rootClassName:Ee}),null)])}}});Kn.PreviewGroup=Jn;const Er=Kn;var Or={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const Pr=Or;function sn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){xr(t,r,n[r])})}return t}function xr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _t=function(e,n){var i=sn({},e,n.attrs);return g(q,sn({},i,{icon:Pr}),null)};_t.displayName="RotateLeftOutlined";_t.inheritAttrs=!1;const kr=_t;var Ir={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const $r=Ir;function un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Mr(t,r,n[r])})}return t}function Mr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dt=function(e,n){var i=un({},e,n.attrs);return g(q,un({},i,{icon:$r}),null)};Dt.displayName="RotateRightOutlined";Dt.inheritAttrs=!1;const Lr=Dt;var zr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const _r=zr;function cn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Dr(t,r,n[r])})}return t}function Dr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Nt=function(e,n){var i=cn({},e,n.attrs);return g(q,cn({},i,{icon:_r}),null)};Nt.displayName="ZoomInOutlined";Nt.inheritAttrs=!1;const Nr=Nt;var Tr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const Br=Tr;function dn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Fr(t,r,n[r])})}return t}function Fr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tt=function(e,n){var i=dn({},e,n.attrs);return g(q,dn({},i,{icon:Br}),null)};Tt.displayName="ZoomOutOutlined";Tt.inheritAttrs=!1;const jr=Tt;var Xn={rotateLeft:g(kr,null,null),rotateRight:g(Lr,null,null),zoomIn:g(Nr,null,null),zoomOut:g(jr,null,null),close:g(wi,null,null),left:g(Si,null,null),right:g(zn,null,null)},Qr=se({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String},setup:function(e,n){var i=n.attrs,r=n.slots,s=et("image",e),m=s.getPrefixCls,c=z(function(){return m("image-preview",e.previewPrefixCls)});return function(){return g(Jn,L(L({},L(L({},i),e)),{},{icons:Xn,previewPrefixCls:c.value}),r)}}});const Rr=Qr;var Ce=se({name:"AImage",inheritAttrs:!1,props:qn(),setup:function(e,n){var i=n.slots,r=n.attrs,s=et("image",e),m=s.prefixCls,c=s.rootPrefixCls,p=s.configProvider,h=z(function(){var P=e.preview;if(P===!1)return P;var C=tt(P)==="object"?P:{};return L(L({icons:Xn},C),{},{transitionName:en(c.value,"zoom",C.transitionName),maskTransitionName:en(c.value,"fade",C.maskTransitionName)})});return function(){var P,C=((P=p.locale)===null||P===void 0?void 0:P.Image)||Ci.Image,S=function(){return g("div",{class:"".concat(m.value,"-mask-info")},[g(Ai,null,null),C==null?void 0:C.preview])},b=e.previewMask,l=b===void 0?i.previewMask||S:b;return g(Er,L(L({},L(L(L({},r),e),{},{prefixCls:m.value})),{},{preview:h.value}),L(L({},i),{},{previewMask:typeof l=="function"?l:null}))}}});Ce.PreviewGroup=Rr;Ce.install=function(t){return t.component(Ce.name,Ce),t.component(Ce.PreviewGroup.name,Ce.PreviewGroup),t};const Vr=Ce;var Ur=["class","style"],Hr=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:Ne.any,delay:Number,indicator:Ne.any}},We=null;function Gr(t,e){return!!t&&!!e&&!isNaN(Number(e))}function Ql(t){var e=t.indicator;We=typeof e=="function"?e:function(){return g(e,null,null)}}const Rl=se({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:Ct(Hr(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:_n("configProvider",Ei)}},data:function(){var e=this.spinning,n=this.delay,i=Gr(e,n);return{sSpinning:e&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;Pt(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var n=e||this.$props,i=n.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=Ie(this.originalUpdateSpinning,i))},updateSpinning:function(){var e=this.spinning,n=this.sSpinning;n!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var n="".concat(e,"-dot"),i=Oi(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),tn(i)?vt(i,{class:n}):We&&tn(We())?vt(We(),{class:n}):g("span",{class:"".concat(n," ").concat(e,"-dot-spin")},[g("i",{class:"".concat(e,"-dot-item")},null),g("i",{class:"".concat(e,"-dot-item")},null),g("i",{class:"".concat(e,"-dot-item")},null),g("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,n,i,r=this.$props,s=r.size,m=r.prefixCls,c=r.tip,p=c===void 0?(e=(n=this.$slots).tip)===null||e===void 0?void 0:e.call(n):c,h=r.wrapperClassName,P=this.$attrs,C=P.class,S=P.style,b=Et(P,Ur),l=this.configProvider,a=l.getPrefixCls,o=l.direction,d=a("spin",m),u=this.sSpinning,A=(i={},G(i,d,!0),G(i,"".concat(d,"-sm"),s==="small"),G(i,"".concat(d,"-lg"),s==="large"),G(i,"".concat(d,"-spinning"),u),G(i,"".concat(d,"-show-text"),!!p),G(i,"".concat(d,"-rtl"),o==="rtl"),G(i,C,!!C),i),f=g("div",L(L({},b),{},{style:S,class:A}),[this.renderIndicator(d),p?g("div",{class:"".concat(d,"-text")},[p]):null]),O=Pi(this);if(O&&O.length){var y,x=(y={},G(y,"".concat(d,"-container"),!0),G(y,"".concat(d,"-blur"),u),y);return g("div",{class:["".concat(d,"-nested-loading"),h]},[u&&g("div",{key:"loading"},[f]),g("div",{class:x,key:"container"},[O])])}return f}});var Wr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};const Jr=Wr;function fn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Yr(t,r,n[r])})}return t}function Yr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bt=function(e,n){var i=fn({},e,n.attrs);return g(q,fn({},i,{icon:Jr}),null)};Bt.displayName="StarFilled";Bt.inheritAttrs=!1;const ei=Bt;var qr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const Zr=qr;function vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Kr(t,r,n[r])})}return t}function Kr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ft=function(e,n){var i=vn({},e,n.attrs);return g(q,vn({},i,{icon:Zr}),null)};Ft.displayName="FileOutlined";Ft.inheritAttrs=!1;const mn=Ft;var Xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const ea=Xr;function gn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){ta(t,r,n[r])})}return t}function ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jt=function(e,n){var i=gn({},e,n.attrs);return g(q,gn({},i,{icon:ea}),null)};jt.displayName="FolderOpenOutlined";jt.inheritAttrs=!1;const pn=jt;function na(t,e,n){if(!xi(n))return!1;var i=typeof e;return(i=="number"?ki(n)&&Ii(e,n.length):i=="string"&&e in n)?$i(n[e],t):!1}var ia=Math.ceil,ra=Math.max;function aa(t,e,n,i){for(var r=-1,s=ra(ia((e-t)/(n||1)),0),m=Array(s);s--;)m[i?s:++r]=t,t+=n;return m}function la(t){return function(e,n,i){return i&&typeof i!="number"&&na(e,n,i)&&(n=i=void 0),e=ut(e),n===void 0?(n=e,e=0):n=ut(n),i=i===void 0?e<n?1:-1:ut(i),aa(e,n,i,t)}}var oa=la();const sa=oa;function ua(t,e){return t&&t.length?Mi(t,fr(e)):[]}const Xe=(...t)=>{document.addEventListener(...t),xt(()=>document.removeEventListener(...t))},ca="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",He=new WeakMap;function da(t,e){return{useHookShareState:i=>{const r=Li();mt(r),He.has(r)||(He.set(r,Te(t(r,i??(e==null?void 0:e())))),xt(()=>{He.delete(r)}));const s=He.get(r);return mt(s),{state:s,toRefs(){return zi(s)}}}}}var fa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const va=fa;function hn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){ma(t,r,n[r])})}return t}function ma(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qt=function(e,n){var i=hn({},e,n.attrs);return g(q,hn({},i,{icon:va}),null)};Qt.displayName="ArrowsAltOutlined";Qt.inheritAttrs=!1;const ga=Qt;var pa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const ha=pa;function yn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){ya(t,r,n[r])})}return t}function ya(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rt=function(e,n){var i=yn({},e,n.attrs);return g(q,yn({},i,{icon:ha}),null)};Rt.displayName="DatabaseOutlined";Rt.inheritAttrs=!1;const ba=Rt;var wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"};const Sa=wa;function bn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Ca(t,r,n[r])})}return t}function Ca(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vt=function(e,n){var i=bn({},e,n.attrs);return g(q,bn({},i,{icon:Sa}),null)};Vt.displayName="DragOutlined";Vt.inheritAttrs=!1;const Aa=Vt;var Ea={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const Oa=Ea;function wn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Pa(t,r,n[r])})}return t}function Pa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ut=function(e,n){var i=wn({},e,n.attrs);return g(q,wn({},i,{icon:Oa}),null)};Ut.displayName="FullscreenExitOutlined";Ut.inheritAttrs=!1;const xa=Ut;var ka={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const Ia=ka;function Sn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){$a(t,r,n[r])})}return t}function $a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ht=function(e,n){var i=Sn({},e,n.attrs);return g(q,Sn({},i,{icon:Ia}),null)};Ht.displayName="FullscreenOutlined";Ht.inheritAttrs=!1;const Ma=Ht;var La={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"left-circle",theme:"outlined"};const za=La;function Cn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){_a(t,r,n[r])})}return t}function _a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gt=function(e,n){var i=Cn({},e,n.attrs);return g(q,Cn({},i,{icon:za}),null)};Gt.displayName="LeftCircleOutlined";Gt.inheritAttrs=!1;const Vl=Gt;var Da={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M666.7 505.5l-246-178A8 8 0 00408 334v46.9c0 10.2 4.9 19.9 13.2 25.9L566.6 512 421.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.8 0-13z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"right-circle",theme:"outlined"};const Na=Da;function An(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Ta(t,r,n[r])})}return t}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wt=function(e,n){var i=An({},e,n.attrs);return g(q,An({},i,{icon:Na}),null)};Wt.displayName="RightCircleOutlined";Wt.inheritAttrs=!1;const Ul=Wt;var Ba={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"};const Fa=Ba;function En(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){ja(t,r,n[r])})}return t}function ja(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jt=function(e,n){var i=En({},e,n.attrs);return g(q,En({},i,{icon:Fa}),null)};Jt.displayName="StarOutlined";Jt.inheritAttrs=!1;const ti=Jt,Qa={"date-asc":F("sortByDateAscending"),"date-desc":F("sortByDateDescending"),"name-asc":F("sortByNameAscending"),"name-desc":F("sortByNameDescending"),"size-asc":F("sortBySizeAscending"),"size-desc":F("sortBySizeDescending"),"created-time-asc":F("sortByCreatedDateAscending"),"created-time-desc":F("sortByCreatedDateDescending")};var ni=(t=>(t.DATE_ASC="date-asc",t.DATE_DESC="date-desc",t.NAME_ASC="name-asc",t.NAME_DESC="name-desc",t.SIZE_ASC="size-asc",t.SIZE_DESC="size-desc",t.CREATED_TIME_ASC="created-time-asc",t.CREATED_TIME_DESC="created-time-desc",t))(ni||{});const Ra=(t,e)=>{const n=t.type==="dir"?1:0;return(e.type==="dir"?1:0)-n},On=(t,e)=>{const n=Date.parse(t.date),i=Date.parse(e.date);return n-i},Pn=(t,e)=>{const n=Date.parse(t.created_time),i=Date.parse(e.created_time);return n-i},xn=(t,e)=>{const n=t.name.toLowerCase(),i=e.name.toLowerCase();return n.localeCompare(i)},kn=(t,e)=>t.bytes-e.bytes,_e=(t,e)=>{const n=(i,r)=>{switch(e){case"date-asc":return On(i,r);case"date-desc":return On(r,i);case"created-time-asc":return Pn(i,r);case"created-time-desc":return Pn(r,i);case"name-asc":return xn(i,r);case"name-desc":return xn(r,i);case"size-asc":return kn(i,r);case"size-desc":return kn(r,i);default:throw new Error(`Invalid sort method: ${e}`)}};return t.slice().sort((i,r)=>Ra(i,r)||n(i,r))},Le=async t=>(await kt.get("/files",{params:{folder_path:t}})).data,Va=async t=>(await kt.post("/delete_files",{file_paths:t})).data,ii=async(t,e)=>(await kt.post("/move_files",{file_paths:t,dest:e})).data;var gt={},Ua={get exports(){return gt},set exports(t){gt=t}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(t,e){(function(n,i){t.exports=i})(_i,function(){var n={};n.version="0.3.5";var i=n.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(l){var a,o;for(a in l)o=l[a],o!==void 0&&l.hasOwnProperty(a)&&(i[a]=o);return this},n.status=null,n.set=function(l){var a=n.isStarted();l=r(l,i.minimum,1),n.status=l===1?null:l;var o=n.render(!a),d=o.querySelector(i.barSelector),u=i.speed,A=i.easing;return o.offsetWidth,c(function(f){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),p(d,m(l,u,A)),l===1?(p(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){p(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout(function(){n.remove(),f()},u)},u)):setTimeout(f,u)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var l=function(){setTimeout(function(){n.status&&(n.trickle(),l())},i.trickleSpeed)};return i.trickle&&l(),this},n.done=function(l){return!l&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(l){var a=n.status;return a?a>1?void 0:(typeof l!="number"&&(a>=0&&a<.2?l=.1:a>=.2&&a<.5?l=.04:a>=.5&&a<.8?l=.02:a>=.8&&a<.99?l=.005:l=0),a=r(a+l,0,.994),n.set(a)):n.start()},n.trickle=function(){return n.inc()},function(){var l=0,a=0;n.promise=function(o){return!o||o.state()==="resolved"?this:(a===0&&n.start(),l++,a++,o.always(function(){a--,a===0?(l=0,n.done()):n.set((l-a)/l)}),this)}}(),n.getElement=function(){var l=n.getParent();if(l){var a=Array.prototype.slice.call(l.querySelectorAll(".nprogress")).filter(function(o){return o.parentElement===l});if(a.length>0)return a[0]}return null},n.getParent=function(){if(i.parent instanceof HTMLElement)return i.parent;if(typeof i.parent=="string")return document.querySelector(i.parent)},n.render=function(l){if(n.isRendered())return n.getElement();P(document.documentElement,"nprogress-busy");var a=document.createElement("div");a.id="nprogress",a.className="nprogress",a.innerHTML=i.template;var o=a.querySelector(i.barSelector),d=l?"-100":s(n.status||0),u=n.getParent(),A;return p(o,{transition:"all 0 linear",transform:"translate3d("+d+"%,0,0)"}),i.showSpinner||(A=a.querySelector(i.spinnerSelector),A&&b(A)),u!=document.body&&P(u,"nprogress-custom-parent"),u.appendChild(a),a},n.remove=function(){n.status=null,C(document.documentElement,"nprogress-busy"),C(n.getParent(),"nprogress-custom-parent");var l=n.getElement();l&&b(l)},n.isRendered=function(){return!!n.getElement()},n.getPositioningCSS=function(){var l=document.body.style,a="WebkitTransform"in l?"Webkit":"MozTransform"in l?"Moz":"msTransform"in l?"ms":"OTransform"in l?"O":"";return a+"Perspective"in l?"translate3d":a+"Transform"in l?"translate":"margin"};function r(l,a,o){return l<a?a:l>o?o:l}function s(l){return(-1+l)*100}function m(l,a,o){var d;return i.positionUsing==="translate3d"?d={transform:"translate3d("+s(l)+"%,0,0)"}:i.positionUsing==="translate"?d={transform:"translate("+s(l)+"%,0)"}:d={"margin-left":s(l)+"%"},d.transition="all "+a+"ms "+o,d}var c=function(){var l=[];function a(){var o=l.shift();o&&o(a)}return function(o){l.push(o),l.length==1&&a()}}(),p=function(){var l=["Webkit","O","Moz","ms"],a={};function o(f){return f.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(O,y){return y.toUpperCase()})}function d(f){var O=document.body.style;if(f in O)return f;for(var y=l.length,x=f.charAt(0).toUpperCase()+f.slice(1),E;y--;)if(E=l[y]+x,E in O)return E;return f}function u(f){return f=o(f),a[f]||(a[f]=d(f))}function A(f,O,y){O=u(O),f.style[O]=y}return function(f,O){var y=arguments,x,E;if(y.length==2)for(x in O)E=O[x],E!==void 0&&O.hasOwnProperty(x)&&A(f,x,E);else A(f,y[1],y[2])}}();function h(l,a){var o=typeof l=="string"?l:S(l);return o.indexOf(" "+a+" ")>=0}function P(l,a){var o=S(l),d=o+a;h(o,a)||(l.className=d.substring(1))}function C(l,a){var o=S(l),d;h(l,a)&&(d=o.replace(" "+a+" "," "),l.className=d.substring(1,d.length-1))}function S(l){return(" "+(l&&l.className||"")+" ").replace(/\s+/gi," ")}function b(l){l&&l.parentNode&&l.parentNode.removeChild(l)}return n})})(Ua);const Ha=gt,dt=new Map,V=nt(),In=new BroadcastChannel("iib-image-transfer-bus"),De=encodeURIComponent,pe=(t,e=!1)=>`/infinite_image_browsing/file?path=${De(t.fullpath)}&t=${De(t.date)}${e?`&disposition=${De(t.name)}`:""}`,Ga=(t,e)=>`/infinite_image_browsing/image-thumbnail?path=${De(t.fullpath)}&size=${e}&t=${De(t.date)}`,{eventEmitter:Je,useEventListen:pt}=Tn(),{useHookShareState:he}=da(()=>{const t=_({tabIdx:-1,paneIdx:-1}),e=z(()=>ke(n.value)),n=_([]),i=z(()=>{var b;return n.value.map(l=>l.curr).slice((b=V.conf)!=null&&b.is_win?1:0)}),r=z(()=>It(...i.value)),s=_(ni.CREATED_TIME_DESC),m=z(()=>{var d;if(!e.value)return[];const b=((d=e.value)==null?void 0:d.files)??[],l=s.value,{walkFiles:a}=e.value,o=u=>V.onlyFoldersAndImages?u.filter(A=>A.type==="dir"||re(A.name)):u;return t.value.walkMode&&a?a.map(u=>_e(o(u),l)).flat():_e(o(b),l)}),c=_([]),p=_(-1),h=_(!0),P=_(),C=_(!1);return{previewing:_(!1),spinning:C,canLoadNext:h,multiSelectedIdxs:c,previewIdx:p,basePath:i,currLocation:r,currPage:e,stack:n,sortMethod:s,sortedFiles:m,scroller:_(),stackViewEl:_(),walkModePath:P,props:t,...Tn()}});function Hl(t,e){const{previewIdx:n,eventEmitter:i,canLoadNext:r,previewing:s}=he().toRefs(),{state:m}=he(),c=z(()=>(e==null?void 0:e.files.value)??m.sortedFiles),p=z(()=>(e==null?void 0:e.scroller.value)??m.scroller);let h=null;const P=(l,a)=>{var o;s.value=l,h!=null&&!l&&a&&((o=p.value)==null||o.scrollToItem(h),h=null)},C=()=>{t.walkMode&&!b("next")&&r&&(ae.info(F("loadingNextFolder")),i.value.emit("loadNextDir",!0))};Xe("keydown",l=>{var a;if(s.value){let o=n.value;if(["ArrowDown","ArrowRight"].includes(l.key))for(o++;c.value[o]&&!re(c.value[o].name);)o++;else if(["ArrowUp","ArrowLeft"].includes(l.key))for(o--;c.value[o]&&!re(c.value[o].name);)o--;if(re((a=c.value[o])==null?void 0:a.name)??""){n.value=o;const d=p.value;d&&!(o>=d.$_startIndex&&o<=d.$_endIndex)&&(h=o)}C()}});const S=l=>{var o;let a=n.value;if(l==="next")for(a++;c.value[a]&&!re(c.value[a].name);)a++;else if(l==="prev")for(a--;c.value[a]&&!re(c.value[a].name);)a--;if(re((o=c.value[a])==null?void 0:o.name)??""){n.value=a;const d=p.value;d&&!(a>=d.$_startIndex&&a<=d.$_endIndex)&&(h=a)}C()},b=l=>{var o;let a=n.value;if(l==="next")for(a++;c.value[a]&&!re(c.value[a].name);)a++;else if(l==="prev")for(a--;c.value[a]&&!re(c.value[a].name);)a--;return re((o=c.value[a])==null?void 0:o.name)??""};return pt("removeFiles",async()=>{var l;s.value&&!m.sortedFiles[n.value]&&(ae.info(F("manualExitFullScreen"),5),await Be(500),(l=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||l.click(),n.value=-1)}),{previewIdx:n,onPreviewVisibleChange:P,previewing:s,previewImgMove:S,canPreview:b}}function Gl(t){const e=_(),{scroller:n,stackViewEl:i,stack:r,currPage:s,currLocation:m,sortMethod:c,useEventListen:p,walkModePath:h,eventEmitter:P}=he().toRefs();le(()=>r.value.length,Ie((y,x)=>{var E;y!==x&&((E=n.value)==null||E.scrollToItem(0))},300));const C=async y=>{if(await o(y),t.walkMode){await Be();const[x]=_e(s.value.files,c.value).filter(E=>E.type==="dir");x&&await o(x.fullpath),await P.value.emit("loadNextDir")}};je(async()=>{var y;if(!r.value.length){const x=await Le("/");r.value.push({files:x.files,curr:"/"})}e.value=new Ha,e.value.configure({parent:i.value}),t.path&&t.path!=="/"?await C(t.path):(y=V.conf)!=null&&y.home&&o(V.conf.home)}),le(m,Ie(y=>{const x=V.tabList[t.tabIdx].panes[t.paneIdx];x.path=y;const E=x.path.split("/").pop(),w=()=>{var v;if(!t.walkMode){const k=Ge(y);for(const[I,$]of Object.entries(V.pathAliasMap))if(k.startsWith($))return k.replace($,I);return E}return"Walk: "+(((v=V.quickMovePaths.find(k=>k.dir===h.value))==null?void 0:v.zh)??E)};x.name=me("div",{style:"display:flex;align-items:center"},[me(ba),me("span",{class:"line-clamp-1",style:"max-width: 256px"},w())]),V.recent=V.recent.filter(v=>v.key!==x.key),V.recent.unshift({path:y,key:x.key}),V.recent.length>20&&(V.recent=V.recent.slice(0,20))},300));const S=()=>Mt(m.value),b=async y=>{var x,E;if(y.type==="dir")try{(x=e.value)==null||x.start();const{files:w}=await Le(y.fullpath);r.value.push({files:w,curr:y.name})}finally{(E=e.value)==null||E.done()}},l=y=>{for(;y<r.value.length-1;)r.value.pop()},a=(y,x)=>(mt(V.conf,"global.conf load failed"),V.conf.is_win?y.toLowerCase()==x.toLowerCase():y==x),o=async y=>{var E,w;const x=r.value.slice();try{Di(y)||(y=It(((E=V.conf)==null?void 0:E.sd_cwd)??"/",y));const v=nn(y),k=r.value.map(I=>I.curr);for(k.shift();k[0]&&v[0]&&a(k[0],v[0]);)k.shift(),v.shift();for(let I=0;I<k.length;I++)r.value.pop();if(!v.length)return d();for(const I of v){const $=(w=s.value)==null?void 0:w.files.find(j=>a(j.name,I));if(!$)throw console.error({frags:v,frag:I,stack:Bn(r.value)}),new Error(`${I} not found`);await b($)}}catch(v){throw ae.error(F("moveFailedCheckPath")+(v instanceof Error?v.message:"")),console.error(y,nn(y),s.value),r.value=x,v}},d=rn(async()=>{var y,x,E;try{if((y=e.value)==null||y.start(),h.value)l(0),await C(h.value);else{const{files:w}=await Le(r.value.length===1?"/":m.value);ke(r.value).files=w}(x=n.value)==null||x.scrollToItem(0),ae.success(F("refreshCompleted"))}finally{(E=e.value)==null||E.done()}});Ni("return-to-iib",rn(async()=>{var y,x;if(!t.walkMode)try{(y=e.value)==null||y.start();const{files:E}=await Le(r.value.length===1?"/":m.value);ke(r.value).files.map(v=>v.date).join()!==E.map(v=>v.date).join()&&(ke(r.value).files=E,ae.success(F("autoUpdate")))}finally{(x=e.value)==null||x.done()}})),p.value("refresh",d);const u=y=>{t.walkMode&&(h.value=y),C(y)},A=z(()=>V.quickMovePaths.map(y=>({...y,path:Ge(y.dir)}))),f=z(()=>{const y=Ge(m.value);return A.value.find(E=>E.path===y)});return{addToSearchScanPathAndQuickMove:async()=>{const y=f.value;if(y){if(!y.can_delete)return;await ur(m.value),ae.success(F("removeComplete"))}else await cr(m.value),ae.success(F("addComplete"));await Fi.emit("updateGlobalSetting")},searchPathInfo:f,refresh:d,copyLocation:S,back:l,openNext:b,currPage:s,currLocation:m,to:o,stack:r,scroller:n,quickMoveTo:u}}function Wl(t){const{scroller:e,sortedFiles:n,stack:i,sortMethod:r,currLocation:s,currPage:m,stackViewEl:c,canLoadNext:p,previewIdx:h}=he().toRefs(),{state:P}=he(),C=_(!1),S=_("grid"),b={line:F("detailList"),grid:F("previewGrid"),"large-size-grid":F("largePreviewGrid")},l={value:w=>w,text:w=>F("sortBy")+" "+Qa[w].toLocaleLowerCase()},a=272,o=64,d=a*2,{width:u}=Ti(c),A=z(()=>{const w=u.value;if(!(S.value==="line"||!w))return~~(w/(S.value==="grid"?a:d))}),f=z(()=>{const w=S.value;if(w==="line")return{first:80,second:void 0};const v=w==="grid"?a:d;return{first:v+o,second:v}}),O=_(!1),y=async()=>{var w;if(!(O.value||!t.walkMode||!p.value))try{O.value=!0;const v=i.value[i.value.length-2],k=_e(v.files,r.value),I=k.findIndex($=>{var j;return $.name===((j=m.value)==null?void 0:j.curr)});if(I!==-1){const $=k[I+1],j=It(s.value,"../",$.name),K=await Le(j),R=m.value;R.curr=$.name,R.walkFiles||(R.walkFiles=[R.files]),R.walkFiles.push(K.files),console.log("curr page files length",(w=m.value)==null?void 0:w.files.length)}}catch(v){console.error("loadNextDir",v),p.value=!1}finally{O.value=!1}},x=async(w=!1)=>{const v=e.value,k=()=>w?h.value:(v==null?void 0:v.$_endIndex)??0;for(;!n.value.length||k()>n.value.length-20&&p.value;)await Be(100),await y()};P.useEventListen("loadNextDir",x);const E=Ie(()=>x(),300);return{gridItems:A,sortedFiles:n,sortMethodConv:l,viewModeMap:b,moreActionsDropdownShow:C,viewMode:S,gridSize:a,sortMethod:r,largeGridSize:d,onScroll:E,loadNextDir:y,loadNextDirLoading:O,canLoadNext:p,itemSize:f}}function Jl(){const{currLocation:t,sortedFiles:e,currPage:n,multiSelectedIdxs:i,eventEmitter:r}=he().toRefs(),s=()=>{i.value=[]};return Xe("click",s),Xe("blur",s),le(n,s),{onFileDragStart:(p,h)=>{const P=Bn(e.value[h]);console.log("onFileDragStart set drag file ",p,h,P);const C=[P];let S=P.type==="dir";if(i.value.includes(h)){const b=i.value.map(l=>e.value[l]);C.push(...b),S=b.some(l=>l.type==="dir")}p.dataTransfer.setData("text/plain",JSON.stringify({includeDir:S,loc:t.value,path:ua(C,"fullpath").map(b=>b.fullpath)}))},onDrop:async p=>{var P;const h=JSON.parse(((P=p.dataTransfer)==null?void 0:P.getData("text"))||"{}");if(console.log(h),h.path&&typeof h.includeDir<"u"&&h.loc){const C=t.value;if(h.loc===C)return;const S=me("div",[me("div",`${F("moveSelectedFilesTo")}${C}`),me("ol",h.path.map(b=>b.split(/[/\\]/).pop()).map(b=>me("li",b)))]);Fn.confirm({title:F("confirm"),content:S,maskClosable:!0,async onOk(){await ii(h.path,C),Je.emit("removeFiles",{paths:h.path,loc:h.loc}),await r.value.emit("refresh")}})}},multiSelectedIdxs:i}}function Yl(t,{openNext:e}){const n=_(!1),i=_(""),{sortedFiles:r,previewIdx:s,multiSelectedIdxs:m,stack:c,currLocation:p,spinning:h,previewing:P}=he().toRefs(),C=Ge;pt("removeFiles",({paths:a,loc:o})=>{if(C(o)!==C(p.value))return;const d=ke(c.value);d&&(d.files=d.files.filter(u=>!a.includes(u.fullpath)),d.walkFiles&&(d.walkFiles=d.walkFiles.map(u=>u.filter(A=>!a.includes(A.fullpath)))))}),pt("addFiles",({files:a,loc:o})=>{if(C(o)!==C(p.value))return;const d=ke(c.value);d&&d.files.unshift(...a)});const S=$t(),b=async(a,o,d)=>{s.value=d,V.fullscreenPreviewInitialUrl=pe(o);const u=m.value.indexOf(d);if(a.shiftKey){if(u!==-1)m.value.splice(u,1);else{m.value.push(d),m.value.sort((O,y)=>O-y);const A=m.value[0],f=m.value[m.value.length-1];m.value=sa(A,f+1)}a.stopPropagation()}else a.ctrlKey||a.metaKey?(u!==-1?m.value.splice(u,1):m.value.push(d),a.stopPropagation()):await e(o)},l=async(a,o,d)=>{var y,x,E;const u=pe(o),A=p.value,f=()=>{let w=[];return m.value.includes(d)?w=m.value.map(v=>r.value[v]):w.push(o),w},O=async w=>{if(!h.value)try{h.value=!0,await Ui(o.fullpath),In.postMessage("iib_hidden_img_update_trigger");const v=setTimeout(()=>Hi.warn({message:F("long_loading"),duration:20}),5e3);await Gi(),clearTimeout(v),In.postMessage(`iib_hidden_tab_${w}`)}catch(v){console.error(v),ae.error("发送图像失败请携带console的错误消息找开发者")}finally{h.value=!1}};if(`${a.key}`.startsWith("toggle-tag-")){const w=+`${a.key}`.split("toggle-tag-")[1],{is_remove:v}=await dr({tag_id:w,img_path:o.fullpath}),k=(x=(y=V.conf)==null?void 0:y.all_custom_tags.find(I=>I.id===w))==null?void 0:x.name;ae.success(F(v?"removedTagFromImage":"addedTagToImage",{tag:k}));return}switch(a.key){case"previewInNewWindow":return window.open(u);case"download":return window.open(pe(o,!0));case"copyPreviewUrl":return Mt(parent.document.location.origin+u);case"send2txt2img":return O("txt2img");case"send2img2img":return O("img2img");case"send2inpaint":return O("inpaint");case"send2extras":return O("extras");case"send2savedDir":{const w=V.quickMovePaths.find(I=>I.key==="outdir_save");if(!w)return ae.error(F("unknownSavedDir"));const v=Vi(w.dir,(E=V.conf)==null?void 0:E.sd_cwd),k=f();await ii(k.map(I=>I.fullpath),v),Je.emit("removeFiles",{paths:k.map(I=>I.fullpath),loc:p.value}),Je.emit("addFiles",{files:k,loc:v});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const w=Ri(),v=Wi(),k=a.key.split("-")[1];k==="img2img"?v.switch_to_img2img():v.switch_to_txt2img(),await Be(100);const $=w.querySelector(`#${k}_controlnet`).querySelector(".label-wrap");$.className.includes("open")||($.click(),await Be(100)),$.scrollIntoView();const K=await(await fetch(pe(o))).blob(),R=new File([K],"image.jpg",{type:K.type,lastModified:Date.now()}),X=new DataTransfer;X.items.add(R);const oe=new ClipboardEvent("paste",{clipboardData:X,bubbles:!0});$.dispatchEvent(oe);break}case"openWithWalkMode":{dt.set(A,c.value);const w=V.tabList[t.tabIdx],v={type:"local",key:st(),path:o.fullpath,name:F("local"),stackKey:A,walkMode:!0};w.panes.push(v),w.key=v.key;break}case"openInNewTab":{dt.set(A,c.value);const w=V.tabList[t.tabIdx],v={type:"local",key:st(),path:o.fullpath,name:F("local"),stackKey:A};w.panes.push(v),w.key=v.key;break}case"openOnTheRight":{dt.set(A,c.value);let w=V.tabList[t.tabIdx+1];w||(w=Qi({panes:[],key:""}),V.tabList[t.tabIdx+1]=w);const v={type:"local",key:st(),path:o.fullpath,name:F("local"),stackKey:A};w.panes.push(v),w.key=v.key;break}case"viewGenInfo":{n.value=!0,i.value=await S.pushAction(()=>jn(o.fullpath)).res;break}case"openWithLocalFileBrowser":{await ji(o.fullpath);break}case"deleteFiles":{const w=f();await new Promise(v=>{Fn.confirm({title:F("confirmDelete"),maskClosable:!0,content:me("ol",{style:"max-height:50vh;overflow:auto;"},w.map(k=>k.fullpath.split(/[/\\]/).pop()).map(k=>me("li",k))),async onOk(){const k=w.map(I=>I.fullpath);await Va(k),ae.success(F("deleteSuccess")),Je.emit("removeFiles",{paths:k,loc:p.value}),v()}})});break}}return{}};return Xe("keydown",a=>{var o,d;if(P.value){const u=[];if(a.shiftKey&&u.push("Shift"),a.ctrlKey&&u.push("Ctrl"),a.code.startsWith("Key")||a.code.startsWith("Digit")){u.push(a.code);const A=u.join(" + "),f=(o=Object.entries(V.shortcut).find(O=>O[1]===A))==null?void 0:o[0];if(f){a.stopPropagation(),a.preventDefault();const O=s.value,y=r.value[O];switch(f){case"deleteInFullScreenPreviewMode":return pe(y)===V.fullscreenPreviewInitialUrl?ae.warn(F("fullscreenRestriction")):l({key:"deleteFiles"},y,O);case"toggleLikeTagInFullScreenPreviewMode":{const x=(d=V.conf)==null?void 0:d.all_custom_tags.find(E=>E.name==="like");return l({key:`toggle-tag-${x.id}`},y,O)}}}}}}),{onFileItemClick:b,onContextMenuClick:l,showGenInfo:n,imageGenInfo:i,q:S}}const ql=()=>{const{stackViewEl:t}=he().toRefs(),e=_(-1);return Bi(t,n=>{var r;let i=n.target;for(;i.parentElement;)if(i=i.parentElement,i.tagName.toLowerCase()==="li"&&i.classList.contains("file-item-trigger")){const s=(r=i.dataset)==null?void 0:r.idx;s&&Number.isSafeInteger(+s)&&(e.value=+s);return}}),{showMenuIdx:e}};function Wa(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var r=t.indexOf("Edge/");return r>0?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1}let Ye;function ht(){ht.init||(ht.init=!0,Ye=Wa()!==-1)}var it={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){ht(),Pt(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",Ye&&this.$el.appendChild(t),t.data="about:blank",Ye||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Ye&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ja=qi();Ji("data-v-b329ee4c");const Ya={class:"resize-observer",tabindex:"-1"};Yi();const qa=Ja((t,e,n,i,r,s)=>(T(),Y("div",Ya)));it.render=qa;it.__scopeId="data-v-b329ee4c";it.__file="src/components/ResizeObserver.vue";function qe(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(e){return typeof e}:qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(t)}function Za(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ka(t,e,n){return e&&$n(t.prototype,e),n&&$n(t,n),t}function Mn(t){return Xa(t)||el(t)||tl(t)||nl()}function Xa(t){if(Array.isArray(t))return yt(t)}function el(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function tl(t,e){if(t){if(typeof t=="string")return yt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yt(t,e)}}function yt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function nl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function il(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function rl(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,s,m=function(p){for(var h=arguments.length,P=new Array(h>1?h-1:0),C=1;C<h;C++)P[C-1]=arguments[C];if(s=P,!(i&&p===r)){var S=n.leading;typeof S=="function"&&(S=S(p,r)),(!i||p!==r)&&S&&t.apply(void 0,[p].concat(Mn(s))),r=p,clearTimeout(i),i=setTimeout(function(){t.apply(void 0,[p].concat(Mn(s))),i=0},e)}};return m._clear=function(){clearTimeout(i),i=null},m}function ri(t,e){if(t===e)return!0;if(qe(t)==="object"){for(var n in t)if(!ri(t[n],e[n]))return!1;return!0}return!1}var al=function(){function t(e,n,i){Za(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,i)}return Ka(t,[{key:"createObserver",value:function(n,i){var r=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=il(n),this.callback=function(c,p){r.options.callback(c,p),c&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},m=s.leading;this.callback=rl(this.callback,this.options.throttle,{leading:function(p){return m==="both"||m==="visible"&&p||m==="hidden"&&!p}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(c){var p=c[0];if(c.length>1){var h=c.find(function(C){return C.isIntersecting});h&&(p=h)}if(r.callback){var P=p.isIntersecting&&p.intersectionRatio>=r.threshold;if(P===r.oldResult)return;r.oldResult=P,r.callback(P,p)}},this.options.intersection),Pt(function(){r.observer&&r.observer.observe(r.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function ai(t,e,n){var i=e.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var r=new al(t,i,n);t._vue_visibilityState=r}}function ll(t,e,n){var i=e.value,r=e.oldValue;if(!ri(i,r)){var s=t._vue_visibilityState;if(!i){li(t);return}s?s.createObserver(i,n):ai(t,{value:i},n)}}function li(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var ol={beforeMount:ai,updated:ll,unmounted:li},sl={itemsLimit:1e3},ul=/(auto|scroll)/;function oi(t,e){return t.parentNode===null?e:oi(t.parentNode,e.concat([t]))}var ft=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},cl=function(e){return ft(e,"overflow")+ft(e,"overflow-y")+ft(e,"overflow-x")},dl=function(e){return ul.test(cl(e))};function Ln(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=oi(t.parentNode,[]),n=0;n<e.length;n+=1)if(dl(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function bt(t){return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt(t)}var fl={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function vl(){return this.items.length&&bt(this.items[0])!=="object"}var wt=!1;if(typeof window<"u"){wt=!1;try{var ml=Object.defineProperty({},"passive",{get:function(){wt=!0}});window.addEventListener("test",null,ml)}catch{}}let gl=0;var si={name:"RecycleScroller",components:{ResizeObserver:it},directives:{ObserveVisibility:ol},props:{...fl,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,i=this.minItemSize;let r=1e4,s=0,m;for(let c=0,p=e.length;c<p;c++)m=e[c][n]||i,m<r&&(r=m),s+=m,t[c]={accumulator:s,size:m};return this.$_computedMinItemSize=r,t}return[]},simpleArray:vl,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let i=0,r=e.length;i<r;i++)n[e[i][t]]=i;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,i,r){const s=Zi({id:gl++,index:e,used:!0,key:i,type:r}),m=Ki({item:n,position:0,nr:s});return t.push(m),m},unuseView(t,e=!1){const n=this.$_unusedViews,i=t.nr.type;let r=n.get(i);r||(r=[],n.set(i,r)),r.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,i=this.gridItems||1,r=this.itemSecondarySize||n,s=this.$_computedMinItemSize,m=this.typeField,c=this.simpleArray?null:this.keyField,p=this.items,h=p.length,P=this.sizes,C=this.$_views,S=this.$_unusedViews,b=this.pool,l=this.itemIndexByKey;let a,o,d,u,A;if(!h)a=o=u=A=d=0;else if(this.$_prerender)a=u=0,o=A=Math.min(this.prerender,p.length),d=null;else{const v=this.getScroll();if(e){let $=v.start-this.$_lastUpdateScrollPosition;if($<0&&($=-$),n===null&&$<s||$<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=v.start;const k=this.buffer;v.start-=k,v.end+=k;let I=0;if(this.$refs.before&&(I=this.$refs.before.scrollHeight,v.start-=I),this.$refs.after){const $=this.$refs.after.scrollHeight;v.end+=$}if(n===null){let $,j=0,K=h-1,R=~~(h/2),X;do X=R,$=P[R].accumulator,$<v.start?j=R:R<h-1&&P[R+1].accumulator>v.start&&(K=R),R=~~((j+K)/2);while(R!==X);for(R<0&&(R=0),a=R,d=P[h-1].accumulator,o=R;o<h&&P[o].accumulator<v.end;o++);for(o===-1?o=p.length-1:(o++,o>h&&(o=h)),u=a;u<h&&I+P[u].accumulator<v.start;u++);for(A=u;A<h&&I+P[A].accumulator<v.end;A++);}else{a=~~(v.start/n*i);const $=a%i;a-=$,o=Math.ceil(v.end/n*i),u=Math.max(0,Math.floor((v.start-I)/n*i)),A=Math.floor((v.end-I)/n*i),a<0&&(a=0),o>h&&(o=h),u<0&&(u=0),A>h&&(A=h),d=Math.ceil(h/i)*n}}o-a>sl.itemsLimit&&this.itemsLimitError(),this.totalSize=d;let f;const O=a<=this.$_endIndex&&o>=this.$_startIndex;if(O)for(let v=0,k=b.length;v<k;v++)f=b[v],f.nr.used&&(t&&(f.nr.index=l[f.item[c]]),(f.nr.index==null||f.nr.index<a||f.nr.index>=o)&&this.unuseView(f));const y=O?null:new Map;let x,E,w;for(let v=a;v<o;v++){x=p[v];const k=c?x[c]:x;if(k==null)throw new Error(`Key is ${k} on item (keyField is '${c}')`);if(f=C.get(k),!n&&!P[v].size){f&&this.unuseView(f);continue}E=x[m];let I=S.get(E),$=!1;if(!f)O?I&&I.length?f=I.pop():f=this.addView(b,v,x,k,E):(w=y.get(E)||0,(!I||w>=I.length)&&(f=this.addView(b,v,x,k,E),this.unuseView(f,!0),I=S.get(E)),f=I[w],y.set(E,w+1)),C.delete(f.nr.key),f.nr.used=!0,f.nr.index=v,f.nr.key=k,f.nr.type=E,C.set(k,f),$=!0;else if(!f.nr.used&&(f.nr.used=!0,f.nr.index=v,$=!0,I)){const j=I.indexOf(f);j!==-1&&I.splice(j,1)}f.item=x,$&&(v===p.length-1&&this.$emit("scroll-end"),v===0&&this.$emit("scroll-start")),n===null?(f.position=P[v-1].accumulator,f.offset=0):(f.position=Math.floor(v/i)*n,f.offset=v%i*r)}return this.$_startIndex=a,this.$_endIndex=o,this.emitUpdate&&this.$emit("update",a,o,u,A),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:O}},getListenerTarget(){let t=Ln(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let i;if(this.pageMode){const r=t.getBoundingClientRect(),s=n?r.height:r.width;let m=-(n?r.top:r.left),c=n?window.innerHeight:window.innerWidth;m<0&&(c+=m,m=0),m+c>s&&(c=s-m),i={start:m,end:m+c}}else n?i={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:i={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,wt?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,r;if(this.pageMode){const s=Ln(this.$el),m=s.tagName==="HTML"?0:s[e.scroll],c=s.getBoundingClientRect(),h=this.$el.getBoundingClientRect()[e.start]-c[e.start];n=s,i=e.scroll,r=t+m+h}else n=this.$el,i=e.scroll,r=t;n[i]=r},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const pl={key:0,ref:"before",class:"vue-recycle-scroller__slot"},hl={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function yl(t,e,n,i,r,s){const m=Xi("ResizeObserver"),c=er("observe-visibility");return tr((T(),J("div",{class:Fe(["vue-recycle-scroller",{ready:r.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...p)=>s.handleScroll&&s.handleScroll(...p))},[t.$slots.before?(T(),J("div",pl,[Ue(t.$slots,"before")],512)):ce("v-if",!0),(T(),Y(an(n.listTag),{ref:"wrapper",style:rr({[t.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:Fe(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:M(()=>[(T(!0),J(ve,null,Lt(r.pool,p=>(T(),Y(an(n.itemTag),nr({key:p.nr.id,style:r.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${p.position}px) translate${t.direction==="vertical"?"X":"Y"}(${p.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&r.hoverKey===p.nr.key}]]},ir(n.skipHover?{}:{mouseenter:()=>{r.hoverKey=p.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:M(()=>[Ue(t.$slots,"default",{item:p.item,index:p.nr.index,active:p.nr.used})]),_:2},1040,["style","class"]))),128)),Ue(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(T(),J("div",hl,[Ue(t.$slots,"after")],512)):ce("v-if",!0),g(m,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[c,s.handleVisibilityChange]])}si.render=yl;si.__file="src/components/RecycleScroller.vue";const St=se({__name:"ContextMenu",props:{file:null,idx:null,selectedTag:null,disableDelete:{type:Boolean}},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,i=nt(),r=z(()=>{var s;return(((s=i.conf)==null?void 0:s.all_custom_tags)??[]).reduce((m,c)=>[...m,{...c,selected:!!n.selectedTag.find(p=>p.id===c.id)}],[])});return(s,m)=>{const c=Qn,p=ar,h=lr,P=Rn;return T(),Y(P,{onClick:m[0]||(m[0]=C=>e("contextMenuClick",C,t.file,t.idx))},{default:M(()=>[g(c,{key:"deleteFiles",disabled:t.disableDelete},{default:M(()=>[Q(N(s.$t("deleteSelected")),1)]),_:1},8,["disabled"]),t.file.type==="dir"?(T(),J(ve,{key:0},[g(c,{key:"openInNewTab"},{default:M(()=>[Q(N(s.$t("openInNewTab")),1)]),_:1}),g(c,{key:"openOnTheRight"},{default:M(()=>[Q(N(s.$t("openOnTheRight")),1)]),_:1}),g(c,{key:"openWithWalkMode"},{default:M(()=>[Q(N(s.$t("openWithWalkMode")),1)]),_:1})],64)):ce("",!0),t.file.type==="file"?(T(),J(ve,{key:1},[D(re)(t.file.name)?(T(),J(ve,{key:0},[g(c,{key:"viewGenInfo"},{default:M(()=>[Q(N(s.$t("viewGenerationInfo")),1)]),_:1}),g(p),g(c,{key:"send2txt2img"},{default:M(()=>[Q(N(s.$t("sendToTxt2img")),1)]),_:1}),g(c,{key:"send2img2img"},{default:M(()=>[Q(N(s.$t("sendToImg2img")),1)]),_:1}),g(c,{key:"send2inpaint"},{default:M(()=>[Q(N(s.$t("sendToInpaint")),1)]),_:1}),g(c,{key:"send2extras"},{default:M(()=>[Q(N(s.$t("sendToExtraFeatures")),1)]),_:1}),g(h,{key:"send2controlnet",title:s.$t("sendToControlNet")},{default:M(()=>[g(c,{key:"send2controlnet-txt2img"},{default:M(()=>[Q(N(s.$t("t2i")),1)]),_:1}),g(c,{key:"send2controlnet-img2img"},{default:M(()=>[Q(N(s.$t("i2i")),1)]),_:1})]),_:1},8,["title"]),g(c,{key:"send2savedDir"},{default:M(()=>[Q(N(s.$t("send2savedDir")),1)]),_:1}),g(p),g(h,{key:"toggle-tag",title:s.$t("toggleTag")},{default:M(()=>[(T(!0),J(ve,null,Lt(D(r),C=>(T(),Y(c,{key:`toggle-tag-${C.id}`},{default:M(()=>[Q(N(C.name)+" ",1),C.selected?(T(),Y(D(ei),{key:0})):(T(),Y(D(ti),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"]),g(c,{key:"openWithLocalFileBrowser"},{default:M(()=>[Q(N(s.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):ce("",!0),g(c,{key:"previewInNewWindow"},{default:M(()=>[Q(N(s.$t("previewInNewWindow")),1)]),_:1}),g(c,{key:"download"},{default:M(()=>[Q(N(s.$t("download")),1)]),_:1}),g(c,{key:"copyPreviewUrl"},{default:M(()=>[Q(N(s.$t("copySourceFilePreviewLink")),1)]),_:1})],64)):ce("",!0)]),_:1})}}}),bl=["data-idx"],wl={key:0},Sl={class:"more"},Cl={key:1,class:"preview-icon-wrap"},Al={class:"profile"},El={class:"name line-clamp-1"},Ol={class:"basic-info"},Pl={class:"name line-clamp-1"},xl={class:"basic-info"},kl=se({__name:"FileItem",props:{file:null,idx:null,selected:{type:Boolean,default:!1},showMenuIdx:null,viewMode:{default:"grid"},fullScreenPreviewImageUrl:null},emits:["update:showMenuIdx","fileItemClick","dragstart","previewVisibleChange","contextMenuClick"],setup(t,{emit:e}){const n=t,i=nt(),r=_([]),s=()=>{var p;((p=n==null?void 0:n.file)==null?void 0:p.type)==="file"&&m.pushAction(()=>Un(n.file.fullpath)).res.then(h=>{r.value=h})},m=$t(),c=z(()=>n.viewMode==="grid"?[i.gridThumbnailSize,i.gridThumbnailSize].join("x"):[i.largeGridThumbnailSize,i.largeGridThumbnailSize].join("x"));return(p,h)=>{const P=Ae,C=Vr;return T(),Y(P,{trigger:["contextmenu"],visible:D(i).longPressOpenContextMenu?typeof t.idx=="number"&&t.showMenuIdx===t.idx:void 0,"onUpdate:visible":h[4]||(h[4]=S=>typeof t.idx=="number"&&e("update:showMenuIdx",S?t.idx:-1))},{overlay:M(()=>[g(St,{file:t.file,idx:t.idx,"selected-tag":r.value,onContextMenuClick:h[3]||(h[3]=(S,b,l)=>e("contextMenuClick",S,b,l))},null,8,["file","idx","selected-tag"])]),default:M(()=>[(T(),J("li",{class:Fe(["file file-item-trigger",{clickable:t.file.type==="dir",selected:t.selected,grid:t.viewMode==="grid"||t.viewMode==="large-size-grid","large-grid":t.viewMode==="large-size-grid"}]),"data-idx":t.idx,key:t.file.name,draggable:"true",onDragstart:h[1]||(h[1]=S=>e("dragstart",S,t.idx)),onContextmenu:s,onClickCapture:h[2]||(h[2]=S=>e("fileItemClick",S,t.file,t.idx))},[t.viewMode!=="line"?(T(),J("div",wl,[g(P,null,{overlay:M(()=>[g(St,{file:t.file,idx:t.idx,"selected-tag":r.value,onContextMenuClick:h[0]||(h[0]=(S,b,l)=>e("contextMenuClick",S,b,l))},null,8,["file","idx","selected-tag"])]),default:M(()=>[Z("div",Sl,[g(D(At))])]),_:1}),D(re)(t.file.name)?(T(),Y(C,{key:t.file.fullpath,class:Fe(`idx-${t.idx}`),src:D(i).enableThumbnail?D(Ga)(t.file,D(c)):D(pe)(t.file),fallback:D(ca),preview:{src:t.fullScreenPreviewImageUrl,onVisibleChange:(S,b)=>e("previewVisibleChange",S,b)}},null,8,["class","src","fallback","preview"])):(T(),J("div",Cl,[t.file.type==="file"?(T(),Y(D(mn),{key:0,class:"icon center"})):(T(),Y(D(pn),{key:1,class:"icon center"}))])),Z("div",Al,[Z("div",El,N(t.file.name),1),Z("div",Ol,[Z("div",null,N(t.file.size),1),Z("div",null,N(t.file.date),1)])])])):(T(),J(ve,{key:1},[t.file.type==="file"?(T(),Y(D(mn),{key:0,class:"icon"})):(T(),Y(D(pn),{key:1,class:"icon"})),Z("div",Pl,N(t.file.name),1),Z("div",xl,[Z("div",null,N(t.file.size),1),Z("div",null,N(t.file.date),1)])],64))],42,bl))]),_:1},8,["visible"])}}});const Zl=Vn(kl,[["__scopeId","data-v-d94f3bd3"]]);function Il(t,e,n,i){const r={x:0,y:0};let s=0,m=0,c=typeof(i==null?void 0:i.width)=="number"?i.width:0,p=typeof(i==null?void 0:i.height)=="number"?i.height:0,h=typeof(i==null?void 0:i.left)=="number"?i.left:0,P=typeof(i==null?void 0:i.top)=="number"?i.top:0,C=!1;const S=u=>{u.stopPropagation(),u.preventDefault(),!(!t.value||!e.value)&&(s=u instanceof MouseEvent?u.clientX:u.touches[0].clientX,m=u instanceof MouseEvent?u.clientY:u.touches[0].clientY,c=t.value.offsetWidth,p=t.value.offsetHeight,r.x=e.value.offsetLeft,r.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",b),document.documentElement.addEventListener("touchmove",b),document.documentElement.addEventListener("mouseup",l),document.documentElement.addEventListener("touchend",l))},b=u=>{if(!t.value||!e.value)return;const A=c+((u instanceof MouseEvent?u.clientX:u.touches[0].clientX)-s),f=p+((u instanceof MouseEvent?u.clientY:u.touches[0].clientY)-m),O=r.x+((u instanceof MouseEvent?u.clientX:u.touches[0].clientX)-s),y=r.y+((u instanceof MouseEvent?u.clientY:u.touches[0].clientY)-m);t.value.style.width=`${A}px`,t.value.style.height=`${f}px`,e.value.style.left=`${O}px`,e.value.style.top=`${y}px`,i!=null&&i.onResize&&i.onResize(A,f)},l=()=>{document.documentElement.removeEventListener("mousemove",b),document.documentElement.removeEventListener("touchmove",b),document.documentElement.removeEventListener("mouseup",l),document.documentElement.removeEventListener("touchend",l)},a=u=>{u.stopPropagation(),u.preventDefault(),!(!t.value||!n.value)&&(C=!0,h=t.value.offsetLeft,P=t.value.offsetTop,s=u instanceof MouseEvent?u.clientX:u.touches[0].clientX,m=u instanceof MouseEvent?u.clientY:u.touches[0].clientY,document.documentElement.addEventListener("mousemove",o),document.documentElement.addEventListener("touchmove",o),document.documentElement.addEventListener("mouseup",d),document.documentElement.addEventListener("touchend",d))},o=u=>{if(!t.value||!n.value||!C)return;const A=h+((u instanceof MouseEvent?u.clientX:u.touches[0].clientX)-s),f=P+((u instanceof MouseEvent?u.clientY:u.touches[0].clientY)-m);t.value.style.left=`${A}px`,t.value.style.top=`${f}px`,i!=null&&i.onDrag&&i.onDrag(A,f)},d=()=>{C=!1,document.documentElement.removeEventListener("mousemove",o),document.documentElement.removeEventListener("touchmove",o),document.documentElement.removeEventListener("mouseup",d),document.documentElement.removeEventListener("touchend",d)};return je(()=>{!t.value||!i||(typeof i.width=="number"&&(t.value.style.width=`${i.width}px`),typeof i.height=="number"&&(t.value.style.height=`${i.height}px`),typeof i.left=="number"&&(t.value.style.left=`${i.left}px`),typeof i.top=="number"&&(t.value.style.top=`${i.top}px`))}),xt(()=>{document.documentElement.removeEventListener("mousemove",b),document.documentElement.removeEventListener("touchmove",b),document.documentElement.removeEventListener("mouseup",l),document.documentElement.removeEventListener("touchend",l),document.documentElement.removeEventListener("mousemove",o),document.documentElement.removeEventListener("touchmove",o),document.documentElement.removeEventListener("mouseup",d),document.documentElement.removeEventListener("touchend",d)}),le(()=>[t.value,e.value,n.value],([u,A,f])=>{u&&A&&(A.addEventListener("mousedown",S),A.addEventListener("touchstart",S)),u&&f&&(f.addEventListener("mousedown",a),f.addEventListener("touchstart",a))}),{handleResizeMouseDown:S,handleDragMouseDown:a}}const $l={class:"container"},Ml={class:"action-bar"},Ll={key:0,class:"icon",style:{cursor:"pointer"}},zl={key:0,"flex-placeholder":""},_l={key:1,class:"action-bar"},Dl={key:0,class:"gen-info"},Nl=se({__name:"fullScreenContextMenu",props:{file:null,idx:null},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,i=nt(),r=_(),s=_([]),m=z(()=>{var l;return(((l=i.conf)==null?void 0:l.all_custom_tags)??[]).reduce((a,o)=>[...a,{...o,selected:!!s.value.find(d=>d.id===o.id)}],[])}),c=$t(),p=_("");le(()=>{var l;return(l=n==null?void 0:n.file)==null?void 0:l.fullpath},async l=>{l&&(c.tasks.forEach(a=>a.cancel()),c.pushAction(()=>jn(l)).res.then(a=>{p.value=a}))},{immediate:!0});const h=l=>{l&&c.pushAction(()=>Un(n.file.fullpath)).res.then(a=>{s.value=a})},P=_(),C=_(),S=or("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});Il(r,P,C,{...S.value,onDrag:Ie(function(l,a){S.value={...S.value,left:l,top:a}},300),onResize:Ie(function(l,a){S.value={...S.value,width:l,height:a}},300)});function b(l){return l.parentNode}return(l,a)=>{const o=Ae,d=Ze,u=Qn,A=Rn;return T(),J("div",{ref_key:"el",ref:r,class:Fe(["full-screen-menu",{"unset-size":!D(S).expanded}]),onWheelCapture:a[5]||(a[5]=sr(()=>{},["stop"]))},[Z("div",$l,[Z("div",Ml,[Z("div",{ref_key:"dragHandle",ref:C,class:"icon",style:{cursor:"grab"}},[g(D(Aa))],512),Z("div",{class:"icon",style:{cursor:"pointer"},onClick:a[0]||(a[0]=f=>D(S).expanded=!D(S).expanded)},[D(S).expanded?(T(),Y(D(xa),{key:0})):(T(),Y(D(Ma),{key:1}))]),g(o,{onVisibleChange:h,"get-popup-container":b},{overlay:M(()=>[g(St,{file:t.file,idx:t.idx,"selected-tag":s.value,"disable-delete":D(pe)(t.file)===D(i).fullscreenPreviewInitialUrl,onContextMenuClick:a[1]||(a[1]=(f,O,y)=>e("contextMenuClick",f,O,y))},null,8,["file","idx","selected-tag","disable-delete"])]),default:M(()=>[D(S).expanded?ce("",!0):(T(),J("div",Ll,[g(D(At))]))]),_:1}),D(S).expanded?(T(),J("div",zl)):ce("",!0),D(S).expanded?(T(),J("div",_l,[g(o,{trigger:["hover"],"get-popup-container":b,onVisibleChange:h},{overlay:M(()=>[g(A,{onClick:a[2]||(a[2]=f=>e("contextMenuClick",f,t.file,t.idx))},{default:M(()=>[(T(!0),J(ve,null,Lt(D(m),f=>(T(),Y(u,{key:`toggle-tag-${f.id}`},{default:M(()=>[Q(N(f.name)+" ",1),f.selected?(T(),Y(D(ei),{key:0})):(T(),Y(D(ti),{key:1}))]),_:2},1024))),128))]),_:1})]),default:M(()=>[g(d,null,{default:M(()=>[Q(N(l.$t("toggleTag")),1)]),_:1})]),_:1}),g(o,{trigger:["hover"],"get-popup-container":b},{overlay:M(()=>[g(A,{onClick:a[3]||(a[3]=f=>e("contextMenuClick",f,t.file,t.idx))},{default:M(()=>[g(u,{key:"send2txt2img"},{default:M(()=>[Q(N(l.$t("sendToTxt2img")),1)]),_:1}),g(u,{key:"send2img2img"},{default:M(()=>[Q(N(l.$t("sendToImg2img")),1)]),_:1}),g(u,{key:"send2inpaint"},{default:M(()=>[Q(N(l.$t("sendToInpaint")),1)]),_:1}),g(u,{key:"send2extras"},{default:M(()=>[Q(N(l.$t("sendToExtraFeatures")),1)]),_:1}),g(u,{key:"send2savedDir"},{default:M(()=>[Q(N(l.$t("send2savedDir")),1)]),_:1}),g(u,{key:"deleteFiles",disabled:D(pe)(t.file)===D(i).fullscreenPreviewInitialUrl},{default:M(()=>[Q(N(l.$t("deleteSelected")),1)]),_:1},8,["disabled"]),g(u,{key:"previewInNewWindow"},{default:M(()=>[Q(N(l.$t("previewInNewWindow")),1)]),_:1}),g(u,{key:"download"},{default:M(()=>[Q(N(l.$t("download")),1)]),_:1}),g(u,{key:"copyPreviewUrl"},{default:M(()=>[Q(N(l.$t("copySourceFilePreviewLink")),1)]),_:1})]),_:1})]),default:M(()=>[g(d,null,{default:M(()=>[Q(N(D(F)("openContextMenu")),1)]),_:1})]),_:1}),g(d,{onClick:a[4]||(a[4]=f=>D(Mt)(p.value))},{default:M(()=>[Q(N(l.$t("copyPrompt")),1)]),_:1})])):ce("",!0)]),D(S).expanded?(T(),J("div",Dl,N(p.value),1)):ce("",!0)]),D(S).expanded?(T(),J("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:P},[g(D(ga))],512)):ce("",!0)],34)}}});const Kl=Vn(Nl,[["__scopeId","data-v-10ae8e66"]]);export{Ae as D,Vl as L,Ul as R,Rl as S,Gl as a,Wl as b,Jl as c,Yl as d,Hl as e,ql as f,dt as g,Qa as h,si as i,Zl as j,Kl as k,pt as l,Ql as s,pe as t,he as u};