sd-webui-infinite-image-bro.../vue/dist/assets/fullScreenContextMenu-7bdec...

2 lines
20 KiB
JavaScript

import{d as oe,bq as fe,aI as ve,bU as pe,ax as me,aC as V,bV as ge,bW as Z,e as J,c as l,_ as he,h as P,a as K,bz as ye,P as R,ag as A,aw as be,aM as we,l as se,k as Oe,$ as W,aj as U,bO as _e,bX as Ee,bY as Le,ai as T,o as h,y as w,p as j,r as v,m as z,n as f,L as ee,bZ as $e,E as N,z as I,A as B,x as g,v as m,t as Se,N as xe,q as Pe,V as Ce,W as Me,M as ke,b_ as De,X as je}from"./index-ad5d60cc.js";import{h as Ne,j as ze,_ as Ae,S as We,k as Te,D as Ie,l as Fe}from"./FileItem-97d38493.js";import"./shortcut-42585f2b.js";var Ue=["class","style"],Be=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:R.any,delay:Number,indicator:R.any}},F=null;function Ve(t,e){return!!t&&!!e&&!isNaN(Number(e))}function xt(t){var e=t.indicator;F=typeof e=="function"?e:function(){return l(e,null,null)}}const Pt=oe({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:fe(Be(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:ve("configProvider",pe)}},data:function(){var e=this.spinning,i=this.delay,n=Ve(e,i);return{sSpinning:e&&!n}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;me(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var i=e||this.$props,n=i.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=V(this.originalUpdateSpinning,n))},updateSpinning:function(){var e=this.spinning,i=this.sSpinning;i!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var i="".concat(e,"-dot"),n=ge(this,"indicator");return n===null?null:(Array.isArray(n)&&(n=n.length===1?n[0]:n),Z(n)?J(n,{class:i}):F&&Z(F())?J(F(),{class:i}):l("span",{class:"".concat(i," ").concat(e,"-dot-spin")},[l("i",{class:"".concat(e,"-dot-item")},null),l("i",{class:"".concat(e,"-dot-item")},null),l("i",{class:"".concat(e,"-dot-item")},null),l("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,i,n,o=this.$props,O=o.size,b=o.prefixCls,M=o.tip,E=M===void 0?(e=(i=this.$slots).tip)===null||e===void 0?void 0:e.call(i):M,k=o.wrapperClassName,L=this.$attrs,S=L.class,C=L.style,_=he(L,Ue),c=this.configProvider,x=c.getPrefixCls,$=c.direction,a=x("spin",b),u=this.sSpinning,r=(n={},P(n,a,!0),P(n,"".concat(a,"-sm"),O==="small"),P(n,"".concat(a,"-lg"),O==="large"),P(n,"".concat(a,"-spinning"),u),P(n,"".concat(a,"-show-text"),!!E),P(n,"".concat(a,"-rtl"),$==="rtl"),P(n,S,!!S),n),d=l("div",K(K({},_),{},{style:C,class:r}),[this.renderIndicator(a),E?l("div",{class:"".concat(a,"-text")},[E]):null]),s=ye(this);if(s&&s.length){var y,D=(y={},P(y,"".concat(a,"-container"),!0),P(y,"".concat(a,"-blur"),u),y);return l("div",{class:["".concat(a,"-nested-loading"),k]},[u&&l("div",{key:"loading"},[d]),l("div",{class:D,key:"container"},[s])])}return d}});var Xe={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 Ye=Xe;function te(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable}))),n.forEach(function(o){He(t,o,i[o])})}return t}function He(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var X=function(e,i){var n=te({},e,i.attrs);return l(A,te({},n,{icon:Ye}),null)};X.displayName="ArrowsAltOutlined";X.inheritAttrs=!1;const qe=X;var Ge={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 Qe=Ge;function ne(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable}))),n.forEach(function(o){Ze(t,o,i[o])})}return t}function Ze(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Y=function(e,i){var n=ne({},e,i.attrs);return l(A,ne({},n,{icon:Qe}),null)};Y.displayName="DragOutlined";Y.inheritAttrs=!1;const Je=Y;var Ke={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 Re=Ke;function ie(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable}))),n.forEach(function(o){et(t,o,i[o])})}return t}function et(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var H=function(e,i){var n=ie({},e,i.attrs);return l(A,ie({},n,{icon:Re}),null)};H.displayName="FullscreenExitOutlined";H.inheritAttrs=!1;const tt=H;var nt={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 it=nt;function ae(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable}))),n.forEach(function(o){at(t,o,i[o])})}return t}function at(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var q=function(e,i){var n=ae({},e,i.attrs);return l(A,ae({},n,{icon:it}),null)};q.displayName="FullscreenOutlined";q.inheritAttrs=!1;const rt=q;var lt={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 ot=lt;function re(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable}))),n.forEach(function(o){st(t,o,i[o])})}return t}function st(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var G=function(e,i){var n=re({},e,i.attrs);return l(A,re({},n,{icon:ot}),null)};G.displayName="LeftCircleOutlined";G.inheritAttrs=!1;const Ct=G;var ut={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 ct=ut;function le(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable}))),n.forEach(function(o){dt(t,o,i[o])})}return t}function dt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Q=function(e,i){var n=le({},e,i.attrs);return l(A,le({},n,{icon:ct}),null)};Q.displayName="RightCircleOutlined";Q.inheritAttrs=!1;const Mt=Q;function ft(t,e,i,n){const o={x:0,y:0};let O=0,b=0,M=typeof(n==null?void 0:n.width)=="number"?n.width:0,E=typeof(n==null?void 0:n.height)=="number"?n.height:0,k=typeof(n==null?void 0:n.left)=="number"?n.left:0,L=typeof(n==null?void 0:n.top)=="number"?n.top:0,S=!1;const C=r=>{r.stopPropagation(),r.preventDefault(),!(!t.value||!e.value)&&(O=r instanceof MouseEvent?r.clientX:r.touches[0].clientX,b=r instanceof MouseEvent?r.clientY:r.touches[0].clientY,M=t.value.offsetWidth,E=t.value.offsetHeight,o.x=e.value.offsetLeft,o.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",_),document.documentElement.addEventListener("touchmove",_),document.documentElement.addEventListener("mouseup",c),document.documentElement.addEventListener("touchend",c))},_=r=>{if(!t.value||!e.value)return;let d=M+((r instanceof MouseEvent?r.clientX:r.touches[0].clientX)-O),s=E+((r instanceof MouseEvent?r.clientY:r.touches[0].clientY)-b),y=o.x+((r instanceof MouseEvent?r.clientX:r.touches[0].clientX)-O),D=o.y+((r instanceof MouseEvent?r.clientY:r.touches[0].clientY)-b);y+e.value.offsetWidth>window.innerWidth&&(y=window.innerWidth-e.value.offsetWidth),t.value.offsetLeft+d>window.innerWidth&&(d=window.innerWidth-t.value.offsetLeft),D+e.value.offsetHeight>window.innerHeight&&(D=window.innerHeight-e.value.offsetHeight),t.value.offsetTop+s>window.innerHeight&&(s=window.innerHeight-t.value.offsetTop),t.value.style.width=`${d}px`,t.value.style.height=`${s}px`,e.value.style.left=`${y}px`,e.value.style.top=`${D}px`,n!=null&&n.onResize&&n.onResize(d,s)},c=()=>{document.documentElement.removeEventListener("mousemove",_),document.documentElement.removeEventListener("touchmove",_),document.documentElement.removeEventListener("mouseup",c),document.documentElement.removeEventListener("touchend",c)},x=r=>{r.stopPropagation(),r.preventDefault(),!(!t.value||!i.value)&&(S=!0,k=t.value.offsetLeft,L=t.value.offsetTop,O=r instanceof MouseEvent?r.clientX:r.touches[0].clientX,b=r instanceof MouseEvent?r.clientY:r.touches[0].clientY,document.documentElement.addEventListener("mousemove",$),document.documentElement.addEventListener("touchmove",$),document.documentElement.addEventListener("mouseup",a),document.documentElement.addEventListener("touchend",a))},$=r=>{if(!t.value||!i.value||!S)return;const d=k+((r instanceof MouseEvent?r.clientX:r.touches[0].clientX)-O),s=L+((r instanceof MouseEvent?r.clientY:r.touches[0].clientY)-b);d<0?t.value.style.left="0px":d+t.value.offsetWidth>window.innerWidth?t.value.style.left=`${window.innerWidth-t.value.offsetWidth}px`:t.value.style.left=`${d}px`,s<0?t.value.style.top="0px":s+t.value.offsetHeight>window.innerHeight?t.value.style.top=`${window.innerHeight-t.value.offsetHeight}px`:t.value.style.top=`${s}px`,n!=null&&n.onDrag&&n.onDrag(d,s)},a=()=>{S=!1,document.documentElement.removeEventListener("mousemove",$),document.documentElement.removeEventListener("touchmove",$),document.documentElement.removeEventListener("mouseup",a),document.documentElement.removeEventListener("touchend",a)},u=()=>{if(!t.value||!e.value)return;let r=t.value.offsetLeft,d=t.value.offsetTop,s=t.value.offsetWidth,y=t.value.offsetHeight;r+s>window.innerWidth&&(r=window.innerWidth-s,r<0&&(r=0,s=window.innerWidth)),d+y>window.innerHeight&&(d=window.innerHeight-y,d<0&&(d=0,y=window.innerHeight)),t.value.style.left=`${r}px`,t.value.style.top=`${d}px`,t.value.style.width=`${s}px`,t.value.style.height=`${y}px`};return be(()=>{!t.value||!n||(typeof n.width=="number"&&(t.value.style.width=`${n.width}px`),typeof n.height=="number"&&(t.value.style.height=`${n.height}px`),typeof n.left=="number"&&(t.value.style.left=`${n.left}px`),typeof n.top=="number"&&(t.value.style.top=`${n.top}px`),u(),window.addEventListener("resize",u))}),we(()=>{document.documentElement.removeEventListener("mousemove",_),document.documentElement.removeEventListener("touchmove",_),document.documentElement.removeEventListener("mouseup",c),document.documentElement.removeEventListener("touchend",c),document.documentElement.removeEventListener("mousemove",$),document.documentElement.removeEventListener("touchmove",$),document.documentElement.removeEventListener("mouseup",a),document.documentElement.removeEventListener("touchend",a),window.removeEventListener("resize",u)}),se(()=>[t.value,e.value,i.value],([r,d,s])=>{r&&d&&(d.addEventListener("mousedown",C),d.addEventListener("touchstart",C)),r&&s&&(s.addEventListener("mousedown",x),s.addEventListener("touchstart",x))}),{handleResizeMouseDown:C,handleDragMouseDown:x}}const vt={class:"container"},pt={class:"action-bar"},mt={key:0,class:"icon",style:{cursor:"pointer"}},gt={key:0,"flex-placeholder":""},ht={key:1,class:"action-bar"},yt={key:0,class:"gen-info"},bt={class:"tags"},wt={class:"name"},Ot={class:"value"},_t={key:0,class:"tags-container"},Et=oe({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(t,{emit:e}){const i=t,n=Oe(),o=Ne(),O=W(),b=U(()=>o.tagMap.get(i.file.fullpath)??[]),M=U(()=>{var a;return(((a=n.conf)==null?void 0:a.all_custom_tags)??[]).reduce((u,r)=>[...u,{...r,selected:!!b.value.find(d=>d.id===r.id)}],[])}),E=W(""),k=_e(),L=W("");se(()=>{var a;return(a=i==null?void 0:i.file)==null?void 0:a.fullpath},async a=>{a&&(k.tasks.forEach(u=>u.cancel()),k.pushAction(()=>Ee(a)).res.then(u=>{L.value=u}))},{immediate:!0});const S=W(),C=W(),_={left:100,top:100,width:512,height:384,expanded:!0},c=Le("fullScreenContextMenu.vue-drag",_);c.value&&(c.value.left<0||c.value.top<0)&&(c.value={..._}),ft(O,S,C,{...c.value,onDrag:V(function(a,u){c.value={...c.value,left:a,top:u}},300),onResize:V(function(a,u){c.value={...c.value,width:a,height:u}},300)});function x(a){return a.parentNode}ze("load",a=>{const u=a.target;u.className==="ant-image-preview-img"&&(E.value=`${u.naturalWidth} x ${u.naturalHeight}`)},{capture:!0});const $=U(()=>{const a=[{name:T("fileName"),val:i.file.name},{name:T("fileSize"),val:i.file.size}];return E.value&&a.push({name:T("resolution"),val:E.value}),a});return(a,u)=>{const r=Ie,d=Ce,s=Me,y=ke,D=De,ue=Fe;return h(),w("div",{ref_key:"el",ref:O,class:xe(["full-screen-menu",{"unset-size":!v(c).expanded}]),onWheelCapture:u[5]||(u[5]=Pe(()=>{},["stop"]))},[j("div",vt,[j("div",pt,[j("div",{ref_key:"dragHandle",ref:C,class:"icon",style:{cursor:"grab"}},[l(v(Je))],512),j("div",{class:"icon",style:{cursor:"pointer"},onClick:u[0]||(u[0]=p=>v(c).expanded=!v(c).expanded)},[v(c).expanded?(h(),z(v(tt),{key:0})):(h(),z(v(rt),{key:1}))]),l(r,{"get-popup-container":x},{overlay:f(()=>[l(Ae,{file:a.file,idx:a.idx,"selected-tag":b.value,"disable-delete":v(ee)(a.file)===v(n).fullscreenPreviewInitialUrl,onContextMenuClick:u[1]||(u[1]=(p,ce,de)=>e("contextMenuClick",p,ce,de))},null,8,["file","idx","selected-tag","disable-delete"])]),default:f(()=>[v(c).expanded?N("",!0):(h(),w("div",mt,[l(v($e))]))]),_:1}),v(c).expanded?(h(),w("div",gt)):N("",!0),v(c).expanded?(h(),w("div",ht,[l(r,{trigger:["hover"],"get-popup-container":x},{overlay:f(()=>[l(y,{onClick:u[2]||(u[2]=p=>e("contextMenuClick",p,a.file,a.idx))},{default:f(()=>[(h(!0),w(I,null,B(M.value,p=>(h(),z(s,{key:`toggle-tag-${p.id}`},{default:f(()=>[g(m(p.name)+" ",1),p.selected?(h(),z(v(We),{key:0})):(h(),z(v(Te),{key:1}))]),_:2},1024))),128))]),_:1})]),default:f(()=>[l(d,null,{default:f(()=>[g(m(a.$t("toggleTag")),1)]),_:1})]),_:1}),l(r,{trigger:["hover"],"get-popup-container":x},{overlay:f(()=>[l(y,{onClick:u[3]||(u[3]=p=>e("contextMenuClick",p,a.file,a.idx))},{default:f(()=>{var p;return[((p=v(n).conf)==null?void 0:p.launch_mode)!=="server"?(h(),w(I,{key:0},[l(s,{key:"send2txt2img"},{default:f(()=>[g(m(a.$t("sendToTxt2img")),1)]),_:1}),l(s,{key:"send2img2img"},{default:f(()=>[g(m(a.$t("sendToImg2img")),1)]),_:1}),l(s,{key:"send2inpaint"},{default:f(()=>[g(m(a.$t("sendToInpaint")),1)]),_:1}),l(s,{key:"send2extras"},{default:f(()=>[g(m(a.$t("sendToExtraFeatures")),1)]),_:1}),l(D,{key:"sendToThirdPartyExtension",title:a.$t("sendToThirdPartyExtension")},{default:f(()=>[l(s,{key:"send2controlnet-txt2img"},{default:f(()=>[g("ControlNet - "+m(a.$t("t2i")),1)]),_:1}),l(s,{key:"send2controlnet-img2img"},{default:f(()=>[g("ControlNet - "+m(a.$t("i2i")),1)]),_:1}),l(s,{key:"send2outpaint"},{default:f(()=>[g("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):N("",!0),l(s,{key:"send2BatchDownload"},{default:f(()=>[g(m(a.$t("sendToBatchDownload")),1)]),_:1}),l(s,{key:"send2savedDir"},{default:f(()=>[g(m(a.$t("send2savedDir")),1)]),_:1}),l(s,{key:"deleteFiles",disabled:v(ee)(a.file)===v(n).fullscreenPreviewInitialUrl},{default:f(()=>[g(m(a.$t("deleteSelected")),1)]),_:1},8,["disabled"]),l(s,{key:"previewInNewWindow"},{default:f(()=>[g(m(a.$t("previewInNewWindow")),1)]),_:1}),l(s,{key:"download"},{default:f(()=>[g(m(a.$t("download")),1)]),_:1}),l(s,{key:"copyPreviewUrl"},{default:f(()=>[g(m(a.$t("copySourceFilePreviewLink")),1)]),_:1})]}),_:1})]),default:f(()=>[l(d,null,{default:f(()=>[g(m(v(T)("openContextMenu")),1)]),_:1})]),_:1}),l(d,{onClick:u[4]||(u[4]=p=>v(Se)(L.value))},{default:f(()=>[g(m(a.$t("copyPrompt")),1)]),_:1})])):N("",!0)]),v(c).expanded?(h(),w("div",yt,[j("div",bt,[(h(!0),w(I,null,B($.value,p=>(h(),w("span",{class:"tag",key:p.name},[j("span",wt,m(p.name),1),j("span",Ot,m(p.val),1)]))),128))]),b.value?(h(),w("div",_t,[(h(!0),w(I,null,B(b.value,p=>(h(),z(ue,{key:p.id,color:v(o).getColor(p.name)},{default:f(()=>[g(m(p.name),1)]),_:2},1032,["color"]))),128))])):N("",!0),g(" "+m(L.value),1)])):N("",!0)]),v(c).expanded?(h(),w("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:S},[l(v(qe))],512)):N("",!0)],34)}}});const kt=je(Et,[["__scopeId","data-v-6b5f3015"]]);export{Ct as L,Mt as R,Pt as S,kt as f,xt as s};