58 行
586 KiB
JavaScript
58 行
586 KiB
JavaScript
|
|
var sk=Object.defineProperty;var uk=(e,n,o)=>n in e?sk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var ec=(e,n,o)=>uk(e,typeof n!="symbol"?n+"":n,o);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const d of s)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function o(s){const d={};return s.integrity&&(d.integrity=s.integrity),s.referrerPolicy&&(d.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?d.credentials="include":s.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(s){if(s.ep)return;s.ep=!0;const d=o(s);fetch(s.href,d)}})();/**
|
|||
|
|
* @vue/shared v3.5.39
|
|||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|||
|
|
* @license MIT
|
|||
|
|
**/function Dc(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const Rt={},Ti=[],_n=()=>{},Yp=()=>!1,Su=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Pu=e=>e.startsWith("onUpdate:"),ul=Object.assign,Wc=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},dk=Object.prototype.hasOwnProperty,Ct=(e,n)=>dk.call(e,n),Ve=Array.isArray,qi=e=>zr(e)==="[object Map]",Ki=e=>zr(e)==="[object Set]",rp=e=>zr(e)==="[object Date]",Ze=e=>typeof e=="function",Ht=e=>typeof e=="string",Ga=e=>typeof e=="symbol",It=e=>e!==null&&typeof e=="object",Xp=e=>(It(e)||Ze(e))&&Ze(e.then)&&Ze(e.catch),Zp=Object.prototype.toString,zr=e=>Zp.call(e),ck=e=>zr(e).slice(8,-1),em=e=>zr(e)==="[object Object]",Uc=e=>Ht(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ar=Dc(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xu=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},fk=/-\w/g,Ka=xu(e=>e.replace(fk,n=>n.slice(1).toUpperCase())),vk=/\B([A-Z])/g,Ao=xu(e=>e.replace(vk,"-$1").toLowerCase()),tm=xu(e=>e.charAt(0).toUpperCase()+e.slice(1)),tc=xu(e=>e?`on${tm(e)}`:""),bn=(e,n)=>!Object.is(e,n),uu=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},lm=(e,n,o,r=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:r,value:o})},Mu=e=>{const n=parseFloat(e);return isNaN(n)?e:n},pk=e=>{const n=Ht(e)?Number(e):NaN;return isNaN(n)?e:n};let sp;const Au=()=>sp||(sp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function el(e){if(Ve(e)){const n={};for(let o=0;o<e.length;o++){const r=e[o],s=Ht(r)?bk(r):el(r);if(s)for(const d in s)n[d]=s[d]}return n}else if(Ht(e)||It(e))return e}const mk=/;(?![^(]*\))/g,gk=/:([^]+)/,yk=/\/\*[^]*?\*\//g;function bk(e){const n={};return e.replace(yk,"").split(mk).forEach(o=>{if(o){const r=o.split(gk);r.length>1&&(n[r[0].trim()]=r[1].trim())}}),n}function ue(e){let n="";if(Ht(e))n=e;else if(Ve(e))for(let o=0;o<e.length;o++){const r=ue(e[o]);r&&(n+=r+" ")}else if(It(e))for(const o in e)e[o]&&(n+=o+" ");return n.trim()}const _k="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wk=Dc(_k);function am(e){return!!e||e===""}function kk(e,n){if(e.length!==n.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=Po(e[r],n[r]);return o}function Po(e,n){if(e===n)return!0;let o=rp(e),r=rp(n);if(o||r)return o&&r?e.getTime()===n.getTime():!1;if(o=Ga(e),r=Ga(n),o||r)return e===n;if(o=Ve(e),r=Ve(n),o||r)return o&&r?kk(e,n):!1;if(o=It(e),r=It(n),o||r){if(!o||!r)return!1;const s=Object.keys(e).length,d=Object.keys(n).length;if(s!==d)return!1;for(const p in e){const y=e.hasOwnProperty(p),b=n.hasOwnProperty(p);if(y&&!b||!y&&b||!Po(e[p],n[p]))return!1}}return String(e)===String(n)}function Fc(e,n){return e.findIndex(o=>Po(o,n))}const nm=e=>!!(e&&e.__v_isRef===!0),u=e=>Ht(e)?e:e==null?"":Ve(e)||It(e)&&(e.toString===Zp||!Ze(e.toString))?nm(e)?u(e.value):JSON.stringify(e,om,2):String(e),om=(e,n)=>nm(n)?om(e,n.value):qi(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[r,s],d)=>(o[lc(r,d)+" =>"]=s,o),{})}:Ki(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>lc(o))}:Ga(n)?lc(n):It(n)&&!Ve(n)&&!em(n)?String(n):n,lc=(e,n="")=>{var o;return Ga(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 hl;class hk{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&&hl&&(hl.active?(this.parent=hl,this.index=(hl.scopes||(hl.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=hl;try{return hl=this,n()}finally{hl=o}}}on(){++this._on===1&&(this.prevScope=hl,hl=this)}off(){if(this._on>0&&--this._on===0){if(hl===this)hl=this.prevScope;else{let n=hl;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,r;for(o=0,r=this.effects.length;o<r;o++)this.effects[o].stop();for(this.effects.length=0,o=0,r=this.cleanups.length;o<r;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,r=this.scopes.length;o<r;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!n){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function $k(){return hl}let qt;const ac=new WeakSet;class im{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,hl&&(hl.active?hl.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ac.has(this)&&(ac.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||sm(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,up(this),um(this);const n=qt,o=ja;qt=this,ja=!0;try{return this.fn()}finally{dm(this),qt=n,ja=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)jc(n);this.deps=this.depsTail=void 0,up(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ac.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){hc(this)&&this.run()}get dirty(){return hc(this)}}let rm=0,Rr,Br;function sm(e,n=!1){if(e.flags|=8,n){e.next=Br,Br=e;return}e.next=Rr,Rr=e}function Vc(){rm++}function Kc(){if(--rm>0)return;if(Br){let n=Br;for(Br=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;Rr;){let n=Rr;for(Rr=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(r){e||(e=r)}n=o}}if(e)throw e}function um(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function dm(e){let n,o=e.depsTail,r=o;for(;r;){const s=r.prevDep;r.version===-1?(r===o&&(o=s),jc(r),Ck(r)):n=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=n,e.depsTail=o}function hc(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(cm(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function cm(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Dr)||(e.globalVersion=Dr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!hc(e))))return;e.flags|=2;const n=e.dep,o=qt,r=ja;qt=e,ja=!0;try{um(e);const s=e.fn(e._value);(n.version===0||bn(s,e._value))&&(e.flags|=128,e._value=s,n.version++)}catch(s){throw n.version++,s}finally{qt=o,ja=r,dm(e),e.flags&=-3}}function jc(e,n=!1){const{dep:o,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),o.subs===e&&(o.subs=r,!r&&o.computed)){o.computed.flags&=-5;for(let d=o.computed.deps;d;d=d.nextDep)jc(d,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function Ck(e){const{prevDep:n,nextDep:o}=e;n&&(n.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=n,e.nextDep=void 0)}let ja=!0;const fm=[];function wn(){fm.push(ja),ja=!1}function kn(){const e=fm.pop();ja=e===void 0?!0:
|
|||
|
|
* @vue/runtime-core v3.5.39
|
|||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|||
|
|
* @license MIT
|
|||
|
|
**/function Hr(e,n,o,r){try{return r?e(...r):e()}catch(s){Bu(s,n,o)}}function Ra(e,n,o,r){if(Ze(e)){const s=Hr(e,n,o,r);return s&&Xp(s)&&s.catch(d=>{Bu(d,n,o)}),s}if(Ve(e)){const s=[];for(let d=0;d<e.length;d++)s.push(Ra(e[d],n,o,r));return s}}function Bu(e,n,o,r=!0){const s=n?n.vnode:null,{errorHandler:d,throwUnhandledErrorInProduction:p}=n&&n.appContext.config||Rt;if(n){let y=n.parent;const b=n.proxy,w=`https://vuejs.org/error-reference/#runtime-${o}`;for(;y;){const _=y.ec;if(_){for(let h=0;h<_.length;h++)if(_[h](e,b,w)===!1)return}y=y.parent}if(d){wn(),Hr(d,null,10,[e,b,w]),kn();return}}Jk(e,o,s,r,p)}function Jk(e,n,o,r=!0,s=!1){if(s)throw e;console.error(e)}const ql=[];let mn=-1;const Oi=[];let So=null,Li=0;const km=Promise.resolve();let yu=null;function zt(e){const n=yu||km;return e?n.then(this?e.bind(this):e):n}function Yk(e){let n=mn+1,o=ql.length;for(;n<o;){const r=n+o>>>1,s=ql[r],d=Ur(s);d<e||d===e&&s.flags&2?n=r+1:o=r}return n}function Yc(e){if(!(e.flags&1)){const n=Ur(e),o=ql[ql.length-1];!o||!(e.flags&2)&&n>=Ur(o)?ql.push(e):ql.splice(Yk(n),0,e),e.flags|=1,hm()}}function hm(){yu||(yu=km.then(Cm))}function Xk(e){Ve(e)?Oi.push(...e):So&&e.id===-1?So.splice(Li+1,0,e):e.flags&1||(Oi.push(e),e.flags|=1),hm()}function cp(e,n,o=mn+1){for(;o<ql.length;o++){const r=ql[o];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;ql.splice(o,1),o--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function $m(e){if(Oi.length){const n=[...new Set(Oi)].sort((o,r)=>Ur(o)-Ur(r));if(Oi.length=0,So){So.push(...n);return}for(So=n,Li=0;Li<So.length;Li++){const o=So[Li];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}So=null,Li=0}}const Ur=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Cm(e){try{for(mn=0;mn<ql.length;mn++){const n=ql[mn];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Hr(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;mn<ql.length;mn++){const n=ql[mn];n&&(n.flags&=-2)}mn=-1,ql.length=0,$m(),yu=null,(ql.length||Oi.length)&&Cm()}}let Pl=null,Im=null;function bu(e){const n=Pl;return Pl=e,Im=e&&e.type.__scopeId||null,n}function Wt(e,n=Pl,o){if(!n||e._n)return e;const r=(...s)=>{r._d&&ku(-1);const d=bu(n);let p;try{p=e(...s)}finally{bu(d),r._d&&ku(1)}return p};return r._n=!0,r._c=!0,r._d=!0,r}function Pe(e,n){if(Pl===null)return e;const o=Ou(Pl),r=e.dirs||(e.dirs=[]);for(let s=0;s<n.length;s++){let[d,p,y,b=Rt]=n[s];d&&(Ze(d)&&(d={mounted:d,updated:d}),d.deep&&Dn(p),r.push({dir:d,instance:o,value:p,oldValue:void 0,arg:y,modifiers:b}))}return e}function Xo(e,n,o,r){const s=e.dirs,d=n&&n.dirs;for(let p=0;p<s.length;p++){const y=s[p];d&&(y.oldValue=d[p].value);let b=y.dir[r];b&&(wn(),Ra(b,o,8,[e.el,y,e,n]),kn())}}function Zk(e,n){if(Ol){let o=Ol.provides;const r=Ol.parent&&Ol.parent.provides;r===o&&(o=Ol.provides=Object.create(r)),o[e]=n}}function du(e,n,o=!1){const r=qu();if(r||Wi){let s=Wi?Wi._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return o&&Ze(n)?n.call(r&&r.proxy):n}}const e1=Symbol.for("v-scx"),t1=()=>du(e1);function Je(e,n,o){return Sm(e,n,o)}function Sm(e,n,o=Rt){const{immediate:r,deep:s,flush:d,once:p}=o,y=ul({},o),b=n&&r||!n&&d!=="post";let w;if(jr){if(d==="sync"){const C=t1();w=C.__watcherHandles||(C.__watcherHandles=[])}else if(!b){const C=()=>{};return C.stop=_n,C.resume=_n,C.pause=_n,C}}const _=Ol;y.call=(C,B,q)=>Ra(C,_,B,q);let h=!1;d==="post"?y.scheduler=C=>{Gl(C,_&&_.suspense)}:d!=="sync"&&(h=!0,y.scheduler=(C,B)=>{B?C():Yc(C)}),y.augmentJob=C=>{n&&(C.flags|=4),h&&(C.flags|=2,_&&(C.id=_.uid,C.i=_))};const R=Qk(e,n,y);return jr&&(w?w.push(R):b&&R()),R}function l1(e,n,o){const r=this.proxy,s=Ht(e)?e.includes(".")?Pm(r,e):()=>r[e]:e.bind(r,r);let d;Ze(n)?d=n:(d=n.handler,o=n);const p=Qr(this),y=Sm(s,d.bind(r),o);return p(),y}function Pm(e,n){const o=n.split(".");return()=>{let r=e;for(let s=0;s<o.length&&r;s++)r=r[o[s]];return r}}const a1=Symbol("_vte"),xm=e=>e.__isTeleport,Sa=Symbol("_leaveCb"),Cr=Symbol("_enterCb");function Mm(){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 Bc;const Sp=typeof window<"u"&&window.trustedTypes;if(Sp)try{Bc=Sp.createPolicy("vue",{createHTML:e=>e})}catch{}const ig=Bc?e=>Bc.createHTML(e):e=>e,ah="http://www.w3.org/2000/svg",nh="http://www.w3.org/1998/Math/MathML",Ln=typeof document<"u"?document:null,Pp=Ln&&Ln.createElement("template"),oh={insert:(e,n,o)=>{n.insertBefore(e,o||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,o,r)=>{const s=n==="svg"?Ln.createElementNS(ah,e):n==="mathml"?Ln.createElementNS(nh,e):o?Ln.createElement(e,{is:o}):Ln.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Ln.createTextNode(e),createComment:e=>Ln.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ln.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,o,r,s,d){const p=o?o.previousSibling:n.lastChild;if(s&&(s===d||s.nextSibling))for(;n.insertBefore(s.cloneNode(!0),o),!(s===d||!(s=s.nextSibling)););else{Pp.innerHTML=ig(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const y=Pp.content;if(r==="svg"||r==="mathml"){const b=y.firstChild;for(;b.firstChild;)y.appendChild(b.firstChild);y.removeChild(b)}n.insertBefore(y,o)}return[p?p.nextSibling:n.firstChild,o?o.previousSibling:n.lastChild]}},$o="transition",Ir="animation",Fi=Symbol("_vtc"),rg={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},sg=ul({},Am,rg),ih=e=>(e.displayName="Transition",e.props=sg,e),dl=ih((e,{slots:n})=>th(o1,ug(e),n)),ei=(e,n=[])=>{Ve(e)?e.forEach(o=>o(...n)):e&&e(...n)},xp=e=>e?Ve(e)?e.some(n=>n.length>1):e.length>1:!1;function ug(e){const n={};for(const T in e)T in rg||(n[T]=e[T]);if(e.css===!1)return n;const{name:o="v",type:r,duration:s,enterFromClass:d=`${o}-enter-from`,enterActiveClass:p=`${o}-enter-active`,enterToClass:y=`${o}-enter-to`,appearFromClass:b=d,appearActiveClass:w=p,appearToClass:_=y,leaveFromClass:h=`${o}-leave-from`,leaveActiveClass:R=`${o}-leave-active`,leaveToClass:C=`${o}-leave-to`}=e,B=rh(s),q=B&&B[0],V=B&&B[1],{onBeforeEnter:W,onEnter:F,onEnterCancelled:U,onLeave:J,onLeaveCancelled:O,onBeforeAppear:S=W,onAppear:ee=F,onAppearCancelled:oe=U}=n,le=(T,ye,te,H)=>{T._enterCancelled=H,Co(T,ye?_:y),Co(T,ye?w:p),te&&te()},K=(T,ye)=>{T._isLeaving=!1,Co(T,h),Co(T,C),Co(T,R),ye&&ye()},j=T=>(ye,te)=>{const H=T?ee:F,pe=()=>le(ye,T,te);ei(H,[ye,pe]),Mp(()=>{Co(ye,T?b:d),pn(ye,T?_:y),xp(H)||Ap(ye,r,q,pe)})};return ul(n,{onBeforeEnter(T){ei(W,[T]),pn(T,d),pn(T,p)},onBeforeAppear(T){ei(S,[T]),pn(T,b),pn(T,w)},onEnter:j(!1),onAppear:j(!0),onLeave(T,ye){T._isLeaving=!0;const te=()=>K(T,ye);pn(T,h),T._enterCancelled?(pn(T,R),Ec(T)):(Ec(T),pn(T,R)),Mp(()=>{T._isLeaving&&(Co(T,h),pn(T,C),xp(J)||Ap(T,r,V,te))}),ei(J,[T,te])},onEnterCancelled(T){le(T,!1,void 0,!0),ei(U,[T])},onAppearCancelled(T){le(T,!0,void 0,!0),ei(oe,[T])},onLeaveCancelled(T){K(T),ei(O,[T])}})}function rh(e){if(e==null)return null;if(It(e))return[uc(e.enter),uc(e.leave)];{const n=uc(e);return[n,n]}}function uc(e){return pk(e)}function pn(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[Fi]||(e[Fi]=new Set)).add(n)}function Co(e,n){n.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const o=e[Fi];o&&(o.delete(n),o.size||(e[Fi]=void 0))}function Mp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let sh=0;function Ap(e,n,o,r){const s=e._endId=++sh,d=()=>{s===e._endId&&r()};if(o!=null)return setTimeout(d,o);const{type:p,timeout:y,propCount:b}=dg(e,n);if(!p)return r();const w=p+"end";let _=0;const h=()=>{e.removeEventListener(w,R),d()},R=C=>{C.target===e&&++_>=b&&h()};setTimeout(()=>{_<b&&h()},y+1),e.addEventListener(w,R)}function dg(e,n){const o=window.getComputedStyle(e),r=B=>(o[B]||"").split(", "),s=r(`${$o}Delay`),d=r(`${$o}Duration`),p=Rp(s,d),y=
|
|||
|
|
`)}function p(R,C){const B=Array.from(new Set(C.replace(/,/g,",").split(/[\n,]/).map(q=>q.trim()).filter(Boolean)));r("update:modelValue",{...o.modelValue,[R]:B})}function y(R,C){r("update:modelValue",{...o.modelValue,[R]:C})}const b=x(()=>s("group_allowlist").length),w=x(()=>s("user_allowlist").length),_=x(()=>s("adult_group_allowlist").length),h=x(()=>s("adult_user_allowlist").length);return(R,C)=>(f(),v("section",G3,[C[24]||(C[24]=tf('<div class="intro" data-v-8371303e><span data-v-8371303e>AstrBot 聊天指令</span><strong data-v-8371303e>群聊与用户白名单</strong><p data-v-8371303e>每行填写一个平台提供的群聊 ID 或用户 ID,也支持用逗号分隔。白名单为空时不会放行对应条件。</p></div><div class="rules" data-v-8371303e><article data-v-8371303e><b data-v-8371303e>快速角色 / 角色工作流</b><strong data-v-8371303e>群聊命中 + 用户命中</strong><p data-v-8371303e>两个白名单必须同时命中才允许使用,避免群内未授权成员启动完整工作流。</p></article><article data-v-8371303e><b data-v-8371303e>单图生成</b><strong data-v-8371303e>群聊命中 或 用户命中</strong><p data-v-8371303e>任意一个白名单命中即可使用;用户白名单也可以在私聊中放行单图。</p></article></div>',2)),l("div",z3,[l("label",null,[l("span",null,[C[10]||(C[10]=rt("群聊白名单 ",-1)),l("em",null,u(b.value)+" 项",1)]),l("textarea",{value:d("group_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个群聊 ID
|
|||
|
|
例如:123456789`,onInput:C[0]||(C[0]=B=>p("group_allowlist",B.target.value))},null,40,H3),C[11]||(C[11]=l("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),l("label",null,[l("span",null,[C[12]||(C[12]=rt("用户白名单 ",-1)),l("em",null,u(w.value)+" 项",1)]),l("textarea",{value:d("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
|
|||
|
|
例如:987654321`,onInput:C[1]||(C[1]=B=>p("user_allowlist",B.target.value))},null,40,Q3),C[13]||(C[13]=l("small",null,"使用 AstrBot 事件返回的平台用户 ID,不使用昵称。",-1))])]),C[25]||(C[25]=l("div",{class:"adult-intro"},[l("div",null,[l("span",null,"成人内容独立授权"),l("strong",null,"必须同时通过内容审核与成人白名单")]),l("p",null,"这些名单不会放宽恐怖主义、高危暴力、现实伤害或其他禁止内容。群聊内要求成人群聊与成人用户同时命中;私聊要求成人用户命中。")],-1)),l("div",J3,[l("label",null,[l("span",null,[C[14]||(C[14]=rt("成人内容群聊白名单 ",-1)),l("em",null,u(_.value)+" 项",1)]),l("textarea",{value:d("adult_group_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的群聊 ID",onInput:C[2]||(C[2]=B=>p("adult_group_allowlist",B.target.value))},null,40,Y3),C[15]||(C[15]=l("small",null,"仅影响通过审核的 adult_allowed 内容。",-1))]),l("label",null,[l("span",null,[C[16]||(C[16]=rt("成人内容用户白名单 ",-1)),l("em",null,u(h.value)+" 项",1)]),l("textarea",{value:d("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:C[3]||(C[3]=B=>p("adult_user_allowlist",B.target.value))},null,40,X3),C[17]||(C[17]=l("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),l("div",Z3,[l("label",null,[C[18]||(C[18]=l("span",null,"用户并发上限",-1)),l("input",{type:"number",min:"1",value:Number(e.modelValue.user_concurrency_limit||2),disabled:e.disabled,onInput:C[4]||(C[4]=B=>y("user_concurrency_limit",Number(B.target.value)))},null,40,ex)]),l("label",null,[C[19]||(C[19]=l("span",null,"群聊并发上限",-1)),l("input",{type:"number",min:"1",value:Number(e.modelValue.group_concurrency_limit||5),disabled:e.disabled,onInput:C[5]||(C[5]=B=>y("group_concurrency_limit",Number(B.target.value)))},null,40,tx)]),l("label",null,[C[20]||(C[20]=l("span",null,"用户每日生成上限",-1)),l("input",{type:"number",min:"1",value:Number(e.modelValue.daily_user_generation_limit||30),disabled:e.disabled,onInput:C[6]||(C[6]=B=>y("daily_user_generation_limit",Number(B.target.value)))},null,40,lx)]),l("label",null,[C[21]||(C[21]=l("span",null,"群聊每日生成上限",-1)),l("input",{type:"number",min:"1",value:Number(e.modelValue.daily_group_generation_limit||100),disabled:e.disabled,onInput:C[7]||(C[7]=B=>y("daily_group_generation_limit",Number(B.target.value)))},null,40,ax)]),l("label",nx,[l("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:C[8]||(C[8]=B=>y("allow_2k",B.target.checked))},null,40,ox),C[22]||(C[22]=l("span",null,"允许聊天使用 2K",-1))]),l("label",ix,[l("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:C[9]||(C[9]=B=>y("allow_4k",B.target.checked))},null,40,rx),C[23]||(C[23]=l("span",null,"允许聊天使用 4K",-1))])])]))}}),ux=St(sx,[["__scopeId","data-v-8371303e"]]),dx={class:"governance"},cx={class:"preview-card"},fx=["disabled"],vx={class:"preview-choice"},px={key:1,class:"preview-error"},mx={key:2,class:"preview-result"},gx={class:"card"},yx={class:"switch"},bx=["checked","disabled"],_x={class:"grid"},wx=["value","disabled"],kx=["value"],hx=["value","disabled"],$x={class:"entries"},Cx=["checked","disabled","onChange"],Ix={class:"card"},Sx={class:"switch"},Px=["checked","disabled"],xx={class:"grid"},Mx=["value","disabled"],Ax=["value"],Rx=["value","disabled"],Bx={class:"card routing"},Ex={class:"switch"},Nx=["checked","disabled"],Lx={class:"route-pair"},Tx=["value","disabled"],qx=["value"],Ox=["value","disabled"],Dx=["value"],Wx={class:"entries"},Ux=["checked","disabled","onChange"],Fx={class:"card"},Vx={class:"switch"},Kx=["checked","disabled"],jx={class:"grid"},Gx=["value","disabled"],zx=["value"],Hx=["value","disabled"],Qx={class:"retention"},Jx=["value","disabled"],Yx=["value","disabled"],Xx=["value","disabled"],Zx=bt({__name:"PromptGovernancePanel",props:{modelValue:{},adapters:{},disabled:{
|
|||
|
|
`)}function Vd(t){const a=ot.value,i=We.value;return{source:"standalone_web_workflow_chat",ui_node_id:nt.value,ui_node_title:a.title,ui_node_phase:a.phase,ui_node_status:a.status,profile_id:i.profileId,profile_name:i.name,workflow_id:i.workflowId,source_language:"auto",target_prompt_language:"en",translation_mode:"backend_llm",user_instruction:t,persona_split_fields_ready:Es.value,persona_split_fields_total:Bs.value,selected_material_ids:Ad(),selected_draft_image_ids:ea.value.filter(la).map(c=>c.image_id),candidate_feedback:al.value}}function k_(t){var m;const a=t.interpretation;if(!a)return"候选反馈已保存。";const i=[],c=[["喜欢",a.liked],["拒绝",a.rejected],["严格拒绝",a.strict_rejected]];for(const[g,k]of c)k.length&&i.push(`${g} ${k.map(A=>A.display_code).join("、")}`);return(m=a.final)!=null&&m.display_code&&i.push(`待定稿 ${a.final.display_code}`),a.positive_patch&&i.push("已生成正向调整"),a.negative_patch&&i.push("已生成负向约束"),a.material_intent&&i.push(`素材意图:${a.material_intent}`),i.length?i.join(";"):"下一轮调整要求已保存。"}async function wv(t){var i,c,m;const a=ft.value;if(!sl.value||!a||a.legacy||!a.candidates.length)return"not_applicable";if(As.value)return _t.value="该轮次已经确认;如需继续修改,请先从当前节点创建分支。","blocked";je.value=!0,_t.value="",La.value="";try{const g=await Ae(D.roundFeedback(a.round.round_id),{feedback_text:t,idempotency_key:`web-round-feedback-text-${a.round.round_id}-${Date.now()}`});yo(a.round.node_id,g);const k=k_(g);return La.value=`${k} 点击“开始新一轮”后会使用这些反馈。`,Ne.value=k,ui.value=t,di.value=(c=(i=g.interpretation)==null?void 0:i.metadata)!=null&&c.model_route?`候选反馈 / ${String(g.interpretation.metadata.model_route)}`:`候选反馈 / ${((m=g.interpretation)==null?void 0:m.source)||"确定性解释"}`,Wl.value="","saved"}catch(g){return _t.value=`候选反馈理解失败:${Le(g)}`,Ne.value=_t.value,"failed"}finally{je.value=!1}}async function h_(){const t=Wl.value.trim();if(!t||je.value||await wv(t)!=="not_applicable")return;if(sl.value&&!co.value.route){Ne.value="当前节点和后端默认均未提供生图路由,请先显式覆盖或前往设置配置。";return}await Ys({promptPatch:Fd(t),metadata:Vd(t)})&&(ui.value=t,di.value=`${ot.value.title} / ${ud.value||"后端自动"}`)}function kv(){!bl.value||!pl(bl.value)||(gs.value="generation",aa("imageViewer"),jd(),Xn.value=!0)}function Qs(t){const a=(t?yd.value.find(i=>i.image_id===t):null)??on.value;!a||!pl(a)||(Dl.value=!1,tl.value=a.image_id,kv())}function hv(){ea.value.length<2||(Dl.value=!0)}function $_(t){return{configure_distinct_generation_cross_review_routes:"请在设置页配置至少一个与主候选不同的生图模型",configure_image_generation_route:"请先配置并启用可用的生图模型路由",regenerate_primary_candidate_with_configured_route:"主候选缺少可复用的模型路由,请先重新生成主候选",retry_or_remove_failed_review_candidate:"当前审查轮次存在失败候选,请重试失败项后再继续",select_review_candidates:"请至少勾选一个需要重新生成的审查候选",open_active_cross_review:"该节点已有进行中的交叉审查,请打开当前审查轮次",create_branch:"当前节点已锁定或工作流已封存,请先创建可编辑分支"}[t]||t.replace(/_/g," ")}function Js(t,a){const i=Le(t),c=t instanceof Cl?Re(t.details,"required_action"):"";return c?`${i};建议操作:${$_(c)}。`:`${a}:${i}`}async function C_(){var i;const t=ft.value;if(!t||t.legacy||!sl.value)return;const a=t.round.round_id;Al.value=!0,Za.value="";try{const c=await Me(D.round(a));if(((i=ft.value)==null?void 0:i.round.round_id)!==a)return;yo(c.round.node_id,c,{select:!0}),Ta.value=c,Lo.value=!0}catch(c){_t.value=Js(c,"交叉审查轮次加载失败")}finally{Al.value=!1}}function I_(){Al.value||(Lo.value=!1,Za.value="")}function S_(t){var i;const a=(i=t.image)==null?void 0:i.image_id;a&&Qs(a)}function Kd(t){yo(t.round.node_id,t,{select:!0}),Ta.val
|
|||
|
|
${m.trim()}`).join(`
|
|||
|
|
|
|||
|
|
`)}function W_(t){const a=Jo(t),i=(...g)=>{for(const k of g){const A=a.find(Z=>Io(Z.node_key)===k);if(A!=null&&A.selected_image_id)return A.selected_image_id}return""},c={avatar:i("headshot"),persona_image:i("design_sheet","turnaround"),standing:i("full_body"),pv:i("style_lock")},m=Object.entries(c).filter(([,g])=>!g).map(([g])=>g);if(m.length){const g={avatar:"头像(头像草稿)",persona_image:"人设图(设定图或三视图)",standing:"立绘(全身设定)",pv:"PV 图(高清修复与统一风格)"};return Ne.value=`档案卡还缺少已明确采用的资产:${m.map(k=>g[k]).join("、")}。请回到对应节点确认一张候选图。`,null}return c}function U_(t){if(!(t instanceof Cl))return`档案卡封存失败:${Le(t)}`;const a=[],i=t.details.incomplete_node_keys;Array.isArray(i)&&i.length&&a.push(`未完成节点:${i.map(String).join("、")}`);const c=Re(t.details,"asset_role");c&&a.push(`资产角色:${c}`);const m=Re(t.details,"active_branch")||Re(t.details,"branch_name");m&&a.push(`当前分支:${m}`);const g=Re(t.details,"status");g&&a.push(`工作流状态:${g}`);const k=a.length?`(${a.join(";")})`:"";return`档案卡封存失败:${t.message}${k}`}async function F_(){const t=We.value;if(!t||je.value)return;const a=Dt("建立档案卡");if(a){Ne.value=a;return}if(!t.workflowId||!t.profileId){Ne.value="请先保存角色并创建详细角色工作流,再建立档案卡。";return}const i=t.workflowId,c=wt.value[i],m=(c==null?void 0:c.current_branch)||"main",g=W_(i);if(!g)return;const k=D_(t);if(!k){Ne.value="档案卡缺少人设文档,请先完成角色设定拆解。";return}const A={idempotency_key:`web-profile-card-${i}-${Ws(m)}`,persona_document:k,assets:g,metadata:{source:"standalone_web_profile_card",schema_version:"character_profile_card_v1",profile_id:t.profileId,profile_name:t.name,workflow_id:i,branch_name:m,selected_material_ids:Ad()}};je.value=!0,Ne.value="";try{const Z=await Ae(D.workflowFinalizeCard(i),A);er.value={...er.value,[t.profileId]:[Z,...(er.value[t.profileId]??[]).filter(Ce=>Ce.card_id!==Z.card_id)]},Hi.value=Z.created_at,await Xs(t,i,"archive");const[ie]=await Promise.allSettled([Me(D.profileCards(t.profileId)),$d(),Bl(),Vl()]);ie.status==="fulfilled"&&(er.value={...er.value,[t.profileId]:ie.value}),sn("archive"),Ne.value=`档案卡已原子封存:${jl(Z.card_id)} / ${Z.branch_name},4 类必填资产均已入库。`}catch(Z){Ne.value=U_(Z)}finally{je.value=!1}}async function zd(t){const a=We.value,i=a==null?void 0:a.workflowId;if(!i||ca.value)return;const c=t==="start"?"启动":t==="cancel"?"取消":"归档";if(t==="start"&&!xs.value){zn.value="请先在第一个节点导入粗略人设;导入成功后工作流会自动启动。";return}if(!(t!=="start"&&!window.confirm(`确定${c}当前工作流吗?`))){ca.value=!0,zn.value="";try{const m=t==="start"?D.workflowStart(i):t==="cancel"?D.workflowCancel(i):D.workflowArchive(i),g=await Ae(m);wt.value={...wt.value,[i]:g},zn.value=`工作流已${c}`}catch(m){zn.value=Le(m)}finally{ca.value=!1}}}async function V_(){var a;const t=(a=We.value)==null?void 0:a.workflowId;if(t){ca.value=!0;try{Wu.value=await Me(D.workflowReview(t)),zn.value="整体审查已完成"}catch(i){zn.value=Le(i)}finally{ca.value=!1}}}async function Mv(){var i;const t=(i=ze.value)==null?void 0:i.node_id;if(!t)return;ca.value=!0;const a=await Od(t,!0);zn.value=a?"依赖上下文已刷新":Ji.value,ca.value=!1}function wr(t){return Fl.value?`${t}暂不可用:${Sn.value}`:nn.value?`${t}已被锁定:${vo.value}`:""}function K_(t){return`branch_${(t.node_key||t.node_id).replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,28)}_${Date.now().toString(36)}`}async function Av(t,a,i,c={}){const m=await Ae(D.workflowSwitchBranch(a),{branch_name:i}),g=await Me(D.workflowNodes(a)),k=g.filter(ie=>ie.branch_name===m.current_branch);mt.value={...mt.value,[a]:g},wt.value={...wt.value,[a]:m},Qo(t,m,k.length?k:g);const A=(c.copiedFromNodeId?k.find(ie=>Re(ie.metadata,"copied_from_node_id")===c.copiedFromNodeId):void 0)??(c.preferredUiNodeId?k.find(ie=>
|
|||
|
|
`)}}function Zs(t,a,i,c,m){return{id:t,title:a,prompt:i,negative:c,weight_suggestions:[{label:"identity",value:1.25,reason:"keep character identity stable"},{label:"style",value:.85,reason:"avoid overfitting style over identity"}],inherits:m,status:"ready"}}function nw(t){const a=Zl.value,i=d.map((c,m)=>{const g=a.find(k=>k.category===c.category);return{id:`rule_${c.category}_${m+1}`,category:c.category,material_id:Md(g==null?void 0:g.id),material_label:(g==null?void 0:g.label)??"",material_group:(g==null?void 0:g.group)??(g==null?void 0:g.category)??"",material_prompt:(g==null?void 0:g.prompt)??"",material_colors:(g==null?void 0:g.colors)??[],bind_to_stages:Ev(c.category),inheritance_rule:g?`${c.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:g?Nv(c.category):"弱",required:!!(g&&["风格","服装"].includes(c.category)),status:g?"ready":"pending"}});return{profile_id:t.profileId,profile_name:t.name,selected_material_ids:Ad(),rules:i}}function Ev(t){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:"修复入库"}]}[t]??[{stage_id:"body-sheet",stage_title:"全身与设定图"}]}function Nv(t){return t==="风格"||t==="服装"?"强":t==="构图"?"中":"弱"}async function ow(){var i;const t=We.value;if(!t||vi.value)return;const a=Dt("保存快照");if(a){Eo.value=a;return}if(!t.workflowId){Eo.value="请先生成档案并创建后端工作流,再保存快照。";return}vi.value=!0,Eo.value="";try{const c=await Ae(D.workflowHistory(t.workflowId),{action:"save_version",title:`${t.name} / ${((i=ot.value)==null?void 0:i.title)??"工作流快照"}`,node_id:bo(nt.value,t),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:nt.value,profile_id:t.profileId,profile_name:t.name,profile_status:t.status}});Hi.value=c.created_at}catch(c){Eo.value=`保存快照失败:${Le(c)}`}finally{vi.value=!1}}function bo(t,a){if(!a.workflowId)return;const c=Jo(a.workflowId).find(g=>Fa(g)===t);if(c)return c.node_id;const m=a.workflowNodeIds??[];if(t!=="brief-import"&&t==="persona-split")return m[0]}function Jo(t){var c;const a=mt.value[t]??[],i=(c=wt.value[t])==null?void 0:c.current_branch;return i?a.filter(m=>m.branch_name===i):a}function iw(t){const a=Ns.value;if(a&&(!t||a.node_id===t))return[a.image_id];if(!t)return[];const i=(Ft.value[t]??[]).find(c=>{var m;return c.image_id===((m=an.value.find(g=>g.node_id===t))==null?void 0:m.selected_image_id)});return i&&la(i)?[i.image_id]:[]}function la(t){const a="metadata"in t&&t.metadata&&typeof t.metadata=="object"?t.metadata:{},i=a.mock===!0||a.mock===1||a.mock==="true",c=Object.prototype.hasOwnProperty.call(a,"provider_error")&&a.provider_error!=null,m=a.fallback_used===!0||a.degraded===!0;return!i&&!c&&!m}async function rw(){if(!bf.value||Gi.value)return;const t=Dt("生成档案");if(t){zi.value=t;return}af.value+=1;const a=fw(Fe.value,af.value);Gi.value=!0,zi.value="";try{const i=await Ae(D.quickProfileDraft,sw(a,Fe.value,jn.value)),c={...a,name:i.profile_preview.name||a.name,style:i.profile_preview.style_prompt||a.style,negative:i.profile_preview.negative_prompt||a.negative},m=await Ae(D.quickProfileDraftSave,uw(c,Fe.value,jn.value,i)),k={...dw(m,c),status:"文本档案已保存"};Ea.value=[k,...Ea.value.filter(A=>A.id!==k.id)],cl.value=[m.profile,...cl.value.filter(A=>A.profile_id!==m.profile.profile_id)],Jt.value={...Jt.value,[m.profile.profile_id]:m.workflow?[m.workflow]:[]},Fs(k),me.value="quickProfile"
|
|||
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="${kt}" height="${Ee}" viewBox="0 0 ${kt} ${Ee}" preserveAspectRatio="xMidYMid meet">
|
|||
|
|
<defs>
|
|||
|
|
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|||
|
|
<stop offset="0%" stop-color="${g}" />
|
|||
|
|
<stop offset="58%" stop-color="${k}" />
|
|||
|
|
<stop offset="100%" stop-color="#111827" />
|
|||
|
|
</linearGradient>
|
|||
|
|
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
|
|||
|
|
<stop offset="0%" stop-color="${A}" stop-opacity="0.82" />
|
|||
|
|
<stop offset="100%" stop-color="${A}" stop-opacity="0" />
|
|||
|
|
</radialGradient>
|
|||
|
|
<pattern id="grid" width="${$t}" height="${$t}" patternUnits="userSpaceOnUse">
|
|||
|
|
<path d="M${$t} 0H0V${$t}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
|
|||
|
|
</pattern>
|
|||
|
|
</defs>
|
|||
|
|
<rect width="${kt}" height="${Ee}" fill="url(#bg)" />
|
|||
|
|
<rect width="${kt}" height="${Ee}" fill="url(#grid)" />
|
|||
|
|
<circle cx="${dn}" cy="${ko}" r="${cn}" fill="url(#halo)" />
|
|||
|
|
<circle cx="${ho}" cy="${P}" r="${yt}" fill="#ffffff" opacity="0.11" />
|
|||
|
|
<rect x="${Lt}" y="${Lt}" width="${wa}" height="${kl}" rx="${Nl}" fill="#ffffff" opacity="0.14" />
|
|||
|
|
<rect x="${il}" y="${il}" width="${Kl}" height="${ka}" rx="${Math.round(Nl*.72)}" fill="#0f172a" opacity="0.24" />
|
|||
|
|
<text x="${il+Math.round(it*.035)}" y="${L}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${_a}" font-weight="700">IMAGESTUDIO · 未生成 ${Z}</text>
|
|||
|
|
<text x="${il+Math.round(it*.035)}" y="${Ll}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ke}" font-weight="800">${ie}</text>
|
|||
|
|
<text x="${il+Math.round(it*.035)}" y="${_l}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Zt}">${Ce}</text>
|
|||
|
|
<text x="${be}" y="${L+Math.round(it*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${wl}" font-weight="900">${Z}</text>
|
|||
|
|
<text x="${kt-Lt}" y="${Ee-Math.round(Lt*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(it*.027))}" font-weight="800">${vt}</text>
|
|||
|
|
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(Tt)}`}function op(t){return t.replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a]??a)}function El(t){return"title"in t&&t.title?t.title:t.node_id||t.workflow_id||t.profile_id||jl(t.image_id)}function pl(t){return ba(t.thumbnail_url)||ba(t.image_url)}function ba(t){const a=String(t||"").trim();if(!a)return"";const i=Xw(a);if(!i)return a;const c=E.value[a];if(c)return c;if(!re.has(a)){const m=Zw(a,i).finally(()=>{re.delete(a)});re.set(a,m)}return su()==="plugin-bridge"?"":a}function Xw(t){var a;try{const i=new URL(t,window.location.origin);return i.pathname.endsWith("/media/fetch")&&((a=i.searchParams.get("token"))==null?void 0:a.trim())||""}catch{return""}}async function Zw(t,a){try{const i=await Me(D.mediaPayload,{token:a}),c=String(i.body_base64||"");if(!c)return;const m=c.replace(/-/g,"+").replace(/_/g,"/"),g=m.padEnd(Math.ceil(m.length/4)*4,"="),k=window.atob(g),A=new Uint8Array(k.length);for(let ie=0;ie<k.length;ie+=1)A[ie]=k.charCodeAt(ie);const Z=URL.createObjectURL(new Blob([A],{type:i.content_type||"application/octet-stream"}));ve.add(Z),E.value={...E.value,[t]:Z}}catch(i){console.warn("ImageStudio media bridge failed",i)}}function ek(t){if(t.status==="confirmed_unsupported")return!1;if(t.dialect==="openai_images"||t.dialect==="comfyui")return!0;const a=t.capabilities||{};return!!(a.text_to_image||a.image_generation||a.workflow_graph||Object.keys(a).some(i=>["text_to_image","image_generation","workflow_graph"].includes(i)))}function tk(t,a,i){return Math.max(a,Math.min(i,t))}function lk(){try{const t=localStorage.getItem(ga.theme);(t==="light"||t==="dark")&&(en.value=t),Jn.value=localStorage.getItem(ga.primary)||Jn.value,Yn.value=localStorage.getItem(ga.accent)||Yn.value;const a=localStorage.getItem(ga.navigationPinned);Oa.value=a===null||a==="true",va.value=ip(localStorage.getItem(ga.readNotifications)),_i.value=ip(localStorage.getItem(ga.dismissedNotifications))}catch{}yi.value=Oa.value}function ak(){try{localStorage.setItem(ga.theme,en.value),localStorage.setItem(ga.primary,Jn.value),localStorage.setItem(ga.accent,Yn.value),localStorage.setItem(ga.navigationPinned,String(Oa.value)),localStorage.setItem(ga.readNotifications,JSON.stringify(va.value)),localStorage.setItem(ga.dismissedNotifications,JSON.stringify(_i.value))}catch{}}function ip(t){if(!t)return[];try{const a=JSON.parse(t);return Array.isArray(a)?a.filter(i=>typeof i=="string"):[]}catch{return[]}}function Bn(t,a){const i=Zd(t);return i?`rgba(${i.r}, ${i.g}, ${i.b}, ${a})`:`rgba(118, 104, 232, ${a})`}function Yd(t,a,i){const c=Zd(t),m=Zd(a);if(!c||!m)return t;const g=Math.min(1,Math.max(0,i));return`#${Xd(c.r*(1-g)+m.r*g)}${Xd(c.g*(1-g)+m.g*g)}${Xd(c.b*(1-g)+m.b*g)}`}function Xd(t){return Math.round(t).toString(16).padStart(2,"0")}function Zd(t){const a=t.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 Re(t,a){const i=t==null?void 0:t[a];return typeof i=="string"?i:""}function nk(t){return!Xt(t)||typeof t.task_id!="string"?null:{task_id:t.task_id,task_type:typeof t.task_type=="string"?t.task_type:"generation",status:typeof t.status=="string"?t.status:"created",progress:typeof t.progress=="number"?t.progress:0,created_at:typeof t.created_at=="string"?t.created_at:"",updated_at:typeof t.updated_at=="string"?t.updated_at:"",profile_id:typeof t.profile_id=="string"?t.profile_id:null,workflow_id:typeof t.workflow_id=="string"?t.workflow_id:null,node_id:typeof t.node_id=="string"?t.node_id:null,model_route:typeof t.model_route=="string"?t.model_route:null,idempotency_key:typeof t.idempotency_key=="string"?t.idempotency_key:null,request:Xt(t.request)?t.request:void 0,result:Xt(t.result)?t.result:void 0,metadata:Xt(t.metadata)?t.metadata:void 0,error_message:typeof t.error_message=="string"?t.error_message:null}}function ok(t){return!!t}function Xt(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function ik(t){return ia(t,a=>a.i
|
|||
|
|
身份:近未来港区巡查员\r
|
|||
|
|
性格:冷静、可靠、行动快\r
|
|||
|
|
外观:黑色短发,青绿色眼睛\r
|
|||
|
|
服装:轻机能外套、短靴、发光臂章\r
|
|||
|
|
避雷:低质量、结构错误`},null,512),[[Ue,ls.value]])]),l("aside",aN,[l("header",null,[l("div",null,[a[160]||(a[160]=l("span",null,"识别预览",-1)),l("strong",null,u(xg.value)+" / "+u(Zu.value.length),1)]),l("em",null,u(ki.value?`${ki.value.length} 字`:"待粘贴"),1)]),l("dl",null,[(f(!0),v(X,null,ne(Zu.value,P=>(f(),v("div",{key:P.key,class:ue({pending:ki.value&&!P.recognized})},[l("dt",null,[rt(u(P.label)+" ",1),l("span",null,u(P.recognized?"已识别":"待整理"),1)]),l("dd",null,u(P.value||"粘贴文本后显示"),1)],2))),128))])])]),l("footer",null,[l("span",null,u(ki.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),l("button",{type:"button",onClick:a[36]||(a[36]=P=>ol("externalProfileImport"))},"取消"),l("button",{type:"button",disabled:!ki.value,onClick:mw}," 识别并填入问卷 ",8,nN)])])])):z("",!0)]),_:1}),He(dl,{name:"viewer-fade"},{default:Wt(()=>[Zr.value?(f(),v("div",oN,[l("section",iN,[l("header",null,[a[161]||(a[161]=l("div",null,[l("span",null,"快速角色"),l("strong",null,"创建角色档案问卷")],-1)),l("button",{type:"button",title:"关闭",onClick:a[37]||(a[37]=P=>ol("personaQuestionnaire"))},"×")]),l("div",rN,[l("label",null,[a[162]||(a[162]=l("span",null,"角色核心",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[38]||(a[38]=P=>Fe.value.roleCore=P),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Ue,Fe.value.roleCore]])]),l("label",sN,[a[164]||(a[164]=l("span",null,"性别表现",-1)),Pe(l("select",{"onUpdate:modelValue":a[39]||(a[39]=P=>Fe.value.genderPresentation=P)},[...a[163]||(a[163]=[l("option",{value:""},"未指定",-1),l("option",{value:"female"},"女性 / Female",-1),l("option",{value:"male"},"男性 / Male",-1),l("option",{value:"androgynous"},"中性 / Androgynous",-1),l("option",{value:"nonbinary"},"非二元 / Nonbinary",-1)])],512),[[Sl,Fe.value.genderPresentation]])]),l("label",uN,[a[165]||(a[165]=l("span",null,"年龄阶段",-1)),Pe(l("input",{"onUpdate:modelValue":a[40]||(a[40]=P=>Fe.value.ageStage=P),type:"text",placeholder:"例如 adult、young adult、middle-aged"},null,512),[[Ue,Fe.value.ageStage]])]),l("label",dN,[a[166]||(a[166]=l("span",null,"物种 / 种族",-1)),Pe(l("input",{"onUpdate:modelValue":a[41]||(a[41]=P=>Fe.value.species=P),type:"text",placeholder:"例如 human、elf、android"},null,512),[[Ue,Fe.value.species]])]),l("label",cN,[a[167]||(a[167]=l("span",null,"体型",-1)),Pe(l("input",{"onUpdate:modelValue":a[42]||(a[42]=P=>Fe.value.bodyType=P),type:"text",placeholder:"例如 slim、athletic、muscular"},null,512),[[Ue,Fe.value.bodyType]])]),l("label",null,[a[168]||(a[168]=l("span",null,"显著特征",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[43]||(a[43]=P=>Fe.value.distinctiveFeatures=P),rows:"3",placeholder:"伤疤、异色瞳、义体、角、纹身或固定视觉记忆点。"},null,512),[[Ue,Fe.value.distinctiveFeatures]])]),l("label",null,[a[169]||(a[169]=l("span",null,"性格关键词",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[44]||(a[44]=P=>Fe.value.personality=P),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[Ue,Fe.value.personality]])]),l("label",null,[a[170]||(a[170]=l("span",null,"外观特征",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[45]||(a[45]=P=>Fe.value.appearance=P),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[Ue,Fe.value.appearance]])]),l("label",null,[a[171]||(a[171]=l("span",null,"服装与配饰",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[46]||(a[46]=P=>Fe.value.outfit=P),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[Ue,Fe.value.outfit]])]),l("label",null,[a[172]||(a[172]=l("span",null,"常用场景",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[47]||(a[47]=P=>Fe.value.scene=P),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[Ue,Fe.value.scene]])]),l("label",null,[a[173]||(a[173]=l("span",null,"避雷内容",-1)),Pe(l("textarea",{"onUpd
|