Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不爱学习的程序员
AI-Draw_01
提交
866828a9
A
AI-Draw_01
项目概览
不爱学习的程序员
/
AI-Draw_01
与 Fork 源项目一致
Fork自
冯丙见 / AI绘图
通知
1
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AI-Draw_01
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
866828a9
编写于
7月 28, 2023
作者:
W
weixin_44463441
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto Commit
上级
0b326481
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
dist/assets/index.4a5ec4b0.js
dist/assets/index.4a5ec4b0.js
+1
-1
dist/index.html
dist/index.html
+1
-1
src/App.vue
src/App.vue
+4
-4
未找到文件。
dist/assets/index.
7ec49da3
.js
→
dist/assets/index.
4a5ec4b0
.js
浏览文件 @
866828a9
...
...
@@ -2350,4 +2350,4 @@ function print() { __p += __j.call(arguments, '') }
`+s:s;break;case"event":r.event=s;break;case"id":t(r.id=s);break;case"retry":const v=parseInt(s,10);isNaN(v)||e(r.retry=v);break}}}}function Mie(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function eS(){return{data:"",event:"",id:"",retry:void 0}}var Nie=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]]);return n};const rh="text/event-stream",Rie=1e3,tS="last-event-id";function Lie(t,e){var{signal:n,headers:r,onopen:a,onmessage:l,onclose:i,onerror:o,openWhenHidden:u,fetch:c}=e,s=Nie(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((v,f)=>{const d=Object.assign({},r);d.accept||(d.accept=rh);let g;function h(){g.abort(),document.hidden||D()}u||document.addEventListener("visibilitychange",h);let m=Rie,y=0;function b(){document.removeEventListener("visibilitychange",h),window.clearTimeout(y),g.abort()}n==null||n.addEventListener("abort",()=>{b(),v()});const C=c!=null?c:window.fetch,S=a!=null?a:Bie;async function D(){var A;g=new AbortController;try{const I=await C(t,Object.assign(Object.assign({},s),{headers:d,signal:g.signal}));await S(I),await $ie(I.body,Aie(Fie($=>{$?d[tS]=$:delete d[tS]},$=>{m=$},l))),i==null||i(),b(),v()}catch(I){if(!g.signal.aborted)try{const $=(A=o==null?void 0:o(I))!==null&&A!==void 0?A:m;window.clearTimeout(y),y=window.setTimeout(D,$)}catch($){b(),f($)}}}D()})}function Bie(t){const e=t.headers.get("content-type");if(!(e!=null&&e.startsWith(rh)))throw new Error(`Expected content-type to be ${rh}, Actual: ${e}`)}const Vie=1024,nS=(t,e=Vie)=>{if(t&&t.length>0){let n=0,r=t.length,a="";for(;a.length<e&&n<r;)t[n].page_content.length+a.length<e&&(a=a+`
`+t[n].page_content),n++;return a}else return""},rS={getPromptByTemplate:(t,e,n,r)=>{var a;if(t.api_prompt_prefix&&(n=(t==null?void 0:t.api_prompt_prefix)+" "+n),t!=null&&t.prompt_template){const l=nS(e,(a=t==null?void 0:t.max_request_len)!=null?a:1024);return t==null?void 0:t.prompt_template.replace(/\{question\}/ig,n).replace(/\{context\}/ig,l)}else return n},getPromptByChatMode(t,e,n){var l,i;const r=Math.min(Math.max(parseInt((l=t==null?void 0:t.history_length)!=null?l:4),4),10);let a=[];if(n&&n.length>=2){const o=n.length-2,u=Math.max(n.length-2-r+1,0);for(let c=u;c<=o;c++){const s=n[c];a.push({role:s.user==="AI"?"system":"user",content:s.message})}}if(t!=null&&t.prompt_template){const o=nS(e,(i=t==null?void 0:t.max_request_len)!=null?i:1024);a.unshift({role:"user",content:t.prompt_template.replace(/\{question\}/ig,"").replace(/\{context\}/ig,o).replace(/\{user_call_name\}/ig,t.user_call_name)})}return a}};class zie{constructor(e){var n;this.config=e,this.abortController=null,this.callback=null,this.temperature=parseFloat((n=e==null?void 0:e.temperature)!=null?n:.7)}createCompletion(e,n,r,a){var y,b,C,S,D,A,I;const l=this.config,i=new AbortController,o=i.signal;this.abortController=i,this.callback=a;const u=(y=l==null?void 0:l.mode)!=null?y:"chat";(b=l==null?void 0:l.token)!=null;const c=l.api_url+(u==="chat"?"/chat/completions":"/completions"),s=(C=l==null?void 0:l.stop)!=null?C:"[DONE]",v=(S=l==null?void 0:l.api_max_token)!=null?S:512,f=(D=l==null?void 0:l.model)!=null?D:"vicuna-13b-all-v1.1",d=this.temperature,g=(A=l==null?void 0:l.top_p)!=null?A:1;let h=(I=l==null?void 0:l.stop_key)!=null?I:null;h!==null&&h!==""&&(h=h.split(";;"));const m={model:f,max_tokens:parseInt(v),temperature:parseFloat(d),top_p:parseFloat(g),stream:!0,stop:h};u==="chat"?m.messages=rS.getPromptByChatMode(l,r,n):m.prompt=rS.getPromptByTemplate(l,r,e),Lie(c,{method:"POST",signal:o,headers:{"Content-Type":"application/json"},body:JSON.stringify(m),onmessage($){var j,M,k,O,w;if($&&($==null?void 0:$.data))if(($==null?void 0:$.data)===s){a!=null&&a.onclose&&(a==null||a.onclose()),i.abort();return}else{console.info($.data);const P=JSON.parse($.data);let _=null;u==="chat"?(_=(M=(j=P==null?void 0:P.choices[0])==null?void 0:j.message)==null?void 0:M.content,typeof _>"u"&&(_=(O=(k=P==null?void 0:P.choices[0])==null?void 0:k.delta)==null?void 0:O.content),typeof _>"u"&&(_="")):_=(w=P==null?void 0:P.choices[0])==null?void 0:w.text,a==null||a.onmessage(_,!0)}},onclose(){a!=null&&a.onclose&&(a==null||a.onclose())},onerror($){a!=null&&a.onerror&&(a==null||a.onerror($))}})}close(){var e;this.abortController&&(this.abortController.abort(),this.callback&&((e=this.callback)==null?void 0:e.onclose)&&this.callback.onclose())}}const aS={getData(){return{code:200,data:{id:128897,name:"AI\u7ED8\u56FE",create_time:1684920670901,app:"llm_rep",resource_type:"app",ext:{mode:"chat",model:"vicuna-7b-all-v1.1",api_url:"",api_type:"openai",robot_img:null,api_max_token:"1024",default_prompt:"cat",max_request_len:"10000",prompt_template:"",api_prompt_prefix:"",show_profile_setting:!1,common_sd_api:"https://api.quickapi.cloud/temporary/sd/"}},message:"success"}}};function UD(t,e){return function(){return t.apply(e,arguments)}}const{toString:Hie}=Object.prototype,{getPrototypeOf:Bg}=Object,xv=(t=>e=>{const n=Hie.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wr=t=>(t=t.toLowerCase(),e=>xv(e)===t),Ev=t=>e=>typeof e===t,{isArray:lo}=Array,fu=Ev("undefined");function Kie(t){return t!==null&&!fu(t)&&t.constructor!==null&&!fu(t.constructor)&&rr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const YD=Wr("ArrayBuffer");function Wie(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&YD(t.buffer),e}const Uie=Ev("string"),rr=Ev("function"),qD=Ev("number"),Dv=t=>t!==null&&typeof t=="object",Yie=t=>t===!0||t===!1,Yc=t=>{if(xv(t)!=="object")return!1;const e=Bg(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},qie=Wr("Date"),Gie=Wr("File"),Xie=Wr("Blob"),Jie=Wr("FileList"),Zie=t=>Dv(t)&&rr(t.pipe),Qie=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||rr(t.append)&&((e=xv(t))==="formdata"||e==="object"&&rr(t.toString)&&t.toString()==="[object FormData]"))},eoe=Wr("URLSearchParams"),toe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ju(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,a;if(typeof t!="object"&&(t=[t]),lo(t))for(r=0,a=t.length;r<a;r++)e.call(null,t[r],r,t);else{const l=n?Object.getOwnPropertyNames(t):Object.keys(t),i=l.length;let o;for(r=0;r<i;r++)o=l[r],e.call(null,t[o],o,t)}}function GD(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,a;for(;r-- >0;)if(a=n[r],e===a.toLowerCase())return a;return null}const XD=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),JD=t=>!fu(t)&&t!==XD;function ah(){const{caseless:t}=JD(this)&&this||{},e={},n=(r,a)=>{const l=t&&GD(e,a)||a;Yc(e[l])&&Yc(r)?e[l]=ah(e[l],r):Yc(r)?e[l]=ah({},r):lo(r)?e[l]=r.slice():e[l]=r};for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&ju(arguments[r],n);return e}const noe=(t,e,n,{allOwnKeys:r}={})=>(ju(e,(a,l)=>{n&&rr(a)?t[l]=UD(a,n):t[l]=a},{allOwnKeys:r}),t),roe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),aoe=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},loe=(t,e,n,r)=>{let a,l,i;const o={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),l=a.length;l-- >0;)i=a[l],(!r||r(i,t,e))&&!o[i]&&(e[i]=t[i],o[i]=!0);t=n!==!1&&Bg(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ioe=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},ooe=t=>{if(!t)return null;if(lo(t))return t;let e=t.length;if(!qD(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},uoe=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Bg(Uint8Array)),coe=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let a;for(;(a=r.next())&&!a.done;){const l=a.value;e.call(t,l[0],l[1])}},soe=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},voe=Wr("HTMLFormElement"),foe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),lS=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),doe=Wr("RegExp"),ZD=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ju(n,(a,l)=>{e(a,l,t)!==!1&&(r[l]=a)}),Object.defineProperties(t,r)},hoe=t=>{ZD(t,(e,n)=>{if(rr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(!!rr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},goe=(t,e)=>{const n={},r=a=>{a.forEach(l=>{n[l]=!0})};return lo(t)?r(t):r(String(t).split(e)),n},poe=()=>{},moe=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Af="abcdefghijklmnopqrstuvwxyz",iS="0123456789",QD={DIGIT:iS,ALPHA:Af,ALPHA_DIGIT:Af+Af.toUpperCase()+iS},yoe=(t=16,e=QD.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function boe(t){return!!(t&&rr(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Coe=t=>{const e=new Array(10),n=(r,a)=>{if(Dv(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[a]=r;const l=lo(r)?[]:{};return ju(r,(i,o)=>{const u=n(i,a+1);!fu(u)&&(l[o]=u)}),e[a]=void 0,l}}return r};return n(t,0)},Ooe=Wr("AsyncFunction"),woe=t=>t&&(Dv(t)||rr(t))&&rr(t.then)&&rr(t.catch),we={isArray:lo,isArrayBuffer:YD,isBuffer:Kie,isFormData:Qie,isArrayBufferView:Wie,isString:Uie,isNumber:qD,isBoolean:Yie,isObject:Dv,isPlainObject:Yc,isUndefined:fu,isDate:qie,isFile:Gie,isBlob:Xie,isRegExp:doe,isFunction:rr,isStream:Zie,isURLSearchParams:eoe,isTypedArray:uoe,isFileList:Jie,forEach:ju,merge:ah,extend:noe,trim:toe,stripBOM:roe,inherits:aoe,toFlatObject:loe,kindOf:xv,kindOfTest:Wr,endsWith:ioe,toArray:ooe,forEachEntry:coe,matchAll:soe,isHTMLForm:voe,hasOwnProperty:lS,hasOwnProp:lS,reduceDescriptors:ZD,freezeMethods:hoe,toObjectSet:goe,toCamelCase:foe,noop:poe,toFiniteNumber:moe,findKey:GD,global:XD,isContextDefined:JD,ALPHABET:QD,generateString:yoe,isSpecCompliantForm:boe,toJSONObject:Coe,isAsyncFn:Ooe,isThenable:woe};function pt(t,e,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}we.inherits(pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:we.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const eT=pt.prototype,tT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{tT[t]={value:t}});Object.defineProperties(pt,tT);Object.defineProperty(eT,"isAxiosError",{value:!0});pt.from=(t,e,n,r,a,l)=>{const i=Object.create(eT);return we.toFlatObject(t,i,function(u){return u!==Error.prototype},o=>o!=="isAxiosError"),pt.call(i,t.message,e,n,r,a),i.cause=t,i.name=t.name,l&&Object.assign(i,l),i};const _oe=null;function lh(t){return we.isPlainObject(t)||we.isArray(t)}function nT(t){return we.endsWith(t,"[]")?t.slice(0,-2):t}function oS(t,e,n){return t?t.concat(e).map(function(a,l){return a=nT(a),!n&&l?"["+a+"]":a}).join(n?".":""):e}function Soe(t){return we.isArray(t)&&!t.some(lh)}const Poe=we.toFlatObject(we,{},null,function(e){return/^is[A-Z]/.test(e)});function Tv(t,e,n){if(!we.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=we.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,m){return!we.isUndefined(m[h])});const r=n.metaTokens,a=n.visitor||s,l=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&we.isSpecCompliantForm(e);if(!we.isFunction(a))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(we.isDate(g))return g.toISOString();if(!u&&we.isBlob(g))throw new pt("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(g)||we.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function s(g,h,m){let y=g;if(g&&!m&&typeof g=="object"){if(we.endsWith(h,"{}"))h=r?h:h.slice(0,-2),g=JSON.stringify(g);else if(we.isArray(g)&&Soe(g)||(we.isFileList(g)||we.endsWith(h,"[]"))&&(y=we.toArray(g)))return h=nT(h),y.forEach(function(C,S){!(we.isUndefined(C)||C===null)&&e.append(i===!0?oS([h],S,l):i===null?h:h+"[]",c(C))}),!1}return lh(g)?!0:(e.append(oS(m,h,l),c(g)),!1)}const v=[],f=Object.assign(Poe,{defaultVisitor:s,convertValue:c,isVisitable:lh});function d(g,h){if(!we.isUndefined(g)){if(v.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));v.push(g),we.forEach(g,function(y,b){(!(we.isUndefined(y)||y===null)&&a.call(e,y,we.isString(b)?b.trim():b,h,f))===!0&&d(y,h?h.concat(b):[b])}),v.pop()}}if(!we.isObject(t))throw new TypeError("data must be an object");return d(t),e}function uS(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Vg(t,e){this._pairs=[],t&&Tv(t,this,e)}const rT=Vg.prototype;rT.append=function(e,n){this._pairs.push([e,n])};rT.toString=function(e){const n=e?function(r){return e.call(this,r,uS)}:uS;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function xoe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aT(t,e,n){if(!e)return t;const r=n&&n.encode||xoe,a=n&&n.serialize;let l;if(a?l=a(e,n):l=we.isURLSearchParams(e)?e.toString():new Vg(e,n).toString(r),l){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}class Eoe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){we.forEach(this.handlers,function(r){r!==null&&e(r)})}}const cS=Eoe,lT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Doe=typeof URLSearchParams<"u"?URLSearchParams:Vg,Toe=typeof FormData<"u"?FormData:null,koe=typeof Blob<"u"?Blob:null,joe=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Ioe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$r={isBrowser:!0,classes:{URLSearchParams:Doe,FormData:Toe,Blob:koe},isStandardBrowserEnv:joe,isStandardBrowserWebWorkerEnv:Ioe,protocols:["http","https","file","blob","url","data"]};function $oe(t,e){return Tv(t,new $r.classes.URLSearchParams,Object.assign({visitor:function(n,r,a,l){return $r.isNode&&we.isBuffer(n)?(this.append(r,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},e))}function Aoe(t){return we.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Foe(t){const e={},n=Object.keys(t);let r;const a=n.length;let l;for(r=0;r<a;r++)l=n[r],e[l]=t[l];return e}function iT(t){function e(n,r,a,l){let i=n[l++];const o=Number.isFinite(+i),u=l>=n.length;return i=!i&&we.isArray(a)?a.length:i,u?(we.hasOwnProp(a,i)?a[i]=[a[i],r]:a[i]=r,!o):((!a[i]||!we.isObject(a[i]))&&(a[i]=[]),e(n,r,a[i],l)&&we.isArray(a[i])&&(a[i]=Foe(a[i])),!o)}if(we.isFormData(t)&&we.isFunction(t.entries)){const n={};return we.forEachEntry(t,(r,a)=>{e(Aoe(r),a,n,0)}),n}return null}const Moe={"Content-Type":void 0};function Noe(t,e,n){if(we.isString(t))try{return(e||JSON.parse)(t),we.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const kv={transitional:lT,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,l=we.isObject(e);if(l&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return a&&a?JSON.stringify(iT(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(l){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $oe(e,this.formSerializer).toString();if((o=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Tv(o?{"files[]":e}:e,u&&new u,this.formSerializer)}}return l||a?(n.setContentType("application/json",!1),Noe(e)):e}],transformResponse:[function(e){const n=this.transitional||kv.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(e&&we.isString(e)&&(r&&!this.responseType||a)){const i=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(o){if(i)throw o.name==="SyntaxError"?pt.from(o,pt.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r.classes.FormData,Blob:$r.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};we.forEach(["delete","get","head"],function(e){kv.headers[e]={}});we.forEach(["post","put","patch"],function(e){kv.headers[e]=we.merge(Moe)});const zg=kv,Roe=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Loe=t=>{const e={};let n,r,a;return t&&t.split(`
`).forEach(function(i){a=i.indexOf(":"),n=i.substring(0,a).trim().toLowerCase(),r=i.substring(a+1).trim(),!(!n||e[n]&&Roe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},sS=Symbol("internals");function Oo(t){return t&&String(t).trim().toLowerCase()}function qc(t){return t===!1||t==null?t:we.isArray(t)?t.map(qc):String(t)}function Boe(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Voe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ff(t,e,n,r,a){if(we.isFunction(r))return r.call(this,e,n);if(a&&(e=n),!!we.isString(e)){if(we.isString(r))return e.indexOf(r)!==-1;if(we.isRegExp(r))return r.test(e)}}function zoe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Hoe(t,e){const n=we.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(a,l,i){return this[r].call(this,e,a,l,i)},configurable:!0})})}class jv{constructor(e){e&&this.set(e)}set(e,n,r){const a=this;function l(o,u,c){const s=Oo(u);if(!s)throw new Error("header name must be a non-empty string");const v=we.findKey(a,s);(!v||a[v]===void 0||c===!0||c===void 0&&a[v]!==!1)&&(a[v||u]=qc(o))}const i=(o,u)=>we.forEach(o,(c,s)=>l(c,s,u));return we.isPlainObject(e)||e instanceof this.constructor?i(e,n):we.isString(e)&&(e=e.trim())&&!Voe(e)?i(Loe(e),n):e!=null&&l(n,e,r),this}get(e,n){if(e=Oo(e),e){const r=we.findKey(this,e);if(r){const a=this[r];if(!n)return a;if(n===!0)return Boe(a);if(we.isFunction(n))return n.call(this,a,r);if(we.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Oo(e),e){const r=we.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ff(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let a=!1;function l(i){if(i=Oo(i),i){const o=we.findKey(r,i);o&&(!n||Ff(r,r[o],o,n))&&(delete r[o],a=!0)}}return we.isArray(e)?e.forEach(l):l(e),a}clear(e){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const l=n[r];(!e||Ff(this,this[l],l,e,!0))&&(delete this[l],a=!0)}return a}normalize(e){const n=this,r={};return we.forEach(this,(a,l)=>{const i=we.findKey(r,l);if(i){n[i]=qc(a),delete n[l];return}const o=e?zoe(l):String(l).trim();o!==l&&delete n[l],n[o]=qc(a),r[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return we.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=e&&we.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(a=>r.set(a)),r}static accessor(e){const r=(this[sS]=this[sS]={accessors:{}}).accessors,a=this.prototype;function l(i){const o=Oo(i);r[o]||(Hoe(a,i),r[o]=!0)}return we.isArray(e)?e.forEach(l):l(e),this}}jv.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.freezeMethods(jv.prototype);we.freezeMethods(jv);const ua=jv;function Mf(t,e){const n=this||zg,r=e||n,a=ua.from(r.headers);let l=r.data;return we.forEach(t,function(o){l=o.call(n,l,a.normalize(),e?e.status:void 0)}),a.normalize(),l}function oT(t){return!!(t&&t.__CANCEL__)}function Iu(t,e,n){pt.call(this,t==null?"canceled":t,pt.ERR_CANCELED,e,n),this.name="CanceledError"}we.inherits(Iu,pt,{__CANCEL__:!0});function Koe(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new pt("Request failed with status code "+n.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Woe=$r.isStandardBrowserEnv?function(){return{write:function(n,r,a,l,i,o){const u=[];u.push(n+"="+encodeURIComponent(r)),we.isNumber(a)&&u.push("expires="+new Date(a).toGMTString()),we.isString(l)&&u.push("path="+l),we.isString(i)&&u.push("domain="+i),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Uoe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Yoe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function uT(t,e){return t&&!Uoe(e)?Yoe(t,e):e}const qoe=$r.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function a(l){let i=l;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(i){const o=we.isString(i)?a(i):i;return o.protocol===r.protocol&&o.host===r.host}}():function(){return function(){return!0}}();function Goe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Xoe(t,e){t=t||10;const n=new Array(t),r=new Array(t);let a=0,l=0,i;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),s=r[l];i||(i=c),n[a]=u,r[a]=c;let v=l,f=0;for(;v!==a;)f+=n[v++],v=v%t;if(a=(a+1)%t,a===l&&(l=(l+1)%t),c-i<e)return;const d=s&&c-s;return d?Math.round(f*1e3/d):void 0}}function vS(t,e){let n=0;const r=Xoe(50,250);return a=>{const l=a.loaded,i=a.lengthComputable?a.total:void 0,o=l-n,u=r(o),c=l<=i;n=l;const s={loaded:l,total:i,progress:i?l/i:void 0,bytes:o,rate:u||void 0,estimated:u&&i&&c?(i-l)/u:void 0,event:a};s[e?"download":"upload"]=!0,t(s)}}const Joe=typeof XMLHttpRequest<"u",Zoe=Joe&&function(t){return new Promise(function(n,r){let a=t.data;const l=ua.from(t.headers).normalize(),i=t.responseType;let o;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}we.isFormData(a)&&($r.isStandardBrowserEnv||$r.isStandardBrowserWebWorkerEnv?l.setContentType(!1):l.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const d=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";l.set("Authorization","Basic "+btoa(d+":"+g))}const s=uT(t.baseURL,t.url);c.open(t.method.toUpperCase(),aT(s,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function v(){if(!c)return;const d=ua.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),h={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:d,config:t,request:c};Koe(function(y){n(y),u()},function(y){r(y),u()},h),c=null}if("onloadend"in c?c.onloadend=v:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(v)},c.onabort=function(){!c||(r(new pt("Request aborted",pt.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new pt("Network Error",pt.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let g=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const h=t.transitional||lT;t.timeoutErrorMessage&&(g=t.timeoutErrorMessage),r(new pt(g,h.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,t,c)),c=null},$r.isStandardBrowserEnv){const d=(t.withCredentials||qoe(s))&&t.xsrfCookieName&&Woe.read(t.xsrfCookieName);d&&l.set(t.xsrfHeaderName,d)}a===void 0&&l.setContentType(null),"setRequestHeader"in c&&we.forEach(l.toJSON(),function(g,h){c.setRequestHeader(h,g)}),we.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&i!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",vS(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",vS(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=d=>{!c||(r(!d||d.type?new Iu(null,t,c):d),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=Goe(s);if(f&&$r.protocols.indexOf(f)===-1){r(new pt("Unsupported protocol "+f+":",pt.ERR_BAD_REQUEST,t));return}c.send(a||null)})},Gc={http:_oe,xhr:Zoe};we.forEach(Gc,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Qoe={getAdapter:t=>{t=we.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let a=0;a<e&&(n=t[a],!(r=we.isString(n)?Gc[n.toLowerCase()]:n));a++);if(!r)throw r===!1?new pt(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(we.hasOwnProp(Gc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!we.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Gc};function Nf(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Iu(null,t)}function fS(t){return Nf(t),t.headers=ua.from(t.headers),t.data=Mf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Qoe.getAdapter(t.adapter||zg.adapter)(t).then(function(r){return Nf(t),r.data=Mf.call(t,t.transformResponse,r),r.headers=ua.from(r.headers),r},function(r){return oT(r)||(Nf(t),r&&r.response&&(r.response.data=Mf.call(t,t.transformResponse,r.response),r.response.headers=ua.from(r.response.headers))),Promise.reject(r)})}const dS=t=>t instanceof ua?t.toJSON():t;function Ai(t,e){e=e||{};const n={};function r(c,s,v){return we.isPlainObject(c)&&we.isPlainObject(s)?we.merge.call({caseless:v},c,s):we.isPlainObject(s)?we.merge({},s):we.isArray(s)?s.slice():s}function a(c,s,v){if(we.isUndefined(s)){if(!we.isUndefined(c))return r(void 0,c,v)}else return r(c,s,v)}function l(c,s){if(!we.isUndefined(s))return r(void 0,s)}function i(c,s){if(we.isUndefined(s)){if(!we.isUndefined(c))return r(void 0,c)}else return r(void 0,s)}function o(c,s,v){if(v in e)return r(c,s);if(v in t)return r(void 0,c)}const u={url:l,method:l,data:l,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:o,headers:(c,s)=>a(dS(c),dS(s),!0)};return we.forEach(Object.keys(Object.assign({},t,e)),function(s){const v=u[s]||a,f=v(t[s],e[s],s);we.isUndefined(f)&&v!==o||(n[s]=f)}),n}const cT="1.4.0",Hg={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Hg[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const hS={};Hg.transitional=function(e,n,r){function a(l,i){return"[Axios v"+cT+"] Transitional option '"+l+"'"+i+(r?". "+r:"")}return(l,i,o)=>{if(e===!1)throw new pt(a(i," has been removed"+(n?" in "+n:"")),pt.ERR_DEPRECATED);return n&&!hS[i]&&(hS[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,i,o):!0}};function eue(t,e,n){if(typeof t!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let a=r.length;for(;a-- >0;){const l=r[a],i=e[l];if(i){const o=t[l],u=o===void 0||i(o,l,t);if(u!==!0)throw new pt("option "+l+" must be "+u,pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pt("Unknown option "+l,pt.ERR_BAD_OPTION)}}const ih={assertOptions:eue,validators:Hg},Pa=ih.validators;class Ds{constructor(e){this.defaults=e,this.interceptors={request:new cS,response:new cS}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ai(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:l}=n;r!==void 0&&ih.assertOptions(r,{silentJSONParsing:Pa.transitional(Pa.boolean),forcedJSONParsing:Pa.transitional(Pa.boolean),clarifyTimeoutError:Pa.transitional(Pa.boolean)},!1),a!=null&&(we.isFunction(a)?n.paramsSerializer={serialize:a}:ih.assertOptions(a,{encode:Pa.function,serialize:Pa.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=l&&we.merge(l.common,l[n.method]),i&&we.forEach(["delete","get","head","post","put","patch","common"],g=>{delete l[g]}),n.headers=ua.concat(i,l);const o=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let s,v=0,f;if(!u){const g=[fS.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,c),f=g.length,s=Promise.resolve(n);v<f;)s=s.then(g[v++],g[v++]);return s}f=o.length;let d=n;for(v=0;v<f;){const g=o[v++],h=o[v++];try{d=g(d)}catch(m){h.call(this,m);break}}try{s=fS.call(this,d)}catch(g){return Promise.reject(g)}for(v=0,f=c.length;v<f;)s=s.then(c[v++],c[v++]);return s}getUri(e){e=Ai(this.defaults,e);const n=uT(e.baseURL,e.url);return aT(n,e.params,e.paramsSerializer)}}we.forEach(["delete","get","head","options"],function(e){Ds.prototype[e]=function(n,r){return this.request(Ai(r||{},{method:e,url:n,data:(r||{}).data}))}});we.forEach(["post","put","patch"],function(e){function n(r){return function(l,i,o){return this.request(Ai(o||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:i}))}}Ds.prototype[e]=n(),Ds.prototype[e+"Form"]=n(!0)});const Xc=Ds;class Kg{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(a=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](a);r._listeners=null}),this.promise.then=a=>{let l;const i=new Promise(o=>{r.subscribe(o),l=o}).then(a);return i.cancel=function(){r.unsubscribe(l)},i},e(function(l,i,o){r.reason||(r.reason=new Iu(l,i,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Kg(function(a){e=a}),cancel:e}}}const tue=Kg;function nue(t){return function(n){return t.apply(null,n)}}function rue(t){return we.isObject(t)&&t.isAxiosError===!0}const oh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oh).forEach(([t,e])=>{oh[e]=t});const aue=oh;function sT(t){const e=new Xc(t),n=UD(Xc.prototype.request,e);return we.extend(n,Xc.prototype,e,{allOwnKeys:!0}),we.extend(n,e,null,{allOwnKeys:!0}),n.create=function(a){return sT(Ai(t,a))},n}const Xt=sT(zg);Xt.Axios=Xc;Xt.CanceledError=Iu;Xt.CancelToken=tue;Xt.isCancel=oT;Xt.VERSION=cT;Xt.toFormData=Tv;Xt.AxiosError=pt;Xt.Cancel=Xt.CanceledError;Xt.all=function(e){return Promise.all(e)};Xt.spread=nue;Xt.isAxiosError=rue;Xt.mergeConfig=Ai;Xt.AxiosHeaders=ua;Xt.formToJSON=t=>iT(we.isHTMLForm(t)?new FormData(t):t);Xt.HttpStatusCode=aue;Xt.default=Xt;const vT=Xt,lue={draw(t,e,n){return new Promise(function(r,a){var u,c,s,v,f,d;const l={prompt:e,steps:(u=t==null?void 0:t.steps)!=null?u:20,negative_prompt:n!=null?n:"nsfw",width:(c=t==null?void 0:t.width)!=null?c:512,height:(s=t==null?void 0:t.height)!=null?s:512,cfg_scale:(v=t==null?void 0:t.cfg_scale)!=null?v:6,seed:(f=t==null?void 0:t.seed)!=null?f:-1,sampler_name:(d=t==null?void 0:t.sampler_name)!=null?d:"DPM++ SDE Karras"},i={"content-type":"application/json"};let o=t==null?void 0:t.sd_api;o.indexOf("/sd")===-1&&(o+="/sdapi/v1/txt2img"),vT.post(o,l,{headers:i}).then(g=>{var h,m;if(g.status===200&&((h=g==null?void 0:g.data)==null?void 0:h.images)){const y=(m=g==null?void 0:g.data)==null?void 0:m.images[0];r("data:image/png;base64,"+y)}}).catch(g=>{a(g)})})}};let Jr=null;const ol="history",Dc={init(t=ol){let e=window.indexedDB.open("ai-draw",1);return new Promise((n,r)=>{e.onerror=a=>{console.log("db init\u62A5\u9519"+a),r()},e.onsuccess=a=>{Jr=a.target.result,console.log("db init\u6210\u529F"),n()},e.onupgradeneeded=a=>{Jr=a.target.result,Jr.createObjectStore(t,{keyPath:"id"}),console.log("db onupgradeneeded \u6210\u529F"),n()}})},isConnected(t=ol){return Jr!=null},set(t=ol,e,n=100){let r=Jr.transaction(t,"readwrite").objectStore(t).add({id:n,data:e});return new Promise((a,l)=>{r.onsuccess=i=>{console.info("\u6DFB\u52A0\u6210\u529F",i),a(i)},r.onerror=i=>{console.info("\u6DFB\u52A0\u5931\u8D25"),l(i)}})},put(t=ol,e,n=100){let r=Jr.transaction(t,"readwrite").objectStore(t).put({id:n,data:e});return new Promise((a,l)=>{r.onsuccess=i=>{console.info("\u6DFB\u52A0\u6210\u529F",i),a(i)},r.onerror=i=>{console.info("\u6DFB\u52A0\u5931\u8D25"),l(i)}})},getAll(t=ol){let e=Jr.transaction(t,"readwrite").objectStore(t).index("key").getAll();return console.info("\u5F00\u6C34\u83B7\u53D6\u5168\u90E8"),new Promise((n,r)=>{e.onsuccess=a=>{console.info("\u83B7\u53D6\u6210\u529F"),n(e.result)},e.onerror=a=>{console.info("\u83B7\u53D6\u5931\u8D25"),r(a)}})},get(t=ol,e=100){let n=Jr.transaction(t,"readwrite").objectStore(t).get(e);return console.info("\u83B7\u53D6"),new Promise((r,a)=>{n.onsuccess=l=>{console.info("\u83B7\u53D6\u6210\u529F"),r(n.result)},n.onerror=l=>{console.info("\u83B7\u53D6\u5931\u8D25"),a(l)}})},del(t=ol,e=100){let n=Jr.transaction(t,"readwrite").objectStore(t).delete(e);return console.info("\u5F00\u59CB\u5220\u9664"),new Promise((r,a)=>{n.onsuccess=l=>{console.info("\u5220\u9664\u6210\u529F"),r(n.result)},n.onerror=l=>{console.info("\u5220\u9664\u5931\u8D25"),a(l)}})}},iue={getPods(){return new Promise(function(t,e){const n={pageNum:1,pageSize:10,total:0,isDelete:0},r={"content-type":"application/json"};let a="https://inscode-api.csdn.net/api/v2/resource/pagekey/ipod/kppod_self";vT.post(a,n,{headers:r}).then(l=>{var i,o;debugger;if(l.status===200&&((i=l==null?void 0:l.data)==null?void 0:i.images)){const u=(o=l==null?void 0:l.data)==null?void 0:o.images[0];t("data:image/png;base64,"+u)}}).catch(l=>{e(l)})})}},oue="/loading.gif";const uue=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},cue={name:"LlmApp",components:{},data(){return{id:0,name:"\u52A0\u8F7D\u4E2D...",userAvatarList:[],robotAvatarList:[],mode:"draw",modeImage:"image",message:[],client:null,indexClient:null,prompt:"",config:{},sdServerType:"common",sdServerTypeOptions:[{label:"\u516C\u5171\u670D\u52A1\u5668",value:"common"},{label:"\u79C1\u6709\u670D\u52A1\u5668",value:"private"}],sdServerUrl:"",loading:!1,maxHistory:200,speaking:!1,autoSpeech:!1,speech:null,options:[{content:"\u7ED8\u56FE\u6A21\u5F0F",value:"draw"},{content:"\u804A\u5929\u6A21\u5F0F",value:"chat"},{content:"\u81EA\u52A8\u6A21\u5F0F",value:"auto"}],showProfileSetting:!1,width:512,height:512,steps:20,sampler:"DPM++ SDE Karras",showMoreSetting:!0,default_prompt:"1girl, (ulzzang-6500:0.7), kpop idol, yae miko,
detached sleeves, bare shoulders, pink hair, long hair, cleavage,japanese clothes,breast,best quality, (painting:1.5), (hair ornament:1.35), jewelry, purple eyes, earrings, breasts, torii, cherry blossoms, lantern light, depth of field, detailed face, face focus, ribbon_trim, (looking at viewer:1.25), nontraditional miko, shiny skin, long sleeves, smile, thick lips, game cg, east asian architecture, (blurry background:1.2), sitting, upper body <lora:YaeMiko_Test:0.45>,<lora:mix4:0.5>",negative_prompt:"nfsw, bright lantern, brightness, (nipples:1.2), pussy, EasyNegative, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers, fewer fingers, strange fingers, bad hand, bare thighs,hand,bad finger",history:{name:"ai",key:"history"}}},methods:{hideLeftMenu(){},changeUserAvatar(t){this.config.user_img=t},changeRobotAvatar(t){this.config.robot_img=t},getAvatar(){let t=this;DataServe.find("t_llm_rep_chat_img",{resoure_sub_type:"user_avatar"}).then(e=>{if(e&&e.status===200&&e.data&&e.data.code===200&&e.data.data){const n=e.data.data;for(let r of n)t.userAvatarList.push({src:JSON.parse(r.ext).img_src,name:r.name})}}),DataServe.find("t_llm_rep_chat_img",{resoure_sub_type:"robot_avatar"}).then(e=>{if(e&&e.status===200&&e.data&&e.data.code===200&&e.data.data){const n=e.data.data;for(let r of n)t.robotAvatarList.push({src:JSON.parse(r.ext).img_src,name:r.name})}})},initAIClient(){this.client=new zie(this.config)},initIndexClient(){var t,e;if((t=this.config)!=null&&t.index_url){const n=(e=this.config)==null?void 0:e.index_type;n==="es"?this.indexClient=new RepEs(this.config):n==="confluence"?this.indexClient=new RepConfluence(this.config):this.indexClient=new RepSimple(this.config)}},query(){if(this.loading){MessagePlugin.warning({content:"\u6B63\u5728\u6267\u884C\u4E2D\uFF0C\u8BF7\u7A0D\u7B49!",placement:"center"});return}if(this.prompt===""){MessagePlugin.warning({content:"\u63D0\u793A\u8BCD\u4E0D\u80FD\u4E3A\u7A7A\uFF01",placement:"center"}),console.info("\u63D0\u793A\u8BCD\u4E0D\u80FD\u4E3A\u7A7A");return}this.mode==="draw"?this.draw():this.getAnswer()},scrollBottom(){const t=this;this.$nextTick(()=>{t.$refs.messageList.scrollTop=t.$refs.messageList.scrollHeight+20})},draw(){this.loading=!0;const t={user:"AI",message:"",img:null,viewMode:"image"},e=this.prompt,n=this.negative_prompt,r=this,a=this.message,l="prompt: <br/>"+this.prompt+(n?"<br/><br/>negative_prompt: </br>"+n:"")+"<br/><br/>width: "+this.width+" height: "+this.height+"<br/>steps: "+this.steps+"<br/>sampler: "+this.sampler;a.push({user:"User",message:l}),a.push(t),this.scrollBottom();const i=JSON.parse(JSON.stringify(this.config));i.width=this.width,i.height=this.height,i.steps=this.steps,i.sampler=this.sampler,i.sd_api=this.sdServerUrl,lue.draw(i,e,n).then(o=>{r.loading=!1,console.info("close"),t.img=o,a.splice(a.length-1,1),a.push(t),r.scrollBottom(),r.saveHistory()}).catch(o=>{r.loading=!1})},getAnswer(t){this.loading=!0;const e=this,n=this.message,r={user:"AI",message:""};n.push({user:"User",message:this.prompt}),n.push(r),e.$refs.messageList.scrollTop=e.$refs.messageList.scrollHeight;const a=this.prompt;console.info(this.prompt),console.info(a),this.prompt="",this.client.createCompletion(a,this.message,t,{onmessage:(l,i)=>{i?r.message+=l:r.message=l,n.splice(n.length-1,1),n.push(r),e.$refs.messageList.scrollTop=e.$refs.messageList.scrollHeight},onclose:()=>{e.loading=!1,e.saveHistory(),console.info("close"),e.autoSpeech&&e.speak()},onerror:l=>{debugger;e.loading=!1,console.info(l)}})},getAppInfo(){var e,n;const t=aS.getData().data;if(this.name=t.name,document.title=this.name,t.ext){const r=t.ext;this.config=r,r.default_prompt&&(this.prompt=r.default_prompt),(e=r==null?void 0:r.auto_speech)!=null&&e&&(this.autoSpeech=!0,this.initSpeaker()),(r==null?void 0:r.welcome_text)&&(r==null?void 0:r.welcome_text.length)>0&&this.message.length===0&&this.message.push({user:"AI",message:r.welcome_text}),this.showProfileSetting=(n=r==null?void 0:r.show_profile_setting)!=null?n:!1,this.initAIClient(),console.info(r)}},recoveryHistory(){Dc.get(this.history.name).then(t=>{t&&t.data&&(this.message=JSON.parse(t.data))})},saveHistory(){if(this.message.length>this.maxHistory){const t=[],e=this.message.length-this.maxHistory,n=this.message.length;for(let r=e;r<n;r++)t.push(this.message[r]);Dc.put(this.history.name,JSON.stringify(t))}else Dc.put(this.history.name,JSON.stringify(this.message))},cleanHistory(){this.message=[],this.saveHistory()},initSpeaker(){window.speechSynthesis.cancel(),this.speech=new SpeechSynthesisUtterance,this.speech.onend=()=>{console.log("\u8BED\u97F3\u64AD\u62A5\u7ED3\u675F"),this.speaking=!1}},speak(){this.speaking=!0;const t=this.message[this.message.length-1].message;t&&t.length>1&&(this.speech.text=t,console.info("speak "+t),window.speechSynthesis.speak(this.speech))},stop(){this.client.close()},copyAsPrompt(t){this.prompt=t},handleSDServerTypeChange(t){if(t==="common"){debugger;this.sdServerUrl=this.config.common_sd_api}this.saveConfig()},recoverConfig(){var e;debugger;const t=localStorage.getItem("ai-config");if(t){const n=JSON.parse(t);this.config=n,this.sdServerType=n.sdServerType,this.sdServerUrl=n.sdServerUrl,this.sdServerType=(e=n.sdServerType)!=null?e:"common";const r=aS.getData().data;this.name=r.name,document.title=this.name,r.ext&&r.ext.common_sd_api&&(this.config.common_sd_api=r.ext.common_sd_api,this.sdServerUrl=r.ext.common_sd_api)}else this.getAppInfo(),this.sdServerUrl=this.config.common_sd_api,this.sdServerType="common"},saveConfig(){const t=JSON.parse(JSON.stringify(this.config));t.sdServerType=this.sdServerType,t.sdServerUrl=this.sdServerUrl,t.sdServerType=this.sdServerType,localStorage.setItem("ai-config",JSON.stringify(t))},getPods(){iue.getPods().then(t=>{})}},mounted(){var t,e;this.id=(e=(t=this.$route)==null?void 0:t.params)==null?void 0:e.id,Dc.init(this.history.name).then(n=>{this.recoveryHistory()}),this.recoverConfig(),this.mode==="draw"&&(this.prompt=this.default_prompt)}},sue={class:"w-full h-screen"},vue={class:"w-full h-14 pt-2 border-b-2 shadow-2xl text-center fixed bg-slate-200"},fue=ht("a",{href:"#/llm-rep/app/"},[ht("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 absolute left-4 top-5"},[ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])],-1),due={class:"leading-10 font-bold"},hue=ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"},null,-1),gue=[hue],pue={class:"flex w-full h-full pt-14"},mue={class:"flex-none w-0 md:w-[260px] bg-slate-200 border-r-2 hidden md:block p-8 text-sm"},yue=ht("br",null,null,-1),bue={class:"flex-auto bg-slate-300 md:bg-slate-300 p-2 sm:p-8"},Cue={class:"w-full bg-slate-200 h-full m-auto relative container max-w-6xl rounded-xl"},Oue={class:"w-full h-full pb-24 p-4 overflow-y-auto overflow-x-hidden",ref:"messageList"},wue={class:"mb-8"},_ue={key:0},Sue={class:"flex flex-row-reverse"},Pue=["onClick","innerHTML"],xue={key:1,class:"flex"},Eue={class:"bg-slate-50 text-gray-700 p-4 mx-2 w-fit max-w-2xl 2xl:max-w-4xl rounded-lg text-wrapper"},Due=["src"],Tue={key:1,src:oue,class:"w-[512px]"},kue={key:0,class:"text-center"},jue=ht("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"animate-spin w-4 h-4 inline-block"},[ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"})],-1),Iue=ht("span",{class:"ml-2 text-[12px]"},"\u505C\u6B62",-1),$ue=[jue,Iue],Aue={class:"w-full absolute bottom-0 bg-slate-100 h-22 py-2 px-2 rounded flex flex-col text-sm"},Fue={class:"w-full h-10 flex"},Mue=ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"},null,-1),Nue=[Mue],Rue={key:0,class:"w-full h-10 mt-2 flex gap-2"},Lue={class:"flex-none w-40 ring-0 outline-0 pl-2 h-10 flex justify-between"},Bue=ht("span",{class:"h-10 leading-10"},"*",-1);function Vue(t,e,n,r,a,l){var S;const i=yn("t-option"),o=yn("t-select"),u=yn("t-form-item"),c=yn("t-textarea"),s=yn("t-form"),v=yn("t-link"),f=yn("t-tooltip"),d=yn("t-card"),g=yn("t-image"),h=yn("t-space"),m=yn("t-input"),y=yn("t-icon"),b=yn("t-button"),C=yn("t-dropdown");return Ft(),sn("div",sue,[ht("div",vue,[fue,ht("span",due,$u(a.name)+" "+$u(((S=a.config)==null?void 0:S.mode)==="completions"?"\uFF08\u65E0\u4E0A\u4E0B\u6587\uFF09":""),1),(Ft(),sn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 absolute right-4 top-5 cursor-pointer",onClick:e[0]||(e[0]=(...D)=>l.cleanHistory&&l.cleanHistory(...D))},gue))]),ht("div",pue,[ht("div",mue,[p(s,{labelAlign:"top"},{default:tn(()=>[p(u,{label:"StableDiffusion\u670D\u52A1\u5668\u7C7B\u578B",name:"sdServerType"},{default:tn(()=>[p(o,{modelValue:a.sdServerType,"onUpdate:modelValue":e[1]||(e[1]=D=>a.sdServerType=D),onChange:l.handleSDServerTypeChange,class:"bg-gray-200",style:{background:"#ccc","font-size":"12px"}},{default:tn(()=>[(Ft(!0),sn(at,null,Bu(a.sdServerTypeOptions,(D,A)=>(Ft(),ul(i,{key:A,value:D.value,label:D.label},{default:tn(()=>[aa($u(D.label),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),p(u,{label:"\u670D\u52A1\u5668\u5730\u5740",name:"sdServerUrl"},{default:tn(()=>[p(c,{placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9",modelValue:a.sdServerUrl,"onUpdate:modelValue":e[2]||(e[2]=D=>a.sdServerUrl=D),autosize:!0,onChange:l.saveConfig},null,8,["modelValue","onChange"])]),_:1})]),_:1}),a.sdServerType==="common"?(Ft(),ul(d,{key:0,class:"bg-orange-100 mt-8 text-gray-600 text-sm"},{default:tn(()=>[aa(" \u516C\u5171\u670D\u52A1\u5668\u4E3A\u4E34\u65F6\u63D0\u4F9B\u7684\u6D4B\u8BD5\u670D\u52A1\u5668\uFF0C\u53EF\u80FD\u5B58\u5728\u9700\u8981\u6392\u961F\u6216\u968F\u65F6\u4E0B\u7EBF\u7684\u53EF\u80FD\u3002"),yue,aa(" \u5EFA\u8BAE\u4F7F\u7528 "),p(f,{content:"\u8D2D\u4E70\u540E\u4E0A\u9762\u670D\u52A1\u5668\u5730\u5740\u586B\u5199 \u5DE5\u4F5C\u53F0-Stable Diffusion WebUI\u57DF\u540D\u5373\u53EF",theme:"primary"},{default:tn(()=>[p(v,{href:"https://inscode.csdn.net/gpu?utm_source=sd_app",target:"_blank","suffix-icon":t.renderSuffixIcon,underline:""},{default:tn(()=>[aa("\u79C1\u6709\u670D\u52A1\u5668")]),_:1},8,["suffix-icon"])]),_:1})]),_:1})):Xa("",!0),p(s,{labelAlign:"top","label-width":"100",style:$s({display:a.showProfileSetting?"block":"none"})},{default:tn(()=>[p(u,{label:"\u673A\u5668\u4EBA\u5934\u50CF"},{default:tn(()=>[(Ft(!0),sn(at,null,Bu(a.robotAvatarList,D=>(Ft(),ul(h,{direction:"vertical",align:"center",class:"mr-2 cursor-pointer hover:bg-blue-600"},{default:tn(()=>[p(g,{class:Yo(["rounded-lg border-2",{"border-blue-800":D.src===a.config.robot_img}]),onClick:A=>l.changeRobotAvatar(D.src),src:D.src,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["class","onClick","src"])]),_:2},1024))),256))]),_:1}),p(u,{label:"\u4F60\u7684\u5934\u50CF"},{default:tn(()=>[(Ft(!0),sn(at,null,Bu(a.userAvatarList,D=>(Ft(),ul(h,{direction:"vertical",align:"center",class:"mr-2 cursor-pointer hover:bg-blue-600"},{default:tn(()=>[p(g,{class:Yo(["rounded-lg border-2",{"border-blue-800":D.src===a.config.user_img}]),onClick:A=>l.changeUserAvatar(D.src),src:D.src,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["class","onClick","src"])]),_:2},1024))),256))]),_:1}),p(u,{label:"\u673A\u5668\u4EBA\u5BF9\u4F60\u7684\u79F0\u547C",help:"\u591A\u4E2A\u79F0\u547C\u7528\u9017\u53F7\u9694\u5F00"},{default:tn(()=>[p(m,{modelValue:a.config.user_call_name,"onUpdate:modelValue":e[3]||(e[3]=D=>a.config.user_call_name=D)},null,8,["modelValue"])]),_:1})]),_:1},8,["style"])]),ht("div",bue,[ht("div",Cue,[ht("div",Oue,[(Ft(!0),sn(at,null,Bu(a.message,D=>{var A;return Ft(),sn("div",wue,[D.user==="User"?(Ft(),sn("div",_ue,[ht("div",Sue,[a.config.user_img?(Ft(),ul(g,{key:0,class:"rounded-lg",src:a.config.user_img,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["src"])):Xa("",!0),ht("div",{class:"bg-green-400 text-gray-700 p-4 mx-2 w-fit max-w-2xl 2xl:max-w-4xl rounded-lg cursor-pointer",onClick:I=>l.copyAsPrompt(D.message),innerHTML:D.message},null,8,Pue)])])):(Ft(),sn("div",xue,[a.config.robot_img?(Ft(),ul(g,{key:0,class:"rounded-lg",src:a.config.robot_img,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["src"])):Xa("",!0),ht("div",Eue,[(A=D==null?void 0:D.viewMode)!=null&&A?(Ft(),sn(at,{key:0},[D.img?(Ft(),sn("img",{key:0,src:D.img},null,8,Due)):(Ft(),sn("img",Tue))],64)):Xa("",!0),ht("template",null,[aa($u(D.message?D.message:"..."),1)])])]))])}),256)),a.mode!=="draw"?(Ft(),sn("div",kue,[a.loading?(Ft(),sn("div",{key:0,onClick:e[4]||(e[4]=(...D)=>l.stop&&l.stop(...D)),class:"-mt-4 px-5 py-1 m-auto w-fit cursor-pointer hover:bg-slate-300 border-dotted border-[1px] border-slate-400 rounded-md"},$ue)):Xa("",!0)])):Xa("",!0)],512),ht("div",Aue,[ht("div",Fue,[mn(ht("input",{"onUpdate:modelValue":e[5]||(e[5]=D=>a.prompt=D),class:"flex-auto ring-0 outline-0 pl-2 bg-slate-200 h-10",onKeyup:e[6]||(e[6]=kp((...D)=>l.query&&l.query(...D),["enter"])),placeholder:"\u63D0\u793A\u8BCD"},null,544),[[Ml,a.prompt]]),p(C,{options:a.options,onClick:t.clickHandler,class:"ml-4 mt-1"},{default:tn(()=>[p(b,{theme:"default",variant:"text",shape:"square"},{default:tn(()=>[p(y,{name:a.modeImage,size:"24",class:"w-6 h-6 text-cyan-800 font-bold hover:text-cyan-600 cursor-pointer"},null,8,["name"])]),_:1})]),_:1},8,["options","onClick"]),(Ft(),sn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 mx-2 ml-4 mt-2 h-6 flex-none text-cyan-800 font-bold hover:text-cyan-600 cursor-pointer",onClick:e[7]||(e[7]=(...D)=>l.query&&l.query(...D))},Nue))]),a.mode==="draw"?(Ft(),sn("div",Rue,[mn(ht("input",{"onUpdate:modelValue":e[8]||(e[8]=D=>a.negative_prompt=D),class:"flex-auto ring-0 outline-0 pl-2 bg-slate-200 h-10",onKeyup:e[9]||(e[9]=kp((...D)=>l.query&&l.query(...D),["enter"])),placeholder:"\u9006\u5411\u63D0\u793A\u8BCD"},null,544),[[Ml,a.negative_prompt]]),ht("div",Lue,[mn(ht("input",{"onUpdate:modelValue":e[10]||(e[10]=D=>a.width=D),class:"ring-0 outline-0 pl-2 bg-slate-200 h-10 w-16",placeholder:"width"},null,512),[[Ml,a.width]]),Bue,mn(ht("input",{"onUpdate:modelValue":e[11]||(e[11]=D=>a.height=D),class:"ring-0 outline-0 pl-2 bg-slate-200 h-10 w-16",placeholder:"height"},null,512),[[Ml,a.height]])]),mn(ht("input",{"onUpdate:modelValue":e[12]||(e[12]=D=>a.steps=D),class:"flex-none w-30 ring-0 outline-0 pl-2 bg-slate-200 h-10 w-16",placeholder:"steps
"},null,512),[[Ml,a.steps]]),mn(ht("input",{"onUpdate:modelValue":e[13]||(e[13]=D=>a.sampler=D),class:"flex-none w-40 ring-0 outline-0 pl-2 bg-slate-200 h-10 w-16 text-small",placeholder:"sampler"},null,512),[[Ml,a.sampler]])])):Xa("",!0)])])])])])}const zue=uue(cue,[["render",Vue]]);const fT=hu(zue);fT.use(Iie);fT.mount("#app");
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(a=>r.set(a)),r}static accessor(e){const r=(this[sS]=this[sS]={accessors:{}}).accessors,a=this.prototype;function l(i){const o=Oo(i);r[o]||(Hoe(a,i),r[o]=!0)}return we.isArray(e)?e.forEach(l):l(e),this}}jv.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.freezeMethods(jv.prototype);we.freezeMethods(jv);const ua=jv;function Mf(t,e){const n=this||zg,r=e||n,a=ua.from(r.headers);let l=r.data;return we.forEach(t,function(o){l=o.call(n,l,a.normalize(),e?e.status:void 0)}),a.normalize(),l}function oT(t){return!!(t&&t.__CANCEL__)}function Iu(t,e,n){pt.call(this,t==null?"canceled":t,pt.ERR_CANCELED,e,n),this.name="CanceledError"}we.inherits(Iu,pt,{__CANCEL__:!0});function Koe(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new pt("Request failed with status code "+n.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Woe=$r.isStandardBrowserEnv?function(){return{write:function(n,r,a,l,i,o){const u=[];u.push(n+"="+encodeURIComponent(r)),we.isNumber(a)&&u.push("expires="+new Date(a).toGMTString()),we.isString(l)&&u.push("path="+l),we.isString(i)&&u.push("domain="+i),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Uoe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Yoe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function uT(t,e){return t&&!Uoe(e)?Yoe(t,e):e}const qoe=$r.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function a(l){let i=l;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(i){const o=we.isString(i)?a(i):i;return o.protocol===r.protocol&&o.host===r.host}}():function(){return function(){return!0}}();function Goe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Xoe(t,e){t=t||10;const n=new Array(t),r=new Array(t);let a=0,l=0,i;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),s=r[l];i||(i=c),n[a]=u,r[a]=c;let v=l,f=0;for(;v!==a;)f+=n[v++],v=v%t;if(a=(a+1)%t,a===l&&(l=(l+1)%t),c-i<e)return;const d=s&&c-s;return d?Math.round(f*1e3/d):void 0}}function vS(t,e){let n=0;const r=Xoe(50,250);return a=>{const l=a.loaded,i=a.lengthComputable?a.total:void 0,o=l-n,u=r(o),c=l<=i;n=l;const s={loaded:l,total:i,progress:i?l/i:void 0,bytes:o,rate:u||void 0,estimated:u&&i&&c?(i-l)/u:void 0,event:a};s[e?"download":"upload"]=!0,t(s)}}const Joe=typeof XMLHttpRequest<"u",Zoe=Joe&&function(t){return new Promise(function(n,r){let a=t.data;const l=ua.from(t.headers).normalize(),i=t.responseType;let o;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}we.isFormData(a)&&($r.isStandardBrowserEnv||$r.isStandardBrowserWebWorkerEnv?l.setContentType(!1):l.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const d=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";l.set("Authorization","Basic "+btoa(d+":"+g))}const s=uT(t.baseURL,t.url);c.open(t.method.toUpperCase(),aT(s,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function v(){if(!c)return;const d=ua.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),h={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:d,config:t,request:c};Koe(function(y){n(y),u()},function(y){r(y),u()},h),c=null}if("onloadend"in c?c.onloadend=v:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(v)},c.onabort=function(){!c||(r(new pt("Request aborted",pt.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new pt("Network Error",pt.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let g=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const h=t.transitional||lT;t.timeoutErrorMessage&&(g=t.timeoutErrorMessage),r(new pt(g,h.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,t,c)),c=null},$r.isStandardBrowserEnv){const d=(t.withCredentials||qoe(s))&&t.xsrfCookieName&&Woe.read(t.xsrfCookieName);d&&l.set(t.xsrfHeaderName,d)}a===void 0&&l.setContentType(null),"setRequestHeader"in c&&we.forEach(l.toJSON(),function(g,h){c.setRequestHeader(h,g)}),we.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&i!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",vS(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",vS(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=d=>{!c||(r(!d||d.type?new Iu(null,t,c):d),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=Goe(s);if(f&&$r.protocols.indexOf(f)===-1){r(new pt("Unsupported protocol "+f+":",pt.ERR_BAD_REQUEST,t));return}c.send(a||null)})},Gc={http:_oe,xhr:Zoe};we.forEach(Gc,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Qoe={getAdapter:t=>{t=we.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let a=0;a<e&&(n=t[a],!(r=we.isString(n)?Gc[n.toLowerCase()]:n));a++);if(!r)throw r===!1?new pt(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(we.hasOwnProp(Gc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!we.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Gc};function Nf(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Iu(null,t)}function fS(t){return Nf(t),t.headers=ua.from(t.headers),t.data=Mf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Qoe.getAdapter(t.adapter||zg.adapter)(t).then(function(r){return Nf(t),r.data=Mf.call(t,t.transformResponse,r),r.headers=ua.from(r.headers),r},function(r){return oT(r)||(Nf(t),r&&r.response&&(r.response.data=Mf.call(t,t.transformResponse,r.response),r.response.headers=ua.from(r.response.headers))),Promise.reject(r)})}const dS=t=>t instanceof ua?t.toJSON():t;function Ai(t,e){e=e||{};const n={};function r(c,s,v){return we.isPlainObject(c)&&we.isPlainObject(s)?we.merge.call({caseless:v},c,s):we.isPlainObject(s)?we.merge({},s):we.isArray(s)?s.slice():s}function a(c,s,v){if(we.isUndefined(s)){if(!we.isUndefined(c))return r(void 0,c,v)}else return r(c,s,v)}function l(c,s){if(!we.isUndefined(s))return r(void 0,s)}function i(c,s){if(we.isUndefined(s)){if(!we.isUndefined(c))return r(void 0,c)}else return r(void 0,s)}function o(c,s,v){if(v in e)return r(c,s);if(v in t)return r(void 0,c)}const u={url:l,method:l,data:l,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:o,headers:(c,s)=>a(dS(c),dS(s),!0)};return we.forEach(Object.keys(Object.assign({},t,e)),function(s){const v=u[s]||a,f=v(t[s],e[s],s);we.isUndefined(f)&&v!==o||(n[s]=f)}),n}const cT="1.4.0",Hg={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Hg[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const hS={};Hg.transitional=function(e,n,r){function a(l,i){return"[Axios v"+cT+"] Transitional option '"+l+"'"+i+(r?". "+r:"")}return(l,i,o)=>{if(e===!1)throw new pt(a(i," has been removed"+(n?" in "+n:"")),pt.ERR_DEPRECATED);return n&&!hS[i]&&(hS[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,i,o):!0}};function eue(t,e,n){if(typeof t!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let a=r.length;for(;a-- >0;){const l=r[a],i=e[l];if(i){const o=t[l],u=o===void 0||i(o,l,t);if(u!==!0)throw new pt("option "+l+" must be "+u,pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pt("Unknown option "+l,pt.ERR_BAD_OPTION)}}const ih={assertOptions:eue,validators:Hg},Pa=ih.validators;class Ds{constructor(e){this.defaults=e,this.interceptors={request:new cS,response:new cS}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ai(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:l}=n;r!==void 0&&ih.assertOptions(r,{silentJSONParsing:Pa.transitional(Pa.boolean),forcedJSONParsing:Pa.transitional(Pa.boolean),clarifyTimeoutError:Pa.transitional(Pa.boolean)},!1),a!=null&&(we.isFunction(a)?n.paramsSerializer={serialize:a}:ih.assertOptions(a,{encode:Pa.function,serialize:Pa.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=l&&we.merge(l.common,l[n.method]),i&&we.forEach(["delete","get","head","post","put","patch","common"],g=>{delete l[g]}),n.headers=ua.concat(i,l);const o=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let s,v=0,f;if(!u){const g=[fS.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,c),f=g.length,s=Promise.resolve(n);v<f;)s=s.then(g[v++],g[v++]);return s}f=o.length;let d=n;for(v=0;v<f;){const g=o[v++],h=o[v++];try{d=g(d)}catch(m){h.call(this,m);break}}try{s=fS.call(this,d)}catch(g){return Promise.reject(g)}for(v=0,f=c.length;v<f;)s=s.then(c[v++],c[v++]);return s}getUri(e){e=Ai(this.defaults,e);const n=uT(e.baseURL,e.url);return aT(n,e.params,e.paramsSerializer)}}we.forEach(["delete","get","head","options"],function(e){Ds.prototype[e]=function(n,r){return this.request(Ai(r||{},{method:e,url:n,data:(r||{}).data}))}});we.forEach(["post","put","patch"],function(e){function n(r){return function(l,i,o){return this.request(Ai(o||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:i}))}}Ds.prototype[e]=n(),Ds.prototype[e+"Form"]=n(!0)});const Xc=Ds;class Kg{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(a=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](a);r._listeners=null}),this.promise.then=a=>{let l;const i=new Promise(o=>{r.subscribe(o),l=o}).then(a);return i.cancel=function(){r.unsubscribe(l)},i},e(function(l,i,o){r.reason||(r.reason=new Iu(l,i,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Kg(function(a){e=a}),cancel:e}}}const tue=Kg;function nue(t){return function(n){return t.apply(null,n)}}function rue(t){return we.isObject(t)&&t.isAxiosError===!0}const oh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oh).forEach(([t,e])=>{oh[e]=t});const aue=oh;function sT(t){const e=new Xc(t),n=UD(Xc.prototype.request,e);return we.extend(n,Xc.prototype,e,{allOwnKeys:!0}),we.extend(n,e,null,{allOwnKeys:!0}),n.create=function(a){return sT(Ai(t,a))},n}const Xt=sT(zg);Xt.Axios=Xc;Xt.CanceledError=Iu;Xt.CancelToken=tue;Xt.isCancel=oT;Xt.VERSION=cT;Xt.toFormData=Tv;Xt.AxiosError=pt;Xt.Cancel=Xt.CanceledError;Xt.all=function(e){return Promise.all(e)};Xt.spread=nue;Xt.isAxiosError=rue;Xt.mergeConfig=Ai;Xt.AxiosHeaders=ua;Xt.formToJSON=t=>iT(we.isHTMLForm(t)?new FormData(t):t);Xt.HttpStatusCode=aue;Xt.default=Xt;const vT=Xt,lue={draw(t,e,n){return new Promise(function(r,a){var u,c,s,v,f,d;const l={prompt:e,steps:(u=t==null?void 0:t.steps)!=null?u:20,negative_prompt:n!=null?n:"nsfw",width:(c=t==null?void 0:t.width)!=null?c:512,height:(s=t==null?void 0:t.height)!=null?s:512,cfg_scale:(v=t==null?void 0:t.cfg_scale)!=null?v:6,seed:(f=t==null?void 0:t.seed)!=null?f:-1,sampler_name:(d=t==null?void 0:t.sampler_name)!=null?d:"DPM++ SDE Karras"},i={"content-type":"application/json"};let o=t==null?void 0:t.sd_api;o.indexOf("/sd")===-1&&(o+="/sdapi/v1/txt2img"),vT.post(o,l,{headers:i}).then(g=>{var h,m;if(g.status===200&&((h=g==null?void 0:g.data)==null?void 0:h.images)){const y=(m=g==null?void 0:g.data)==null?void 0:m.images[0];r("data:image/png;base64,"+y)}}).catch(g=>{a(g)})})}};let Jr=null;const ol="history",Dc={init(t=ol){let e=window.indexedDB.open("ai-draw",1);return new Promise((n,r)=>{e.onerror=a=>{console.log("db init\u62A5\u9519"+a),r()},e.onsuccess=a=>{Jr=a.target.result,console.log("db init\u6210\u529F"),n()},e.onupgradeneeded=a=>{Jr=a.target.result,Jr.createObjectStore(t,{keyPath:"id"}),console.log("db onupgradeneeded \u6210\u529F"),n()}})},isConnected(t=ol){return Jr!=null},set(t=ol,e,n=100){let r=Jr.transaction(t,"readwrite").objectStore(t).add({id:n,data:e});return new Promise((a,l)=>{r.onsuccess=i=>{console.info("\u6DFB\u52A0\u6210\u529F",i),a(i)},r.onerror=i=>{console.info("\u6DFB\u52A0\u5931\u8D25"),l(i)}})},put(t=ol,e,n=100){let r=Jr.transaction(t,"readwrite").objectStore(t).put({id:n,data:e});return new Promise((a,l)=>{r.onsuccess=i=>{console.info("\u6DFB\u52A0\u6210\u529F",i),a(i)},r.onerror=i=>{console.info("\u6DFB\u52A0\u5931\u8D25"),l(i)}})},getAll(t=ol){let e=Jr.transaction(t,"readwrite").objectStore(t).index("key").getAll();return console.info("\u5F00\u6C34\u83B7\u53D6\u5168\u90E8"),new Promise((n,r)=>{e.onsuccess=a=>{console.info("\u83B7\u53D6\u6210\u529F"),n(e.result)},e.onerror=a=>{console.info("\u83B7\u53D6\u5931\u8D25"),r(a)}})},get(t=ol,e=100){let n=Jr.transaction(t,"readwrite").objectStore(t).get(e);return console.info("\u83B7\u53D6"),new Promise((r,a)=>{n.onsuccess=l=>{console.info("\u83B7\u53D6\u6210\u529F"),r(n.result)},n.onerror=l=>{console.info("\u83B7\u53D6\u5931\u8D25"),a(l)}})},del(t=ol,e=100){let n=Jr.transaction(t,"readwrite").objectStore(t).delete(e);return console.info("\u5F00\u59CB\u5220\u9664"),new Promise((r,a)=>{n.onsuccess=l=>{console.info("\u5220\u9664\u6210\u529F"),r(n.result)},n.onerror=l=>{console.info("\u5220\u9664\u5931\u8D25"),a(l)}})}},iue={getPods(){return new Promise(function(t,e){const n={pageNum:1,pageSize:10,total:0,isDelete:0},r={"content-type":"application/json"};let a="https://inscode-api.csdn.net/api/v2/resource/pagekey/ipod/kppod_self";vT.post(a,n,{headers:r}).then(l=>{var i,o;debugger;if(l.status===200&&((i=l==null?void 0:l.data)==null?void 0:i.images)){const u=(o=l==null?void 0:l.data)==null?void 0:o.images[0];t("data:image/png;base64,"+u)}}).catch(l=>{e(l)})})}},oue="/loading.gif";const uue=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},cue={name:"LlmApp",components:{},data(){return{id:0,name:"\u52A0\u8F7D\u4E2D...",userAvatarList:[],robotAvatarList:[],mode:"draw",modeImage:"image",message:[],client:null,indexClient:null,prompt:"",config:{},sdServerType:"common",sdServerTypeOptions:[{label:"\u516C\u5171\u670D\u52A1\u5668",value:"common"},{label:"\u79C1\u6709\u670D\u52A1\u5668",value:"private"}],sdServerUrl:"",loading:!1,maxHistory:200,speaking:!1,autoSpeech:!1,speech:null,options:[{content:"\u7ED8\u56FE\u6A21\u5F0F",value:"draw"},{content:"\u804A\u5929\u6A21\u5F0F",value:"chat"},{content:"\u81EA\u52A8\u6A21\u5F0F",value:"auto"}],showProfileSetting:!1,width:512,height:512,steps:20,sampler:"DPM++ SDE Karras",showMoreSetting:!0,default_prompt:"1girl, (ulzzang-6500:0.7), kpop idol, yae miko,
pink hair, long hair,best quality, (painting:1.5), (hair ornament:1.35), jewelry, purple eyes, cherry blossoms, lantern light, depth of field, detailed face, face focus, ribbon_trim, (looking at viewer:1.25), nontraditional miko, shiny skin, long sleeves, smile, thick lips, game cg, (blurry background:1.2), sitting, upper body <lora:YaeMiko_Test:0.45>,<lora:mix4:0.5>",negative_prompt:"nfsw, bright lantern, brightness, (nipples:1.2), pussy, EasyNegative, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers, fewer fingers, strange fingers, bad hand, bare thighs,hand,bad finger",history:{name:"ai",key:"history"}}},methods:{hideLeftMenu(){},changeUserAvatar(t){this.config.user_img=t},changeRobotAvatar(t){this.config.robot_img=t},getAvatar(){let t=this;DataServe.find("t_llm_rep_chat_img",{resoure_sub_type:"user_avatar"}).then(e=>{if(e&&e.status===200&&e.data&&e.data.code===200&&e.data.data){const n=e.data.data;for(let r of n)t.userAvatarList.push({src:JSON.parse(r.ext).img_src,name:r.name})}}),DataServe.find("t_llm_rep_chat_img",{resoure_sub_type:"robot_avatar"}).then(e=>{if(e&&e.status===200&&e.data&&e.data.code===200&&e.data.data){const n=e.data.data;for(let r of n)t.robotAvatarList.push({src:JSON.parse(r.ext).img_src,name:r.name})}})},initAIClient(){this.client=new zie(this.config)},initIndexClient(){var t,e;if((t=this.config)!=null&&t.index_url){const n=(e=this.config)==null?void 0:e.index_type;n==="es"?this.indexClient=new RepEs(this.config):n==="confluence"?this.indexClient=new RepConfluence(this.config):this.indexClient=new RepSimple(this.config)}},query(){if(this.loading){MessagePlugin.warning({content:"\u6B63\u5728\u6267\u884C\u4E2D\uFF0C\u8BF7\u7A0D\u7B49!",placement:"center"});return}if(this.prompt===""){MessagePlugin.warning({content:"\u63D0\u793A\u8BCD\u4E0D\u80FD\u4E3A\u7A7A\uFF01",placement:"center"}),console.info("\u63D0\u793A\u8BCD\u4E0D\u80FD\u4E3A\u7A7A");return}this.mode==="draw"?this.draw():this.getAnswer()},scrollBottom(){const t=this;this.$nextTick(()=>{t.$refs.messageList.scrollTop=t.$refs.messageList.scrollHeight+20})},draw(){this.loading=!0;const t={user:"AI",message:"",img:null,viewMode:"image"},e=this.prompt,n=this.negative_prompt,r=this,a=this.message,l="prompt: <br/>"+this.prompt+(n?"<br/><br/>negative_prompt: </br>"+n:"")+"<br/><br/>width: "+this.width+" height: "+this.height+"<br/>steps: "+this.steps+"<br/>sampler: "+this.sampler;a.push({user:"User",message:l}),a.push(t),this.scrollBottom();const i=JSON.parse(JSON.stringify(this.config));i.width=this.width,i.height=this.height,i.steps=this.steps,i.sampler=this.sampler,i.sd_api=this.sdServerUrl,lue.draw(i,e,n).then(o=>{r.loading=!1,console.info("close"),t.img=o,a.splice(a.length-1,1),a.push(t),r.scrollBottom(),r.saveHistory()}).catch(o=>{r.loading=!1})},getAnswer(t){this.loading=!0;const e=this,n=this.message,r={user:"AI",message:""};n.push({user:"User",message:this.prompt}),n.push(r),e.$refs.messageList.scrollTop=e.$refs.messageList.scrollHeight;const a=this.prompt;console.info(this.prompt),console.info(a),this.prompt="",this.client.createCompletion(a,this.message,t,{onmessage:(l,i)=>{i?r.message+=l:r.message=l,n.splice(n.length-1,1),n.push(r),e.$refs.messageList.scrollTop=e.$refs.messageList.scrollHeight},onclose:()=>{e.loading=!1,e.saveHistory(),console.info("close"),e.autoSpeech&&e.speak()},onerror:l=>{debugger;e.loading=!1,console.info(l)}})},getAppInfo(){var e,n;const t=aS.getData().data;if(this.name=t.name,document.title=this.name,t.ext){const r=t.ext;this.config=r,r.default_prompt&&(this.prompt=r.default_prompt),(e=r==null?void 0:r.auto_speech)!=null&&e&&(this.autoSpeech=!0,this.initSpeaker()),(r==null?void 0:r.welcome_text)&&(r==null?void 0:r.welcome_text.length)>0&&this.message.length===0&&this.message.push({user:"AI",message:r.welcome_text}),this.showProfileSetting=(n=r==null?void 0:r.show_profile_setting)!=null?n:!1,this.initAIClient(),console.info(r)}},recoveryHistory(){Dc.get(this.history.name).then(t=>{t&&t.data&&(this.message=JSON.parse(t.data))})},saveHistory(){if(this.message.length>this.maxHistory){const t=[],e=this.message.length-this.maxHistory,n=this.message.length;for(let r=e;r<n;r++)t.push(this.message[r]);Dc.put(this.history.name,JSON.stringify(t))}else Dc.put(this.history.name,JSON.stringify(this.message))},cleanHistory(){this.message=[],this.saveHistory()},initSpeaker(){window.speechSynthesis.cancel(),this.speech=new SpeechSynthesisUtterance,this.speech.onend=()=>{console.log("\u8BED\u97F3\u64AD\u62A5\u7ED3\u675F"),this.speaking=!1}},speak(){this.speaking=!0;const t=this.message[this.message.length-1].message;t&&t.length>1&&(this.speech.text=t,console.info("speak "+t),window.speechSynthesis.speak(this.speech))},stop(){this.client.close()},copyAsPrompt(t){this.prompt=t},handleSDServerTypeChange(t){if(t==="common"){debugger;this.sdServerUrl=this.config.common_sd_api}this.saveConfig()},recoverConfig(){var e;debugger;const t=localStorage.getItem("ai-config");if(t){const n=JSON.parse(t);this.config=n,this.sdServerType=n.sdServerType,this.sdServerUrl=n.sdServerUrl,this.sdServerType=(e=n.sdServerType)!=null?e:"common";const r=aS.getData().data;this.name=r.name,document.title=this.name,r.ext&&r.ext.common_sd_api&&(this.config.common_sd_api=r.ext.common_sd_api,this.sdServerUrl=r.ext.common_sd_api)}else this.getAppInfo(),this.sdServerUrl=this.config.common_sd_api,this.sdServerType="common"},saveConfig(){const t=JSON.parse(JSON.stringify(this.config));t.sdServerType=this.sdServerType,t.sdServerUrl=this.sdServerUrl,t.sdServerType=this.sdServerType,localStorage.setItem("ai-config",JSON.stringify(t))},getPods(){iue.getPods().then(t=>{})}},mounted(){var t,e;this.id=(e=(t=this.$route)==null?void 0:t.params)==null?void 0:e.id,Dc.init(this.history.name).then(n=>{this.recoveryHistory()}),this.recoverConfig(),this.mode==="draw"&&(this.prompt=this.default_prompt),this.getPods()}},sue={class:"w-full h-screen"},vue={class:"w-full h-14 pt-2 border-b-2 shadow-2xl text-center fixed bg-slate-200"},fue=ht("a",{href:"#/llm-rep/app/"},[ht("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 absolute left-4 top-5"},[ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])],-1),due={class:"leading-10 font-bold"},hue=ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"},null,-1),gue=[hue],pue={class:"flex w-full h-full pt-14"},mue={class:"flex-none w-0 md:w-[260px] bg-slate-200 border-r-2 hidden md:block p-8 text-sm"},yue=ht("br",null,null,-1),bue={class:"flex-auto bg-slate-300 md:bg-slate-300 p-2 sm:p-8"},Cue={class:"w-full bg-slate-200 h-full m-auto relative container max-w-6xl rounded-xl"},Oue={class:"w-full h-full pb-24 p-4 overflow-y-auto overflow-x-hidden",ref:"messageList"},wue={class:"mb-8"},_ue={key:0},Sue={class:"flex flex-row-reverse"},Pue=["onClick","innerHTML"],xue={key:1,class:"flex"},Eue={class:"bg-slate-50 text-gray-700 p-4 mx-2 w-fit max-w-2xl 2xl:max-w-4xl rounded-lg text-wrapper"},Due=["src"],Tue={key:1,src:oue,class:"w-[512px]"},kue={key:0,class:"text-center"},jue=ht("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"animate-spin w-4 h-4 inline-block"},[ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"})],-1),Iue=ht("span",{class:"ml-2 text-[12px]"},"\u505C\u6B62",-1),$ue=[jue,Iue],Aue={class:"w-full absolute bottom-0 bg-slate-100 h-22 py-2 px-2 rounded flex flex-col text-sm"},Fue={class:"w-full h-10 flex"},Mue=ht("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"},null,-1),Nue=[Mue],Rue={key:0,class:"w-full h-10 mt-2 flex gap-2"},Lue={class:"flex-none w-40 ring-0 outline-0 pl-2 h-10 flex justify-between"},Bue=ht("span",{class:"h-10 leading-10"},"*",-1);function Vue(t,e,n,r,a,l){var S;const i=yn("t-option"),o=yn("t-select"),u=yn("t-form-item"),c=yn("t-textarea"),s=yn("t-form"),v=yn("t-link"),f=yn("t-tooltip"),d=yn("t-card"),g=yn("t-image"),h=yn("t-space"),m=yn("t-input"),y=yn("t-icon"),b=yn("t-button"),C=yn("t-dropdown");return Ft(),sn("div",sue,[ht("div",vue,[fue,ht("span",due,$u(a.name)+" "+$u(((S=a.config)==null?void 0:S.mode)==="completions"?"\uFF08\u65E0\u4E0A\u4E0B\u6587\uFF09":""),1),(Ft(),sn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 absolute right-4 top-5 cursor-pointer",onClick:e[0]||(e[0]=(...D)=>l.cleanHistory&&l.cleanHistory(...D))},gue))]),ht("div",pue,[ht("div",mue,[p(s,{labelAlign:"top"},{default:tn(()=>[p(u,{label:"StableDiffusion\u670D\u52A1\u5668\u7C7B\u578B",name:"sdServerType"},{default:tn(()=>[p(o,{modelValue:a.sdServerType,"onUpdate:modelValue":e[1]||(e[1]=D=>a.sdServerType=D),onChange:l.handleSDServerTypeChange,class:"bg-gray-200",style:{background:"#ccc","font-size":"12px"}},{default:tn(()=>[(Ft(!0),sn(at,null,Bu(a.sdServerTypeOptions,(D,A)=>(Ft(),ul(i,{key:A,value:D.value,label:D.label},{default:tn(()=>[aa($u(D.label),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),p(u,{label:"\u670D\u52A1\u5668\u5730\u5740",name:"sdServerUrl"},{default:tn(()=>[p(c,{placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9",modelValue:a.sdServerUrl,"onUpdate:modelValue":e[2]||(e[2]=D=>a.sdServerUrl=D),autosize:!0,onChange:l.saveConfig},null,8,["modelValue","onChange"])]),_:1})]),_:1}),a.sdServerType==="common"?(Ft(),ul(d,{key:0,class:"bg-orange-100 mt-8 text-gray-600 text-sm"},{default:tn(()=>[aa(" \u516C\u5171\u670D\u52A1\u5668\u4E3A\u4E34\u65F6\u63D0\u4F9B\u7684\u6D4B\u8BD5\u670D\u52A1\u5668\uFF0C\u53EF\u80FD\u5B58\u5728\u9700\u8981\u6392\u961F\u6216\u968F\u65F6\u4E0B\u7EBF\u7684\u53EF\u80FD\u3002"),yue,aa(" \u5EFA\u8BAE\u4F7F\u7528 "),p(f,{content:"\u8D2D\u4E70\u540E\u4E0A\u9762\u670D\u52A1\u5668\u5730\u5740\u586B\u5199 \u5DE5\u4F5C\u53F0-Stable Diffusion WebUI\u57DF\u540D\u5373\u53EF",theme:"primary"},{default:tn(()=>[p(v,{href:"https://inscode.csdn.net/gpu?utm_source=sd_app",target:"_blank","suffix-icon":t.renderSuffixIcon,underline:""},{default:tn(()=>[aa("\u79C1\u6709\u670D\u52A1\u5668")]),_:1},8,["suffix-icon"])]),_:1})]),_:1})):Xa("",!0),p(s,{labelAlign:"top","label-width":"100",style:$s({display:a.showProfileSetting?"block":"none"})},{default:tn(()=>[p(u,{label:"\u673A\u5668\u4EBA\u5934\u50CF"},{default:tn(()=>[(Ft(!0),sn(at,null,Bu(a.robotAvatarList,D=>(Ft(),ul(h,{direction:"vertical",align:"center",class:"mr-2 cursor-pointer hover:bg-blue-600"},{default:tn(()=>[p(g,{class:Yo(["rounded-lg border-2",{"border-blue-800":D.src===a.config.robot_img}]),onClick:A=>l.changeRobotAvatar(D.src),src:D.src,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["class","onClick","src"])]),_:2},1024))),256))]),_:1}),p(u,{label:"\u4F60\u7684\u5934\u50CF"},{default:tn(()=>[(Ft(!0),sn(at,null,Bu(a.userAvatarList,D=>(Ft(),ul(h,{direction:"vertical",align:"center",class:"mr-2 cursor-pointer hover:bg-blue-600"},{default:tn(()=>[p(g,{class:Yo(["rounded-lg border-2",{"border-blue-800":D.src===a.config.user_img}]),onClick:A=>l.changeUserAvatar(D.src),src:D.src,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["class","onClick","src"])]),_:2},1024))),256))]),_:1}),p(u,{label:"\u673A\u5668\u4EBA\u5BF9\u4F60\u7684\u79F0\u547C",help:"\u591A\u4E2A\u79F0\u547C\u7528\u9017\u53F7\u9694\u5F00"},{default:tn(()=>[p(m,{modelValue:a.config.user_call_name,"onUpdate:modelValue":e[3]||(e[3]=D=>a.config.user_call_name=D)},null,8,["modelValue"])]),_:1})]),_:1},8,["style"])]),ht("div",bue,[ht("div",Cue,[ht("div",Oue,[(Ft(!0),sn(at,null,Bu(a.message,D=>{var A;return Ft(),sn("div",wue,[D.user==="User"?(Ft(),sn("div",_ue,[ht("div",Sue,[a.config.user_img?(Ft(),ul(g,{key:0,class:"rounded-lg",src:a.config.user_img,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["src"])):Xa("",!0),ht("div",{class:"bg-green-400 text-gray-700 p-4 mx-2 w-fit max-w-2xl 2xl:max-w-4xl rounded-lg cursor-pointer",onClick:I=>l.copyAsPrompt(D.message),innerHTML:D.message},null,8,Pue)])])):(Ft(),sn("div",xue,[a.config.robot_img?(Ft(),ul(g,{key:0,class:"rounded-lg",src:a.config.robot_img,fit:"cover",style:{width:"40px",height:"40px"}},null,8,["src"])):Xa("",!0),ht("div",Eue,[(A=D==null?void 0:D.viewMode)!=null&&A?(Ft(),sn(at,{key:0},[D.img?(Ft(),sn("img",{key:0,src:D.img},null,8,Due)):(Ft(),sn("img",Tue))],64)):Xa("",!0),ht("template",null,[aa($u(D.message?D.message:"..."),1)])])]))])}),256)),a.mode!=="draw"?(Ft(),sn("div",kue,[a.loading?(Ft(),sn("div",{key:0,onClick:e[4]||(e[4]=(...D)=>l.stop&&l.stop(...D)),class:"-mt-4 px-5 py-1 m-auto w-fit cursor-pointer hover:bg-slate-300 border-dotted border-[1px] border-slate-400 rounded-md"},$ue)):Xa("",!0)])):Xa("",!0)],512),ht("div",Aue,[ht("div",Fue,[mn(ht("input",{"onUpdate:modelValue":e[5]||(e[5]=D=>a.prompt=D),class:"flex-auto ring-0 outline-0 pl-2 bg-slate-200 h-10",onKeyup:e[6]||(e[6]=kp((...D)=>l.query&&l.query(...D),["enter"])),placeholder:"\u63D0\u793A\u8BCD"},null,544),[[Ml,a.prompt]]),p(C,{options:a.options,onClick:t.clickHandler,class:"ml-4 mt-1"},{default:tn(()=>[p(b,{theme:"default",variant:"text",shape:"square"},{default:tn(()=>[p(y,{name:a.modeImage,size:"24",class:"w-6 h-6 text-cyan-800 font-bold hover:text-cyan-600 cursor-pointer"},null,8,["name"])]),_:1})]),_:1},8,["options","onClick"]),(Ft(),sn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 mx-2 ml-4 mt-2 h-6 flex-none text-cyan-800 font-bold hover:text-cyan-600 cursor-pointer",onClick:e[7]||(e[7]=(...D)=>l.query&&l.query(...D))},Nue))]),a.mode==="draw"?(Ft(),sn("div",Rue,[mn(ht("input",{"onUpdate:modelValue":e[8]||(e[8]=D=>a.negative_prompt=D),class:"flex-auto ring-0 outline-0 pl-2 bg-slate-200 h-10",onKeyup:e[9]||(e[9]=kp((...D)=>l.query&&l.query(...D),["enter"])),placeholder:"\u9006\u5411\u63D0\u793A\u8BCD"},null,544),[[Ml,a.negative_prompt]]),ht("div",Lue,[mn(ht("input",{"onUpdate:modelValue":e[10]||(e[10]=D=>a.width=D),class:"ring-0 outline-0 pl-2 bg-slate-300 h-10 w-16",placeholder:"width",disabled:""},null,512),[[Ml,a.width]]),Bue,mn(ht("input",{"onUpdate:modelValue":e[11]||(e[11]=D=>a.height=D),class:"ring-0 outline-0 pl-2 bg-slate-300 h-10 w-16",placeholder:"height",disabled:""},null,512),[[Ml,a.height]])]),mn(ht("input",{"onUpdate:modelValue":e[12]||(e[12]=D=>a.steps=D),class:"flex-none w-30 ring-0 outline-0 pl-2 bg-slate-300 h-10 w-16",placeholder:"steps",disabled:"
"},null,512),[[Ml,a.steps]]),mn(ht("input",{"onUpdate:modelValue":e[13]||(e[13]=D=>a.sampler=D),class:"flex-none w-40 ring-0 outline-0 pl-2 bg-slate-200 h-10 w-16 text-small",placeholder:"sampler"},null,512),[[Ml,a.sampler]])])):Xa("",!0)])])])])])}const zue=uue(cue,[["render",Vue]]);const fT=hu(zue);fT.use(Iie);fT.mount("#app");
dist/index.html
浏览文件 @
866828a9
...
...
@@ -5,7 +5,7 @@
<link
rel=
"icon"
href=
"https://csdn-665-inscode.s3.cn-north-1.jdcloud-oss.com/inscode/202307/anonymous/1688436360645-09755384-VMG9VSsOi4FZl8WOUxmIxdojCO1Jy0wY/avatar"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
Vite App
</title>
<script
type=
"module"
crossorigin
src=
"/assets/index.
7ec49da3
.js"
></script>
<script
type=
"module"
crossorigin
src=
"/assets/index.
4a5ec4b0
.js"
></script>
<link
rel=
"stylesheet"
href=
"/assets/index.60ec49f5.css"
>
</head>
<body>
...
...
src/App.vue
浏览文件 @
866828a9
...
...
@@ -135,11 +135,11 @@
<div
class=
"w-full h-10 mt-2 flex gap-2"
v-if=
"mode === 'draw'"
>
<input
v-model=
"negative_prompt"
class=
"flex-auto ring-0 outline-0 pl-2 bg-slate-200 h-10"
v-on:keyup.enter=
"query"
placeholder=
"逆向提示词"
/>
<div
class=
"flex-none w-40 ring-0 outline-0 pl-2 h-10 flex justify-between"
>
<input
v-model=
"width"
class=
"ring-0 outline-0 pl-2 bg-slate-
200 h-10 w-16"
placeholder=
"width"
/>
<input
v-model=
"width"
class=
"ring-0 outline-0 pl-2 bg-slate-
300 h-10 w-16"
placeholder=
"width"
disabled
/>
<span
class=
"h-10 leading-10"
>
*
</span>
<input
v-model=
"height"
class=
"ring-0 outline-0 pl-2 bg-slate-
200 h-10 w-16"
placeholder=
"height"
/>
<input
v-model=
"height"
class=
"ring-0 outline-0 pl-2 bg-slate-
300 h-10 w-16"
placeholder=
"height"
disabled
/>
</div>
<input
v-model=
"steps"
class=
"flex-none w-30 ring-0 outline-0 pl-2 bg-slate-
200 h-10 w-16"
placeholder=
"steps"
/>
<input
v-model=
"steps"
class=
"flex-none w-30 ring-0 outline-0 pl-2 bg-slate-
300 h-10 w-16"
placeholder=
"steps"
disabled
/>
<input
v-model=
"sampler"
class=
"flex-none w-40 ring-0 outline-0 pl-2 bg-slate-200 h-10 w-16 text-small"
placeholder=
"sampler"
/>
</div>
</div>
...
...
@@ -210,7 +210,7 @@ export default {
steps
:
20
,
sampler
:
'
DPM++ SDE Karras
'
,
showMoreSetting
:
true
,
default_prompt
:
'
1girl, (ulzzang-6500:0.7), kpop idol, yae miko,
detached sleeves, bare shoulders, pink hair, long hair, cleavage,japanese clothes,breast,best quality, (painting:1.5), (hair ornament:1.35), jewelry, purple eyes, earrings, breasts, torii, cherry blossoms, lantern light, depth of field, detailed face, face focus, ribbon_trim, (looking at viewer:1.25), nontraditional miko, shiny skin, long sleeves, smile, thick lips, game cg, east asian architecture,
(blurry background:1.2), sitting, upper body <lora:YaeMiko_Test:0.45>,<lora:mix4:0.5>
'
,
default_prompt
:
'
1girl, (ulzzang-6500:0.7), kpop idol, yae miko,
pink hair, long hair,best quality, (painting:1.5), (hair ornament:1.35), jewelry, purple eyes, cherry blossoms, lantern light, depth of field, detailed face, face focus, ribbon_trim, (looking at viewer:1.25), nontraditional miko, shiny skin, long sleeves, smile, thick lips, game cg,
(blurry background:1.2), sitting, upper body <lora:YaeMiko_Test:0.45>,<lora:mix4:0.5>
'
,
negative_prompt
:
'
nfsw, bright lantern, brightness, (nipples:1.2), pussy, EasyNegative, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers, fewer fingers, strange fingers, bad hand, bare thighs,hand,bad finger
'
,
history
:
{
name
:
'
ai
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录