astrbot_plugin_imagestudio/web/assets/index-B2NiW3rX.js

51 行
238 KiB
JavaScript

var sf=Object.defineProperty;var uf=(e,t,l)=>t in e?sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l;var Xi=(e,t,l)=>uf(e,typeof t!="symbol"?t+"":t,l);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function l(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=l(a);fetch(a.href,s)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Pr(e){const t=Object.create(null);for(const l of e.split(","))t[l]=1;return l=>l in t}const Te={},_n=[],Jt=()=>{},_s=()=>!1,ri=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ai=e=>e.startsWith("onUpdate:"),je=Object.assign,Sr=(e,t)=>{const l=e.indexOf(t);l>-1&&e.splice(l,1)},cf=Object.prototype.hasOwnProperty,we=(e,t)=>cf.call(e,t),Y=Array.isArray,In=e=>ul(e)==="[object Map]",si=e=>ul(e)==="[object Set]",qa=e=>ul(e)==="[object Date]",oe=e=>typeof e=="function",De=e=>typeof e=="string",Xt=e=>typeof e=="symbol",ke=e=>e!==null&&typeof e=="object",Is=e=>(ke(e)||oe(e))&&oe(e.then)&&oe(e.catch),Cs=Object.prototype.toString,ul=e=>Cs.call(e),df=e=>ul(e).slice(8,-1),xs=e=>ul(e)==="[object Object]",$r=e=>De(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Yn=Pr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ui=e=>{const t=Object.create(null);return(l=>t[l]||(t[l]=e(l)))},ff=/-\w/g,qt=ui(e=>e.replace(ff,t=>t.slice(1).toUpperCase())),pf=/\B([A-Z])/g,Eo=ui(e=>e.replace(pf,"-$1").toLowerCase()),Ps=ui(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zi=ui(e=>e?`on${Ps(e)}`:""),Yt=(e,t)=>!Object.is(e,t),Hl=(e,...t)=>{for(let l=0;l<e.length;l++)e[l](...t)},Ss=(e,t,l,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:l})},ci=e=>{const t=parseFloat(e);return isNaN(t)?e:t},mf=e=>{const t=De(e)?Number(e):NaN;return isNaN(t)?e:t};let La;const di=()=>La||(La=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ge(e){if(Y(e)){const t={};for(let l=0;l<e.length;l++){const r=e[l],a=De(r)?bf(r):Ge(r);if(a)for(const s in a)t[s]=a[s]}return t}else if(De(e)||ke(e))return e}const vf=/;(?![^(]*\))/g,gf=/:([^]+)/,hf=/\/\*[^]*?\*\//g;function bf(e){const t={};return e.replace(hf,"").split(vf).forEach(l=>{if(l){const r=l.split(gf);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function X(e){let t="";if(De(e))t=e;else if(Y(e))for(let l=0;l<e.length;l++){const r=X(e[l]);r&&(t+=r+" ")}else if(ke(e))for(const l in e)e[l]&&(t+=l+" ");return t.trim()}const yf="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wf=Pr(yf);function $s(e){return!!e||e===""}function kf(e,t){if(e.length!==t.length)return!1;let l=!0;for(let r=0;l&&r<e.length;r++)l=cl(e[r],t[r]);return l}function cl(e,t){if(e===t)return!0;let l=qa(e),r=qa(t);if(l||r)return l&&r?e.getTime()===t.getTime():!1;if(l=Xt(e),r=Xt(t),l||r)return e===t;if(l=Y(e),r=Y(t),l||r)return l&&r?kf(e,t):!1;if(l=ke(e),r=ke(t),l||r){if(!l||!r)return!1;const a=Object.keys(e).length,s=Object.keys(t).length;if(a!==s)return!1;for(const u in e){const f=e.hasOwnProperty(u),m=t.hasOwnProperty(u);if(f&&!m||!f&&m||!cl(e[u],t[u]))return!1}}return String(e)===String(t)}function _f(e,t){return e.findIndex(l=>cl(l,t))}const Ms=e=>!!(e&&e.__v_isRef===!0),g=e=>De(e)?e:e==null?"":Y(e)||ke(e)&&(e.toString===Cs||!oe(e.toString))?Ms(e)?g(e.value):JSON.stringify(e,As,2):String(e),As=(e,t)=>Ms(t)?As(e,t.value):In(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((l,[r,a],s)=>(l[er(r,s)+" =>"]=a,l),{})}:si(t)?{[`Set(${t.size})`]:[...t.values()].map(l=>er(l))}:Xt(t)?er(t):ke(t)&&!Y(t)&&!xs(t)?String(t):t,er=(e,t="")=>{var l;return Xt(e)?`Symbol(${(l=e.description)!=null?l:t})`:e};/**
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let ot;class If{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ot&&(ot.active?(this.parent=ot,this.index=(ot.scopes||(ot.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,l;if(this.scopes)for(t=0,l=this.scopes.length;t<l;t++)this.scopes[t].pause();for(t=0,l=this.effects.length;t<l;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,l;if(this.scopes)for(t=0,l=this.scopes.length;t<l;t++)this.scopes[t].resume();for(t=0,l=this.effects.length;t<l;t++)this.effects[t].resume()}}run(t){if(this._active){const l=ot;try{return ot=this,t()}finally{ot=l}}}on(){++this._on===1&&(this.prevScope=ot,ot=this)}off(){if(this._on>0&&--this._on===0){if(ot===this)ot=this.prevScope;else{let t=ot;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let l,r;for(l=0,r=this.effects.length;l<r;l++)this.effects[l].stop();for(this.effects.length=0,l=0,r=this.cleanups.length;l<r;l++)this.cleanups[l]();if(this.cleanups.length=0,this.scopes){for(l=0,r=this.scopes.length;l<r;l++)this.scopes[l].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Cf(){return ot}let Ne;const tr=new WeakSet;class Ts{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ot&&(ot.active?ot.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,tr.has(this)&&(tr.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ns(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ra(this),Os(this);const t=Ne,l=Lt;Ne=this,Lt=!0;try{return this.fn()}finally{qs(this),Ne=t,Lt=l,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Tr(t);this.deps=this.depsTail=void 0,Ra(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?tr.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){mr(this)&&this.run()}get dirty(){return mr(this)}}let Es=0,Jn,Xn;function Ns(e,t=!1){if(e.flags|=8,t){e.next=Xn,Xn=e;return}e.next=Jn,Jn=e}function Mr(){Es++}function Ar(){if(--Es>0)return;if(Xn){let t=Xn;for(Xn=void 0;t;){const l=t.next;t.next=void 0,t.flags&=-9,t=l}}let e;for(;Jn;){let t=Jn;for(Jn=void 0;t;){const l=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=l}}if(e)throw e}function Os(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function qs(e){let t,l=e.depsTail,r=l;for(;r;){const a=r.prevDep;r.version===-1?(r===l&&(l=a),Tr(r),xf(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=a}e.deps=t,e.depsTail=l}function mr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ls(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ls(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===nl)||(e.globalVersion=nl,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!mr(e))))return;e.flags|=2;const t=e.dep,l=Ne,r=Lt;Ne=e,Lt=!0;try{Os(e);const a=e.fn(e._value);(t.version===0||Yt(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Ne=l,Lt=r,qs(e),e.flags&=-3}}function Tr(e,t=!1){const{dep:l,prevSub:r,nextSub:a}=e;if(r&&(r.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=r,e.nextSub=void 0),l.subs===e&&(l.subs=r,!r&&l.computed)){l.computed.flags&=-5;for(let s=l.computed.deps;s;s=s.nextDep)Tr(s,!0)}!t&&!--l.sc&&l.map&&l.map.delete(l.key)}function xf(e){const{prevDep:t,nextDep:l}=e;t&&(t.nextDep=l,e.prevDep=void 0),l&&(l.prevDep=t,e.nextDep=void 0)}let Lt=!0;const Rs=[];function Zt(){Rs.push(Lt),Lt=!1}function eo(){const e=Rs.pop();Lt=e===void 0?!0:
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function dl(e,t,l,r){try{return r?e(...r):e()}catch(a){pi(a,t,l)}}function Mt(e,t,l,r){if(oe(e)){const a=dl(e,t,l,r);return a&&Is(a)&&a.catch(s=>{pi(s,t,l)}),a}if(Y(e)){const a=[];for(let s=0;s<e.length;s++)a.push(Mt(e[s],t,l,r));return a}}function pi(e,t,l,r=!0){const a=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:u}=t&&t.appContext.config||Te;if(t){let f=t.parent;const m=t.proxy,w=`https://vuejs.org/error-reference/#runtime-${l}`;for(;f;){const h=f.ec;if(h){for(let x=0;x<h.length;x++)if(h[x](e,m,w)===!1)return}f=f.parent}if(s){Zt(),dl(s,null,10,[e,m,w]),eo();return}}Xf(e,l,a,r,u)}function Xf(e,t,l,r=!0,a=!1){if(a)throw e;console.error(e)}const st=[];let Gt=-1;const Cn=[];let Ao=null,wn=0;const Ks=Promise.resolve();let zl=null;function kn(e){const t=zl||Ks;return e?t.then(this?e.bind(this):e):t}function Zf(e){let t=Gt+1,l=st.length;for(;t<l;){const r=t+l>>>1,a=st[r],s=il(a);s<e||s===e&&a.flags&2?t=r+1:l=r}return t}function Rr(e){if(!(e.flags&1)){const t=il(e),l=st[st.length-1];!l||!(e.flags&2)&&t>=il(l)?st.push(e):st.splice(Zf(t),0,e),e.flags|=1,Gs()}}function Gs(){zl||(zl=Ks.then(zs))}function ep(e){Y(e)?Cn.push(...e):Ao&&e.id===-1?Ao.splice(wn+1,0,e):e.flags&1||(Cn.push(e),e.flags|=1),Gs()}function Da(e,t,l=Gt+1){for(;l<st.length;l++){const r=st[l];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;st.splice(l,1),l--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Qs(e){if(Cn.length){const t=[...new Set(Cn)].sort((l,r)=>il(l)-il(r));if(Cn.length=0,Ao){Ao.push(...t);return}for(Ao=t,wn=0;wn<Ao.length;wn++){const l=Ao[wn];l.flags&4&&(l.flags&=-2),l.flags&8||l(),l.flags&=-2}Ao=null,wn=0}}const il=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zs(e){try{for(Gt=0;Gt<st.length;Gt++){const t=st[Gt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),dl(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Gt<st.length;Gt++){const t=st[Gt];t&&(t.flags&=-2)}Gt=-1,st.length=0,Qs(),zl=null,(st.length||Cn.length)&&zs()}}let St=null,Ys=null;function Yl(e){const t=St;return St=e,Ys=e&&e.type.__scopeId||null,t}function tt(e,t=St,l){if(!t||e._n)return e;const r=(...a)=>{r._d&&Zl(-1);const s=Yl(t);let u;try{u=e(...a)}finally{Yl(s),r._d&&Zl(1)}return u};return r._n=!0,r._c=!0,r._d=!0,r}function Ae(e,t){if(St===null)return e;const l=bi(St),r=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[s,u,f,m=Te]=t[a];s&&(oe(s)&&(s={mounted:s,updated:s}),s.deep&&mo(u),r.push({dir:s,instance:l,value:u,oldValue:void 0,arg:f,modifiers:m}))}return e}function Uo(e,t,l,r){const a=e.dirs,s=t&&t.dirs;for(let u=0;u<a.length;u++){const f=a[u];s&&(f.oldValue=s[u].value);let m=f.dir[r];m&&(Zt(),Mt(m,l,8,[e.el,f,e,t]),eo())}}function tp(e,t){if(ct){let l=ct.provides;const r=ct.parent&&ct.parent.provides;r===l&&(l=ct.provides=Object.create(r)),l[e]=t}}function Ul(e,t,l=!1){const r=jr();if(r||xn){let a=xn?xn._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return l&&oe(t)?t.call(r&&r.proxy):t}}const op=Symbol.for("v-scx"),np=()=>Ul(op);function Ot(e,t,l){return Js(e,t,l)}function Js(e,t,l=Te){const{immediate:r,deep:a,flush:s,once:u}=l,f=je({},l),m=t&&r||!t&&s!=="post";let w;if(sl){if(s==="sync"){const F=np();w=F.__watcherHandles||(F.__watcherHandles=[])}else if(!m){const F=()=>{};return F.stop=Jt,F.resume=Jt,F.pause=Jt,F}}const h=ct;f.call=(F,D,z)=>Mt(F,h,D,z);let x=!1;s==="post"?f.scheduler=F=>{dt(F,h&&h.suspense)}:s!=="sync"&&(x=!0,f.scheduler=(F,D)=>{D?F():Rr(F)}),f.augmentJob=F=>{t&&(F.flags|=4),x&&(F.flags|=2,h&&(F.id=h.uid,F.i=h))};const T=Jf(e,t,f);return sl&&(w?w.push(T):m&&T()),T}function lp(e,t,l){const r=this.proxy,a=De(e)?e.includes(".")?Xs(r,e):()=>r[e]:e.bind(r,r);let s;oe(t)?s=t:(s=t.handler,l=t);const u=fl(this),f=Js(a,s.bind(r),l);return u(),f}function Xs(e,t){const l=t.split(".");return()=>{let r=e;for(let a=0;a<l.length&&r;a++)r=r[l[a]];return r}}const ip=Symbol("_vte"),Zs=e=>e.__isTeleport,Pt=Symbol("_leaveCb"),Kn=Symbol("_enterCb");function eu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNo
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Cr;const Za=typeof window<"u"&&window.trustedTypes;if(Za)try{Cr=Za.createPolicy("vue",{createHTML:e=>e})}catch{}const Tu=Cr?e=>Cr.createHTML(e):e=>e,im="http://www.w3.org/2000/svg",rm="http://www.w3.org/1998/Math/MathML",co=typeof document<"u"?document:null,es=co&&co.createElement("template"),am={insert:(e,t,l)=>{t.insertBefore(e,l||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,l,r)=>{const a=t==="svg"?co.createElementNS(im,e):t==="mathml"?co.createElementNS(rm,e):l?co.createElement(e,{is:l}):co.createElement(e);return e==="select"&&r&&r.multiple!=null&&a.setAttribute("multiple",r.multiple),a},createText:e=>co.createTextNode(e),createComment:e=>co.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>co.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,l,r,a,s){const u=l?l.previousSibling:t.lastChild;if(a&&(a===s||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),l),!(a===s||!(a=a.nextSibling)););else{es.innerHTML=Tu(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const f=es.content;if(r==="svg"||r==="mathml"){const m=f.firstChild;for(;m.firstChild;)f.appendChild(m.firstChild);f.removeChild(m)}t.insertBefore(f,l)}return[u?u.nextSibling:t.firstChild,l?l.previousSibling:t.lastChild]}},$o="transition",Gn="animation",$n=Symbol("_vtc"),Eu={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Nu=je({},tu,Eu),sm=e=>(e.displayName="Transition",e.props=Nu,e),ht=sm((e,{slots:t})=>nm(ap,Ou(e),t)),Go=(e,t=[])=>{Y(e)?e.forEach(l=>l(...t)):e&&e(...t)},ts=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function Ou(e){const t={};for(const W in e)W in Eu||(t[W]=e[W]);if(e.css===!1)return t;const{name:l="v",type:r,duration:a,enterFromClass:s=`${l}-enter-from`,enterActiveClass:u=`${l}-enter-active`,enterToClass:f=`${l}-enter-to`,appearFromClass:m=s,appearActiveClass:w=u,appearToClass:h=f,leaveFromClass:x=`${l}-leave-from`,leaveActiveClass:T=`${l}-leave-active`,leaveToClass:F=`${l}-leave-to`}=e,D=um(a),z=D&&D[0],ye=D&&D[1],{onBeforeEnter:le,onEnter:ne,onEnterCancelled:ae,onLeave:V,onLeaveCancelled:se,onBeforeAppear:$e=le,onAppear:He=ne,onAppearCancelled:Ye=ae}=t,Z=(W,de,Ee,Me)=>{W._enterCancelled=Me,Mo(W,de?h:f),Mo(W,de?w:u),Ee&&Ee()},ce=(W,de)=>{W._isLeaving=!1,Mo(W,x),Mo(W,F),Mo(W,T),de&&de()},_e=W=>(de,Ee)=>{const Me=W?He:ne,Pe=()=>Z(de,W,Ee);Go(Me,[de,Pe]),os(()=>{Mo(de,W?m:s),Kt(de,W?h:f),ts(Me)||ns(de,r,z,Pe)})};return je(t,{onBeforeEnter(W){Go(le,[W]),Kt(W,s),Kt(W,u)},onBeforeAppear(W){Go($e,[W]),Kt(W,m),Kt(W,w)},onEnter:_e(!1),onAppear:_e(!0),onLeave(W,de){W._isLeaving=!0;const Ee=()=>ce(W,de);Kt(W,x),W._enterCancelled?(Kt(W,T),xr(W)):(xr(W),Kt(W,T)),os(()=>{W._isLeaving&&(Mo(W,x),Kt(W,F),ts(V)||ns(W,r,ye,Ee))}),Go(V,[W,Ee])},onEnterCancelled(W){Z(W,!1,void 0,!0),Go(ae,[W])},onAppearCancelled(W){Z(W,!0,void 0,!0),Go(Ye,[W])},onLeaveCancelled(W){ce(W),Go(se,[W])}})}function um(e){if(e==null)return null;if(ke(e))return[sr(e.enter),sr(e.leave)];{const t=sr(e);return[t,t]}}function sr(e){return mf(e)}function Kt(e,t){t.split(/\s+/).forEach(l=>l&&e.classList.add(l)),(e[$n]||(e[$n]=new Set)).add(t)}function Mo(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const l=e[$n];l&&(l.delete(t),l.size||(e[$n]=void 0))}function os(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let cm=0;function ns(e,t,l,r){const a=e._endId=++cm,s=()=>{a===e._endId&&r()};if(l!=null)return setTimeout(s,l);const{type:u,timeout:f,propCount:m}=qu(e,t);if(!u)return r();const w=u+"end";let h=0;const x=()=>{e.removeEventListener(w,T),s()},T=F=>{F.target===e&&++h>=m&&x()};setTimeout(()=>{h<m&&x()},f+1),e.addEventListener(w,T)}function qu(e,t){const l=window.getComputedStyle(e),r=D=>(l[D]||"").split(", "),a=r(`${$o}Delay`),s=r(`${$o}Dur
`)}function ha(o){const n=Ce.value,c=Oe.value;return{source:"standalone_web_workflow_chat",ui_node_id:Me.value,ui_node_title:n.title,ui_node_phase:n.phase,ui_node_status:n.status,profile_id:c.profileId,profile_name:c.name,workflow_id:c.workflowId,source_language:"auto",target_prompt_language:"en",translation_mode:"backend_llm",user_instruction:o,persona_split_fields_ready:xl.value,persona_split_fields_total:Cl.value,selected_material_ids:Co.value.map(v=>v.id),selected_draft_image_ids:nt.value.map(v=>v.image_id)}}async function Gc(){var c;const o=ge.value.trim();!o||j.value||!await Wi({promptPatch:ga(o),metadata:ha(o)})||(At.value=o,No.value=`${Ce.value.title} / ${((c=sn.value)==null?void 0:c.label)??de.value}`)}function ba(){!Re.value||!We(Re.value)||(Lo.value="generation",Nt("imageViewer"),vn(),Et.value=!0)}function ya(o){const n=(o?Nn.value.find(c=>c.image_id===o):null)??Pl.value;!n||!We(n)||(se.value=n.image_id,ba())}function Qc(){nt.value.length&&(Lo.value="workflowCompare",Nt("imageViewer"),vn(),Et.value=!0)}function wa(o){var n;o&&fa(o),(n=Ze.value)!=null&&n.imageUrl&&(Lo.value="quickProfile",Nt("imageViewer"),vn(),Et.value=!0)}function Ml(){Et.value=!1,lo.value=!1}function vn(){Bt.value=1,wo.value={x:0,y:0}}function Rn(o){Bt.value=Dd(Number((Bt.value+o).toFixed(2)),.5,4),Bt.value<=1&&(wo.value={x:0,y:0})}function Di(o){Rn(o.deltaY<0?.12:-.12)}function zc(){if(Bt.value>1){vn();return}Bt.value=2.2,wo.value={x:0,y:0}}function Bi(o){Bt.value<=1||(lo.value=!0,Ro.value={pointerId:o.pointerId,x:o.clientX,y:o.clientY,offsetX:wo.value.x,offsetY:wo.value.y},o.currentTarget instanceof HTMLElement&&o.currentTarget.setPointerCapture(o.pointerId))}function Vi(o){!lo.value||o.pointerId!==Ro.value.pointerId||(wo.value={x:Ro.value.offsetX+o.clientX-Ro.value.x,y:Ro.value.offsetY+o.clientY-Ro.value.y})}function ro(o){!lo.value||o.pointerId!==Ro.value.pointerId||(lo.value=!1,o.currentTarget instanceof HTMLElement&&o.currentTarget.hasPointerCapture(o.pointerId)&&o.currentTarget.releasePointerCapture(o.pointerId))}function Yc(){Nt("search"),Je.value=!0,Xe.value=!0}function Fn(){Nt("personaQuestionnaire"),M.value="",no.value=!0}function Jc(){Nt("externalProfileImport"),Oo.value=!0,kn(()=>{var o;(o=document.querySelector("[data-profile-import-input]"))==null||o.focus()})}function Xc(){Nt("quickProfileDetail"),ho.value=!0}async function Zc(o){if(o.enabled){if(o.actionKey==="personaQuestionnaire"){Fn();return}if(o.actionKey==="workflowCompare"){Qc();return}if(o.actionKey==="externalProfileImport"){Jc();return}if(o.actionKey==="workflowPersonaSplit"){await od();return}if(o.actionKey==="workflowSaveVersion"){await ld();return}if(o.actionKey==="workflowCreateBranchFromNode"){await td();return}if(o.actionKey==="workflowNodeGenerate"){await Wi();return}if(o.actionKey==="workflowNodeRetry"){await Wi({retry:!0});return}if(o.actionKey==="workflowNodeComplete"){await nd();return}if(o.actionKey==="workflowPromptPlanNext"){mn("prompt-plan");return}o.nav&&o.module&&io(o.nav,o.module)}}function Al(o){return fn.value?`${o}已被锁定:${Pi.value}`:""}function ed(o){return`branch_${(o.node_key||o.node_id).replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,28)}_${Date.now().toString(36)}`}async function td(){var C,S;const o=Oe.value,n=dn.value;if(!(o!=null&&o.workflowId)||!n||fe.value)return;const c=Po("创建工作流分支");if(c){ue.value=c,K.value=c;return}fe.value=!0,ue.value="",K.value="";const v=o.workflowId,y=((C=Ce.value)==null?void 0:C.title)??n.title;try{const k=await bt(J.workflowBranches(v),{branch_name:ed(n),base_branch_name:n.branch_name||((S=Ie.value[v])==null?void 0:S.current_branch)||"main",base_node_id:n.node_id,copy_nodes:!0,metadata:{source:"standalone_web",ui_node_id:Me.value,ui_node_title:y,reason:"edit_locked_completed_node"}}),te=await bt(J.workflowSwitchBranch(v),{branch_name:k.branch_name}),d=await ze(J.workflowNodes(v)),G=d.filter(Se=>Se.branch_name===te.current_branch);be.value={...be.value,[v]:d},Ie.value={...Ie.value,[v]:te},await va(G.length?G:d),Fi(o,te,G.length?G:d);const pe=G.find(Se=>rt(Se.metadata,"copied_from_node_id")===n.no
<svg xmlns="http://www.w3.org/2000/svg" width="${me}" height="${Ve}" viewBox="0 0 ${me} ${Ve}" preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="${C}" />
<stop offset="58%" stop-color="${S}" />
<stop offset="100%" stop-color="#111827" />
</linearGradient>
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
<stop offset="0%" stop-color="${k}" stop-opacity="0.82" />
<stop offset="100%" stop-color="${k}" stop-opacity="0" />
</radialGradient>
<pattern id="grid" width="${Ho}" height="${Ho}" patternUnits="userSpaceOnUse">
<path d="M${Ho} 0H0V${Ho}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
</pattern>
</defs>
<rect width="${me}" height="${Ve}" fill="url(#bg)" />
<rect width="${me}" height="${Ve}" fill="url(#grid)" />
<circle cx="${Xd}" cy="${Zd}" r="${ef}" fill="url(#halo)" />
<circle cx="${tf}" cy="${of}" r="${nf}" fill="#ffffff" opacity="0.11" />
<rect x="${et}" y="${et}" width="${Qd}" height="${zd}" rx="${Wn}" fill="#ffffff" opacity="0.14" />
<rect x="${Ht}" y="${Ht}" width="${Yd}" height="${Jd}" rx="${Math.round(Wn*.72)}" fill="#0f172a" opacity="0.24" />
<text x="${Ht+Math.round(Fe*.035)}" y="${Hn}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ji}" font-weight="700">IMAGESTUDIO TEST ${te}</text>
<text x="${Ht+Math.round(Fe*.035)}" y="${jn}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Dl}" font-weight="800">${d}</text>
<text x="${Ht+Math.round(Fe*.035)}" y="${Fl}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Yi}">${G}</text>
<text x="${lf}" y="${Hn+Math.round(Fe*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Gd}" font-weight="900">${te}</text>
<text x="${me-et}" y="${Ve-Math.round(et*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(Fe*.027))}" font-weight="800">${rf}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(af)}`}function qd(o){const n=o.match(/(\d+)\s*x\s*(\d+)/i);if(!n)return[4,3];const c=Number(n[1]),v=Number(n[2]);if(!Number.isFinite(c)||!Number.isFinite(v)||c<=0||v<=0)return[4,3];const y=Ld(c,v);return[Math.round(c/y),Math.round(v/y)]}function Ld(o,n){let c=Math.abs(Math.round(o)),v=Math.abs(Math.round(n));for(;v;){const y=c%v;c=v,v=y}return c||1}function Ea(o){return o.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[n]??n)}function Le(o){return"title"in o&&o.title?o.title:o.node_id||o.workflow_id||o.profile_id||ql(o.image_id)}function We(o){return o.thumbnail_url||o.image_url||""}function Rd(o){if(o.status==="confirmed_unsupported")return!1;if(o.dialect==="openai_images"||o.dialect==="comfyui")return!0;const n=o.capabilities||{};return!!(n.text_to_image||n.image_generation||n.workflow_graph||Object.keys(n).some(c=>["text_to_image","image_generation","workflow_graph"].includes(c)))}function ql(o){return o.length>10?`${o.slice(0,6)}...${o.slice(-4)}`:o}function Fd(o){const n=Number(o.progress);return Number.isFinite(n)?Math.max(0,Math.min(100,n)):0}function Dd(o,n,c){return Math.max(n,Math.min(c,o))}function jt(o){return String(o||"").trim().toLowerCase()}function Bd(o){const n=jt(o);return["failed","dead_letter","cancelled"].includes(n)?"is-bad":["running","queued","created","pending"].includes(n)?"is-warn":["completed","succeeded"].includes(n)?"is-good":"is-idle"}function jo(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:o<1024*1024*1024?`${(o/1024/1024).toFixed(1)} MB`:`${(o/1024/1024/1024).toFixed(1)} GB`}function gn(o){if(!o)return"-";const n=new Date(o);return Number.isNaN(n.getTime())?o:new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(n)}function Vd(o){const n=zi(o.created_at);if(!n)return"-";const c=Math.max(0,Math.round((Date.now()-n)/6e4));return c<1?"刚刚":c<60?`${c} 分钟`:`${Math.round(c/60)} 小时`}function Wd(){const o=localStorage.getItem(Vt.theme);(o==="light"||o==="dark")&&(ft.value=o),Tt.value=localStorage.getItem(Vt.primary)||Tt.value,yo.value=localStorage.getItem(Vt.accent)||yo.value,It.value=Na(localStorage.getItem(Vt.readNotifications)),tn.value=Na(localStorage.getItem(Vt.dismissedNotifications))}function jd(){localStorage.setItem(Vt.theme,ft.value),localStorage.setItem(Vt.primary,Tt.value),localStorage.setItem(Vt.accent,yo.value),localStorage.setItem(Vt.readNotifications,JSON.stringify(It.value)),localStorage.setItem(Vt.dismissedNotifications,JSON.stringify(tn.value))}function Na(o){if(!o)return[];try{const n=JSON.parse(o);return Array.isArray(n)?n.filter(c=>typeof c=="string"):[]}catch{return[]}}function ao(o,n){const c=Qi(o);return c?`rgba(${c.r}, ${c.g}, ${c.b}, ${n})`:`rgba(118, 104, 232, ${n})`}function Ki(o,n,c){const v=Qi(o),y=Qi(n);if(!v||!y)return o;const C=Math.min(1,Math.max(0,c));return`#${Gi(v.r*(1-C)+y.r*C)}${Gi(v.g*(1-C)+y.g*C)}${Gi(v.b*(1-C)+y.b*C)}`}function Gi(o){return Math.round(o).toString(16).padStart(2,"0")}function Qi(o){const n=o.replace("#","");return/^[0-9a-fA-F]{6}$/.test(n)?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16)}:null}function rt(o,n){const c=o==null?void 0:o[n];return typeof c=="string"?c:""}function Hd(o){return!Ll(o)||typeof o.task_id!="string"?null:{task_id:o.task_id,task_type:typeof o.task_type=="string"?o.task_type:"generation",status:typeof o.status=="string"?o.status:"created",progress:typeof o.progress=="number"?o.progress:0,created_at:typeof o.created_at=="string"?o.created_at:"",updated_at:typeof o.updated_at=="string"?o.updated_at:"",profile_id:typeof o.profile_id=="string"?o.profile_id:null,workflow_id:typeof o.workflow_id=="string"?o.workflow_id:null,node_id:typeof o.node_id=="string"?o.node_id:null,model_route:typeof o.model_route=="string"?o.model_route:null,idempotency_key:typeof o.idempotency_key=="string"?o.idempotency_key:null,request:Ll(o.request)?o.request:void 0,result:Ll(o.result)?o.result:void 0
身份:近未来港区巡查员
性格:冷静、可靠、行动快
外观:黑色短发,青绿色眼睛
服装:轻机能外套、短靴、发光臂章
避雷:低质量、结构错误`},null,512),[[qe,Ft.value]])]),i("aside",ty,[i("header",null,[i("div",null,[n[131]||(n[131]=i("span",null,"识别预览",-1)),i("strong",null,g(Hu.value)+" / "+g(_i.value.length),1)]),i("em",null,g(an.value?`${an.value.length} 字`:"待粘贴"),1)]),i("dl",null,[(_(!0),I(U,null,ee(_i.value,d=>(_(),I("div",{key:d.key,class:X({pending:an.value&&!d.recognized})},[i("dt",null,[Gl(g(d.label)+" ",1),i("span",null,g(d.recognized?"已识别":"待整理"),1)]),i("dd",null,g(d.value||"粘贴文本后显示"),1)],2))),128))])])]),i("footer",null,[i("span",null,g(an.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),i("button",{type:"button",onClick:n[26]||(n[26]=d=>Ct("externalProfileImport"))},"取消"),i("button",{type:"button",disabled:!an.value,onClick:md}," 识别并填入问卷 ",8,oy)])])])):ve("",!0)]),_:1}),xe(ht,{name:"viewer-fade"},{default:tt(()=>[no.value?(_(),I("div",ny,[i("section",ly,[i("header",null,[n[132]||(n[132]=i("div",null,[i("span",null,"快速角色"),i("strong",null,"创建角色档案问卷")],-1)),i("button",{type:"button",title:"关闭",onClick:n[27]||(n[27]=d=>Ct("personaQuestionnaire"))},"×")]),i("div",iy,[i("label",null,[n[133]||(n[133]=i("span",null,"角色核心",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[28]||(n[28]=d=>p.value.roleCore=d),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[qe,p.value.roleCore]])]),i("label",null,[n[134]||(n[134]=i("span",null,"性格关键词",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[29]||(n[29]=d=>p.value.personality=d),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[qe,p.value.personality]])]),i("label",null,[n[135]||(n[135]=i("span",null,"外观特征",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[30]||(n[30]=d=>p.value.appearance=d),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[qe,p.value.appearance]])]),i("label",null,[n[136]||(n[136]=i("span",null,"服装与配饰",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[31]||(n[31]=d=>p.value.outfit=d),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[qe,p.value.outfit]])]),i("label",null,[n[137]||(n[137]=i("span",null,"常用场景",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[32]||(n[32]=d=>p.value.scene=d),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[qe,p.value.scene]])]),i("label",null,[n[138]||(n[138]=i("span",null,"避雷内容",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[33]||(n[33]=d=>p.value.avoid=d),rows:"3",placeholder:"不想要的设计方向、负面词和禁用元素。"},null,512),[[qe,p.value.avoid]])]),bo.value==="advanced"?(_(),I(U,{key:0},[i("label",null,[n[139]||(n[139]=i("span",null,"世界观",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[34]||(n[34]=d=>p.value.worldview=d),rows:"3",placeholder:"现代、赛博、奇幻、末世、校园、古风、星际等。"},null,512),[[qe,p.value.worldview]])]),i("label",null,[n[140]||(n[140]=i("span",null,"背景经历",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[35]||(n[35]=d=>p.value.background=d),rows:"3",placeholder:"所属组织、过往经历、当前处境。"},null,512),[[qe,p.value.background]])]),i("label",null,[n[141]||(n[141]=i("span",null,"身高 / 身材",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[36]||(n[36]=d=>p.value.heightBuild=d),rows:"3",placeholder:"身高范围、体型、姿态气质、肤色。"},null,512),[[qe,p.value.heightBuild]])]),i("label",null,[n[142]||(n[142]=i("span",null,"身体记忆点",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[37]||(n[37]=d=>p.value.bodyFeatures=d),rows:"3",placeholder:"伤疤、痣、纹身、义体、异色瞳等。"},null,512),[[qe,p.value.bodyFeatures]])]),i("label",null,[n[143]||(n[143]=i("span",null,"喜好",-1)),Ae(i("textarea",{"onUpdate:modelValue":n[38]||(n[38]=d=>p.value.likes=d),rows:"3",placeholder:"颜色、食物、饮品、兴趣、常去地点。"},null,512),[[qe,p.value.like