sd-webui-infinite-image-bro.../vue/dist/assets/stackView-6116cf45.js

2 lines
15 KiB
JavaScript

import{d as Q,u as ke,g as K,_ as Te,c as r,a as de,P as te,D as ce,f as Le,w as Ct,b as _t,e as yt,h as Re,M as pe,i as ht,j as wt,F as me,A as St,o as k,k as $,l as s,m as L,t as m,n as fe,p as D,q as Ee,r as It,s as At,v as Fe,x as M,y as i,z as e,B as p,C as B,E as $t,G as Pt,H as Me,I as xt,J as Rt,S as Ft,K as Mt,L as Bt,N as Dt,O as Nt,Q as Be,R as Ot,T as Tt,U as Lt,V as Et,W as Vt,X as zt}from"./index-2865012e.js";import{S as jt}from"./index-5aea14c7.js";import{F as N,_ as Ut}from"./index-117a691b.js";import"./index-6db1bae6.js";import"./index-50dada2e.js";import{_ as Wt}from"./index-85cde8a2.js";import{_ as Gt}from"./shortcut-7cf3ed76.js";import{D as Ve}from"./index-f200274c.js";/* empty css */import"./index-de079109.js";/* empty css */import{u as qt,a as Kt,b as Ht,c as Qt,d as Jt,e as Xt,f as Yt,g as Zt,h as en,s as tn,o as De}from"./index-9ff6b146.js";import{s as nn,F as on}from"./FileItem-3bb21719.js";import{M as rn,L as an,R as ln,f as sn}from"./MultiSelectKeep-d96596db.js";import"./isArrayLikeObject-0a84f6f1.js";import"./index-dfe4c7be.js";import"./_isIterateeCall-3cdb292e.js";import"./index-cc5bdcee.js";var un=["class","style"],dn=function(){return{prefixCls:String,href:String,separator:te.any,overlay:te.any,onClick:Function}};const H=Q({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:dn(),slots:["separator","overlay"],setup:function(o,u){var c=u.slots,f=u.attrs,h=ke("breadcrumb",o),C=h.prefixCls,I=function(w,v){var d=K(c,o,"overlay");return d?r(Ve,{overlay:d,placement:"bottom"},{default:function(){return[r("span",{class:"".concat(v,"-overlay-link")},[w,r(ce,null,null)])]}}):w};return function(){var A,w=(A=K(c,o,"separator"))!==null&&A!==void 0?A:"/",v=K(c,o),d=f.class,_=f.style,g=Te(f,un),b;return o.href!==void 0?b=r("a",de({class:"".concat(C.value,"-link"),onClick:o.onClick},g),[v]):b=r("span",de({class:"".concat(C.value,"-link"),onClick:o.onClick},g),[v]),b=I(b,C.value),v?r("span",{class:d,style:_},[b,w&&r("span",{class:"".concat(C.value,"-separator")},[w])]):null}}});var cn=function(){return{prefixCls:String,routes:{type:Array},params:te.any,separator:te.any,itemRender:{type:Function}}};function pn(a,o){if(!a.breadcrumbName)return null;var u=Object.keys(o).join("|"),c=a.breadcrumbName.replace(new RegExp(":(".concat(u,")"),"g"),function(f,h){return o[h]||f});return c}function Ne(a){var o=a.route,u=a.params,c=a.routes,f=a.paths,h=c.indexOf(o)===c.length-1,C=pn(o,u);return h?r("span",null,[C]):r("a",{href:"#/".concat(f.join("/"))},[C])}const z=Q({compatConfig:{MODE:3},name:"ABreadcrumb",props:cn(),slots:["separator","itemRender"],setup:function(o,u){var c=u.slots,f=ke("breadcrumb",o),h=f.prefixCls,C=f.direction,I=function(d,_){return d=(d||"").replace(/^\//,""),Object.keys(_).forEach(function(g){d=d.replace(":".concat(g),_[g])}),d},A=function(d,_,g){var b=ht(d),S=I(_||"",g);return S&&b.push(S),b},w=function(d){var _=d.routes,g=_===void 0?[]:_,b=d.params,S=b===void 0?{}:b,O=d.separator,P=d.itemRender,x=P===void 0?Ne:P,T=[];return g.map(function(y){var R=I(y.path,S);R&&T.push(R);var j=[].concat(T),U=null;return y.children&&y.children.length&&(U=r(pe,null,{default:function(){return[y.children.map(function(E){return r(pe.Item,{key:E.path||E.breadcrumbName},{default:function(){return[x({route:E,params:S,routes:g,paths:A(j,E.path,S)})]}})})]}})),r(H,{overlay:U,separator:O,key:R||y.breadcrumbName},{default:function(){return[x({route:y,params:S,routes:g,paths:j})]}})})};return function(){var v,d,_,g=o.routes,b=o.params,S=b===void 0?{}:b,O=Le(K(c,o)),P=(v=K(c,o,"separator"))!==null&&v!==void 0?v:"/",x=o.itemRender||c.itemRender||Ne;g&&g.length>0?_=w({routes:g,params:S,separator:P,itemRender:x}):O.length&&(_=O.map(function(y,R){return Ct(_t(y.type)==="object"&&(y.type.__ANT_BREADCRUMB_ITEM||y.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),yt(y,{separator:P,key:R})}));var T=(d={},Re(d,h.value,!0),Re(d,"".concat(h.value,"-rtl"),C.value==="rtl"),d);return r("div",{class:T},[_])}}});var mn=["separator","class"],fn=function(){return{prefixCls:String}};const ve=Q({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:fn(),setup:function(o,u){var c=u.slots,f=u.attrs,h=ke("breadcrumb",o),C=h.prefixCls;return function(){var I;f.separator;var A=f.class,w=Te(f,mn),v=Le((I=c.default)===null||I===void 0?void 0:I.call(c));return r("span",de({class:["".concat(C.value,"-separator"),A]},w),[v.length>0?v:"/"])}}});z.Item=H;z.Separator=ve;z.install=function(a){return a.component(z.name,z),a.component(H.name,H),a.component(ve.name,ve),a};N.useInjectFormItemContext=wt;N.ItemRest=me;N.install=function(a){return a.component(N.name,N),a.component(N.Item.name,N.Item),a.component(me.name,me),a};var vn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const kn=vn;function Oe(a){for(var o=1;o<arguments.length;o++){var u=arguments[o]!=null?Object(arguments[o]):{},c=Object.keys(u);typeof Object.getOwnPropertySymbols=="function"&&(c=c.concat(Object.getOwnPropertySymbols(u).filter(function(f){return Object.getOwnPropertyDescriptor(u,f).enumerable}))),c.forEach(function(f){gn(a,f,u[f])})}return a}function gn(a,o,u){return o in a?Object.defineProperty(a,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[o]=u,a}var ge=function(o,u){var c=Oe({},o,u.attrs);return r(St,Oe({},c,{icon:kn}),null)};ge.displayName="ArrowLeftOutlined";ge.inheritAttrs=!1;const bn=ge;const Cn={class:"base-info"},_n=Q({__name:"BaseFileListInfo",props:{fileNum:{},selectedFileNum:{}},setup(a){return(o,u)=>(k(),$("div",Cn,[s("span",null,[L(m(o.$t("items",[o.fileNum]))+" ",1),o.selectedFileNum?(k(),$(fe,{key:0},[L(", "+m(o.$t("selectedItems",[o.selectedFileNum])),1)],64)):D("",!0)])]))}});const yn=Ee(_n,[["__scopeId","data-v-afd25667"]]),hn={class:"hint"},wn={class:"location-bar"},Sn=["onClick"],In={key:3,class:"location-act"},An={class:"actions"},$n=["onClick"],Pn=["onClick"],xn={style:{width:"512px",background:"var(--zp-primary-background)",padding:"16px","border-radius":"4px","box-shadow":"0 0 4px var(--zp-secondary-background)",border:"1px solid var(--zp-secondary-background)"}},Rn={style:{padding:"4px"}},Fn={style:{padding:"4px"}},Mn={style:{padding:"4px"}},Bn={key:0,style:{padding:"4px"}},Dn={style:{padding:"4px"}},Nn={key:0,class:"view"},On={style:{padding:"16px 0 512px"}},Tn={key:0,class:"preview-switch"},Ln=Q({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},mode:{},stackKey:{}},setup(a){const o=a,u=It(),{scroller:c,stackViewEl:f,props:h,multiSelectedIdxs:C,spinning:I}=qt().toRefs();c.value,f.value;const{currLocation:A,currPage:w,refresh:v,copyLocation:d,back:_,openNext:g,stack:b,quickMoveTo:S,addToSearchScanPathAndQuickMove:O,locInputValue:P,isLocationEditing:x,onLocEditEnter:T,onEditBtnClick:y,share:R,selectAll:j,onCreateFloderBtnClick:U,onWalkBtnClick:J,showWalkButton:E,searchInCurrentDir:ne,backToLastUseTo:be,polling:ze,onPollRefreshClick:Ce}=Kt(),{gridItems:je,sortMethodConv:Ue,moreActionsDropdownShow:oe,sortedFiles:F,sortMethod:re,itemSize:_e,loadNextDir:We,loadNextDirLoading:Ge,canLoadNext:qe,onScroll:Ke,cellWidth:X,dirCoverCache:He}=Ht(),{onDrop:ye,onFileDragStart:Qe,onFileDragEnd:Je,onFileDropToFolder:Xe}=Qt(),{onFileItemClick:Ye,onContextMenuClick:he,showGenInfo:Y,imageGenInfo:we,q:Ze}=Jt({openNext:g}),{previewIdx:W,onPreviewVisibleChange:et,previewing:ae,previewImgMove:Se,canPreview:Ie,scrollToFileId:tt}=Xt(),Ae=At(),{showMenuIdx:le}=Yt(),{onClearAllSelected:nt,onReverseSelect:ot,onSelectAll:rt}=Zt(),{getGenDiff:at,changeIndchecked:G,seedChangeChecked:Z,getRawGenParams:lt,getGenDiffWatchDep:st}=en(),it=async(l,t)=>{await Xe(l,t)||await ye(l)},ut=()=>{F.value.length!==0&&De(F.value,W.value||0)};return Fe(()=>o,()=>{h.value=o;const l=tn.get(o.stackKey??"");l&&(b.value=l.slice())},{immediate:!0}),Fe(()=>Ae.visible,(l,t)=>{if(!l&&t){const q=Ae.lastActiveId;q&&tt(q)}}),(l,t)=>{const q=Ot,dt=Tt,ct=Lt,pt=Et,mt=H,ft=z,$e=Vt,se=zt,Pe=pe,ie=Ve,vt=Gt,ee=Ut,xe=Wt,kt=N,gt=jt;return k(),M(gt,{spinning:e(I),size:"large"},{default:i(()=>[r(rn,{show:e(u).keepMultiSelect||!!e(C).length,onClearAllSelected:e(nt),onSelectAll:e(rt),onReverseSelect:e(ot)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),r(q,{style:{display:"none"}}),s("div",{ref_key:"stackViewEl",ref:f,onDragover:t[31]||(t[31]=p(()=>{},["prevent"])),onDrop:t[32]||(t[32]=p(n=>e(ye)(n),["prevent"])),class:"container"},[r(ct,{visible:e(Y),"onUpdate:visible":t[1]||(t[1]=n=>B(Y)?Y.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>Y.value=!1)},{cancelText:i(()=>[]),default:i(()=>[r(dt,{active:"",loading:!e(Ze).isIdle},{default:i(()=>[s("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto","z-index":"9999"},onDblclick:t[0]||(t[0]=n=>e($t)(e(we)))},[s("div",hn,m(l.$t("doubleClickToCopy")),1),L(" "+m(e(we)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),s("div",wn,[s("div",{class:"breadcrumb",style:Pt({flex:e(x)?1:""})},[e(x)?(k(),M(pt,{key:0,style:{flex:"1"},value:e(P),"onUpdate:value":t[3]||(t[3]=n=>B(P)?P.value=n:null),onClick:t[4]||(t[4]=p(()=>{},["stop"])),onKeydown:t[5]||(t[5]=p(()=>{},["stop"])),onPressEnter:e(T),"allow-clear":""},null,8,["value","onPressEnter"])):(k(),M(ft,{key:1,style:{flex:"1"}},{default:i(()=>[(k(!0),$(fe,null,Me(e(b),(n,V)=>(k(),M(mt,{key:V},{default:i(()=>[s("a",{onClick:p(ue=>e(_)(V),["prevent"])},m(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),9,Sn)]),_:2},1024))),128))]),_:1})),e(x)?(k(),M($e,{key:2,size:"small",onClick:e(T),type:"primary"},{default:i(()=>[L(m(l.$t("go")),1)]),_:1},8,["onClick"])):(k(),$("div",In,[l.mode==="scanned-fixed"?(k(),$("a",{key:0,onClick:t[6]||(t[6]=p((...n)=>e(be)&&e(be)(...n),["prevent"])),style:{margin:"0 8px 16px 0"}},[r(e(bn))])):D("",!0),s("a",{onClick:t[7]||(t[7]=p((...n)=>e(d)&&e(d)(...n),["prevent"])),class:"copy"},m(l.$t("copy")),1),s("a",{onClick:t[8]||(t[8]=p((...n)=>e(y)&&e(y)(...n),["prevent","stop"]))},m(l.$t("edit")),1)]))],4),s("div",An,[s("a",{class:"opt",onClick:t[9]||(t[9]=p((...n)=>e(v)&&e(v)(...n),["prevent"]))},m(l.$t("refresh")),1),s("a",{class:"opt",onClick:p(ut,["prevent"])},m(l.$t("TikTok View")),9,$n),r(ie,null,{overlay:i(()=>[r(Pe,null,{default:i(()=>[r(se,{key:"tag-search"},{default:i(()=>[s("a",{onClick:t[11]||(t[11]=p(n=>e(ne)("tag-search"),["prevent"]))},m(l.$t("imgSearch")),1)]),_:1}),r(se,{key:"tag-search"},{default:i(()=>[s("a",{onClick:t[12]||(t[12]=p(n=>e(ne)("fuzzy-search"),["prevent"]))},m(l.$t("fuzzy-search")),1)]),_:1})]),_:1})]),default:i(()=>[s("a",{class:"opt",onClick:t[10]||(t[10]=p(()=>{},["prevent"]))},[L(m(l.$t("search"))+" ",1),r(e(ce))])]),_:1}),e(E)?(k(),$("a",{key:0,class:"opt",onClick:t[13]||(t[13]=p((...n)=>e(J)&&e(J)(...n),["prevent"]))}," Walk ")):D("",!0),s("a",{class:"opt",onClick:t[14]||(t[14]=p((...n)=>e(j)&&e(j)(...n),["prevent","stop"]))},m(l.$t("selectAll")),1),r(ie,null,{overlay:i(()=>[r(Pe,null,{default:i(()=>[(k(!0),$(fe,null,Me(e(u).quickMovePaths,n=>(k(),M(se,{key:n.dir},{default:i(()=>[s("a",{onClick:p(V=>e(S)(n.dir),["prevent"])},m(n.zh),9,Pn)]),_:2},1024))),128))]),_:1})]),default:i(()=>[s("a",{class:"opt",onClick:t[15]||(t[15]=p(()=>{},["prevent"]))},[L(m(l.$t("quickMove"))+" ",1),r(e(ce))])]),_:1}),r(ie,{trigger:["click"],visible:e(oe),"onUpdate:visible":t[27]||(t[27]=n=>B(oe)?oe.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[s("div",xn,[r(kt,xt(Rt({labelCol:{span:10},wrapperCol:{span:14}})),{default:i(()=>[r(ee,{label:l.$t("gridCellWidth")},{default:i(()=>[r(vt,{modelValue:e(X),"onUpdate:modelValue":t[17]||(t[17]=n=>B(X)?X.value=n:null),max:1024,min:64,step:16},null,8,["modelValue"])]),_:1},8,["label"]),r(ee,{label:l.$t("sortingMethod")},{default:i(()=>[r(e(Ft),{value:e(re),"onUpdate:value":t[18]||(t[18]=n=>B(re)?re.value=n:null),onClick:t[19]||(t[19]=p(()=>{},["stop"])),conv:e(Ue),options:e(Mt)},null,8,["value","conv","options"])]),_:1},8,["label"]),r(ee,{label:l.$t("showChangeIndicators")},{default:i(()=>[r(xe,{checked:e(G),"onUpdate:checked":t[20]||(t[20]=n=>B(G)?G.value=n:null),onClick:e(lt)},null,8,["checked","onClick"])]),_:1},8,["label"]),r(ee,{label:l.$t("seedAsChange")},{default:i(()=>[r(xe,{checked:e(Z),"onUpdate:checked":t[21]||(t[21]=n=>B(Z)?Z.value=n:null),disabled:!e(G)},null,8,["checked","disabled"])]),_:1},8,["label"]),s("div",Rn,[s("a",{onClick:t[22]||(t[22]=p((...n)=>e(O)&&e(O)(...n),["prevent"]))},m(l.$t("addToSearchScanPathAndQuickMove")),1)]),s("div",Fn,[s("a",{onClick:t[23]||(t[23]=p(n=>e(Bt)(e(A)+"/"),["prevent"]))},m(l.$t("openWithLocalFileBrowser")),1)]),s("div",Mn,[s("a",{onClick:t[24]||(t[24]=p((...n)=>e(Ce)&&e(Ce)(...n),["prevent"]))},m(e(ze)?l.$t("stopPollRefresh"):l.$t("pollRefresh")),1)]),e(Dt)?D("",!0):(k(),$("div",Bn,[s("a",{onClick:t[25]||(t[25]=p((...n)=>e(R)&&e(R)(...n),["prevent"]))},m(l.$t("share")),1)])),s("div",Dn,[s("a",{onClick:t[26]||(t[26]=p((...n)=>e(U)&&e(U)(...n),["prevent"]))},m(l.$t("createFolder")),1)])]),_:1},16)])]),default:i(()=>[s("a",{class:"opt",onClick:t[16]||(t[16]=p(()=>{},["prevent"]))},m(l.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(w)?(k(),$("div",Nn,[r(e(nn),{class:"file-list",items:e(F),ref_key:"scroller",ref:c,onScroll:e(Ke),"item-size":e(_e).first,"key-field":"fullpath","item-secondary-size":e(_e).second,gridItems:e(je)},{default:i(({item:n,index:V})=>[r(on,{idx:parseInt(V),file:n,"full-screen-preview-image-url":e(F)[e(W)]?e(Nt)(e(F)[e(W)]):"","show-menu-idx":e(le),"onUpdate:showMenuIdx":t[28]||(t[28]=ue=>B(le)?le.value=ue:null),selected:e(C).includes(V),"cell-width":e(X),onFileItemClick:e(Ye),onDragstart:e(Qe),onDragend:e(Je),onPreviewVisibleChange:e(et),onContextMenuClick:e(he),onDropToFolder:it,onTiktokView:(ue,bt)=>e(De)(e(F),bt),"is-selected-mutil-files":e(C).length>1,"enable-change-indicator":e(G),"seed-change-checked":e(Z),"get-gen-diff":e(at),"get-gen-diff-watch-dep":e(st),previewing:e(ae),"cover-files":e(He).get(n.fullpath)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick","onTiktokView","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep","previewing","cover-files"])]),after:i(()=>[s("div",On,[o.mode==="walk"?(k(),M($e,{key:0,onClick:e(We),loading:e(Ge),block:"",type:"primary",disabled:!e(qe),ghost:""},{default:i(()=>[L(m(l.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])):D("",!0)])]),_:1},8,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(ae)?(k(),$("div",Tn,[r(e(an),{onClick:t[29]||(t[29]=n=>e(Se)("prev")),class:Be({disable:!e(Ie)("prev")})},null,8,["class"]),r(e(ln),{onClick:t[30]||(t[30]=n=>e(Se)("next")),class:Be({disable:!e(Ie)("next")})},null,8,["class"])])):D("",!0)])):D("",!0)],544),e(ae)?(k(),M(sn,{key:0,file:e(F)[e(W)],idx:e(W),onContextMenuClick:e(he)},null,8,["file","idx","onContextMenuClick"])):D("",!0),r(yn,{"file-num":e(F).length,"selected-file-num":e(C).length},null,8,["file-num","selected-file-num"])]),_:1},8,["spinning"])}}});const oo=Ee(Ln,[["__scopeId","data-v-14de506a"]]);export{oo as default};