astrbot_plugin_imagestudio/pages/imagestudio/assets/index-KZ-4gT9r.js

55 行
478 KiB
JavaScript

2026-07-12 23:14:55 +08:00
var mb=Object.defineProperty;var gb=(e,n,o)=>n in e?mb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Os=(e,n,o)=>gb(e,typeof n!="symbol"?n+"":n,o);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function o(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(r){if(r.ep)return;r.ep=!0;const u=o(r);fetch(r.href,u)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function wu(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const it={},so=[],ia=()=>{},pf=()=>!1,$r=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Cr=e=>e.startsWith("onUpdate:"),At=Object.assign,_u=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},bb=Object.prototype.hasOwnProperty,Ze=(e,n)=>bb.call(e,n),Pe=Array.isArray,uo=e=>si(e)==="[object Map]",bo=e=>si(e)==="[object Set]",$c=e=>si(e)==="[object Date]",qe=e=>typeof e=="function",ht=e=>typeof e=="string",Ul=e=>typeof e=="symbol",et=e=>e!==null&&typeof e=="object",vf=e=>(et(e)||qe(e))&&qe(e.then)&&qe(e.catch),mf=Object.prototype.toString,si=e=>mf.call(e),yb=e=>si(e).slice(8,-1),gf=e=>si(e)==="[object Object]",$u=e=>ht(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zo=wu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ir=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},hb=/-\w/g,Dl=Ir(e=>e.replace(hb,n=>n.slice(1).toUpperCase())),kb=/\B([A-Z])/g,sn=Ir(e=>e.replace(kb,"-$1").toLowerCase()),bf=Ir(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ds=Ir(e=>e?`on${bf(e)}`:""),oa=(e,n)=>!Object.is(e,n),rr=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},yf=(e,n,o,i=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:i,value:o})},Pr=e=>{const n=parseFloat(e);return isNaN(n)?e:n},wb=e=>{const n=ht(e)?Number(e):NaN;return isNaN(n)?e:n};let Cc;const Sr=()=>Cc||(Cc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pt(e){if(Pe(e)){const n={};for(let o=0;o<e.length;o++){const i=e[o],r=ht(i)?Ib(i):Pt(i);if(r)for(const u in r)n[u]=r[u]}return n}else if(ht(e)||et(e))return e}const _b=/;(?![^(]*\))/g,$b=/:([^]+)/,Cb=/\/\*[^]*?\*\//g;function Ib(e){const n={};return e.replace(Cb,"").split(_b).forEach(o=>{if(o){const i=o.split($b);i.length>1&&(n[i[0].trim()]=i[1].trim())}}),n}function le(e){let n="";if(ht(e))n=e;else if(Pe(e))for(let o=0;o<e.length;o++){const i=le(e[o]);i&&(n+=i+" ")}else if(et(e))for(const o in e)e[o]&&(n+=o+" ");return n.trim()}const Pb="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Sb=wu(Pb);function hf(e){return!!e||e===""}function xb(e,n){if(e.length!==n.length)return!1;let o=!0;for(let i=0;o&&i<e.length;i++)o=nn(e[i],n[i]);return o}function nn(e,n){if(e===n)return!0;let o=$c(e),i=$c(n);if(o||i)return o&&i?e.getTime()===n.getTime():!1;if(o=Ul(e),i=Ul(n),o||i)return e===n;if(o=Pe(e),i=Pe(n),o||i)return o&&i?xb(e,n):!1;if(o=et(e),i=et(n),o||i){if(!o||!i)return!1;const r=Object.keys(e).length,u=Object.keys(n).length;if(r!==u)return!1;for(const f in e){const g=e.hasOwnProperty(f),h=n.hasOwnProperty(f);if(g&&!h||!g&&h||!nn(e[f],n[f]))return!1}}return String(e)===String(n)}function Cu(e,n){return e.findIndex(o=>nn(o,n))}const kf=e=>!!(e&&e.__v_isRef===!0),d=e=>ht(e)?e:e==null?"":Pe(e)||et(e)&&(e.toString===mf||!qe(e.toString))?kf(e)?d(e.value):JSON.stringify(e,wf,2):String(e),wf=(e,n)=>kf(n)?wf(e,n.value):uo(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[i,r],u)=>(o[Vs(i,u)+" =>"]=r,o),{})}:bo(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>Vs(o))}:Ul(n)?Vs(n):et(n)&&!Pe(n)&&!gf(n)?String(n):n,Vs=(e,n="")=>{var o;return Ul(e)?`Symbol(${(o=e.description)!=null?o:n})`:e};/**
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let jt;class Ab{constructor(n=!1){this.detached=n,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!n&&jt&&(jt.active?(this.parent=jt,this.index=(jt.scopes||(jt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let n,o;if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].pause();for(n=0,o=this.effects.length;n<o;n++)this.effects[n].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let n,o;if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].resume();for(n=0,o=this.effects.length;n<o;n++)this.effects[n].resume()}}run(n){if(this._active){const o=jt;try{return jt=this,n()}finally{jt=o}}}on(){++this._on===1&&(this.prevScope=jt,jt=this)}off(){if(this._on>0&&--this._on===0){if(jt===this)jt=this.prevScope;else{let n=jt;for(;n;){if(n.prevScope===this){n.prevScope=this.prevScope;break}n=n.prevScope}}this.prevScope=void 0}}stop(n){if(this._active){this._active=!1;let o,i;for(o=0,i=this.effects.length;o<i;o++)this.effects[o].stop();for(this.effects.length=0,o=0,i=this.cleanups.length;o<i;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,i=this.scopes.length;o<i;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!n){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Mb(){return jt}let ut;const Us=new WeakSet;class _f{constructor(n){this.fn=n,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,jt&&(jt.active?jt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Us.has(this)&&(Us.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cf(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ic(this),If(this);const n=ut,o=Vl;ut=this,Vl=!0;try{return this.fn()}finally{Pf(this),ut=n,Vl=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Su(n);this.deps=this.depsTail=void 0,Ic(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Us.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ou(this)&&this.run()}get dirty(){return ou(this)}}let $f=0,Ho,Qo;function Cf(e,n=!1){if(e.flags|=8,n){e.next=Qo,Qo=e;return}e.next=Ho,Ho=e}function Iu(){$f++}function Pu(){if(--$f>0)return;if(Qo){let n=Qo;for(Qo=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;Ho;){let n=Ho;for(Ho=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(i){e||(e=i)}n=o}}if(e)throw e}function If(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function Pf(e){let n,o=e.depsTail,i=o;for(;i;){const r=i.prevDep;i.version===-1?(i===o&&(o=r),Su(i),Eb(i)):n=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=n,e.depsTail=o}function ou(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(Sf(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function Sf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ei)||(e.globalVersion=ei,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ou(e))))return;e.flags|=2;const n=e.dep,o=ut,i=Vl;ut=e,Vl=!0;try{If(e);const r=e.fn(e._value);(n.version===0||oa(r,e._value))&&(e.flags|=128,e._value=r,n.version++)}catch(r){throw n.version++,r}finally{ut=o,Vl=i,Pf(e),e.flags&=-3}}function Su(e,n=!1){const{dep:o,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),o.subs===e&&(o.subs=i,!i&&o.computed)){o.computed.flags&=-5;for(let u=o.computed.deps;u;u=u.nextDep)Su(u,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function Eb(e){const{prevDep:n,nextDep:o}=e;n&&(n.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=n,e.nextDep=void 0)}let Vl=!0;const xf=[];function ra(){xf.push(Vl),Vl=!1}function sa(){const e=xf.pop();Vl=e===void 0?!0:
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function ui(e,n,o,i){try{return i?e(...i):e()}catch(r){Ar(r,n,o)}}function El(e,n,o,i){if(qe(e)){const r=ui(e,n,o,i);return r&&vf(r)&&r.catch(u=>{Ar(u,n,o)}),r}if(Pe(e)){const r=[];for(let u=0;u<e.length;u++)r.push(El(e[u],n,o,i));return r}}function Ar(e,n,o,i=!0){const r=n?n.vnode:null,{errorHandler:u,throwUnhandledErrorInProduction:f}=n&&n.appContext.config||it;if(n){let g=n.parent;const h=n.proxy,_=`https://vuejs.org/error-reference/#runtime-${o}`;for(;g;){const y=g.ec;if(y){for(let A=0;A<y.length;A++)if(y[A](e,h,_)===!1)return}g=g.parent}if(u){ra(),ui(u,null,10,[e,h,_]),sa();return}}ay(e,o,r,i,f)}function ay(e,n,o,i=!0,r=!1){if(r)throw e;console.error(e)}const el=[];let ta=-1;const co=[];let an=null,ro=0;const Lf=Promise.resolve();let mr=null;function Kt(e){const n=mr||Lf;return e?n.then(this?e.bind(this):e):n}function ny(e){let n=ta+1,o=el.length;for(;n<o;){const i=n+o>>>1,r=el[i],u=li(r);u<e||u===e&&r.flags&2?n=i+1:o=i}return n}function Ru(e){if(!(e.flags&1)){const n=li(e),o=el[el.length-1];!o||!(e.flags&2)&&n>=li(o)?el.push(e):el.splice(ny(n),0,e),e.flags|=1,Of()}}function Of(){mr||(mr=Lf.then(Vf))}function oy(e){Pe(e)?co.push(...e):an&&e.id===-1?an.splice(ro+1,0,e):e.flags&1||(co.push(e),e.flags|=1),Of()}function Sc(e,n,o=ta+1){for(;o<el.length;o++){const i=el[o];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;el.splice(o,1),o--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Df(e){if(co.length){const n=[...new Set(co)].sort((o,i)=>li(o)-li(i));if(co.length=0,an){an.push(...n);return}for(an=n,ro=0;ro<an.length;ro++){const o=an[ro];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}an=null,ro=0}}const li=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vf(e){try{for(ta=0;ta<el.length;ta++){const n=el[ta];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),ui(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;ta<el.length;ta++){const n=el[ta];n&&(n.flags&=-2)}ta=-1,el.length=0,Df(),mr=null,(el.length||co.length)&&Vf()}}let Jt=null,Uf=null;function gr(e){const n=Jt;return Jt=e,Uf=e&&e.type.__scopeId||null,n}function $t(e,n=Jt,o){if(!n||e._n)return e;const i=(...r)=>{i._d&&hr(-1);const u=gr(n);let f;try{f=e(...r)}finally{gr(u),i._d&&hr(1)}return f};return i._n=!0,i._c=!0,i._d=!0,i}function ve(e,n){if(Jt===null)return e;const o=Br(Jt),i=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[u,f,g,h=it]=n[r];u&&(qe(u)&&(u={mounted:u,updated:u}),u.deep&&Ea(f),i.push({dir:u,instance:o,value:f,oldValue:void 0,arg:g,modifiers:h}))}return e}function En(e,n,o,i){const r=e.dirs,u=n&&n.dirs;for(let f=0;f<r.length;f++){const g=r[f];u&&(g.oldValue=u[f].value);let h=g.dir[i];h&&(ra(),El(h,o,8,[e.el,g,e,n]),sa())}}function iy(e,n){if(tl){let o=tl.provides;const i=tl.parent&&tl.parent.provides;i===o&&(o=tl.provides=Object.create(i)),o[e]=n}}function sr(e,n,o=!1){const i=Ou();if(i||po){let r=po?po._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return o&&qe(n)?n.call(i&&i.proxy):n}}const ry=Symbol.for("v-scx"),sy=()=>sr(ry);function He(e,n,o){return Ff(e,n,o)}function Ff(e,n,o=it){const{immediate:i,deep:r,flush:u,once:f}=o,g=At({},o),h=n&&i||!n&&u!=="post";let _;if(ii){if(u==="sync"){const w=sy();_=w.__watcherHandles||(w.__watcherHandles=[])}else if(!h){const w=()=>{};return w.stop=ia,w.resume=ia,w.pause=ia,w}}const y=tl;g.call=(w,I,L)=>El(w,y,I,L);let A=!1;u==="post"?g.scheduler=w=>{rl(w,y&&y.suspense)}:u!=="sync"&&(A=!0,g.scheduler=(w,I)=>{I?w():Ru(w)}),g.augmentJob=w=>{n&&(w.flags|=4),A&&(w.flags|=2,y&&(w.id=y.uid,w.i=y))};const O=ly(e,n,g);return ii&&(_?_.push(O):h&&O()),O}function uy(e,n,o){const i=this.proxy,r=ht(e)?e.includes(".")?Wf(i,e):()=>i[e]:e.bind(i,i);let u;qe(n)?u=n:(u=n.handler,o=n);const f=ci(this),g=Ff(r,u.bind(i),o);return f(),g}function Wf(e,n){const o=n.split(".");return()=>{let i=e;for(let r=0;r<o.length&&i;r++)i=i[o[r]];return i}}const dy=Symbol("_vte"),jf=e=>e.__isTeleport,Sl=Symbol("_leaveCb"),Vo=Symbol("_enterCb");function Kf(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingV
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let mu;const Fc=typeof window<"u"&&window.trustedTypes;if(Fc)try{mu=Fc.createPolicy("vue",{createHTML:e=>e})}catch{}const _p=mu?e=>mu.createHTML(e):e=>e,u1="http://www.w3.org/2000/svg",d1="http://www.w3.org/1998/Math/MathML",xa=typeof document<"u"?document:null,Wc=xa&&xa.createElement("template"),c1={insert:(e,n,o)=>{n.insertBefore(e,o||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,o,i)=>{const r=n==="svg"?xa.createElementNS(u1,e):n==="mathml"?xa.createElementNS(d1,e):o?xa.createElement(e,{is:o}):xa.createElement(e);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>xa.createTextNode(e),createComment:e=>xa.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>xa.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,o,i,r,u){const f=o?o.previousSibling:n.lastChild;if(r&&(r===u||r.nextSibling))for(;n.insertBefore(r.cloneNode(!0),o),!(r===u||!(r=r.nextSibling)););else{Wc.innerHTML=_p(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const g=Wc.content;if(i==="svg"||i==="mathml"){const h=g.firstChild;for(;h.firstChild;)g.appendChild(h.firstChild);g.removeChild(h)}n.insertBefore(g,o)}return[f?f.nextSibling:n.firstChild,o?o.previousSibling:n.lastChild]}},Xa="transition",Uo="animation",mo=Symbol("_vtc"),$p={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},Cp=At({},Gf,$p),f1=e=>(e.displayName="Transition",e.props=Cp,e),zt=f1((e,{slots:n})=>r1(fy,Ip(e),n)),Rn=(e,n=[])=>{Pe(e)?e.forEach(o=>o(...n)):e&&e(...n)},jc=e=>e?Pe(e)?e.some(n=>n.length>1):e.length>1:!1;function Ip(e){const n={};for(const ne in e)ne in $p||(n[ne]=e[ne]);if(e.css===!1)return n;const{name:o="v",type:i,duration:r,enterFromClass:u=`${o}-enter-from`,enterActiveClass:f=`${o}-enter-active`,enterToClass:g=`${o}-enter-to`,appearFromClass:h=u,appearActiveClass:_=f,appearToClass:y=g,leaveFromClass:A=`${o}-leave-from`,leaveActiveClass:O=`${o}-leave-active`,leaveToClass:w=`${o}-leave-to`}=e,I=p1(r),L=I&&I[0],H=I&&I[1],{onBeforeEnter:N,onEnter:B,onEnterCancelled:S,onLeave:F,onLeaveCancelled:ue,onBeforeAppear:fe=N,onAppear:be=B,onAppearCancelled:se=S}=n,R=(ne,$e,Q,j)=>{ne._enterCancelled=j,tn(ne,$e?y:g),tn(ne,$e?_:f),Q&&Q()},D=(ne,$e)=>{ne._isLeaving=!1,tn(ne,A),tn(ne,w),tn(ne,O),$e&&$e()},W=ne=>($e,Q)=>{const j=ne?be:B,Ae=()=>R($e,ne,Q);Rn(j,[$e,Ae]),Kc(()=>{tn($e,ne?h:u),ea($e,ne?y:g),jc(j)||Gc($e,i,L,Ae)})};return At(n,{onBeforeEnter(ne){Rn(N,[ne]),ea(ne,u),ea(ne,f)},onBeforeAppear(ne){Rn(fe,[ne]),ea(ne,h),ea(ne,_)},onEnter:W(!1),onAppear:W(!0),onLeave(ne,$e){ne._isLeaving=!0;const Q=()=>D(ne,$e);ea(ne,A),ne._enterCancelled?(ea(ne,O),gu(ne)):(gu(ne),ea(ne,O)),Kc(()=>{ne._isLeaving&&(tn(ne,A),ea(ne,w),jc(F)||Gc(ne,i,H,Q))}),Rn(F,[ne,Q])},onEnterCancelled(ne){R(ne,!1,void 0,!0),Rn(S,[ne])},onAppearCancelled(ne){R(ne,!0,void 0,!0),Rn(se,[ne])},onLeaveCancelled(ne){D(ne),Rn(ue,[ne])}})}function p1(e){if(e==null)return null;if(et(e))return[zs(e.enter),zs(e.leave)];{const n=zs(e);return[n,n]}}function zs(e){return wb(e)}function ea(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[mo]||(e[mo]=new Set)).add(n)}function tn(e,n){n.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const o=e[mo];o&&(o.delete(n),o.size||(e[mo]=void 0))}function Kc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let v1=0;function Gc(e,n,o,i){const r=e._endId=++v1,u=()=>{r===e._endId&&i()};if(o!=null)return setTimeout(u,o);const{type:f,timeout:g,propCount:h}=Pp(e,n);if(!f)return i();const _=f+"end";let y=0;const A=()=>{e.removeEventListener(_,O),u()},O=w=>{w.target===e&&++y>=h&&A()};setTimeout(()=>{y<h&&A()},g+1),e.addEventListener(_,O)}function Pp(e,n){const o=window.getComputedStyle(e),i=I=>(o[I]||"").split(", "),r=i(`${Xa}
`)}function f(O,w){const I=Array.from(new Set(w.replace(/,/g,",").split(/[\n,]/).map(L=>L.trim()).filter(Boolean)));i("update:modelValue",{...o.modelValue,[O]:I})}function g(O,w){i("update:modelValue",{...o.modelValue,[O]:w})}const h=E(()=>r("group_allowlist").length),_=E(()=>r("user_allowlist").length),y=E(()=>r("adult_group_allowlist").length),A=E(()=>r("adult_user_allowlist").length);return(O,w)=>(c(),p("section",gC,[w[24]||(w[24]=Lu('<div class="intro" data-v-1ac2e616><span data-v-1ac2e616>AstrBot 聊天指令</span><strong data-v-1ac2e616>群聊与用户白名单</strong><p data-v-1ac2e616>每行填写一个平台提供的群聊 ID 或用户 ID,也支持用逗号分隔。白名单为空时不会放行对应条件。</p></div><div class="rules" data-v-1ac2e616><article data-v-1ac2e616><b data-v-1ac2e616>快速角色 / 角色工作流</b><strong data-v-1ac2e616>群聊命中 + 用户命中</strong><p data-v-1ac2e616>两个白名单必须同时命中才允许使用,避免群内未授权成员启动完整工作流。</p></article><article data-v-1ac2e616><b data-v-1ac2e616>单图生成</b><strong data-v-1ac2e616>群聊命中 或 用户命中</strong><p data-v-1ac2e616>任意一个白名单命中即可使用;用户白名单也可以在私聊中放行单图。</p></article></div>',2)),t("div",bC,[t("label",null,[t("span",null,[w[10]||(w[10]=nt("群聊白名单 ",-1)),t("em",null,d(h.value)+" 项",1)]),t("textarea",{value:u("group_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个群聊 ID
例如:123456789`,onInput:w[0]||(w[0]=I=>f("group_allowlist",I.target.value))},null,40,yC),w[11]||(w[11]=t("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),t("label",null,[t("span",null,[w[12]||(w[12]=nt("用户白名单 ",-1)),t("em",null,d(_.value)+" 项",1)]),t("textarea",{value:u("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
例如:987654321`,onInput:w[1]||(w[1]=I=>f("user_allowlist",I.target.value))},null,40,hC),w[13]||(w[13]=t("small",null,"使用 AstrBot 事件返回的平台用户 ID,不使用昵称。",-1))])]),w[25]||(w[25]=t("div",{class:"adult-intro"},[t("div",null,[t("span",null,"成人内容独立授权"),t("strong",null,"必须同时通过内容审核与成人白名单")]),t("p",null,"这些名单不会放宽恐怖主义、高危暴力、现实伤害或其他禁止内容。群聊内要求成人群聊与成人用户同时命中;私聊要求成人用户命中。")],-1)),t("div",kC,[t("label",null,[t("span",null,[w[14]||(w[14]=nt("成人内容群聊白名单 ",-1)),t("em",null,d(y.value)+" 项",1)]),t("textarea",{value:u("adult_group_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的群聊 ID",onInput:w[2]||(w[2]=I=>f("adult_group_allowlist",I.target.value))},null,40,wC),w[15]||(w[15]=t("small",null,"仅影响通过审核的 adult_allowed 内容。",-1))]),t("label",null,[t("span",null,[w[16]||(w[16]=nt("成人内容用户白名单 ",-1)),t("em",null,d(A.value)+" 项",1)]),t("textarea",{value:u("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:w[3]||(w[3]=I=>f("adult_user_allowlist",I.target.value))},null,40,_C),w[17]||(w[17]=t("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),t("div",$C,[t("label",null,[w[18]||(w[18]=t("span",null,"用户并发上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.user_concurrency_limit||2),disabled:e.disabled,onInput:w[4]||(w[4]=I=>g("user_concurrency_limit",Number(I.target.value)))},null,40,CC)]),t("label",null,[w[19]||(w[19]=t("span",null,"群聊并发上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.group_concurrency_limit||5),disabled:e.disabled,onInput:w[5]||(w[5]=I=>g("group_concurrency_limit",Number(I.target.value)))},null,40,IC)]),t("label",null,[w[20]||(w[20]=t("span",null,"用户每日生成上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.daily_user_generation_limit||30),disabled:e.disabled,onInput:w[6]||(w[6]=I=>g("daily_user_generation_limit",Number(I.target.value)))},null,40,PC)]),t("label",null,[w[21]||(w[21]=t("span",null,"群聊每日生成上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.daily_group_generation_limit||100),disabled:e.disabled,onInput:w[7]||(w[7]=I=>g("daily_group_generation_limit",Number(I.target.value)))},null,40,SC)]),t("label",xC,[t("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:w[8]||(w[8]=I=>g("allow_2k",I.target.checked))},null,40,AC),w[22]||(w[22]=t("span",null,"允许聊天使用 2K",-1))]),t("label",MC,[t("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:w[9]||(w[9]=I=>g("allow_4k",I.target.checked))},null,40,EC),w[23]||(w[23]=t("span",null,"允许聊天使用 4K",-1))])])]))}}),RC=St(NC,[["__scopeId","data-v-1ac2e616"]]),BC={class:"governance"},TC={class:"preview-card"},qC=["disabled"],LC={class:"preview-choice"},OC={key:1,class:"preview-error"},DC={key:2,class:"preview-result"},VC={class:"card"},UC={class:"switch"},FC=["checked","disabled"],WC={class:"grid"},jC=["value","disabled"],KC=["value"],GC=["value","disabled"],zC={class:"entries"},HC=["checked","disabled","onChange"],QC={class:"card"},JC={class:"switch"},YC=["checked","disabled"],XC={class:"grid"},ZC=["value","disabled"],eI=["value"],tI=["value","disabled"],lI={class:"card routing"},aI={class:"switch"},nI=["checked","disabled"],oI={class:"route-pair"},iI=["value","disabled"],rI=["value"],sI=["value","disabled"],uI=["value"],dI={class:"entries"},cI=["checked","disabled","onChange"],fI={class:"card"},pI={class:"switch"},vI=["checked","disabled"],mI={class:"grid"},gI=["value","disabled"],bI=["value"],yI=["value","disabled"],hI={class:"retention"},kI=["value","disabled"],wI=["value","disabled"],_I=["value","disabled"],$I=dt({__name:"PromptGovernancePanel",props:{modelValue:{},adapters:{},disabled:{
`)}function Kd(l){const a=Ge.value,s=Fe.value;return{source:"standalone_web_workflow_chat",ui_node_id:U.value,ui_node_title:a.title,ui_node_phase:a.phase,ui_node_status:a.status,profile_id:s.profileId,profile_name:s.name,workflow_id:s.workflowId,source_language:"auto",target_prompt_language:"en",translation_mode:"backend_llm",user_instruction:l,persona_split_fields_ready:Vi.value,persona_split_fields_total:Di.value,selected_material_ids:ks(),selected_draft_image_ids:vt.value.filter(pl).map(v=>v.image_id)}}async function Ss(){var s;const l=jl.value.trim();if(!l||We.value)return;if(!Ql.value){Ce.value="请先在设置中配置并确认一个生图模型。";return}await Es({promptPatch:jd(l),metadata:Kd(l)})&&(qr.value=l,Vu.value=`${Ge.value.title} / ${((s=Ql.value)==null?void 0:s.label)??K.value}`)}function Gd(){!Ut.value||!Et(Ut.value)||(Kn.value="generation",al("imageViewer"),Hi(),zl.value=!0)}function zd(l){const a=(l?Ui.value.find(s=>s.image_id===l):null)??Ja.value;!a||!Et(a)||(Bt.value=a.image_id,Gd())}function Dm(){vt.value.length&&(Kn.value="workflowCompare",al("imageViewer"),Hi(),zl.value=!0)}function Hd(l){var a;l&&Vd(l),(a=Ft.value)!=null&&a.imageUrl&&(Kn.value="quickProfile",al("imageViewer"),Hi(),zl.value=!0)}function xs(){zl.value=!1,bn.value=!1}function Hi(){ua.value=1,Fa.value={x:0,y:0}}function Vm(l){ua.value=Xg(Number((ua.value+l).toFixed(2)),.5,4),ua.value<=1&&(Fa.value={x:0,y:0})}function Um(l){Vm(l.deltaY<0?.12:-.12)}function Fm(){if(ua.value>1){Hi();return}ua.value=2.2,Fa.value={x:0,y:0}}function Wm(l){ua.value<=1||(bn.value=!0,yn.value={pointerId:l.pointerId,x:l.clientX,y:l.clientY,offsetX:Fa.value.x,offsetY:Fa.value.y},l.currentTarget instanceof HTMLElement&&l.currentTarget.setPointerCapture(l.pointerId))}function jm(l){!bn.value||l.pointerId!==yn.value.pointerId||(Fa.value={x:yn.value.offsetX+l.clientX-yn.value.x,y:yn.value.offsetY+l.clientY-yn.value.y})}function As(l){!bn.value||l.pointerId!==yn.value.pointerId||(bn.value=!1,l.currentTarget instanceof HTMLElement&&l.currentTarget.hasPointerCapture(l.pointerId)&&l.currentTarget.releasePointerCapture(l.pointerId))}function Qd(){al("search"),Vr.value=!0,jn.value=!0,kl.value=0}function Jd(l){if(!Pn.value.length)return;const a=Pn.value.length;kl.value=(kl.value+l+a)%a}function Km(){const l=Pn.value[kl.value];l&&$d(l)}function lo(){al("personaQuestionnaire"),ho.value="",bi.value=!0}function Yd(){al("externalProfileImport"),hi.value=!0,Kt(()=>{var l;(l=document.querySelector("[data-profile-import-input]"))==null||l.focus()})}function Gm(){al("quickProfileDetail"),yi.value=!0}function zm(l){me.value=l,al("materialDetail"),pi.value=!0}async function Hm(l){if(l.enabled){if(l.actionKey==="personaQuestionnaire"){lo();return}if(l.actionKey==="workflowCompare"){Dm();return}if(l.actionKey==="externalProfileImport"){Yd();return}if(l.actionKey==="workflowPersonaSplit"){await eg();return}if(l.actionKey==="workflowSaveVersion"){await fg();return}if(l.actionKey==="workflowCreateBranchFromNode"){await Zm();return}if(l.actionKey==="workflowNodeGenerate"){l.id==="hires"&&U.value!=="hires-fix"&&(Ol("hires-fix"),await Kt()),await Es();return}if(l.actionKey==="workflowNodeRetry"){await Es({retry:!0});return}if(l.actionKey==="workflowNodeComplete"){await tg();return}if(l.actionKey==="workflowNodeReview"){await ng();return}if(l.actionKey==="workflowReviewAdopt"){await ug();return}if(l.actionKey==="workflowPromptPlanSave"){await lg();return}if(l.actionKey==="workflowPromptPlanNext"){Ol("prompt-plan");return}if(l.actionKey==="workflowMaterialBindSave"){await ag();return}if(l.actionKey==="workflowArchiveFinal"){await Qm();return}l.nav&&l.module&&yt(l.nav,l.module)}}async function Qm(){const l=Fe.value;if(!l||We.value)return;const a=wt("入库");if(a){Ce.value=a;return}if(!l.workflowId){Ce.value="请先生成角色档案并创建后端工作流,再执行入库。";return}const s=l.workflowId,v=fl("archive",l);if(!v){Ce.value="当前工作流缺少后端入库节点 final_pack。";return}const k=An(s).find(V=>V.node_id===v);if(k&&["completed","selected"].includes(lt(k.status))
`)}}function Qi(l,a,s,v,k){return{id:l,title:a,prompt:s,negative:v,weight_suggestions:[{label:"identity",value:1.25,reason:"keep character identity stable"},{label:"style",value:.85,reason:"avoid overfitting style over identity"}],inherits:k,status:"ready"}}function cg(l){const a=ql.value,s=u.map((v,k)=>{const $=a.find(P=>P.category===v.category);return{id:`rule_${v.category}_${k+1}`,category:v.category,material_id:hs($==null?void 0:$.id),material_label:($==null?void 0:$.label)??"",material_group:($==null?void 0:$.group)??($==null?void 0:$.category)??"",material_prompt:($==null?void 0:$.prompt)??"",material_colors:($==null?void 0:$.colors)??[],bind_to_stages:Zd(v.category),inheritance_rule:$?`${v.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:$?ec(v.category):"弱",required:!!($&&["风格","服装"].includes(v.category)),status:$?"ready":"pending"}});return{profile_id:l.profileId,profile_name:l.name,selected_material_ids:ks(),rules:s}}function Zd(l){return{风格:[{stage_id:"portrait-draft",stage_title:"头像草稿"},{stage_id:"halfbody-draft",stage_title:"半身草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"},{stage_id:"review-archive",stage_title:"修复入库"}],构图:[{stage_id:"portrait-draft",stage_title:"头像草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"}],服装:[{stage_id:"halfbody-draft",stage_title:"半身草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"}],鞋袜:[{stage_id:"body-sheet",stage_title:"全身与设定图"}],配饰:[{stage_id:"body-sheet",stage_title:"全身与设定图"},{stage_id:"review-archive",stage_title:"修复入库"}]}[l]??[{stage_id:"body-sheet",stage_title:"全身与设定图"}]}function ec(l){return l==="风格"||l==="服装"?"强":l==="构图"?"中":"弱"}async function fg(){var s;const l=Fe.value;if(!l||Wn.value)return;const a=wt("保存快照");if(a){vn.value=a;return}if(!l.workflowId){vn.value="请先生成档案并创建后端工作流,再保存快照。";return}Wn.value=!0,vn.value="";try{const v=await _e(q.workflowHistory(l.workflowId),{action:"save_version",title:`${l.name} / ${((s=Ge.value)==null?void 0:s.title)??"工作流快照"}`,node_id:fl(U.value,l),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:U.value,profile_id:l.profileId,profile_name:l.name,profile_status:l.status}});ko.value=v.created_at}catch(v){vn.value=`保存快照失败:${Re(v)}`}finally{Wn.value=!1}}function fl(l,a){if(!a.workflowId)return;const v=An(a.workflowId).find($=>_a($)===l);if(v)return v.node_id;const k=a.workflowNodeIds??[];if(l!=="brief-import"&&l==="persona-split")return k[0]}function An(l){var v;const a=Je.value[l]??[],s=(v=st.value[l])==null?void 0:v.current_branch;return s?a.filter(k=>k.branch_name===s):a}function tc(l){const a=[...vt.value,...Ja.value?[Ja.value]:[],...l?ll.value[l]??[]:[]];return Array.from(new Set(a.filter(pl).map(s=>s.image_id)))}function pl(l){if(l.image_id.startsWith("mock-")||l.image_uri.startsWith("mock://"))return!1;const a="metadata"in l&&l.metadata&&typeof l.metadata=="object"?l.metadata:{},s=a.mock===!0||a.mock===1||a.mock==="true",v=Object.prototype.hasOwnProperty.call(a,"provider_error")&&a.provider_error!=null,k=a.fallback_used===!0||a.degraded===!0;return!s&&!v&&!k}async function pg(){if(!td.value||yo.value)return;const l=wt("生成档案");if(l){ho.value=l;return}Uu.value+=1;const a=hg(Le.value,Uu.value);yo.value=!0,ho.value="";try{const s=await _e(q.quickProfileDraft,vg(a,Le.value,La.value)),v={...a,name:s.profile_preview.name||a.name,style:s.profile_preview.style_prompt||a.style,negative:s.profile_preview.negative_prompt||a.negative},k=await _e(q.quickProfileDraftSave,mg(v,Le.value,La.value,s)),P={...bg(k,v),status:"文本档案已保存"};cn.value=[P,...cn.value.filter(V=>V.id!==P.id)],Oa.value=[k.profile,...Oa.value.filter(V=>V.profile_id!==k.profile.profile_id)],qt.value={...qt.value,[k.profile.profile_id]:k.workflow?[k.workflow]:[]},zi(P),Xe.value="quickProfile",xt("personaQuestionnaire"),Kt(()=>
<svg xmlns="http://www.w3.org/2000/svg" width="${ze}" height="${Nt}" viewBox="0 0 ${ze} ${Nt}" preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="${$}" />
<stop offset="58%" stop-color="${P}" />
<stop offset="100%" stop-color="#111827" />
</linearGradient>
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
<stop offset="0%" stop-color="${V}" stop-opacity="0.82" />
<stop offset="100%" stop-color="${V}" stop-opacity="0" />
</radialGradient>
<pattern id="grid" width="${Xl}" height="${Xl}" patternUnits="userSpaceOnUse">
<path d="M${Xl} 0H0V${Xl}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
</pattern>
</defs>
<rect width="${ze}" height="${Nt}" fill="url(#bg)" />
<rect width="${ze}" height="${Nt}" fill="url(#grid)" />
<circle cx="${ib}" cy="${rb}" r="${sb}" fill="url(#halo)" />
<circle cx="${ub}" cy="${db}" r="${cb}" fill="#ffffff" opacity="0.11" />
<rect x="${Ie}" y="${Ie}" width="${Xi}" height="${_c}" rx="${Yl}" fill="#ffffff" opacity="0.14" />
<rect x="${It}" y="${It}" width="${nb}" height="${ob}" rx="${Math.round(Yl*.72)}" fill="#0f172a" opacity="0.24" />
<text x="${It+Math.round(M*.035)}" y="${Oe}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ca}" font-weight="700">IMAGESTUDIO TEST ${te}</text>
<text x="${It+Math.round(M*.035)}" y="${Cl}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ne}" font-weight="800">${ce}</text>
<text x="${It+Math.round(M*.035)}" y="${C}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${ol}">${ke}</text>
<text x="${fb}" y="${Oe+Math.round(M*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${_t}" font-weight="900">${te}</text>
<text x="${ze-Ie}" y="${Nt-Math.round(Ie*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(M*.027))}" font-weight="800">${pb}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(vb)}`}function Qg(l){const a=l.match(/(\d+)\s*x\s*(\d+)/i);if(!a)return[4,3];const s=Number(a[1]),v=Number(a[2]);if(!Number.isFinite(s)||!Number.isFinite(v)||s<=0||v<=0)return[4,3];const k=Jg(s,v);return[Math.round(s/k),Math.round(v/k)]}function Jg(l,a){let s=Math.abs(Math.round(l)),v=Math.abs(Math.round(a));for(;v;){const k=s%v;s=v,v=k}return s||1}function kc(l){return l.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[a]??a)}function Mt(l){return"title"in l&&l.title?l.title:l.node_id||l.workflow_id||l.profile_id||il(l.image_id)}function Et(l){return l.thumbnail_url||l.image_url||""}function Yg(l){if(l.status==="confirmed_unsupported")return!1;if(l.dialect==="openai_images"||l.dialect==="comfyui")return!0;const a=l.capabilities||{};return!!(a.text_to_image||a.image_generation||a.workflow_graph||Object.keys(a).some(s=>["text_to_image","image_generation","workflow_graph"].includes(s)))}function Xg(l,a,s){return Math.max(a,Math.min(s,l))}function Zg(){const l=localStorage.getItem($l.theme);(l==="light"||l==="dark")&&(Gl.value=l),Va.value=localStorage.getItem($l.primary)||Va.value,Ua.value=localStorage.getItem($l.accent)||Ua.value;const a=localStorage.getItem($l.navigationPinned);Bl.value=a===null||a==="true",Gn.value=Bl.value,wl.value=wc(localStorage.getItem($l.readNotifications)),zn.value=wc(localStorage.getItem($l.dismissedNotifications))}function eb(){localStorage.setItem($l.theme,Gl.value),localStorage.setItem($l.primary,Va.value),localStorage.setItem($l.accent,Ua.value),localStorage.setItem($l.navigationPinned,String(Bl.value)),localStorage.setItem($l.readNotifications,JSON.stringify(wl.value)),localStorage.setItem($l.dismissedNotifications,JSON.stringify(zn.value))}function wc(l){if(!l)return[];try{const a=JSON.parse(l);return Array.isArray(a)?a.filter(s=>typeof s=="string"):[]}catch{return[]}}function $a(l,a){const s=Ls(l);return s?`rgba(${s.r}, ${s.g}, ${s.b}, ${a})`:`rgba(118, 104, 232, ${a})`}function Ts(l,a,s){const v=Ls(l),k=Ls(a);if(!v||!k)return l;const $=Math.min(1,Math.max(0,s));return`#${qs(v.r*(1-$)+k.r*$)}${qs(v.g*(1-$)+k.g*$)}${qs(v.b*(1-$)+k.b*$)}`}function qs(l){return Math.round(l).toString(16).padStart(2,"0")}function Ls(l){const a=l.replace("#","");return/^[0-9a-fA-F]{6}$/.test(a)?{r:Number.parseInt(a.slice(0,2),16),g:Number.parseInt(a.slice(2,4),16),b:Number.parseInt(a.slice(4,6),16)}:null}function Wt(l,a){const s=l==null?void 0:l[a];return typeof s=="string"?s:""}function tb(l){return!Yi(l)||typeof l.task_id!="string"?null:{task_id:l.task_id,task_type:typeof l.task_type=="string"?l.task_type:"generation",status:typeof l.status=="string"?l.status:"created",progress:typeof l.progress=="number"?l.progress:0,created_at:typeof l.created_at=="string"?l.created_at:"",updated_at:typeof l.updated_at=="string"?l.updated_at:"",profile_id:typeof l.profile_id=="string"?l.profile_id:null,workflow_id:typeof l.workflow_id=="string"?l.workflow_id:null,node_id:typeof l.node_id=="string"?l.node_id:null,model_route:typeof l.model_route=="string"?l.model_route:null,idempotency_key:typeof l.idempotency_key=="string"?l.idempotency_key:null,request:Yi(l.request)?l.request:void 0,result:Yi(l.result)?l.result:void 0,metadata:Yi(l.metadata)?l.metadata:void 0,error_message:typeof l.error_message=="string"?l.error_message:null}}function lb(l){return!!l}function Yi(l){return!!(l&&typeof l=="object"&&!Array.isArray(l))}function ab(l){return Sa(l,a=>a.id)}function Re(l){return gd(l)}return(l,a)=>{var s,v,k,$,P,V,te,ce,ke,ye,he,at,ze,Nt;return c(),p("main",{class:le(["navigation-shell",{"rail-collapsed":!Gn.value}]),"data-theme":Gl.value,style:Pt(Bv.value)},[De(rh,{items:Be(Qw),"active-key":bt.value,"plugin-version":((s=w.value)==null?void 0:s.plugin_version)??"v3",expanded:Gn.value,pinned:Bl.value,onSelect:sm,onReveal:bs,onScheduleHide:a[0]||(a[0]=M=>ji()),onTogglePinned:dm},null,8,["items","active-key","plugin-version","expanded","pinned"]),t("section",UP,[t("header",FP,[t("div",WP,[t("span",null,d(jp.value.label),1),t("h
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
避雷:低质量、结构错误`},null,512),[[Ee,ki.value]])]),t("aside",l6,[t("header",null,[t("div",null,[a[162]||(a[162]=t("span",null,"识别预览",-1)),t("strong",null,d(Wp.value)+" / "+d(Yr.value.length),1)]),t("em",null,d(Qn.value?`${Qn.value.length} 字`:"待粘贴"),1)]),t("dl",null,[(c(!0),p(z,null,Y(Yr.value,C=>(c(),p("div",{key:C.key,class:le({pending:Qn.value&&!C.recognized})},[t("dt",null,[nt(d(C.label)+" ",1),t("span",null,d(C.recognized?"已识别":"待整理"),1)]),t("dd",null,d(C.value||"粘贴文本后显示"),1)],2))),128))])])]),t("footer",null,[t("span",null,d(Qn.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),t("button",{type:"button",onClick:a[33]||(a[33]=C=>xt("externalProfileImport"))},"取消"),t("button",{type:"button",disabled:!Qn.value,onClick:_g}," 识别并填入问卷 ",8,a6)])])])):X("",!0)]),_:1}),De(zt,{name:"viewer-fade"},{default:$t(()=>[bi.value?(c(),p("div",n6,[t("section",o6,[t("header",null,[a[163]||(a[163]=t("div",null,[t("span",null,"快速角色"),t("strong",null,"创建角色档案问卷")],-1)),t("button",{type:"button",title:"关闭",onClick:a[34]||(a[34]=C=>xt("personaQuestionnaire"))},"×")]),t("div",i6,[t("label",null,[a[164]||(a[164]=t("span",null,"角色核心",-1)),ve(t("textarea",{"onUpdate:modelValue":a[35]||(a[35]=C=>Le.value.roleCore=C),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Ee,Le.value.roleCore]])]),t("label",null,[a[165]||(a[165]=t("span",null,"性格关键词",-1)),ve(t("textarea",{"onUpdate:modelValue":a[36]||(a[36]=C=>Le.value.personality=C),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[Ee,Le.value.personality]])]),t("label",null,[a[166]||(a[166]=t("span",null,"外观特征",-1)),ve(t("textarea",{"onUpdate:modelValue":a[37]||(a[37]=C=>Le.value.appearance=C),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[Ee,Le.value.appearance]])]),t("label",null,[a[167]||(a[167]=t("span",null,"服装与配饰",-1)),ve(t("textarea",{"onUpdate:modelValue":a[38]||(a[38]=C=>Le.value.outfit=C),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[Ee,Le.value.outfit]])]),t("label",null,[a[168]||(a[168]=t("span",null,"常用场景",-1)),ve(t("textarea",{"onUpdate:modelValue":a[39]||(a[39]=C=>Le.value.scene=C),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[Ee,Le.value.scene]])]),t("label",null,[a[169]||(a[169]=t("span",null,"避雷内容",-1)),ve(t("textarea",{"onUpdate:modelValue":a[40]||(a[40]=C=>Le.value.avoid=C),rows:"3",placeholder:"不想要的设计方向、负面词和禁用元素。"},null,512),[[Ee,Le.value.avoid]])]),La.value==="advanced"?(c(),p(z,{key:0},[t("label",null,[a[170]||(a[170]=t("span",null,"世界观",-1)),ve(t("textarea",{"onUpdate:modelValue":a[41]||(a[41]=C=>Le.value.worldview=C),rows:"3",placeholder:"现代、赛博、奇幻、末世、校园、古风、星际等。"},null,512),[[Ee,Le.value.worldview]])]),t("label",null,[a[171]||(a[171]=t("span",null,"背景经历",-1)),ve(t("textarea",{"onUpdate:modelValue":a[42]||(a[42]=C=>Le.value.background=C),rows:"3",placeholder:"所属组织、过往经历、当前处境。"},null,512),[[Ee,Le.value.background]])]),t("label",null,[a[172]||(a[172]=t("span",null,"身高 / 身材",-1)),ve(t("textarea",{"onUpdate:modelValue":a[43]||(a[43]=C=>Le.value.heightBuild=C),rows:"3",placeholder:"身高范围、体型、姿态气质、肤色。"},null,512),[[Ee,Le.value.heightBuild]])]),t("label",null,[a[173]||(a[173]=t("span",null,"身体记忆点",-1)),ve(t("textarea",{"onUpdate:modelValue":a[44]||(a[44]=C=>Le.value.bodyFeatures=C),rows:"3",placeholder:"伤疤、痣、纹身、义体、异色瞳等。"},null,512),[[Ee,Le.value.bodyFeatures]])]),t("label",null,[a[174]||(a[174]=t("span",null,"喜好",-1)),ve(t("textarea",{"onUpdate:modelValue":a[45]||(a[45]=C=>Le.value.likes=C),rows:"3",placeholder:"颜色、食物、饮品、兴趣、常去地点。"},null,51