@acedatacloud/nexior 3.317.1 → 3.318.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-DKH1hHeZ.js → ApiCodeButton-wgOlho8X.js} +1 -1
- package/dist/assets/{Artifacts-Ah2Xrxia.js → Artifacts-CXZcy2DX.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-WvaiP8j2.js → AskUserQuestionCard-2B11CWSG.js} +2 -2
- package/dist/assets/{Auth-CK7MWQMD.js → Auth-CYda4Ur5.js} +1 -1
- package/dist/assets/{Bare-CIZVsLhW.js → Bare-CvgakV86.js} +1 -1
- package/dist/assets/{BotPlaceholder-ClZEJUKd.js → BotPlaceholder-BBa7CDpO.js} +1 -1
- package/dist/assets/{BottomFooter-Dl8Uxolx.js → BottomFooter-DGm3lDw5.js} +1 -1
- package/dist/assets/{Callback-BvI8CjEk.js → Callback-DgouWBIl.js} +1 -1
- package/dist/assets/{CodeSnippet-JLsROz6h.js → CodeSnippet-LKBGH9rJ.js} +1 -1
- package/dist/assets/{Console-BygsXOkj.js → Console-PxZvL98h.js} +1 -1
- package/dist/assets/{Consumption-DaIZFJJr.js → Consumption-B7oPcRnx.js} +1 -1
- package/dist/assets/{Conversation-yDtcQbxN.js → Conversation-CtpToozC.js} +1 -1
- package/dist/assets/Conversation-D_SLQsbF.js +1 -0
- package/dist/assets/{CopyToClipboard-D0HbbYqd.js → CopyToClipboard-D8gJOukV.js} +1 -1
- package/dist/assets/Detail-Dqgu2hBn.js +2 -0
- package/dist/assets/{Extra-BXmAXncE.js → Extra-BsPqUXuI.js} +1 -1
- package/dist/assets/{FilePreview-BpP5DL0H.js → FilePreview-y4VNrGmk.js} +1 -1
- package/dist/assets/{Hailuo-DoNdAAr1.js → Hailuo-3D4qylFS.js} +1 -1
- package/dist/assets/{History-83dbBi-L.js → History-BUbJYVtR.js} +1 -1
- package/dist/assets/{ImagePreview-B52Bs40Y.js → ImagePreview-DtPgesXi.js} +1 -1
- package/dist/assets/{ImageWrapper-DJYx5A0y.js → ImageWrapper-CKuj75Dg.js} +1 -1
- package/dist/assets/Index-2etdo-76.js +1 -0
- package/dist/assets/{Index-BgXBpya0.js → Index-BBLnjagD.js} +1 -1
- package/dist/assets/Index-BFWTTvgn.js +1 -0
- package/dist/assets/Index-BH_0BAYr.js +1 -0
- package/dist/assets/Index-BOWUU7_h.js +1 -0
- package/dist/assets/{Index-CGXzxW-L.js → Index-BTQO30GB.js} +1 -1
- package/dist/assets/{Index-D0Opt4Z3.js → Index-BqGOislX.js} +1 -1
- package/dist/assets/{Index-DQ0jbWjc.js → Index-C3kiWeUu.js} +2 -2
- package/dist/assets/{Index-CTIeKTKZ.css → Index-C3tV6qNe.css} +1 -1
- package/dist/assets/Index-CDzPcevN.js +1 -0
- package/dist/assets/{Index-DTdpTFNq.js → Index-CJO1-JPj.js} +1 -1
- package/dist/assets/Index-CPhZowrC.js +1 -0
- package/dist/assets/{Index-DCRiPSKx.js → Index-CVXa2Ea4.js} +1 -1
- package/dist/assets/{Index-BuJaJbq7.js → Index-CVfmk3bX.js} +1 -1
- package/dist/assets/Index-C_6MY3Cz.js +1 -0
- package/dist/assets/{Index-BvHIYWRt.js → Index-CeP9wXEB.js} +1 -1
- package/dist/assets/{Index-DOoTUeJU.js → Index-Cpa22ib4.js} +1 -1
- package/dist/assets/{Index-Bo1qjRKx.js → Index-CqfDSaWw.js} +1 -1
- package/dist/assets/{Index-Mh-i49u9.js → Index-DOZFJEdd.js} +1 -1
- package/dist/assets/Index-D_EvoZ9u.css +1 -0
- package/dist/assets/Index-DgPJbU7J.js +1 -0
- package/dist/assets/{Index-C6IQzOd7.js → Index-DvAApEcD.js} +1 -1
- package/dist/assets/{Index-Bxi7UUBP.js → Index-EPh4fcSi.js} +1 -1
- package/dist/assets/{Index-CmzQSvZF.js → Index-Ee7RkHan.js} +1 -1
- package/dist/assets/Index-FbOIZJKQ.js +1 -0
- package/dist/assets/Index-MHMtqTle.js +1 -0
- package/dist/assets/{Index-CR9-S26Z.js → Index-_Qaedys-.js} +1 -1
- package/dist/assets/{Index-DXYcJbu1.js → Index-a1xouAR7.js} +1 -1
- package/dist/assets/Index-d0ujNW24.js +1 -0
- package/dist/assets/Index-mVL2VYVc.js +1 -0
- package/dist/assets/{Invitees-s1LPBHIq.js → Invitees-DXee9JvC.js} +1 -1
- package/dist/assets/{List-5lctZAJy.js → List-DK28j3Og.js} +1 -1
- package/dist/assets/List-DfT3yQNT.js +1 -0
- package/dist/assets/{List-CDx3vQL1.js → List-Hisek5Vq.js} +1 -1
- package/dist/assets/{LocalTools-C8u19_xi.js → LocalTools-BCHo14IO.js} +1 -1
- package/dist/assets/{LocalTools-CDG3TsRP.js → LocalTools-DmFqVbMB.js} +3 -3
- package/dist/assets/{Main-CABmfSQP.js → Main-zOIYg0X7.js} +1 -1
- package/dist/assets/{Message-BQWjChXL.js → Message-lVBcC5BV.js} +2 -2
- package/dist/assets/Model-fAPZOcOu.js +1 -0
- package/dist/assets/{Navigator-Bn3ap_ez.js → Navigator-C2YhAcPP.js} +3 -3
- package/dist/assets/{NoTasks-C_SJ3rcm.js → NoTasks-CGrunQ-b.js} +1 -1
- package/dist/assets/{NotFound-BGshRL_j.js → NotFound-BJkn9bHC.js} +1 -1
- package/dist/assets/{Pagination-DfqSFOi_.js → Pagination-C94BNzE6.js} +1 -1
- package/dist/assets/Pay-DCL-Teg3.js +1 -0
- package/dist/assets/{Player-fgL-IVv3.js → Player-NTlaGeEB.js} +1 -1
- package/dist/assets/{PromptTextarea-CQ-TMes3.js → PromptTextarea-CMhCuxJH.js} +1 -1
- package/dist/assets/{RealtimeCall-ChT00amB.js → RealtimeCall-D4CPoFWe.js} +1 -1
- package/dist/assets/{ScheduledTasks-CeOCXiTT.js → ScheduledTasks-IwxVwfkW.js} +2 -2
- package/dist/assets/{Status-hbgNnxwI.js → Status-Xf3arMf9.js} +1 -1
- package/dist/assets/{Subscribe-wmXsV-nx.js → Subscribe-DAsMU9o8.js} +1 -1
- package/dist/assets/{TabSwitcher-CCCIncqu.js → TabSwitcher-C-DCP5l_.js} +1 -1
- package/dist/assets/{Tts-DFZUXaBM.js → Tts-C03UaPB3.js} +1 -1
- package/dist/assets/{VideoPlayer-O38SMk83.js → VideoPlayer-CgGC2uHg.js} +1 -1
- package/dist/assets/VideoPreview-0TSgwdv2.js +1 -0
- package/dist/assets/VideoPreview-BmaA0wXe.css +1 -0
- package/dist/assets/{alert-EHtwZ3w6.js → alert-CXSqX3ys.js} +1 -1
- package/dist/assets/{avatar-DycuV8BB.js → avatar-D9dPhF16.js} +1 -1
- package/dist/assets/{basic-BF4njrtx.js → basic-nhaReqxy.js} +1 -1
- package/dist/assets/chat-MrUrYnvB.js +1 -0
- package/dist/assets/{codingBridge-wfr2QIWI.js → codingBridge-uYqF7N6p.js} +2 -2
- package/dist/assets/{codingBridgeNotify-x2s-hhzs.js → codingBridgeNotify-0vBnVt0E.js} +2 -2
- package/dist/assets/{collapse-CmbZgG9z.js → collapse-BPov2dKT.js} +1 -1
- package/dist/assets/constants-BbSGgy1t.js +1 -0
- package/dist/assets/{createTaskActions-CnwcQMqt.js → createTaskActions-DS483BuS.js} +1 -1
- package/dist/assets/{date-picker-DyAiCJHy.js → date-picker-BsK68iD-.js} +1 -1
- package/dist/assets/{digitalhuman-BFAnuLrQ.js → digitalhuman-DpeUyxSc.js} +1 -1
- package/dist/assets/{drawer-CIjKrJBz.js → drawer-CF-Mh2Gm.js} +1 -1
- package/dist/assets/{dropdown-DMfuqRXJ.js → dropdown-Cwzl5Bdk.js} +1 -1
- package/dist/assets/{dropdown-BqVtxt7S.js → dropdown-DCD4N07K.js} +1 -1
- package/dist/assets/{esm-DM21nl9G.js → esm-BAn04B3h.js} +1 -1
- package/dist/assets/{esm-DIg2Zfvq.js → esm-BDLSAWI8.js} +1 -1
- package/dist/assets/esm-CKXTlwF1.js +1 -0
- package/dist/assets/{esm-WrvbpjeX.js → esm-D8BDVzFZ.js} +1 -1
- package/dist/assets/{esm-yFpYgEi7.js → esm-DwRU-Ys2.js} +2 -2
- package/dist/assets/{esm-Cwj4rH3U.js → esm-YVjHtvxZ.js} +3 -3
- package/dist/assets/{esm-DAP9V4h7.js → esm-n0Dc0blS.js} +2 -2
- package/dist/assets/fish-hW5diXoj.js +1 -0
- package/dist/assets/{flux-DVnVxbpm.js → flux-C1T7X7Pd.js} +1 -1
- package/dist/assets/{grokvideo-3elEXvhZ.js → grokvideo-CQKHtoct.js} +1 -1
- package/dist/assets/{hailuo-tJRhIUVJ.js → hailuo-BxYpe2Ha.js} +1 -1
- package/dist/assets/{headshots-CrXrjfsD.js → headshots-BtgdNSJZ.js} +1 -1
- package/dist/assets/image-BJNsYYKd.js +1 -0
- package/dist/assets/{index-CfP01Xrf.js → index-Bf6bS8cW.js} +15 -15
- package/dist/assets/{index.browser.esm-MgDVlg_J.js → index.browser.esm-Bu9bIqqC.js} +1 -1
- package/dist/assets/{index.es-BqKdSbPf.js → index.es-CuQlvr5B.js} +1 -1
- package/dist/assets/{input-number-BM3dTBC-.js → input-number-D5etV7az.js} +1 -1
- package/dist/assets/{kling-BvRxbn96.js → kling-DStIbLPG.js} +1 -1
- package/dist/assets/{qrart-Bnc9b6Vj.js → luma-Crqwafyq.js} +1 -1
- package/dist/assets/{maestro-BOsE7cYK.js → maestro-5eCcoaHV.js} +1 -1
- package/dist/assets/{midjourney-D34oZ9Zz.js → midjourney-B6L3wKEB.js} +1 -1
- package/dist/assets/{mobileLocalExec-Ck-ERIJC.js → mobileLocalExec-CR7XlRgT.js} +2 -2
- package/dist/assets/{nanobanana-BE-5OJZp.js → nanobanana-cQ9q3cEZ.js} +1 -1
- package/dist/assets/{openaiimage-CMeI8C2-.js → openaiimage-D6U7K59J.js} +1 -1
- package/dist/assets/{pagination-Df8qBbtZ.js → pagination-BJ34zRxf.js} +2 -2
- package/dist/assets/{sora-GLZ2c15r.js → pika-Bg914Dur.js} +1 -1
- package/dist/assets/{pixverse-FARtvOv8.js → pixverse-DaE-5Enp.js} +1 -1
- package/dist/assets/{popover-CSN9aj0N.js → popover-qKQ35FWK.js} +1 -1
- package/dist/assets/{producer-Dj2MLUfn.js → producer-CgDhuaaZ.js} +1 -1
- package/dist/assets/{luma-3a9-rQx7.js → qrart-bKPmWp6O.js} +1 -1
- package/dist/assets/realtime-ReS3DC64.js +1 -0
- package/dist/assets/{row-SlcjdS7s.js → row-BB4IYwi9.js} +1 -1
- package/dist/assets/{seedance-fGFht3Tx.js → seedance-B3vk5KB5.js} +1 -1
- package/dist/assets/seedream-B2um1gCg.js +1 -0
- package/dist/assets/{select-D_XqcEYh.js → select-ul7Wo_Q6.js} +1 -1
- package/dist/assets/serp-CVniV9lG.js +1 -0
- package/dist/assets/{slider-CHi7GzrA.js → slider-BAnHaO57.js} +1 -1
- package/dist/assets/{solana-wallets-DTshWnZW.js → solana-wallets-CKd7UMzL.js} +2 -2
- package/dist/assets/{solana-wallets-vue-B5NHfmqA.js → solana-wallets-vue-Cuu2sQA3.js} +1 -1
- package/dist/assets/sora-80GEYXx0.js +1 -0
- package/dist/assets/{suno-CNAAmiiK.js → suno-CkFHsdZ0.js} +1 -1
- package/dist/assets/{switch-u_34vqEt.js → switch-DFeLUK7J.js} +1 -1
- package/dist/assets/{table-2H19X-lc.js → table-DeX9wTtz.js} +1 -1
- package/dist/assets/{tabs-CVS4aCWr.js → tabs-CcGiBXnJ.js} +1 -1
- package/dist/assets/{time-picker-BX-MCmZE.js → time-picker-wCdQM-l9.js} +1 -1
- package/dist/assets/tooltip-BWueZx_j.js +1 -0
- package/dist/assets/{upload-B59M5Z9B.js → upload-BUY6iRe-.js} +1 -1
- package/dist/assets/{veo-B4vVJax1.js → veo-EScwHyw1.js} +1 -1
- package/dist/assets/wan-B1J2B1bi.js +1 -0
- package/dist/assets/web-91rlXmFM.js +1 -0
- package/dist/assets/{web-B--w4pnI.js → web-BGpuHWE6.js} +1 -1
- package/dist/assets/{web-Bi7a5eW3.js → web-KpJNJXNj.js} +1 -1
- package/dist/assets/{web-CVKgEWcv.js → web-aoR5k19y.js} +1 -1
- package/dist/assets/{web-BmQuB1vU.js → web-sWSjKZZn.js} +1 -1
- package/dist/assets/webextrator-77012YXT.js +1 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/Conversation-B-ph8EIH.js +0 -1
- package/dist/assets/Detail-COQll1zZ.js +0 -2
- package/dist/assets/Index-0wcboqbg.js +0 -1
- package/dist/assets/Index-B2LF8cFB.js +0 -1
- package/dist/assets/Index-BR3XF2NY.js +0 -1
- package/dist/assets/Index-Bh3EsNfw.js +0 -1
- package/dist/assets/Index-BosJttOv.css +0 -1
- package/dist/assets/Index-CiZoygPS.js +0 -1
- package/dist/assets/Index-Cj-sh0it.js +0 -1
- package/dist/assets/Index-Ck05TSC0.js +0 -1
- package/dist/assets/Index-Cp65XCOJ.js +0 -1
- package/dist/assets/Index-DVlrzfwb.js +0 -1
- package/dist/assets/Index-Dh-jZdd6.js +0 -1
- package/dist/assets/Index-DoAU4zDQ.js +0 -1
- package/dist/assets/Index-wiy8EUHe.js +0 -1
- package/dist/assets/List-CQSSy6CY.js +0 -1
- package/dist/assets/Model-BWldtD82.js +0 -1
- package/dist/assets/Pay-CJugJCrY.js +0 -1
- package/dist/assets/chat-DXgq9Ik1.js +0 -1
- package/dist/assets/constants-fCD_7a3u.js +0 -1
- package/dist/assets/esm-D45Idq8U.js +0 -1
- package/dist/assets/fish-D8jz6Lju.js +0 -1
- package/dist/assets/image-DTNNDkzc.js +0 -1
- package/dist/assets/pika-r09EGcIb.js +0 -1
- package/dist/assets/realtime-C52LoMVZ.js +0 -1
- package/dist/assets/seedream-x6YDH9gw.js +0 -1
- package/dist/assets/serp-DeO75qcI.js +0 -1
- package/dist/assets/tooltip-DdIzsuY7.js +0 -1
- package/dist/assets/wan-CkED8S5X.js +0 -1
- package/dist/assets/web-BsomEYSV.js +0 -1
- package/dist/assets/webextrator-BmF-ePpH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,D as t,Gt as n,Ht as r,I as i,N as a,O as o,P as s,Q as c,S as l,Wt as u,dt as d,et as f,ft as p,k as m,nt as h,tt as g,v as _}from"./vendor-chart-kBsXB1rh.js";import{r as v,t as y}from"./select-D_XqcEYh.js";import{t as b}from"./upload-B59M5Z9B.js";import{t as x}from"./tooltip-DdIzsuY7.js";import{t as S}from"./image-DTNNDkzc.js";import{t as C}from"./alert-EHtwZ3w6.js";import{t as w}from"./drawer-CIjKrJBz.js";import{t as T}from"./input-number-BM3dTBC-.js";import{t as E}from"./slider-CHi7GzrA.js";import{ar as D,ir as O,nr as k,rr as A}from"./constants-fCD_7a3u.js";import{A as j,Br as ee,Ht as te,Kt as M,Lr as N,Tn as P,Ut as F,Vt as I,Wt as L,Zn as R,Zr as z,ci as B,en as V}from"./index-CfP01Xrf.js";import{t as H}from"./index.es-BqKdSbPf.js";import{t as U}from"./CopyToClipboard-D0HbbYqd.js";import{t as W}from"./ImagePreview-B52Bs40Y.js";import{n as G}from"./taskDrawerMixin-CfysS2FH.js";import{t as K}from"./Consumption-DaIZFJJr.js";import{i as q,n as J,t as Y}from"./pagination-Df8qBbtZ.js";import{t as X}from"./VideoPlayer-O38SMk83.js";import{t as Z}from"./ApiCodeButton-DKH1hHeZ.js";import{t as Q}from"./BotPlaceholder-ClZEJUKd.js";import{t as ne}from"./NoTasks-C_SJ3rcm.js";import{t as re}from"./PromptTextarea-CQ-TMes3.js";var ie=i({name:`LayoutPixverse`,components:{ElDrawer:w,ElButton:B,FontAwesomeIcon:H},mixins:[G]}),ae={class:`main flex flex-row flex-1`},oe={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},se={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ce(n,r,i,a,o,l){let u=h(`font-awesome-icon`),f=h(`el-button`),m=h(`el-drawer`);return c(),e(`div`,ae,[t(`div`,oe,[g(n.$slots,`config`,{},void 0,!0)]),t(`div`,se,[g(n.$slots,`result`,{},void 0,!0)]),p(s(f,{circle:``,class:`menu`,onClick:r[0]||=e=>n.drawer=!0},{default:d(()=>[s(u,{icon:`fa-solid fa-magic`})]),_:1},512),[[_,!n.tasksEmpty]]),s(m,{modelValue:n.drawer,"onUpdate:modelValue":r[1]||=e=>n.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`},{default:d(()=>[g(n.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var le=j(ie,[[`render`,ce],[`__scopeId`,`data-v-e688a015`]]),ue=i({name:`ModelSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`v3.5`,label:`v3.5`},{value:`v4`,label:`v4`},{value:`v4.5`,label:`v4.5`}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.model},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,model:e})}}},mounted(){this.value||=A}}),de={class:`field`},fe={class:`title font-bold`};function pe(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,de,[t(`h2`,fe,n(r.$t(`pixverse.name.model`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var me=j(ue,[[`render`,pe],[`__scopeId`,`data-v-e8f337ca`]]),he=i({name:`QualitySelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`360p`,label:`360p`},{value:`540p`,label:`540p`},{value:`720p`,label:`720p`},{value:`1080p`,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.quality},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,quality:e})}}},mounted(){this.value||=D}}),ge={class:`field`},_e={class:`title font-bold`};function ve(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,ge,[t(`h2`,_e,n(r.$t(`pixverse.name.quality`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ye=j(he,[[`render`,ve],[`__scopeId`,`data-v-64aeaae9`]]),be=i({name:`MotionSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`normal`,label:this.$t(`pixverse.name.motion1`)},{value:`fast`,label:this.$t(`pixverse.name.motion2`)}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.motion},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,motion:e})}}},mounted(){this.value||=O}}),xe={class:`field`},Se={class:`title font-bold`};function Ce(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,xe,[t(`h2`,Se,n(r.$t(`pixverse.name.motion`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var we=j(be,[[`render`,Ce],[`__scopeId`,`data-v-94237408`]]),Te=i({name:`StyleSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`cyberpunk`,label:this.$t(`pixverse.name.style1`)},{value:`anime`,label:this.$t(`pixverse.name.style2`)},{value:`comic`,label:this.$t(`pixverse.name.style3`)},{value:`clay`,label:this.$t(`pixverse.name.style4`)},{value:`3d_animation`,label:this.$t(`pixverse.name.style5`)},{value:`realistic`,label:this.$t(`pixverse.name.style6`)}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.style},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,style:e})}}},mounted(){this.value||=``}}),Ee={class:`field`},De={class:`title font-bold`};function Oe(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,Ee,[t(`h2`,De,n(r.$t(`pixverse.name.style`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ke=j(Te,[[`render`,Oe],[`__scopeId`,`data-v-64e17b3c`]]),Ae=i({name:`SeedSelector`,components:{ElSlider:E,InfoIcon:q,ElInputNumber:T},computed:{value:{get(){return this.$store.state?.pixverse?.config?.seed},set(e){console.debug(`set seed`,e),this.$store.commit(`pixverse/setConfig`,{...this.$store.state?.pixverse?.config,seed:e})}}},mounted(){this.value||=void 0}}),je={class:`flex justify-between`},Me={class:`flex justify-start items-center`},Ne={class:`text-sm font-bold`},Pe={class:`flex justify-end items-center`},Fe={class:`w-full`};function Ie(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-input-number`),p=h(`el-slider`);return c(),e(`div`,null,[t(`div`,je,[t(`div`,Me,[t(`span`,Ne,n(r.$t(`pixverse.name.seed`)),1),s(d,{content:r.$t(`pixverse.description.seed`)},null,8,[`content`])]),t(`div`,Pe,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),t(`div`,Fe,[s(p,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:0,max:1e3,step:1},null,8,[`modelValue`])])])}var Le=j(Ae,[[`render`,Ie]]),Re=i({name:`DurationSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:5,label:`5s`},{value:8,label:`8s`}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.duration},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,duration:e})}}},mounted(){this.value||=5}}),ze={class:`field`},Be={class:`title font-bold`};function Ve(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,ze,[t(`h2`,Be,n(r.$t(`pixverse.name.duration`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var He=j(Re,[[`render`,Ve],[`__scopeId`,`data-v-065c77ef`]]),Ue=i({name:`RatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`4:3`,label:`4:3`,width:20,height:15},{value:`3:4`,label:`3:4`,width:15,height:20},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state.pixverse.config?.aspect_ratio},set(e){console.debug(`set aspect_ratio`,e),this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,aspect_ratio:e})}}},mounted(){this.value||=k}}),We={class:`text-sm font-bold mb-2 block`},Ge={class:`items`},Ke=[`onClick`],qe={class:`name`};function Je(i,a,o,s,d,p){return c(),e(`div`,null,[t(`span`,We,n(i.$t(`pixverse.name.aspectRatio`)),1),t(`div`,Ge,[(c(!0),e(l,null,f(i.options,(a,o)=>(c(),e(`div`,{key:o,class:r({active:i.active===o,item:!0}),onClick:e=>i.value=a.value},[t(`div`,{class:r([`preview`,a.label])},[t(`div`,{class:`rect`,style:u({width:a.width+`px`,height:a.height+`px`})},null,4)],2),t(`p`,qe,n(a.label),1)],10,Ke))),128))])])}var Ye=j(Ue,[[`render`,Je],[`__scopeId`,`data-v-53038264`]]),Xe=i({name:`StartImage`,components:{ElUpload:b,ElButton:B,InfoIcon:q,FontAwesomeIcon:H,ImagePreview:W},mixins:[L,te],emits:[`change`],data(){return{fileList:[],uploadUrl:ee()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.pixverse?.config?.image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){z.warning(this.$t(`pixverse.message.uploadReferencesExceed`))},onError(){z.error(this.$t(`pixverse.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`pixverse/setConfig`,{...this.$store.state?.pixverse?.config,image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Ze={class:`relative`},Qe={class:`flex justify-between`},$e={class:`flex justify-start items-center`},et={class:`text-sm font-bold`};function tt(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`image-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,Ze,[t(`div`,Qe,[t(`div`,$e,[t(`span`,et,n(r.$t(`pixverse.name.startImage`)),1),s(g,{content:r.$t(`pixverse.description.uploadStartImage`)},null,8,[`content`])])]),s(b,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:r.uploadUrl,"list-type":`picture`,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.url&&e.percentage!==void 0?(c(),o(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):m(``,!0)]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`pixverse.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var nt=j(Xe,[[`render`,tt],[`__scopeId`,`data-v-0d570ad7`]]),rt=i({name:`PromptInput`,components:{PromptTextarea:re},computed:{prompt:{get(){return this.$store.state.pixverse?.config?.prompt},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse?.config,prompt:e})}}},mounted(){this.prompt||=``}});function it(e,t,n,r,i,a){let s=h(`prompt-textarea`);return c(),o(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`pixverse.name.prompt`),info:e.$t(`pixverse.description.prompt`),placeholder:e.$t(`pixverse.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var at=i({name:`ConfigPanel`,components:{ElButton:B,FontAwesomeIcon:H,PromptInput:j(rt,[[`render`,it]]),ModelSelector:me,QualitySelector:ye,MotionSelector:we,StyleSelector:ke,DurationSelector:He,StartImage:nt,SeedSelector:Le,RatioSelector:Ye,Consumption:K},emits:[`generate`],computed:{config(){return this.$store.state.pixverse?.config},consumption(){return M(this.config,this.service?.cost)},service(){return this.$store.state.pixverse?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),ot={class:`flex flex-col h-full`},st={class:`flex-1 overflow-y-auto p-5`},ct={class:`flex flex-col items-center justify-center px-5 pb-5`};function lt(r,i,o,l,u,f){let p=h(`prompt-input`),m=h(`model-selector`),g=h(`style-selector`),_=h(`ratio-selector`),v=h(`motion-selector`),y=h(`quality-selector`),b=h(`start-image`),x=h(`seed-selector`),S=h(`duration-selector`),C=h(`consumption`),w=h(`font-awesome-icon`),T=h(`el-button`);return c(),e(`div`,ot,[t(`div`,st,[s(p,{class:`mb-4`}),s(m,{class:`mb-4`}),s(g,{class:`mb-4`}),s(_,{class:`mb-4`}),s(v,{class:`mb-4`}),s(y,{class:`mb-4`}),s(b,{class:`mb-2`}),s(x,{class:`mb-4`}),s(S,{class:`mb-4`})]),t(`div`,ct,[s(C,{value:r.consumption,service:r.service},null,8,[`value`,`service`]),s(T,{type:`primary`,class:`btn w-full`,round:``,onClick:r.onGenerate},{default:d(()=>[s(w,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+n(r.$t(`pixverse.button.generate`)),1)]),_:1},8,[`onClick`])])])}var ut=j(at,[[`render`,lt]]),dt=i({name:`TaskPreview`,components:{ElImage:S,CopyToClipboard:U,FontAwesomeIcon:H,ElAlert:C,VideoPlayer:X,ElTooltip:x,ElButton:B,ApiCodeButton:Z},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.pixverse?.application},config(){return this.$store.state.pixverse?.config}},methods:{onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),ft={class:`preview`},pt={class:`left`},mt={class:`main`},ht={class:`bot`},gt={class:`datetime`},_t={class:`info`},vt={key:0,class:`prompt mt-2`},yt={key:0},bt={key:1},xt={key:0,class:r({content:!0,failed:!0})},St={key:0,class:`mb-4`},Ct={key:1,class:r({operations:!0,"mt-2":!0})},wt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Tt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Et={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},$={key:1,class:r({content:!0})},Dt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ot={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},At={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function jt(r,i,l,u,f,p){let g=h(`el-image`),_=h(`video-player`),v=h(`el-button`),y=h(`el-tooltip`),b=h(`api-code-button`),x=h(`font-awesome-icon`),S=h(`copy-to-clipboard`),C=h(`el-alert`);return c(),e(`div`,ft,[t(`div`,pt,[s(g,{src:`https://cdn.acedata.cloud/viy61r.jpg`,class:`avatar`})]),t(`div`,mt,[t(`div`,ht,[a(n(r.$t(`pixverse.name.pixverseBot`))+` `,1),t(`span`,gt,n(r.$dayjs.format(``+new Date(parseFloat((r.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,_t,[r.modelValue?.request?.prompt?(c(),e(`p`,vt,[a(n(r.modelValue?.request?.prompt)+` `,1),r.modelValue?.response?m(``,!0):(c(),e(`span`,yt,` - (`+n(r.$t(`pixverse.status.pending`))+`) `,1)),r.modelValue?.response?.data&&(r.modelValue?.response?.data[0]?.state===`processing`||r.modelValue?.response?.data[0]?.state===`pending`)?(c(),e(`span`,bt,` - (`+n(r.$t(`pixverse.status.processing`))+`) `,1)):m(``,!0)])):m(``,!0)]),r.modelValue?.response?.success===!0&&r.modelValue?.response?.data?(c(),e(`div`,xt,[r.modelValue?.response?.data[0]?.video_url?(c(),e(`div`,St,[s(_,{src:r.modelValue?.response?.data[0]?.video_url},null,8,[`src`])])):m(``,!0),r.modelValue?.response.success?(c(),e(`div`,Ct,[s(y,{class:`box-item`,effect:`dark`,content:r.$t(`pixverse.message.downloadVideo`),placement:`top-start`},{default:d(()=>[r.modelValue?.response?.data[0]?.video_url?(c(),o(v,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:i[0]||=e=>r.onDownload(e,r.modelValue?.response?.data[0]?.video_url)},{default:d(()=>[a(n(r.$t(`pixverse.button.download`)),1)]),_:1})):m(``,!0)]),_:1},8,[`content`]),s(b,{path:`/pixverse/videos`,body:r.modelValue?.request},null,8,[`body`])])):m(``,!0),s(C,{closable:!1,class:`mt-2 success`},{default:d(()=>[t(`p`,wt,[s(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.model`))+`: `+n(r.modelValue?.request?.model),1)]),t(`p`,Tt,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,Et,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0)]),_:1})])):m(``,!0),r.modelValue?.response?.success===!1?(c(),e(`div`,$,[s(C,{closable:!1,class:`info`},{template:d(()=>[s(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.failure`)),1)]),default:d(()=>[t(`p`,Dt,[s(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.failureReason`))+`: `+n(r.modelValue?.response?.error?.message)+` `,1),s(S,{content:r.modelValue?.response?.error?.message},null,8,[`content`])]),t(`p`,Ot,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,kt,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0),r.modelValue?.response?.trace_id?(c(),e(`p`,At,[s(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.traceId`))+`: `+n(r.modelValue?.response?.trace_id)+` `,1),s(S,{content:r.modelValue?.response?.trace_id},null,8,[`content`])])):m(``,!0)]),_:1})])):m(``,!0)])])}var Mt=i({name:`RecentPanel`,components:{TaskPreview:j(dt,[[`render`,jt],[`__scopeId`,`data-v-dd3037dc`]]),NoTasks:ne,BotPlaceholder:Q,ScrollList:J},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.pixverse?.tasks,items:this.$store.state.pixverse?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Nt={key:0},Pt={key:2,class:`w-full h-full flex items-center justify-center`};function Ft(t,n,r,i,a,u){let p=h(`bot-placeholder`),g=h(`task-preview`),_=h(`scroll-list`),v=h(`no-tasks`);return c(),e(l,null,[t.tasks?.items===void 0?(c(),e(`div`,Nt,[s(p)])):t.tasks?.items?.length&&t.tasks?.items?.length>0?(c(),o(_,{key:1,ref:`scrollList`,class:`h-full w-full overflow-y-auto tasks`,loading:t.loading,onReachTop:n[0]||=e=>t.$emit(`reach-top`)},{default:d(()=>[(c(!0),e(l,null,f(t.tasks?.items,(e,t)=>(c(),o(g,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):m(``,!0),t.tasks?.items?.length===0?(c(),e(`div`,Pt,[s(v)])):m(``,!0)],64)}var It=i({name:`PixverseIndex`,components:{ConfigPanel:ut,Layout:le,RecentPanel:j(Mt,[[`render`,Ft]])},mixins:[F],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.pixverse?.status?.getApplications===N.Request},tasksLoading(){return this.$store.state.pixverse?.status?.getTasks===N.Request||this.fetchingTasks},credential(){return this.$store.state.pixverse.credential},config(){return this.$store.state.pixverse.config},tasks(){return this.$store.state.pixverse.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Y({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`pixverse/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`pixverse/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`pixverse/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!I(this.uploadTracker,e=>this.$t(e),e=>z.warning(e)))return;let e={...this.config,async:!0};if(!V())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}z.info(this.$t(`pixverse.message.startingTask`)),R(`pixverse`,P.generate(e,{token:t})).then(()=>{z.success(this.$t(`pixverse.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?z.error(this.$t(`pixverse.message.usedUp`)):z.error(this.$t(`pixverse.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Lt(e,t,n,r,i,a){let l=h(`config-panel`),u=h(`recent-panel`),f=h(`layout`);return c(),o(f,null,{config:d(()=>[s(l,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:d(()=>[s(u,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Rt=j(It,[[`render`,Lt]]);export{Rt as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,D as t,Gt as n,Ht as r,I as i,N as a,O as o,P as s,Q as c,S as l,Wt as u,dt as d,et as f,ft as p,k as m,nt as h,tt as g,v as _}from"./vendor-chart-kBsXB1rh.js";import{r as v,t as y}from"./select-ul7Wo_Q6.js";import{t as b}from"./upload-BUY6iRe-.js";import{t as x}from"./tooltip-BWueZx_j.js";import{t as S}from"./image-BJNsYYKd.js";import{t as C}from"./alert-CXSqX3ys.js";import{t as w}from"./drawer-CF-Mh2Gm.js";import{t as T}from"./input-number-D5etV7az.js";import{t as ee}from"./slider-BAnHaO57.js";import{ar as te,ir as E,nr as D,rr as O}from"./constants-BbSGgy1t.js";import{$n as k,$r as A,A as j,Dn as M,Hr as N,Ht as P,Kt as F,Ut as I,Vt as L,Wt as R,en as z,ui as B,zr as V}from"./index-Bf6bS8cW.js";import{t as H}from"./index.es-CuQlvr5B.js";import{t as U}from"./CopyToClipboard-D8gJOukV.js";import{t as W}from"./ImagePreview-DtPgesXi.js";import{n as G}from"./taskDrawerMixin-CfysS2FH.js";import{t as K}from"./Consumption-B7oPcRnx.js";import{i as q,n as J,t as Y}from"./pagination-BJ34zRxf.js";import{t as X}from"./VideoPlayer-CgGC2uHg.js";import{t as Z}from"./ApiCodeButton-wgOlho8X.js";import{t as Q}from"./BotPlaceholder-BBa7CDpO.js";import{t as ne}from"./NoTasks-CGrunQ-b.js";import{t as re}from"./PromptTextarea-CMhCuxJH.js";var ie=i({name:`LayoutPixverse`,components:{ElDrawer:w,ElButton:B,FontAwesomeIcon:H},mixins:[G]}),ae={class:`main flex flex-row flex-1`},oe={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},se={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ce(n,r,i,a,o,l){let u=h(`font-awesome-icon`),f=h(`el-button`),m=h(`el-drawer`);return c(),e(`div`,ae,[t(`div`,oe,[g(n.$slots,`config`,{},void 0,!0)]),t(`div`,se,[g(n.$slots,`result`,{},void 0,!0)]),p(s(f,{circle:``,class:`menu`,onClick:r[0]||=e=>n.drawer=!0},{default:d(()=>[s(u,{icon:`fa-solid fa-magic`})]),_:1},512),[[_,!n.tasksEmpty]]),s(m,{modelValue:n.drawer,"onUpdate:modelValue":r[1]||=e=>n.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`},{default:d(()=>[g(n.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var le=j(ie,[[`render`,ce],[`__scopeId`,`data-v-e688a015`]]),ue=i({name:`ModelSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`v3.5`,label:`v3.5`},{value:`v4`,label:`v4`},{value:`v4.5`,label:`v4.5`}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.model},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,model:e})}}},mounted(){this.value||=O}}),de={class:`field`},fe={class:`title font-bold`};function pe(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,de,[t(`h2`,fe,n(r.$t(`pixverse.name.model`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var me=j(ue,[[`render`,pe],[`__scopeId`,`data-v-e8f337ca`]]),he=i({name:`QualitySelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`360p`,label:`360p`},{value:`540p`,label:`540p`},{value:`720p`,label:`720p`},{value:`1080p`,label:`1080p`}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.quality},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,quality:e})}}},mounted(){this.value||=te}}),ge={class:`field`},_e={class:`title font-bold`};function ve(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,ge,[t(`h2`,_e,n(r.$t(`pixverse.name.quality`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ye=j(he,[[`render`,ve],[`__scopeId`,`data-v-64aeaae9`]]),be=i({name:`MotionSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`normal`,label:this.$t(`pixverse.name.motion1`)},{value:`fast`,label:this.$t(`pixverse.name.motion2`)}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.motion},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,motion:e})}}},mounted(){this.value||=E}}),xe={class:`field`},Se={class:`title font-bold`};function Ce(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,xe,[t(`h2`,Se,n(r.$t(`pixverse.name.motion`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var we=j(be,[[`render`,Ce],[`__scopeId`,`data-v-94237408`]]),Te=i({name:`StyleSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`cyberpunk`,label:this.$t(`pixverse.name.style1`)},{value:`anime`,label:this.$t(`pixverse.name.style2`)},{value:`comic`,label:this.$t(`pixverse.name.style3`)},{value:`clay`,label:this.$t(`pixverse.name.style4`)},{value:`3d_animation`,label:this.$t(`pixverse.name.style5`)},{value:`realistic`,label:this.$t(`pixverse.name.style6`)}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.style},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,style:e})}}},mounted(){this.value||=``}}),Ee={class:`field`},De={class:`title font-bold`};function Oe(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,Ee,[t(`h2`,De,n(r.$t(`pixverse.name.style`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ke=j(Te,[[`render`,Oe],[`__scopeId`,`data-v-64e17b3c`]]),Ae=i({name:`SeedSelector`,components:{ElSlider:ee,InfoIcon:q,ElInputNumber:T},computed:{value:{get(){return this.$store.state?.pixverse?.config?.seed},set(e){console.debug(`set seed`,e),this.$store.commit(`pixverse/setConfig`,{...this.$store.state?.pixverse?.config,seed:e})}}},mounted(){this.value||=void 0}}),je={class:`flex justify-between`},Me={class:`flex justify-start items-center`},Ne={class:`text-sm font-bold`},Pe={class:`flex justify-end items-center`},Fe={class:`w-full`};function Ie(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-input-number`),p=h(`el-slider`);return c(),e(`div`,null,[t(`div`,je,[t(`div`,Me,[t(`span`,Ne,n(r.$t(`pixverse.name.seed`)),1),s(d,{content:r.$t(`pixverse.description.seed`)},null,8,[`content`])]),t(`div`,Pe,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),t(`div`,Fe,[s(p,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:0,max:1e3,step:1},null,8,[`modelValue`])])])}var Le=j(Ae,[[`render`,Ie]]),Re=i({name:`DurationSelector`,components:{ElSelect:v,ElOption:y},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:5,label:`5s`},{value:8,label:`8s`}]}},computed:{value:{get(){return this.$store.state.pixverse?.config?.duration},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,duration:e})}}},mounted(){this.value||=5}}),ze={class:`field`},Be={class:`title font-bold`};function Ve(r,i,a,u,p,m){let g=h(`el-option`),_=h(`el-select`);return c(),e(`div`,ze,[t(`h2`,Be,n(r.$t(`pixverse.name.duration`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`pixverse.placeholder.select`)},{default:d(()=>[(c(!0),e(l,null,f(r.options,e=>(c(),o(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var He=j(Re,[[`render`,Ve],[`__scopeId`,`data-v-065c77ef`]]),Ue=i({name:`RatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`4:3`,label:`4:3`,width:20,height:15},{value:`3:4`,label:`3:4`,width:15,height:20},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state.pixverse.config?.aspect_ratio},set(e){console.debug(`set aspect_ratio`,e),this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse.config,aspect_ratio:e})}}},mounted(){this.value||=D}}),We={class:`text-sm font-bold mb-2 block`},Ge={class:`items`},Ke=[`onClick`],qe={class:`name`};function Je(i,a,o,s,d,p){return c(),e(`div`,null,[t(`span`,We,n(i.$t(`pixverse.name.aspectRatio`)),1),t(`div`,Ge,[(c(!0),e(l,null,f(i.options,(a,o)=>(c(),e(`div`,{key:o,class:r({active:i.active===o,item:!0}),onClick:e=>i.value=a.value},[t(`div`,{class:r([`preview`,a.label])},[t(`div`,{class:`rect`,style:u({width:a.width+`px`,height:a.height+`px`})},null,4)],2),t(`p`,qe,n(a.label),1)],10,Ke))),128))])])}var Ye=j(Ue,[[`render`,Je],[`__scopeId`,`data-v-53038264`]]),Xe=i({name:`StartImage`,components:{ElUpload:b,ElButton:B,InfoIcon:q,FontAwesomeIcon:H,ImagePreview:W},mixins:[R,P],emits:[`change`],data(){return{fileList:[],uploadUrl:N()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.pixverse?.config?.image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){A.warning(this.$t(`pixverse.message.uploadReferencesExceed`))},onError(){A.error(this.$t(`pixverse.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`pixverse/setConfig`,{...this.$store.state?.pixverse?.config,image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Ze={class:`relative`},Qe={class:`flex justify-between`},$e={class:`flex justify-start items-center`},et={class:`text-sm font-bold`};function tt(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`image-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,Ze,[t(`div`,Qe,[t(`div`,$e,[t(`span`,et,n(r.$t(`pixverse.name.startImage`)),1),s(g,{content:r.$t(`pixverse.description.uploadStartImage`)},null,8,[`content`])])]),s(b,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:r.uploadUrl,"list-type":`picture`,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.url&&e.percentage!==void 0?(c(),o(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):m(``,!0)]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`pixverse.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var nt=j(Xe,[[`render`,tt],[`__scopeId`,`data-v-0d570ad7`]]),rt=i({name:`PromptInput`,components:{PromptTextarea:re},computed:{prompt:{get(){return this.$store.state.pixverse?.config?.prompt},set(e){this.$store.commit(`pixverse/setConfig`,{...this.$store.state.pixverse?.config,prompt:e})}}},mounted(){this.prompt||=``}});function it(e,t,n,r,i,a){let s=h(`prompt-textarea`);return c(),o(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`pixverse.name.prompt`),info:e.$t(`pixverse.description.prompt`),placeholder:e.$t(`pixverse.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var at=i({name:`ConfigPanel`,components:{ElButton:B,FontAwesomeIcon:H,PromptInput:j(rt,[[`render`,it]]),ModelSelector:me,QualitySelector:ye,MotionSelector:we,StyleSelector:ke,DurationSelector:He,StartImage:nt,SeedSelector:Le,RatioSelector:Ye,Consumption:K},emits:[`generate`],computed:{config(){return this.$store.state.pixverse?.config},consumption(){return F(this.config,this.service?.cost)},service(){return this.$store.state.pixverse?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),ot={class:`flex flex-col h-full`},st={class:`flex-1 overflow-y-auto p-5`},ct={class:`flex flex-col items-center justify-center px-5 pb-5`};function lt(r,i,o,l,u,f){let p=h(`prompt-input`),m=h(`model-selector`),g=h(`style-selector`),_=h(`ratio-selector`),v=h(`motion-selector`),y=h(`quality-selector`),b=h(`start-image`),x=h(`seed-selector`),S=h(`duration-selector`),C=h(`consumption`),w=h(`font-awesome-icon`),T=h(`el-button`);return c(),e(`div`,ot,[t(`div`,st,[s(p,{class:`mb-4`}),s(m,{class:`mb-4`}),s(g,{class:`mb-4`}),s(_,{class:`mb-4`}),s(v,{class:`mb-4`}),s(y,{class:`mb-4`}),s(b,{class:`mb-2`}),s(x,{class:`mb-4`}),s(S,{class:`mb-4`})]),t(`div`,ct,[s(C,{value:r.consumption,service:r.service},null,8,[`value`,`service`]),s(T,{type:`primary`,class:`btn w-full`,round:``,onClick:r.onGenerate},{default:d(()=>[s(w,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+n(r.$t(`pixverse.button.generate`)),1)]),_:1},8,[`onClick`])])])}var ut=j(at,[[`render`,lt]]),dt=i({name:`TaskPreview`,components:{ElImage:S,CopyToClipboard:U,FontAwesomeIcon:H,ElAlert:C,VideoPlayer:X,ElTooltip:x,ElButton:B,ApiCodeButton:Z},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.pixverse?.application},config(){return this.$store.state.pixverse?.config}},methods:{onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),ft={class:`preview`},pt={class:`left`},mt={class:`main`},ht={class:`bot`},gt={class:`datetime`},_t={class:`info`},vt={key:0,class:`prompt mt-2`},yt={key:0},bt={key:1},xt={key:0,class:r({content:!0,failed:!0})},St={key:0,class:`mb-4`},Ct={key:1,class:r({operations:!0,"mt-2":!0})},wt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Tt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Et={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},$={key:1,class:r({content:!0})},Dt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ot={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},At={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function jt(r,i,l,u,f,p){let g=h(`el-image`),_=h(`video-player`),v=h(`el-button`),y=h(`el-tooltip`),b=h(`api-code-button`),x=h(`font-awesome-icon`),S=h(`copy-to-clipboard`),C=h(`el-alert`);return c(),e(`div`,ft,[t(`div`,pt,[s(g,{src:`https://cdn.acedata.cloud/viy61r.jpg`,class:`avatar`})]),t(`div`,mt,[t(`div`,ht,[a(n(r.$t(`pixverse.name.pixverseBot`))+` `,1),t(`span`,gt,n(r.$dayjs.format(``+new Date(parseFloat((r.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,_t,[r.modelValue?.request?.prompt?(c(),e(`p`,vt,[a(n(r.modelValue?.request?.prompt)+` `,1),r.modelValue?.response?m(``,!0):(c(),e(`span`,yt,` - (`+n(r.$t(`pixverse.status.pending`))+`) `,1)),r.modelValue?.response?.data&&(r.modelValue?.response?.data[0]?.state===`processing`||r.modelValue?.response?.data[0]?.state===`pending`)?(c(),e(`span`,bt,` - (`+n(r.$t(`pixverse.status.processing`))+`) `,1)):m(``,!0)])):m(``,!0)]),r.modelValue?.response?.success===!0&&r.modelValue?.response?.data?(c(),e(`div`,xt,[r.modelValue?.response?.data[0]?.video_url?(c(),e(`div`,St,[s(_,{src:r.modelValue?.response?.data[0]?.video_url},null,8,[`src`])])):m(``,!0),r.modelValue?.response.success?(c(),e(`div`,Ct,[s(y,{class:`box-item`,effect:`dark`,content:r.$t(`pixverse.message.downloadVideo`),placement:`top-start`},{default:d(()=>[r.modelValue?.response?.data[0]?.video_url?(c(),o(v,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:i[0]||=e=>r.onDownload(e,r.modelValue?.response?.data[0]?.video_url)},{default:d(()=>[a(n(r.$t(`pixverse.button.download`)),1)]),_:1})):m(``,!0)]),_:1},8,[`content`]),s(b,{path:`/pixverse/videos`,body:r.modelValue?.request},null,8,[`body`])])):m(``,!0),s(C,{closable:!1,class:`mt-2 success`},{default:d(()=>[t(`p`,wt,[s(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.model`))+`: `+n(r.modelValue?.request?.model),1)]),t(`p`,Tt,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,Et,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0)]),_:1})])):m(``,!0),r.modelValue?.response?.success===!1?(c(),e(`div`,$,[s(C,{closable:!1,class:`info`},{template:d(()=>[s(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.failure`)),1)]),default:d(()=>[t(`p`,Dt,[s(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.failureReason`))+`: `+n(r.modelValue?.response?.error?.message)+` `,1),s(S,{content:r.modelValue?.response?.error?.message},null,8,[`content`])]),t(`p`,Ot,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,kt,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0),r.modelValue?.response?.trace_id?(c(),e(`p`,At,[s(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(r.$t(`pixverse.name.traceId`))+`: `+n(r.modelValue?.response?.trace_id)+` `,1),s(S,{content:r.modelValue?.response?.trace_id},null,8,[`content`])])):m(``,!0)]),_:1})])):m(``,!0)])])}var Mt=i({name:`RecentPanel`,components:{TaskPreview:j(dt,[[`render`,jt],[`__scopeId`,`data-v-dd3037dc`]]),NoTasks:ne,BotPlaceholder:Q,ScrollList:J},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.pixverse?.tasks,items:this.$store.state.pixverse?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Nt={key:0},Pt={key:2,class:`w-full h-full flex items-center justify-center`};function Ft(t,n,r,i,a,u){let p=h(`bot-placeholder`),g=h(`task-preview`),_=h(`scroll-list`),v=h(`no-tasks`);return c(),e(l,null,[t.tasks?.items===void 0?(c(),e(`div`,Nt,[s(p)])):t.tasks?.items?.length&&t.tasks?.items?.length>0?(c(),o(_,{key:1,ref:`scrollList`,class:`h-full w-full overflow-y-auto tasks`,loading:t.loading,onReachTop:n[0]||=e=>t.$emit(`reach-top`)},{default:d(()=>[(c(!0),e(l,null,f(t.tasks?.items,(e,t)=>(c(),o(g,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):m(``,!0),t.tasks?.items?.length===0?(c(),e(`div`,Pt,[s(v)])):m(``,!0)],64)}var It=i({name:`PixverseIndex`,components:{ConfigPanel:ut,Layout:le,RecentPanel:j(Mt,[[`render`,Ft]])},mixins:[I],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.pixverse?.status?.getApplications===V.Request},tasksLoading(){return this.$store.state.pixverse?.status?.getTasks===V.Request||this.fetchingTasks},credential(){return this.$store.state.pixverse.credential},config(){return this.$store.state.pixverse.config},tasks(){return this.$store.state.pixverse.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Y({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`pixverse/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`pixverse/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`pixverse/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!L(this.uploadTracker,e=>this.$t(e),e=>A.warning(e)))return;let e={...this.config,async:!0};if(!z())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}A.info(this.$t(`pixverse.message.startingTask`)),k(`pixverse`,M.generate(e,{token:t})).then(()=>{A.success(this.$t(`pixverse.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?A.error(this.$t(`pixverse.message.usedUp`)):A.error(this.$t(`pixverse.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function Lt(e,t,n,r,i,a){let l=h(`config-panel`),u=h(`recent-panel`),f=h(`layout`);return c(),o(f,null,{config:d(()=>[s(l,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:d(()=>[s(u,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Rt=j(It,[[`render`,Lt]]);export{Rt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,I as t,Q as n}from"./vendor-chart-kBsXB1rh.js";import{A as r}from"./index-
|
|
1
|
+
import{A as e,I as t,Q as n}from"./vendor-chart-kBsXB1rh.js";import{A as r}from"./index-Bf6bS8cW.js";var i=t({name:`SettingsIndex`,mounted(){let e=this.$route.query.tab||``;window.dispatchEvent(new CustomEvent(`open-user-settings`,{detail:{tab:e}}))}}),a={class:`settings-page`};function o(t,r,i,o,s,c){return n(),e(`div`,a)}var s=r(i,[[`render`,o]]);export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,D as t,Gt as n,Ht as r,I as i,N as a,O as o,P as s,Q as c,S as l,b as u,dt as d,et as f,ft as p,k as m,nt as h,tt as g,v as _}from"./vendor-chart-kBsXB1rh.js";import{t as v}from"./upload-B59M5Z9B.js";import{t as y}from"./tooltip-DdIzsuY7.js";import{t as b}from"./image-DTNNDkzc.js";import{t as x}from"./alert-EHtwZ3w6.js";import{t as S}from"./drawer-CIjKrJBz.js";import{t as C}from"./switch-u_34vqEt.js";import"./constants-fCD_7a3u.js";import{A as w,Br as T,Ht as E,Kt as D,Lr as O,Mn as k,Ut as ee,Vt as A,Wt as j,Zn as M,Zr as N,ci as P,en as te}from"./index-CfP01Xrf.js";import{t as F}from"./index.es-BqKdSbPf.js";import{t as I}from"./CopyToClipboard-D0HbbYqd.js";import{t as L}from"./FilePreview-BpP5DL0H.js";import{t as R}from"./ImagePreview-B52Bs40Y.js";import{n as z}from"./taskDrawerMixin-CfysS2FH.js";import{t as B}from"./Consumption-DaIZFJJr.js";import{i as V,n as H,t as U}from"./pagination-Df8qBbtZ.js";import{t as W}from"./VideoPlayer-O38SMk83.js";import{t as G}from"./ApiCodeButton-DKH1hHeZ.js";import{t as K}from"./BotPlaceholder-ClZEJUKd.js";import{t as q}from"./NoTasks-C_SJ3rcm.js";import{t as J}from"./PromptTextarea-CQ-TMes3.js";var Y=i({name:`LayoutLuma`,components:{ElDrawer:S,ElButton:P,FontAwesomeIcon:F},mixins:[z]}),X={class:`main flex flex-row flex-1`},Z={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Q={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ne(n,r,i,a,o,l){let u=h(`font-awesome-icon`),f=h(`el-button`),m=h(`el-drawer`);return c(),e(`div`,X,[t(`div`,Z,[g(n.$slots,`config`,{},void 0,!0)]),t(`div`,Q,[g(n.$slots,`result`,{},void 0,!0)]),p(s(f,{circle:``,class:`menu`,onClick:r[0]||=e=>n.drawer=!0},{default:d(()=>[s(u,{icon:`fa-solid fa-magic`})]),_:1},512),[[_,!n.tasksEmpty]]),s(m,{modelValue:n.drawer,"onUpdate:modelValue":r[1]||=e=>n.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`,class:`drawer`},{default:d(()=>[g(n.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var re=w(Y,[[`render`,ne],[`__scopeId`,`data-v-da4bcd3a`]]),ie=i({name:`EnhancementSelector`,components:{ElSwitch:C,InfoIcon:V},computed:{value:{get(){return this.$store.state.luma?.config?.enhancement},set(e){console.debug(`set enhancement`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=!0)}}),ae={class:`relative`},oe={class:`flex justify-between`},se={class:`flex justify-start items-center`},ce={class:`text-sm font-bold`},le={class:`flex justify-end items-center`};function ue(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-switch`);return c(),e(`div`,ae,[t(`div`,oe,[t(`div`,se,[t(`span`,ce,n(r.$t(`luma.name.enhancement`)),1),s(d,{content:r.$t(`luma.description.enhancement`)},null,8,[`content`])]),t(`div`,le,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var de=w(ie,[[`render`,ue]]),fe=i({name:`CustomSelector`,components:{ElSwitch:C,InfoIcon:V},computed:{value:{get(){return this.$store.state.luma?.config?.custom},set(e){console.debug(`set custom`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),pe={class:`relative`},me={class:`flex justify-between`},he={class:`flex justify-start items-center`},ge={class:`text-sm font-bold`},_e={class:`flex justify-end items-center`};function ve(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-switch`);return c(),e(`div`,pe,[t(`div`,me,[t(`div`,he,[t(`span`,ge,n(r.$t(`luma.name.custom`)),1),s(d,{content:r.$t(`luma.description.custom`)},null,8,[`content`])]),t(`div`,_e,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var ye=w(fe,[[`render`,ve]]),be=i({name:`LoopSelector`,components:{ElSwitch:C,InfoIcon:V},computed:{value:{get(){return this.$store.state.luma?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),xe={class:`relative`},Se={class:`flex justify-between`},Ce={class:`flex justify-start items-center`},we={class:`text-sm font-bold`},Te={class:`flex justify-end items-center`};function Ee(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-switch`);return c(),e(`div`,xe,[t(`div`,Se,[t(`div`,Ce,[t(`span`,we,n(r.$t(`luma.name.loop`)),1),s(d,{content:r.$t(`luma.description.loop`)},null,8,[`content`])]),t(`div`,Te,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var De=w(be,[[`render`,Ee]]),Oe=i({name:`EndImage`,components:{ElUpload:v,ElButton:P,ImagePreview:R,InfoIcon:V,FontAwesomeIcon:F},mixins:[j,E],data(){return{fileList:[],uploadUrl:T()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onExceed(){N.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){N.error(this.$t(`luma.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),ke={class:`relative`},Ae={class:`flex justify-between`},je={class:`flex justify-start items-center`},Me={class:`text-sm font-bold`};function Ne(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`image-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,ke,[t(`div`,Ae,[t(`div`,je,[t(`span`,Me,n(r.$t(`luma.name.endImageUrl`)),1),s(g,{content:r.$t(`luma.description.endImageUrl`)},null,8,[`content`])])]),s(b,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:r.uploadUrl,"list-type":`picture`,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.url&&e.percentage!==void 0?(c(),o(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):m(``,!0)]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`luma.button.uploadEndImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Pe=w(Oe,[[`render`,Ne],[`__scopeId`,`data-v-cd768b26`]]),Fe=i({name:`StartImage`,components:{ElUpload:v,ElButton:P,ImagePreview:R,InfoIcon:V,FontAwesomeIcon:F},mixins:[j,E],data(){return{fileList:[],uploadUrl:T()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){N.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){N.error(this.$t(`luma.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Ie={class:`relative`},Le={class:`flex justify-between`},Re={class:`flex justify-start items-center`},ze={class:`text-sm font-bold`};function Be(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`image-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,Ie,[t(`div`,Le,[t(`div`,Re,[t(`span`,ze,n(r.$t(`luma.name.startImageUrl`)),1),s(g,{content:r.$t(`luma.description.startImageUrl`)},null,8,[`content`])])]),s(b,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:r.uploadUrl,"list-type":`picture`,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.percentage==null?m(``,!0):(c(),o(_,{key:0,url:e.url||e.response.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`luma.button.uploadStartImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Ve=w(Fe,[[`render`,Be],[`__scopeId`,`data-v-4d03e978`]]),He=i({name:`UploadVideo`,components:{ElUpload:v,ElButton:P,InfoIcon:V,FilePreview:L,FontAwesomeIcon:F},mixins:[E],data(){return{fileList:[],uploadUrl:T()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.luma?.config?.video_url},set(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e})}}},mounted(){this.value||=void 0},methods:{onExceed(){N.warning(this.$t(`luma.message.uploadVideoExceed`))},onError(){N.error(this.$t(`luma.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`,n=e.size/1024/1024<10;return t?n?!0:(N.error(this.$t(`luma.message.uploadVideoSizeExceed`)),!1):(N.error(this.$t(`luma.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e,action:`extend`})},async onSuccess(){this.onSetVideoUrl()}}}),Ue={class:`relative`},We={class:`flex justify-between`},Ge={class:`flex justify-start items-center`},Ke={class:`text-sm font-bold`};function qe(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`file-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,Ue,[t(`div`,We,[t(`div`,Ge,[t(`span`,Ke,n(r.$t(`luma.name.videoUrl`)),1),s(g,{content:r.$t(`luma.description.videoUrl`)},null,8,[`content`])])]),s(b,{"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,accept:`.mp4`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:r.uploadUrl,"before-upload":r.beforeUpload,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.percentage==null?m(``,!0):(c(),o(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`luma.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Je=w(He,[[`render`,qe],[`__scopeId`,`data-v-b4c637fa`]]),Ye=i({name:`PromptInput`,components:{PromptTextarea:J},computed:{prompt:{get(){return this.$store.state.luma?.config?.prompt},set(e){this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Xe(e,t,n,r,i,a){let s=h(`prompt-textarea`);return c(),o(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`luma.name.prompt`),info:e.$t(`luma.description.prompt`),placeholder:e.$t(`luma.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ze=w(Ye,[[`render`,Xe]]),Qe=i({name:`ExtendFromInput`,components:{VideoPlayer:W},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{quality:{default:`1080p`}}}},computed:{config(){return this.$store.state.luma?.config}}}),$e={class:`relative`},et={class:`flex mb-2`},tt={class:`text-sm font-bold`};function nt(r,i,a,s,l,u){let d=h(`video-player`);return c(),e(`div`,$e,[t(`div`,et,[t(`span`,tt,n(r.$t(`luma.name.extend`)),1)]),t(`div`,null,[r.config?.video_url?(c(),o(d,{key:0,src:r.config?.video_url},null,8,[`src`])):m(``,!0)])])}var rt=i({name:`ConfigPanel`,components:{LoopSelector:De,StartImageInput:Ve,EndImageInput:Pe,EnhancementSelector:de,ElButton:P,FontAwesomeIcon:F,PromptInput:Ze,ExtendFromInput:w(Qe,[[`render`,nt]]),CustomSelector:ye,UploadVideo:Je,Consumption:B},emits:[`generate`],computed:{config(){return this.$store.state.luma?.config},consumption(){return D(this.config,this.service?.cost)},service(){return this.$store.state.luma?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),it={class:`flex flex-col h-full`},at={class:`flex-1 overflow-y-auto p-5`},ot={class:`flex flex-col items-center justify-center px-5 pb-5`};function st(r,i,l,u,f,p){let g=h(`extend-from-input`),_=h(`prompt-input`),v=h(`custom-selector`),y=h(`upload-video`),b=h(`start-image-input`),x=h(`end-image-input`),S=h(`enhancement-selector`),C=h(`loop-selector`),w=h(`consumption`),T=h(`font-awesome-icon`),E=h(`el-button`);return c(),e(`div`,it,[t(`div`,at,[r.config?.video_id||r.config?.video_url?(c(),o(g,{key:0,class:`mb-4`})):m(``,!0),s(_,{class:`mb-4`}),r.config?.video_id?m(``,!0):(c(),o(v,{key:1,class:`mb-4`})),r.config?.custom?(c(),o(y,{key:2,class:`mb-4`})):m(``,!0),!(r.config?.video_id||r.config?.video_url)&&!r.config?.custom?(c(),o(b,{key:3,class:`mb-4`})):m(``,!0),s(x,{class:`mb-4`}),s(S,{class:`mb-4`}),s(C,{class:`mb-4`})]),t(`div`,ot,[s(w,{value:r.consumption,service:r.service},null,8,[`value`,`service`]),r.config?.video_url!==void 0||r.config?.custom?(c(),o(E,{key:0,type:`primary`,class:`btn w-full`,round:``,onClick:r.onGenerate},{default:d(()=>[s(T,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+n(r.$t(`luma.button.extend`)),1)]),_:1},8,[`onClick`])):(c(),o(E,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:r.onGenerate},{default:d(()=>[s(T,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+n(r.$t(`luma.button.generate`)),1)]),_:1},8,[`onClick`]))])])}var ct=w(rt,[[`render`,st]]),lt=i({name:`TaskPreview`,components:{ElImage:b,CopyToClipboard:I,FontAwesomeIcon:F,ElAlert:x,VideoPlayer:W,ElTooltip:y,ElButton:P,ApiCodeButton:G},props:{modelValue:{type:Object,required:!0}},emits:[`extend`],data(){return{}},computed:{application(){return this.$store.state.luma?.application},config(){return this.$store.state.luma?.config}},methods:{onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_id:t.video_id,prompt:t.prompt,action:`extend`,thumbnail_url:t.thumbnail_url,video_url:t.video_url}),this.$emit(`extend`)},onDownload(e){window.open(e,`_blank`)}}}),ut={class:`preview`},dt={class:`left`},ft={class:`main`},pt={class:`bot`},mt={class:`datetime`},ht={class:`info`},gt={key:0,class:`prompt mt-2`},_t={key:0},vt={key:1},yt={key:0,class:r({content:!0,failed:!0})},bt={key:0,class:`mb-4`},xt={key:1,class:r({operations:!0,"mt-2":!0,"mb-4":!0})},St={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ct={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},wt={key:1,class:r({content:!0})},Tt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Et={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Dt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ot={key:2,class:r({content:!0})},kt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function At(r,i,o,l,f,p){let g=h(`el-image`),_=h(`video-player`),v=h(`el-button`),y=h(`el-tooltip`),b=h(`api-code-button`),x=h(`font-awesome-icon`),S=h(`copy-to-clipboard`),C=h(`el-alert`);return c(),e(`div`,ut,[t(`div`,dt,[s(g,{src:`https://cdn.acedata.cloud/ahjfwi.png`,class:`avatar`})]),t(`div`,ft,[t(`div`,pt,[a(n(r.$t(`luma.name.lumaBot`))+` `,1),t(`span`,mt,n(r.$dayjs.format(``+new Date(parseFloat((r.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,ht,[r.modelValue?.request?.prompt?(c(),e(`p`,gt,[a(n(r.modelValue?.request?.prompt)+` `,1),r.modelValue?.response?m(``,!0):(c(),e(`span`,_t,` - (`+n(r.$t(`luma.status.pending`))+`) `,1)),r.modelValue?.response?.state===`processing`||r.modelValue?.response?.state===`pending`?(c(),e(`span`,vt,` - (`+n(r.$t(`luma.status.processing`))+`) `,1)):m(``,!0)])):m(``,!0)]),r.modelValue?.response?.success===!0?(c(),e(`div`,yt,[r.modelValue.response.video_url?(c(),e(`div`,bt,[s(_,{src:r.modelValue.response.video_url},null,8,[`src`])])):m(``,!0),r.modelValue?.response&&!r.config?.custom?(c(),e(`div`,xt,[s(y,{class:`box-item`,effect:`dark`,content:r.$t(`luma.message.extendVideo`),placement:`top-start`},{default:d(()=>[s(v,{type:`info`,size:`small`,class:`btn-action`,onClick:i[0]||=u(e=>r.onExtend(e,r.modelValue?.response),[`stop`])},{default:d(()=>[a(n(r.$t(`luma.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),s(y,{class:`box-item`,effect:`dark`,content:r.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:d(()=>[s(v,{type:`info`,size:`small`,class:`btn-action`,onClick:i[1]||=u(e=>r.onDownload(r.modelValue?.response?.video_url),[`stop`])},{default:d(()=>[a(n(r.$t(`luma.button.download`)),1)]),_:1})]),_:1},8,[`content`]),s(b,{path:`/luma/videos`,body:r.modelValue?.request},null,8,[`body`])])):m(``,!0),s(C,{closable:!1,class:`mt-2 success`},{default:d(()=>[t(`p`,St,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,Ct,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0)]),_:1})])):m(``,!0),r.modelValue?.response?.state===`failed`||r.modelValue?.response?.success===!1?(c(),e(`div`,wt,[s(C,{closable:!1,class:`failure`},{template:d(()=>[s(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.failure`)),1)]),default:d(()=>[t(`p`,Tt,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),t(`p`,Et,[s(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.failureReason`))+`: `+n(r.modelValue?.response?.error?.message)+` `,1),s(S,{content:r.modelValue?.response?.error?.message},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,$,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0),t(`p`,Dt,[s(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.traceId`))+`: `+n(r.modelValue?.trace_id)+` `,1),s(S,{content:r.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})])):m(``,!0),!r.modelValue?.response||r.modelValue?.response?.state===`processing`||r.modelValue?.response?.state===`pending`?(c(),e(`div`,Ot,[s(C,{closable:!1,class:`info`},{template:d(()=>[s(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.failure`)),1)]),default:d(()=>[t(`p`,kt,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])])]),_:1})])):m(``,!0)])])}var jt=i({name:`RecentPanel`,components:{BotPlaceholder:K,TaskPreview:w(lt,[[`render`,At],[`__scopeId`,`data-v-9c354ffe`]]),NoTasks:q,ScrollList:H},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`,`extend`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.luma?.tasks,items:this.$store.state.luma?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Mt={key:0},Nt={key:2,class:`w-full h-full flex items-center justify-center`};function Pt(t,n,r,i,a,u){let p=h(`bot-placeholder`),g=h(`task-preview`),_=h(`scroll-list`),v=h(`no-tasks`);return c(),e(l,null,[t.tasks?.items===void 0?(c(),e(`div`,Mt,[s(p)])):t.tasks?.items?.length&&t.tasks?.items?.length>0?(c(),o(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:t.loading,onReachTop:n[1]||=e=>t.$emit(`reach-top`)},{default:d(()=>[(c(!0),e(l,null,f(t.tasks?.items,e=>(c(),o(g,{key:e.id,"model-value":e,onExtend:n[0]||=e=>t.$emit(`extend`)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):m(``,!0),t.tasks?.items?.length===0?(c(),e(`div`,Nt,[s(v)])):m(``,!0)],64)}var Ft=i({name:`LumaIndex`,components:{ConfigPanel:ct,Layout:re,RecentPanel:w(jt,[[`render`,Pt]])},mixins:[ee],inject:[`initialized`],emits:[`extend`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.luma?.status?.getApplications===O.Request},tasksLoading(){return this.$store.state.luma?.status?.getTasks===O.Request||this.fetchingTasks},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},application(){return this.$store.state.luma.application},tasks(){return this.$store.state.luma.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await U({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`luma/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`luma/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){console.debug(`scrolling down`),await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`luma/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!A(this.uploadTracker,e=>this.$t(e),e=>N.warning(e)))return;let e={...this.config,async:!0};if(!this.hasText(e.prompt)){N.error(this.$t(`luma.message.promptRequired`));return}if(e.prompt=e.prompt?.trim(),!te())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}N.info(this.$t(`luma.message.startingTask`)),M(`luma`,k.generate(e,{token:t})).then(()=>{N.success(this.$t(`luma.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?N.error(this.$t(`luma.message.usedUp`)):N.error(this.$t(`luma.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},hasText(e){return typeof e==`string`&&e.trim().length>0}}});function It(e,t,n,r,i,a){let l=h(`config-panel`),u=h(`recent-panel`),f=h(`layout`);return c(),o(f,null,{config:d(()=>[s(l,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:d(()=>[s(u,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`loading`,`onReachTop`])]),_:1})}var Lt=w(Ft,[[`render`,It]]);export{Lt as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,D as t,Gt as n,Ht as r,I as i,N as a,O as o,P as s,Q as c,S as l,b as u,dt as d,et as f,ft as p,k as m,nt as h,tt as g,v as _}from"./vendor-chart-kBsXB1rh.js";import{t as v}from"./upload-BUY6iRe-.js";import{t as y}from"./tooltip-BWueZx_j.js";import{t as b}from"./image-BJNsYYKd.js";import{t as x}from"./alert-CXSqX3ys.js";import{t as S}from"./drawer-CF-Mh2Gm.js";import{t as C}from"./switch-DFeLUK7J.js";import"./constants-BbSGgy1t.js";import{$n as w,$r as T,A as E,Hr as D,Ht as O,Kt as k,Pn as A,Ut as ee,Vt as te,Wt as j,en as M,ui as N,zr as P}from"./index-Bf6bS8cW.js";import{t as F}from"./index.es-CuQlvr5B.js";import{t as I}from"./CopyToClipboard-D8gJOukV.js";import{t as L}from"./FilePreview-y4VNrGmk.js";import{t as R}from"./ImagePreview-DtPgesXi.js";import{n as z}from"./taskDrawerMixin-CfysS2FH.js";import{t as B}from"./Consumption-B7oPcRnx.js";import{i as V,n as H,t as U}from"./pagination-BJ34zRxf.js";import{t as W}from"./VideoPlayer-CgGC2uHg.js";import{t as G}from"./ApiCodeButton-wgOlho8X.js";import{t as K}from"./BotPlaceholder-BBa7CDpO.js";import{t as q}from"./NoTasks-CGrunQ-b.js";import{t as J}from"./PromptTextarea-CMhCuxJH.js";var Y=i({name:`LayoutLuma`,components:{ElDrawer:S,ElButton:N,FontAwesomeIcon:F},mixins:[z]}),X={class:`main flex flex-row flex-1`},Z={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Q={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ne(n,r,i,a,o,l){let u=h(`font-awesome-icon`),f=h(`el-button`),m=h(`el-drawer`);return c(),e(`div`,X,[t(`div`,Z,[g(n.$slots,`config`,{},void 0,!0)]),t(`div`,Q,[g(n.$slots,`result`,{},void 0,!0)]),p(s(f,{circle:``,class:`menu`,onClick:r[0]||=e=>n.drawer=!0},{default:d(()=>[s(u,{icon:`fa-solid fa-magic`})]),_:1},512),[[_,!n.tasksEmpty]]),s(m,{modelValue:n.drawer,"onUpdate:modelValue":r[1]||=e=>n.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`,class:`drawer`},{default:d(()=>[g(n.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var re=E(Y,[[`render`,ne],[`__scopeId`,`data-v-da4bcd3a`]]),ie=i({name:`EnhancementSelector`,components:{ElSwitch:C,InfoIcon:V},computed:{value:{get(){return this.$store.state.luma?.config?.enhancement},set(e){console.debug(`set enhancement`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=!0)}}),ae={class:`relative`},oe={class:`flex justify-between`},se={class:`flex justify-start items-center`},ce={class:`text-sm font-bold`},le={class:`flex justify-end items-center`};function ue(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-switch`);return c(),e(`div`,ae,[t(`div`,oe,[t(`div`,se,[t(`span`,ce,n(r.$t(`luma.name.enhancement`)),1),s(d,{content:r.$t(`luma.description.enhancement`)},null,8,[`content`])]),t(`div`,le,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var de=E(ie,[[`render`,ue]]),fe=i({name:`CustomSelector`,components:{ElSwitch:C,InfoIcon:V},computed:{value:{get(){return this.$store.state.luma?.config?.custom},set(e){console.debug(`set custom`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),pe={class:`relative`},me={class:`flex justify-between`},he={class:`flex justify-start items-center`},ge={class:`text-sm font-bold`},_e={class:`flex justify-end items-center`};function ve(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-switch`);return c(),e(`div`,pe,[t(`div`,me,[t(`div`,he,[t(`span`,ge,n(r.$t(`luma.name.custom`)),1),s(d,{content:r.$t(`luma.description.custom`)},null,8,[`content`])]),t(`div`,_e,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var ye=E(fe,[[`render`,ve]]),be=i({name:`LoopSelector`,components:{ElSwitch:C,InfoIcon:V},computed:{value:{get(){return this.$store.state.luma?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),xe={class:`relative`},Se={class:`flex justify-between`},Ce={class:`flex justify-start items-center`},we={class:`text-sm font-bold`},Te={class:`flex justify-end items-center`};function Ee(r,i,a,o,l,u){let d=h(`info-icon`),f=h(`el-switch`);return c(),e(`div`,xe,[t(`div`,Se,[t(`div`,Ce,[t(`span`,we,n(r.$t(`luma.name.loop`)),1),s(d,{content:r.$t(`luma.description.loop`)},null,8,[`content`])]),t(`div`,Te,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var De=E(be,[[`render`,Ee]]),Oe=i({name:`EndImage`,components:{ElUpload:v,ElButton:N,ImagePreview:R,InfoIcon:V,FontAwesomeIcon:F},mixins:[j,O],data(){return{fileList:[],uploadUrl:D()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onExceed(){T.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){T.error(this.$t(`luma.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),ke={class:`relative`},Ae={class:`flex justify-between`},je={class:`flex justify-start items-center`},Me={class:`text-sm font-bold`};function Ne(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`image-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,ke,[t(`div`,Ae,[t(`div`,je,[t(`span`,Me,n(r.$t(`luma.name.endImageUrl`)),1),s(g,{content:r.$t(`luma.description.endImageUrl`)},null,8,[`content`])])]),s(b,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:r.uploadUrl,"list-type":`picture`,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.url&&e.percentage!==void 0?(c(),o(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):m(``,!0)]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`luma.button.uploadEndImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Pe=E(Oe,[[`render`,Ne],[`__scopeId`,`data-v-cd768b26`]]),Fe=i({name:`StartImage`,components:{ElUpload:v,ElButton:N,ImagePreview:R,InfoIcon:V,FontAwesomeIcon:F},mixins:[j,O],data(){return{fileList:[],uploadUrl:D()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.luma?.config?.start_image_url},set(){}}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){T.warning(this.$t(`luma.message.uploadReferencesExceed`))},onError(){T.error(this.$t(`luma.message.uploadReferencesError`))},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),Ie={class:`relative`},Le={class:`flex justify-between`},Re={class:`flex justify-start items-center`},ze={class:`text-sm font-bold`};function Be(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`image-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,Ie,[t(`div`,Le,[t(`div`,Re,[t(`span`,ze,n(r.$t(`luma.name.startImageUrl`)),1),s(g,{content:r.$t(`luma.description.startImageUrl`)},null,8,[`content`])])]),s(b,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:5,class:`upload-wrapper`,multiple:!1,action:r.uploadUrl,"list-type":`picture`,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.percentage==null?m(``,!0):(c(),o(_,{key:0,url:e.url||e.response.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`luma.button.uploadStartImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Ve=E(Fe,[[`render`,Be],[`__scopeId`,`data-v-4d03e978`]]),He=i({name:`UploadVideo`,components:{ElUpload:v,ElButton:N,InfoIcon:V,FilePreview:L,FontAwesomeIcon:F},mixins:[O],data(){return{fileList:[],uploadUrl:D()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.luma?.config?.video_url},set(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e})}}},mounted(){this.value||=void 0},methods:{onExceed(){T.warning(this.$t(`luma.message.uploadVideoExceed`))},onError(){T.error(this.$t(`luma.message.uploadVideoError`))},beforeUpload(e){let t=e.type===`video/mp4`,n=e.size/1024/1024<10;return t?n?!0:(T.error(this.$t(`luma.message.uploadVideoSizeExceed`)),!1):(T.error(this.$t(`luma.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_url:e,action:`extend`})},async onSuccess(){this.onSetVideoUrl()}}}),Ue={class:`relative`},We={class:`flex justify-between`},Ge={class:`flex justify-start items-center`},Ke={class:`text-sm font-bold`};function qe(r,i,l,u,f,p){let g=h(`info-icon`),_=h(`file-preview`),v=h(`font-awesome-icon`),y=h(`el-button`),b=h(`el-upload`);return c(),e(`div`,Ue,[t(`div`,We,[t(`div`,Ge,[t(`span`,Ke,n(r.$t(`luma.name.videoUrl`)),1),s(g,{content:r.$t(`luma.description.videoUrl`)},null,8,[`content`])])]),s(b,{"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,accept:`.mp4`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:r.uploadUrl,"before-upload":r.beforeUpload,"on-exceed":r.onExceed,"on-error":r.onError,"on-success":r.onSuccess,headers:r.headers},{file:d(({file:e})=>[e.percentage==null?m(``,!0):(c(),o(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:d(()=>[s(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:d(()=>[s(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`luma.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var Je=E(He,[[`render`,qe],[`__scopeId`,`data-v-b4c637fa`]]),Ye=i({name:`PromptInput`,components:{PromptTextarea:J},computed:{prompt:{get(){return this.$store.state.luma?.config?.prompt},set(e){this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Xe(e,t,n,r,i,a){let s=h(`prompt-textarea`);return c(),o(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`luma.name.prompt`),info:e.$t(`luma.description.prompt`),placeholder:e.$t(`luma.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ze=E(Ye,[[`render`,Xe]]),Qe=i({name:`ExtendFromInput`,components:{VideoPlayer:W},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{quality:{default:`1080p`}}}},computed:{config(){return this.$store.state.luma?.config}}}),$e={class:`relative`},et={class:`flex mb-2`},tt={class:`text-sm font-bold`};function nt(r,i,a,s,l,u){let d=h(`video-player`);return c(),e(`div`,$e,[t(`div`,et,[t(`span`,tt,n(r.$t(`luma.name.extend`)),1)]),t(`div`,null,[r.config?.video_url?(c(),o(d,{key:0,src:r.config?.video_url},null,8,[`src`])):m(``,!0)])])}var rt=i({name:`ConfigPanel`,components:{LoopSelector:De,StartImageInput:Ve,EndImageInput:Pe,EnhancementSelector:de,ElButton:N,FontAwesomeIcon:F,PromptInput:Ze,ExtendFromInput:E(Qe,[[`render`,nt]]),CustomSelector:ye,UploadVideo:Je,Consumption:B},emits:[`generate`],computed:{config(){return this.$store.state.luma?.config},consumption(){return k(this.config,this.service?.cost)},service(){return this.$store.state.luma?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),it={class:`flex flex-col h-full`},at={class:`flex-1 overflow-y-auto p-5`},ot={class:`flex flex-col items-center justify-center px-5 pb-5`};function st(r,i,l,u,f,p){let g=h(`extend-from-input`),_=h(`prompt-input`),v=h(`custom-selector`),y=h(`upload-video`),b=h(`start-image-input`),x=h(`end-image-input`),S=h(`enhancement-selector`),C=h(`loop-selector`),w=h(`consumption`),T=h(`font-awesome-icon`),E=h(`el-button`);return c(),e(`div`,it,[t(`div`,at,[r.config?.video_id||r.config?.video_url?(c(),o(g,{key:0,class:`mb-4`})):m(``,!0),s(_,{class:`mb-4`}),r.config?.video_id?m(``,!0):(c(),o(v,{key:1,class:`mb-4`})),r.config?.custom?(c(),o(y,{key:2,class:`mb-4`})):m(``,!0),!(r.config?.video_id||r.config?.video_url)&&!r.config?.custom?(c(),o(b,{key:3,class:`mb-4`})):m(``,!0),s(x,{class:`mb-4`}),s(S,{class:`mb-4`}),s(C,{class:`mb-4`})]),t(`div`,ot,[s(w,{value:r.consumption,service:r.service},null,8,[`value`,`service`]),r.config?.video_url!==void 0||r.config?.custom?(c(),o(E,{key:0,type:`primary`,class:`btn w-full`,round:``,onClick:r.onGenerate},{default:d(()=>[s(T,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+n(r.$t(`luma.button.extend`)),1)]),_:1},8,[`onClick`])):(c(),o(E,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:r.onGenerate},{default:d(()=>[s(T,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+n(r.$t(`luma.button.generate`)),1)]),_:1},8,[`onClick`]))])])}var ct=E(rt,[[`render`,st]]),lt=i({name:`TaskPreview`,components:{ElImage:b,CopyToClipboard:I,FontAwesomeIcon:F,ElAlert:x,VideoPlayer:W,ElTooltip:y,ElButton:N,ApiCodeButton:G},props:{modelValue:{type:Object,required:!0}},emits:[`extend`],data(){return{}},computed:{application(){return this.$store.state.luma?.application},config(){return this.$store.state.luma?.config}},methods:{onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`luma/setConfig`,{...this.$store.state.luma?.config,video_id:t.video_id,prompt:t.prompt,action:`extend`,thumbnail_url:t.thumbnail_url,video_url:t.video_url}),this.$emit(`extend`)},onDownload(e){window.open(e,`_blank`)}}}),ut={class:`preview`},dt={class:`left`},ft={class:`main`},pt={class:`bot`},mt={class:`datetime`},ht={class:`info`},gt={key:0,class:`prompt mt-2`},_t={key:0},vt={key:1},yt={key:0,class:r({content:!0,failed:!0})},bt={key:0,class:`mb-4`},xt={key:1,class:r({operations:!0,"mt-2":!0,"mb-4":!0})},St={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ct={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},wt={key:1,class:r({content:!0})},Tt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Et={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Dt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ot={key:2,class:r({content:!0})},kt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function At(r,i,o,l,f,p){let g=h(`el-image`),_=h(`video-player`),v=h(`el-button`),y=h(`el-tooltip`),b=h(`api-code-button`),x=h(`font-awesome-icon`),S=h(`copy-to-clipboard`),C=h(`el-alert`);return c(),e(`div`,ut,[t(`div`,dt,[s(g,{src:`https://cdn.acedata.cloud/ahjfwi.png`,class:`avatar`})]),t(`div`,ft,[t(`div`,pt,[a(n(r.$t(`luma.name.lumaBot`))+` `,1),t(`span`,mt,n(r.$dayjs.format(``+new Date(parseFloat((r.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,ht,[r.modelValue?.request?.prompt?(c(),e(`p`,gt,[a(n(r.modelValue?.request?.prompt)+` `,1),r.modelValue?.response?m(``,!0):(c(),e(`span`,_t,` - (`+n(r.$t(`luma.status.pending`))+`) `,1)),r.modelValue?.response?.state===`processing`||r.modelValue?.response?.state===`pending`?(c(),e(`span`,vt,` - (`+n(r.$t(`luma.status.processing`))+`) `,1)):m(``,!0)])):m(``,!0)]),r.modelValue?.response?.success===!0?(c(),e(`div`,yt,[r.modelValue.response.video_url?(c(),e(`div`,bt,[s(_,{src:r.modelValue.response.video_url},null,8,[`src`])])):m(``,!0),r.modelValue?.response&&!r.config?.custom?(c(),e(`div`,xt,[s(y,{class:`box-item`,effect:`dark`,content:r.$t(`luma.message.extendVideo`),placement:`top-start`},{default:d(()=>[s(v,{type:`info`,size:`small`,class:`btn-action`,onClick:i[0]||=u(e=>r.onExtend(e,r.modelValue?.response),[`stop`])},{default:d(()=>[a(n(r.$t(`luma.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),s(y,{class:`box-item`,effect:`dark`,content:r.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:d(()=>[s(v,{type:`info`,size:`small`,class:`btn-action`,onClick:i[1]||=u(e=>r.onDownload(r.modelValue?.response?.video_url),[`stop`])},{default:d(()=>[a(n(r.$t(`luma.button.download`)),1)]),_:1})]),_:1},8,[`content`]),s(b,{path:`/luma/videos`,body:r.modelValue?.request},null,8,[`body`])])):m(``,!0),s(C,{closable:!1,class:`mt-2 success`},{default:d(()=>[t(`p`,St,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,Ct,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0)]),_:1})])):m(``,!0),r.modelValue?.response?.state===`failed`||r.modelValue?.response?.success===!1?(c(),e(`div`,wt,[s(C,{closable:!1,class:`failure`},{template:d(()=>[s(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.failure`)),1)]),default:d(()=>[t(`p`,Tt,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])]),t(`p`,Et,[s(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.failureReason`))+`: `+n(r.modelValue?.response?.error?.message)+` `,1),s(S,{content:r.modelValue?.response?.error?.message},null,8,[`content`])]),r.modelValue?.elapsed?(c(),e(`p`,$,[s(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.elapsed`))+`: `+n(r.modelValue?.elapsed?.toFixed(2))+`s `,1)])):m(``,!0),t(`p`,Dt,[s(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.traceId`))+`: `+n(r.modelValue?.trace_id)+` `,1),s(S,{content:r.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})])):m(``,!0),!r.modelValue?.response||r.modelValue?.response?.state===`processing`||r.modelValue?.response?.state===`pending`?(c(),e(`div`,Ot,[s(C,{closable:!1,class:`info`},{template:d(()=>[s(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.failure`)),1)]),default:d(()=>[t(`p`,kt,[s(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(r.$t(`luma.name.taskId`))+`: `+n(r.modelValue?.id)+` `,1),s(S,{content:r.modelValue?.id},null,8,[`content`])])]),_:1})])):m(``,!0)])])}var jt=i({name:`RecentPanel`,components:{BotPlaceholder:K,TaskPreview:E(lt,[[`render`,At],[`__scopeId`,`data-v-9c354ffe`]]),NoTasks:q,ScrollList:H},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`,`extend`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.luma?.tasks,items:this.$store.state.luma?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Mt={key:0},Nt={key:2,class:`w-full h-full flex items-center justify-center`};function Pt(t,n,r,i,a,u){let p=h(`bot-placeholder`),g=h(`task-preview`),_=h(`scroll-list`),v=h(`no-tasks`);return c(),e(l,null,[t.tasks?.items===void 0?(c(),e(`div`,Mt,[s(p)])):t.tasks?.items?.length&&t.tasks?.items?.length>0?(c(),o(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:t.loading,onReachTop:n[1]||=e=>t.$emit(`reach-top`)},{default:d(()=>[(c(!0),e(l,null,f(t.tasks?.items,e=>(c(),o(g,{key:e.id,"model-value":e,onExtend:n[0]||=e=>t.$emit(`extend`)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):m(``,!0),t.tasks?.items?.length===0?(c(),e(`div`,Nt,[s(v)])):m(``,!0)],64)}var Ft=i({name:`LumaIndex`,components:{ConfigPanel:ct,Layout:re,RecentPanel:E(jt,[[`render`,Pt]])},mixins:[ee],inject:[`initialized`],emits:[`extend`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.luma?.status?.getApplications===P.Request},tasksLoading(){return this.$store.state.luma?.status?.getTasks===P.Request||this.fetchingTasks},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},application(){return this.$store.state.luma.application},tasks(){return this.$store.state.luma.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await U({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`luma/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`luma/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){console.debug(`scrolling down`),await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`luma/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!te(this.uploadTracker,e=>this.$t(e),e=>T.warning(e)))return;let e={...this.config,async:!0};if(!this.hasText(e.prompt)){T.error(this.$t(`luma.message.promptRequired`));return}if(e.prompt=e.prompt?.trim(),!M())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}T.info(this.$t(`luma.message.startingTask`)),w(`luma`,A.generate(e,{token:t})).then(()=>{T.success(this.$t(`luma.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?T.error(this.$t(`luma.message.usedUp`)):T.error(this.$t(`luma.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},hasText(e){return typeof e==`string`&&e.trim().length>0}}});function It(e,t,n,r,i,a){let l=h(`config-panel`),u=h(`recent-panel`),f=h(`layout`);return c(),o(f,null,{config:d(()=>[s(l,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:d(()=>[s(u,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop,onExtend:t[0]||=t=>e.$emit(`extend`)},null,8,[`loading`,`onReachTop`])]),_:1})}var Lt=E(Ft,[[`render`,It]]);export{Lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,D as t,E as n,Gt as r,Ht as i,I as a,N as o,O as s,P as c,Q as l,S as u,dt as d,et as f,k as p,nt as m,tt as h}from"./vendor-chart-kBsXB1rh.js";import{n as g,t as _}from"./tabs-CcGiBXnJ.js";import{t as v}from"./upload-BUY6iRe-.js";import{t as y}from"./image-BJNsYYKd.js";import{t as b}from"./alert-CXSqX3ys.js";import{n as ee,r as x}from"./radio-Ct6y4mt7.js";import{t as S}from"./drawer-CF-Mh2Gm.js";import{n as C,t as w}from"./skeleton-DN9iOc90.js";import"./constants-BbSGgy1t.js";import{$n as te,$r as T,A as E,Hr as D,Ht as O,Ut as k,Vt as A,Wt as j,Yn as M,en as N,ui as P,wn as F,zr as I}from"./index-Bf6bS8cW.js";import{t as L}from"./index.es-CuQlvr5B.js";import{t as R}from"./CopyToClipboard-D8gJOukV.js";import{t as z}from"./Status-Xf3arMf9.js";import{t as B}from"./ImagePreview-DtPgesXi.js";import{i as V,n as H,t as U}from"./pagination-BJ34zRxf.js";import{t as W}from"./ApiCodeButton-wgOlho8X.js";var G=a({name:`LayoutHeadshots`,components:{ElDrawer:S,ElButton:P,FontAwesomeIcon:L},data(){return{drawer:!1}}}),K={class:`main flex flex-row flex-1`},q={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},J={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Y(n,r,i,a,o,s){let u=m(`font-awesome-icon`),f=m(`el-button`),p=m(`el-drawer`);return l(),e(`div`,K,[t(`div`,q,[h(n.$slots,`config`,{},void 0,!0)]),t(`div`,J,[h(n.$slots,`result`,{},void 0,!0)]),c(f,{circle:``,class:`menu`,onClick:r[0]||=e=>n.drawer=!0},{default:d(()=>[c(u,{icon:`fa-solid fa-gear`})]),_:1}),c(p,{modelValue:n.drawer,"onUpdate:modelValue":r[1]||=e=>n.drawer=e,"with-header":!1,size:`340px`,class:`drawer`},{default:d(()=>[h(n.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var X=E(G,[[`render`,Y],[`__scopeId`,`data-v-ada6b2d1`]]),Z=a({name:`ImageUrlsInput`,components:{ElUpload:v,ElButton:P,InfoIcon:V,ImagePreview:B,FontAwesomeIcon:L},mixins:[j,O],data(){return{fileList:[],uploadUrl:D()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.headshots?.config?.image_urls},set(){let e=this.urls;this.$store.commit(`headshots/setConfig`,{...this.$store.state.headshots?.config,image_urls:e})}}},mounted(){this.value||=void 0,this.onSetImageUrls()},methods:{onExceed(){T.warning(this.$t(`headshots.message.uploadImageExceed`))},onError(){T.error(this.$t(`headshots.message.uploadImageError`))},onSetImageUrls(){let e=this.urls;this.$store.commit(`headshots/setConfig`,{...this.$store.state.headshots?.config,image_urls:e})},async onSuccess(){this.onSetImageUrls()}}}),Q={class:`field`},ne={class:`title font-bold`},re={class:`upload-wrapper`};function ie(n,i,a,s,u,f){let p=m(`image-preview`),h=m(`font-awesome-icon`),g=m(`el-button`),_=m(`el-upload`),v=m(`info-icon`);return l(),e(`div`,Q,[t(`h2`,ne,r(n.$t(`headshots.name.endImageUrls`)),1),t(`div`,re,[c(_,{ref:`uploader`,"file-list":n.fileList,"onUpdate:fileList":i[0]||=e=>n.fileList=e,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,class:`value upload-wrapper`,limit:2,multiple:!0,"list-type":`picture`,action:n.uploadUrl,"on-exceed":n.onExceed,"on-error":n.onError,"on-success":n.onSuccess,headers:n.headers},{file:d(({file:e})=>[c(p,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>n.fileList.splice(n.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:d(()=>[c(g,{size:`small`,type:`primary`,round:``},{default:d(()=>[c(h,{icon:`fa-solid fa-upload`,class:`mr-1`}),o(` `+r(n.$t(`headshots.button.uploadImageUrls`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])]),c(v,{content:n.$t(`headshots.description.endImageUrls`),class:`info`},null,8,[`content`])])}var ae=E(Z,[[`render`,ie],[`__scopeId`,`data-v-d468812a`]]),oe=`fast`,se=a({name:`ModeSelector`,components:{ElRadioButton:ee,ElRadioGroup:x},data(){return{options:[{label:this.$t(`headshots.button.fast`),value:`fast`},{label:this.$t(`headshots.button.relax`),value:`relax`}]}},computed:{value:{get(){return this.$store.state.headshots.config?.mode},set(e){console.debug(`set mode`,e),this.$store.commit(`headshots/setConfig`,{...this.$store.state.headshots.config,mode:e})}}},mounted(){this.value||=oe}}),ce={class:`field`},le={class:`title font-bold`};function ue(n,i,a,p,h,g){let _=m(`el-radio-button`),v=m(`el-radio-group`);return l(),e(`div`,ce,[t(`h2`,le,r(n.$t(`headshots.name.mode`)),1),c(v,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,class:`mode`},{default:d(()=>[(l(!0),e(u,null,f(n.options,e=>(l(),s(_,{key:e.value,label:e.value},{default:d(()=>[o(r(e.label),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])])}var de=E(se,[[`render`,ue],[`__scopeId`,`data-v-e7702494`]]),fe=a({name:`StylizeSelector`,components:{ElTabs:g,ElTabPane:_,ElImage:y},data(){return{tab:`styles`,value:``,elements:{styles:{displayName:this.$t(`headshots.styleCategory.styles`),items:[{image:`https://static.aipedias.com/aicamera/common/20241008/20241008202314260779439.png`,label:this.$t(`headshots.styleTag.malePportrait`),value:`male_portrait`},{image:`https://static.aipedias.com/aicamera/common/20241008/202410082022241e9755548.png`,label:this.$t(`headshots.styleTag.malePportrait2`),value:`male_portrait2`},{image:`https://static.aipedias.com/aicamera/common/20241101/20241101170130d78f66521.png`,label:this.$t(`headshots.styleTag.kindergarten`),value:`kindergarten`},{image:`https://static.aipedias.com/aicamera/common/20240923/20240923123233accf60398.webp`,label:this.$t(`headshots.styleTag.logoTshirt`),value:`logo_tshirt`},{image:`https://static.aipedias.com/aicamera/common/20241025/202410252012329472d0656.jpg`,label:this.$t(`headshots.styleTag.wedding`),value:`wedding`},{image:`https://static.aipedias.com/aicamera/common/20240915/20240915145045254931400.webp`,label:this.$t(`headshots.styleTag.businessPphoto`),value:`business_photo`},{image:`https://static.aipedias.com/aicamera/common/20240810/20240810194526040341795.jpg`,label:this.$t(`headshots.styleTag.bobSuit`),value:`bob_suit`},{image:`https://static.aipedias.com/aicamera/common/20240717/20240717152654e0b348173.webp`,label:this.$t(`headshots.styleTag.femalePortrait`),value:`female_portrait`}]}}}},watch:{value(e){console.debug(`set template`,e),this.$store.commit(`headshots/setConfig`,{...this.$store.state.headshots?.config,template:e})}},mounted(){this.value||=``,console.debug(`set template`,this.value),this.$store.commit(`headshots/setConfig`,{...this.$store.state.headshots?.config,template:this.value})},methods:{onToggle(e){this.value===e?this.value=``:this.value=e,console.debug(`set template`,this.value),this.$store.commit(`headshots/setConfig`,{...this.$store.state.headshots?.config,template:this.value})}}}),pe={class:`field`},me=[`onClick`],he={class:`name`};function ge(n,a,o,p,h,g){let _=m(`el-image`),v=m(`el-tab-pane`),y=m(`el-tabs`);return l(),e(`div`,pe,[c(y,{modelValue:n.tab,"onUpdate:modelValue":a[0]||=e=>n.tab=e},{default:d(()=>[(l(!0),e(u,null,f(n.elements,(a,o)=>(l(),s(v,{key:o,label:a.displayName,name:o,class:`pane`},{default:d(()=>[(l(!0),e(u,null,f(a.items,(a,o)=>(l(),e(`div`,{key:o,class:i({item:!0,active:n.value===a.value}),onClick:e=>n.onToggle(a.value)},[c(_,{src:a.image,fit:`fill`,class:`preview`},null,8,[`src`]),t(`span`,he,r(a.label),1)],10,me))),128))]),_:2},1032,[`label`,`name`]))),128))]),_:1},8,[`modelValue`])])}var _e=a({name:`PresetPanel`,components:{ModeSelector:de,ImageUrlsInput:ae,ElButton:P,FontAwesomeIcon:L,ElementsSelector:E(fe,[[`render`,ge],[`__scopeId`,`data-v-be4bd25d`]])},emits:[`generate`],computed:{config(){return this.$store.state.headshots?.config}},methods:{onGenerate(){this.$emit(`generate`)}}}),ve={class:`panel`},ye={class:`config`},be={class:`actions`};function xe(n,i,a,s,u,f){let p=m(`elements-selector`),h=m(`mode-selector`),g=m(`image-urls-input`),_=m(`font-awesome-icon`),v=m(`el-button`);return l(),e(`div`,ve,[t(`div`,ye,[c(p,{class:`mb-4`}),c(h,{class:`mb-4`}),c(g,{class:`mb-4`}),t(`div`,be,[c(v,{type:`primary`,class:`btn w-full`,round:``,onClick:n.onGenerate},{default:d(()=>[c(_,{icon:`fa-solid fa-magic`,class:`mr-2`}),o(` `+r(n.$t(`headshots.button.generate`)),1)]),_:1},8,[`onClick`])])])])}var Se=E(_e,[[`render`,xe],[`__scopeId`,`data-v-848739f6`]]),Ce=a({name:`ImageGallery`,props:{modelValue:{type:Object,required:!0}},setup(e){return{images:n(()=>e.modelValue?.response?.data?.slice(0,2)||[]),viewImage:e=>{window.open(e,`_blank`)}}}}),we={class:`image-gallery`},Te=[`src`],Ee=[`onClick`];function De(n,i,a,o,s,c){return l(),e(`div`,we,[(l(!0),e(u,null,f(n.images,(i,a)=>(l(),e(`div`,{key:a,class:`image-container`},[t(`img`,{src:i.image_url,alt:`Image`},null,8,Te),i.image_url?(l(),e(`button`,{key:0,class:`view-button`,onClick:e=>n.viewImage(i.image_url)},r(n.$t(`headshots.button.viewImage`)),9,Ee)):p(``,!0)]))),128))])}var Oe=a({name:`TaskPreview`,components:{ElImage:y,CopyToClipboard:R,FontAwesomeIcon:L,ElAlert:b,ImageGallery:E(Ce,[[`render`,De],[`__scopeId`,`data-v-42f0a7be`]]),ApiCodeButton:W},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.headshots?.application},config(){return this.$store.state.headshots?.config}},methods:{onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onReload(e){let t=e.target,n=new URL(t.src),r=n.searchParams.get(`retry`);if(!r)n.searchParams.set(`retry`,`1`);else if(parseInt(r)<2)n.searchParams.set(`retry`,(parseInt(r)+1).toString());else return;t.src=n.toString()},onOpenVideo(e){window.open(e,`_blank`)}}}),ke={class:`preview`},Ae={class:`left`},je={class:`main`},Me={class:`bot`},Ne={class:`datetime`},Pe={class:`info`},Fe={key:0,class:`prompt mt-2`},Ie={key:0},Le={key:1},Re={key:0,class:i({content:!0,failed:!0})},ze={class:`image-wrapper`},Be={class:i({operations:!0,"mt-2":!0,"mb-2":!0})},Ve={class:`description`},He={key:0,class:`description`},Ue={key:1,class:i({content:!0})},We={class:`description`},Ge={class:`description`},Ke={key:0,class:`description`},qe={class:`description`},Je={key:2,class:i({content:!0})},$={class:`description`},Ye={key:3,class:i({content:!0})},Xe={class:`description`};function Ze(n,i,a,s,u,f){let h=m(`el-image`),g=m(`image-gallery`),_=m(`api-code-button`),v=m(`font-awesome-icon`),y=m(`copy-to-clipboard`),b=m(`el-alert`);return l(),e(`div`,ke,[t(`div`,Ae,[c(h,{src:`https://cdn.acedata.cloud/isxyfw.png`,class:`avatar`})]),t(`div`,je,[t(`div`,Me,[o(r(n.$t(`headshots.name.headshotsBot`))+` `,1),t(`span`,Ne,r(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,Pe,[n.modelValue?.request?.template?(l(),e(`p`,Fe,[o(r(n.modelValue?.request?.template)+` `,1),n.modelValue?.response?p(``,!0):(l(),e(`span`,Ie,` - (`+r(n.$t(`headshots.status.pending`))+`) `,1)),n.modelValue?.response?.status===`unknown`?(l(),e(`span`,Le,` - (`+r(n.$t(`headshots.status.processing`))+`) `,1)):p(``,!0)])):p(``,!0)]),n.modelValue?.response?.success===!0?(l(),e(`div`,Re,[t(`div`,ze,[c(g,{"model-value":n.modelValue},null,8,[`model-value`])]),t(`div`,Be,[c(_,{path:`/headshots/images`,body:n.modelValue?.request},null,8,[`body`])]),c(b,{closable:!1,class:`mt-2 success`},{default:d(()=>[t(`p`,Ve,[c(v,{icon:`fa-solid fa-magic`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.taskId`))+`: `+r(n.modelValue?.id)+` `,1),c(y,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(l(),e(`p`,He,[c(v,{icon:`fa-solid fa-clock`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.elapsed`))+`: `+r(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):p(``,!0)]),_:1})])):p(``,!0),n.modelValue?.response?.success===!1?(l(),e(`div`,Ue,[c(b,{closable:!1,class:`failure`},{template:d(()=>[c(v,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.failure`)),1)]),default:d(()=>[t(`p`,We,[c(v,{icon:`fa-solid fa-magic`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.taskId`))+`: `+r(n.modelValue?.id)+` `,1),c(y,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),t(`p`,Ge,[c(v,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.failureReason`))+`: `+r(n.modelValue?.response?.error?.message)+` `,1),c(y,{content:n.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),n.modelValue?.elapsed?(l(),e(`p`,Ke,[c(v,{icon:`fa-solid fa-clock`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.elapsed`))+`: `+r(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):p(``,!0),t(`p`,qe,[c(v,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.traceId`))+`: `+r(n.modelValue?.response?.trace_id)+` `,1),c(y,{content:n.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):p(``,!0),n.modelValue?.response?p(``,!0):(l(),e(`div`,Je,[c(b,{closable:!1,class:`info`},{template:d(()=>[c(v,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.failure`)),1)]),default:d(()=>[t(`p`,$,[c(v,{icon:`fa-solid fa-magic`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.taskId`))+`: `+r(n.modelValue?.id)+` `,1),c(y,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})])),n.modelValue?.response?.status===`unknown`?(l(),e(`div`,Ye,[c(b,{closable:!1,class:`info`},{template:d(()=>[c(v,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.failure`)),1)]),default:d(()=>[t(`p`,Xe,[c(v,{icon:`fa-solid fa-magic`,class:`mr-1`}),o(` `+r(n.$t(`headshots.name.taskId`))+`: `+r(n.modelValue?.id)+` `,1),c(y,{content:n.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):p(``,!0)])])}var Qe=a({name:`RecentPanel`,components:{TaskPreview:E(Oe,[[`render`,Ze],[`__scopeId`,`data-v-0e921c0c`]]),ElSkeleton:w,ElSkeletonItem:C,ScrollList:H},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.headshots?.tasks,items:this.$store.state.headshots?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),$e={key:0,class:`tasks`},et={class:`left`},tt={class:`main`},nt={key:1,class:`tasks`},rt={key:2,class:`description`};function it(n,i,a,o,h,g){let _=m(`el-skeleton-item`),v=m(`el-skeleton`),y=m(`task-preview`),b=m(`scroll-list`);return l(),s(b,{ref:`scrollList`,class:`panel recent`,loading:n.loading,onReachTop:i[0]||=e=>n.$emit(`reach-top`)},{default:d(()=>[n.tasks?.items===void 0?(l(),e(`div`,$e,[(l(),e(u,null,f(3,e=>t(`div`,{key:e,class:`task placeholder`},[t(`div`,et,[c(v,{animated:``},{template:d(()=>[c(_,{variant:`image`,class:`avatar`})]),_:1})]),t(`div`,tt,[c(v,{animated:``},{template:d(()=>[c(_,{variant:`p`,class:`title`}),c(_,{variant:`image`,class:`icon`})]),_:1})])])),64))])):n.tasks?.items?.length&&n.tasks?.items?.length>0?(l(),e(`div`,nt,[(l(!0),e(u,null,f(n.tasks?.items,(e,t)=>(l(),s(y,{key:t,"model-value":e,class:`preview`},null,8,[`model-value`]))),128))])):p(``,!0),n.tasks?.items?.length===0?(l(),e(`p`,rt,r(n.$t(`headshots.message.noTasks`)),1)):p(``,!0)]),_:1},8,[`loading`])}var at=a({name:`HeadshotsIndex`,components:{ConfigPanel:Se,Layout:X,ApplicationStatus:z,RecentPanel:E(Qe,[[`render`,it],[`__scopeId`,`data-v-ffd55c16`]])},mixins:[k],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.headshots?.status?.getApplications===I.Request},tasksLoading(){return this.$store.state.headshots?.status?.getTasks===I.Request||this.fetchingTasks},service(){return this.$store.state.headshots.service},credential(){return this.$store.state.headshots.credential},config(){return this.$store.state.headshots.config},initializing(){return this.$store.state.headshots.status.getApplications===I.Request},needApply(){return this.$store.state.headshots.status.getApplications===I.Success&&!this.application},application(){return this.$store.state.headshots.application},applications(){return this.$store.state.headshots.applications},tasks(){return this.$store.state.headshots.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await U({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`headshots/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`headshots/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},onApply(){M.create({application:this.application}).then(({data:e})=>{this.application=e,T.success(this.$t(`application.message.applySuccessfully`))}).catch(e=>{e?.response?.data?.code===`duplication`&&T.error(this.$t(`application.message.alreadyApplied`))})},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`headshots/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGeneratePicture(){if(!A(this.uploadTracker,e=>this.$t(e),e=>T.warning(e)))return;let e={...this.config,async:!0};if(!N())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}T.info(this.$t(`headshots.message.startingTask`)),te(`headshots`,F.generate(e,{token:t})).then(()=>{T.success(this.$t(`headshots.message.startTaskSuccess`)),this.$store.commit(`headshots/setConfig`,{config:void 0})}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?T.error(this.$t(`headshots.message.usedUp`)):T.error(this.$t(`headshots.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function ot(e,t,n,r,i,a){let o=m(`config-panel`),u=m(`application-status`),f=m(`recent-panel`),p=m(`layout`);return l(),s(p,null,{config:d(()=>[c(o,{onGenerate:e.onGeneratePicture},null,8,[`onGenerate`])]),result:d(()=>[c(u,{initializing:e.initializing,application:e.application,applications:e.applications,service:e.service,"need-apply":e.needApply,class:`mb-4`,onRefresh:e.onGetApplication,onSelect:t[0]||=t=>e.$store.dispatch(`headshots/setApplication`,t)},null,8,[`initializing`,`application`,`applications`,`service`,`need-apply`,`onRefresh`]),c(f,{ref:`recentPanel`,class:`panel recent`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var st=E(at,[[`render`,ot],[`__scopeId`,`data-v-9ea36b64`]]);export{st as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,D as t,Gt as n,Ht as r,I as i,N as a,O as o,P as s,Q as c,S as l,Wt as u,b as d,dt as f,et as p,ft as m,k as h,nt as g,tt as _,v}from"./vendor-chart-kBsXB1rh.js";import{b as y,h as b,nt as x}from"./use-deprecated-DiBc2upm.js";import{r as S,t as C}from"./select-ul7Wo_Q6.js";import{n as w,t as T}from"./tabs-CcGiBXnJ.js";import{t as E}from"./upload-BUY6iRe-.js";import{t as D}from"./tooltip-BWueZx_j.js";import{t as O}from"./image-BJNsYYKd.js";import{t as k}from"./alert-CXSqX3ys.js";import{n as A,r as j}from"./radio-Ct6y4mt7.js";import{t as M}from"./drawer-CF-Mh2Gm.js";import{n as ee,t as N}from"./dropdown-DCD4N07K.js";import{t as P}from"./input-number-D5etV7az.js";import{t as F}from"./slider-BAnHaO57.js";import{t as I}from"./switch-DFeLUK7J.js";import{vi as L,yi as R}from"./constants-BbSGgy1t.js";import{$n as z,$r as B,A as V,Hr as H,Ht as U,Kn as W,Kt as G,Mr as K,Nr as te,Pr as ne,Ut as re,Vt as ie,Wt as q,ci as J,en as Y,ni as ae,ui as X,zr as oe}from"./index-Bf6bS8cW.js";import{t as Z}from"./index.es-CuQlvr5B.js";import{t as se}from"./CopyToClipboard-D8gJOukV.js";import{t as Q}from"./ImagePreview-DtPgesXi.js";import{n as ce}from"./taskDrawerMixin-CfysS2FH.js";import{t as le}from"./Consumption-B7oPcRnx.js";import{i as $,n as ue,t as de}from"./pagination-BJ34zRxf.js";import{t as fe}from"./VideoPlayer-CgGC2uHg.js";import{t as pe}from"./ApiCodeButton-wgOlho8X.js";import{t as me}from"./BotPlaceholder-BBa7CDpO.js";import{t as he}from"./NoTasks-CGrunQ-b.js";import{t as ge}from"./PromptTextarea-CMhCuxJH.js";import{t as _e}from"./ImageWrapper-CKuj75Dg.js";var ve=i({name:`LayoutMidjourney`,components:{ElDrawer:M,ElButton:X,FontAwesomeIcon:Z},mixins:[ce]}),ye={class:`main flex-1 h-full flex flex-row`},be={class:`config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},xe={class:`results flex-1 h-full flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Se(n,r,i,a,o,l){let u=g(`font-awesome-icon`),d=g(`el-button`),p=g(`el-drawer`);return c(),e(`div`,ye,[t(`div`,be,[_(n.$slots,`config`,{},void 0,!0)]),t(`div`,xe,[_(n.$slots,`results`,{},void 0,!0)]),m(s(d,{circle:``,class:`menu`,onClick:r[0]||=e=>n.drawer=!0},{default:f(()=>[s(u,{icon:`fa-solid fa-magic`})]),_:1},512),[[v,!n.tasksEmpty]]),s(p,{modelValue:n.drawer,"onUpdate:modelValue":r[1]||=e=>n.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`,class:`drawer`},{default:f(()=>[_(n.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Ce=V(ve,[[`render`,Se],[`__scopeId`,`data-v-689d2913`]]),we=i({name:`RatioSelector`,data(){return{options:[{value:`1:1`,label:`1:1`,width:20,height:20},{value:`4:3`,label:`4:3`,width:20,height:15},{value:`3:4`,label:`3:4`,width:15,height:20},{value:`16:9`,label:`16:9`,width:25,height:13},{value:`9:16`,label:`9:16`,width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state.midjourney.config.ratio},set(e){console.debug(`set ratio`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,ratio:e})}}},mounted(){this.value||=`1:1`}}),Te={class:`text-sm font-bold mb-2 block`},Ee={class:`items`},De=[`onClick`],Oe={class:`name`};function ke(i,a,o,s,d,f){return c(),e(`div`,null,[t(`span`,Te,n(i.$t(`midjourney.name.ratio`)),1),t(`div`,Ee,[(c(!0),e(l,null,p(i.options,(a,o)=>(c(),e(`div`,{key:o,class:r({active:i.active===o,item:!0}),onClick:e=>i.value=a.value},[t(`div`,{class:r([`preview`,a.label])},[t(`div`,{class:`rect`,style:u({width:a.width+`px`,height:a.height+`px`})},null,4)],2),t(`p`,Oe,n(a.label),1)],10,De))),128))])])}var Ae=V(we,[[`render`,ke],[`__scopeId`,`data-v-b1114c34`]]),je=!1,Me=i({name:`AdvancedSelector`,components:{ElSwitch:I},computed:{value:{get(){return this.$store.state.midjourney.config.advanced},set(e){console.debug(`set advanced`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,advanced:e})}}},mounted(){this.value===void 0&&(this.value=je)}}),Ne={class:`field`},Pe={class:`title`};function Fe(r,i,a,o,l,u){let d=g(`el-switch`);return c(),e(`div`,Ne,[t(`h2`,Pe,n(r.$t(`midjourney.name.advanced`)),1),s(d,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])}var Ie=V(Me,[[`render`,Fe],[`__scopeId`,`data-v-2d55fce2`]]),Le=i({name:`LoopSelector`,components:{ElSwitch:I,InfoIcon:$},computed:{value:{get(){return this.$store.state.midjourney?.config?.loop},set(e){console.debug(`set loop`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney?.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),Re={class:`relative`},ze={class:`flex justify-between`},Be={class:`flex justify-start items-center`},Ve={class:`text-sm font-bold`},He={class:`flex justify-end items-center`};function Ue(r,i,a,o,l,u){let d=g(`info-icon`),f=g(`el-switch`);return c(),e(`div`,Re,[t(`div`,ze,[t(`div`,Be,[t(`span`,Ve,n(r.$t(`midjourney.name.loop`)),1),s(d,{content:r.$t(`midjourney.description.loop`)},null,8,[`content`])]),t(`div`,He,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`},null,8,[`modelValue`])])])])}var We=V(Le,[[`render`,Ue]]),Ge=`8.1`,Ke=i({name:`VersionSelector`,components:{ElSelect:S,ElOption:C},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`8.1`,label:`8.1`},{value:`8`,label:`8`},{value:`7`,label:`7`},{value:`6.1`,label:`6.1`},{value:`6.0`,label:`6.0`},{value:`5.2`,label:`5.2`},{value:`5.1`,label:`5.1`},{value:`5.0`,label:`5`},{value:`4`,label:`4`},{value:`3`,label:`3`},{value:`2`,label:`2`},{value:`1`,label:`1`}]}},computed:{value:{get(){return this.$store.state.midjourney.config.version},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,version:e})}}},mounted(){this.value||=Ge}}),qe={class:`field`},Je={class:`text-sm font-bold`};function Ye(r,i,a,u,d,m){let h=g(`el-option`),_=g(`el-select`);return c(),e(`div`,qe,[t(`span`,Je,n(r.$t(`midjourney.name.version`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`midjourney.placeholder.select`)},{default:f(()=>[(c(!0),e(l,null,p(r.options,e=>(c(),o(h,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Xe=V(Ke,[[`render`,Ye],[`__scopeId`,`data-v-8e00777d`]]),Ze=i({name:`HdSelector`,components:{ElSwitch:I,ElTooltip:D,FontAwesomeIcon:Z},computed:{value:{get(){return this.$store.state.midjourney.config.hd||!1},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,hd:e})}}}}),Qe={class:`field`},$e={class:`text-sm font-bold`};function et(r,i,o,l,u,d){let p=g(`font-awesome-icon`),m=g(`el-tooltip`),h=g(`el-switch`);return c(),e(`div`,Qe,[t(`span`,$e,[a(n(r.$t(`midjourney.name.hd`))+` `,1),s(m,{content:r.$t(`midjourney.description.hd`),placement:`top`},{default:f(()=>[s(p,{icon:`fa-solid fa-circle-info`,class:`info-icon`})]),_:1},8,[`content`])]),s(h,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e},null,8,[`modelValue`])])}var tt=V(Ze,[[`render`,et],[`__scopeId`,`data-v-871c894e`]]),nt=i({name:`ReferenceImage`,components:{ElUpload:E,ElButton:X,InfoIcon:$,FontAwesomeIcon:Z,ImagePreview:Q},mixins:[q,U],emits:[`change`],data(){return{fileList:[],uploadUrl:H()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,image_url:e[0]})}}},methods:{onExceed(){B.warning(this.$t(`midjourney.message.uploadStartImageExceed`))},onError(){B.error(this.$t(`midjourney.message.uploadStartImageError`))}}}),rt={class:`relative`},it={class:`flex justify-between`},at={class:`flex justify-start items-center`},ot={class:`text-sm font-bold`};function st(r,i,o,l,u,d){let p=g(`info-icon`),m=g(`image-preview`),h=g(`font-awesome-icon`),_=g(`el-button`),v=g(`el-upload`);return c(),e(`div`,rt,[t(`div`,it,[t(`div`,at,[t(`span`,ot,[a(n(r.$t(`midjourney.name.imageUrl`))+` `,1),i[1]||=t(`span`,{class:`text-red-500`,"aria-hidden":`true`},`*`,-1)]),s(p,{content:r.$t(`midjourney.description.imageUrl`)},null,8,[`content`])])]),s(v,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,action:r.uploadUrl,"on-exceed":r.onExceed,"on-error":r.onError,headers:r.headers},{file:f(({file:e})=>[s(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:f(()=>[s(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:f(()=>[s(h,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`midjourney.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`headers`])])}var ct=V(nt,[[`render`,st],[`__scopeId`,`data-v-0445850f`]]),lt=i({name:`EndImageUrlInput`,components:{ElUpload:E,ElButton:X,InfoIcon:$,FontAwesomeIcon:Z,ImagePreview:Q},mixins:[q,U],emits:[`change`],data(){return{fileList:[],uploadUrl:H()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,end_image_url:e[0]})}}},methods:{onExceed(){B.warning(this.$t(`midjourney.message.uploadStartImageExceed`))},onError(){B.error(this.$t(`midjourney.message.uploadEndImageError`))}}}),ut={class:`relative`},dt={class:`flex justify-between`},ft={class:`flex justify-start items-center`},pt={class:`text-sm font-bold`};function mt(r,i,o,l,u,d){let p=g(`info-icon`),m=g(`image-preview`),h=g(`font-awesome-icon`),_=g(`el-button`),v=g(`el-upload`);return c(),e(`div`,ut,[t(`div`,dt,[t(`div`,ft,[t(`span`,pt,n(r.$t(`midjourney.name.endImageUrl`)),1),s(p,{content:r.$t(`midjourney.description.endImageUrl`)},null,8,[`content`])])]),s(v,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,action:r.uploadUrl,"on-exceed":r.onExceed,"on-error":r.onError,headers:r.headers},{file:f(({file:e})=>[s(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:f(()=>[s(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:f(()=>[s(h,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`midjourney.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`headers`])])}var ht=V(lt,[[`render`,mt],[`__scopeId`,`data-v-375309d2`]]),gt=i({name:`ReferenceImage`,components:{ElUpload:E,ElButton:X,InfoIcon:$,FontAwesomeIcon:Z,ImagePreview:Q},mixins:[q,U],emits:[`change`],data(){return{fileList:[],uploadUrl:H()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,image_url:e[0]})}}},methods:{onExceed(){B.warning(this.$t(`midjourney.message.uploadStartImageExceed`))},onError(){B.error(this.$t(`midjourney.message.uploadStartImageError`))}}}),_t={class:`relative`},vt={class:`flex justify-between`},yt={class:`flex justify-start items-center`},bt={class:`text-sm font-bold`};function xt(r,i,o,l,u,d){let p=g(`info-icon`),m=g(`image-preview`),h=g(`font-awesome-icon`),_=g(`el-button`),v=g(`el-upload`);return c(),e(`div`,_t,[t(`div`,vt,[t(`div`,yt,[t(`span`,bt,n(r.$t(`midjourney.name.imageUrl2`)),1),s(p,{content:r.$t(`midjourney.description.imageUrl2`)},null,8,[`content`])])]),s(v,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,action:r.uploadUrl,"on-exceed":r.onExceed,"on-error":r.onError,headers:r.headers},{file:f(({file:e})=>[s(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:f(()=>[s(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:f(()=>[s(h,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`midjourney.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`headers`])])}var St=V(gt,[[`render`,xt],[`__scopeId`,`data-v-6b4c9a65`]]),Ct=i({name:`StylizeSelector`,components:{ElSlider:F,InfoIcon:$,ElInputNumber:P},computed:{value:{get(){return this.$store.state.midjourney.config.stylize},set(e){console.debug(`set stylize`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,stylize:e})}}},mounted(){this.value||=100}}),wt={class:`flex justify-between`},Tt={class:`flex justify-start items-center`},Et={class:`text-sm font-bold`},Dt={class:`flex justify-end items-center`},Ot={class:`w-full px-2`};function kt(r,i,a,o,l,u){let d=g(`info-icon`),f=g(`el-input-number`),p=g(`el-slider`);return c(),e(`div`,null,[t(`div`,wt,[t(`div`,Tt,[t(`span`,Et,n(r.$t(`midjourney.name.stylize`)),1),s(d,{content:r.$t(`midjourney.description.stylize`)},null,8,[`content`])]),t(`div`,Dt,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),t(`div`,Ot,[s(p,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:0,max:100,step:1},null,8,[`modelValue`])])])}var At=V(Ct,[[`render`,kt]]),jt=0,Mt=i({name:`ChaosSelector`,components:{ElSlider:F,InfoIcon:$,ElInputNumber:P},computed:{value:{get(){return this.$store.state.midjourney.config.chaos},set(e){console.debug(`set quality`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,chaos:e})}}},mounted(){this.value||=jt}}),Nt={class:`flex justify-between`},Pt={class:`flex justify-start items-center`},Ft={class:`text-sm font-bold`},It={class:`flex justify-end items-center`},Lt={class:`w-full px-2`};function Rt(r,i,a,o,l,u){let d=g(`info-icon`),f=g(`el-input-number`),p=g(`el-slider`);return c(),e(`div`,null,[t(`div`,Nt,[t(`div`,Pt,[t(`span`,Ft,n(r.$t(`midjourney.name.chaos`)),1),s(d,{content:r.$t(`midjourney.description.chaos`)},null,8,[`content`])]),t(`div`,It,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),t(`div`,Lt,[s(p,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:0,max:100,step:1},null,8,[`modelValue`])])])}var zt=V(Mt,[[`render`,Rt],[`__scopeId`,`data-v-ed158765`]]),Bt=i({name:`ModelSelector`,components:{ElImage:O,InfoIcon:$},data(){return{options:[{value:``,label:this.$t(`midjourney.model.general`),image:`https://cdn.acedata.cloud/ebvlwg.png`},{value:`niji 5`,label:this.$t(`midjourney.model.niji`),image:`https://cdn.acedata.cloud/j6v1m7.png`}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)},value:{get(){return this.$store.state.midjourney.config.model},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,model:e})}}},mounted(){this.value===void 0&&(this.value=``)}}),Vt={class:`flex justify-start items-center`},Ht={class:`text-sm font-bold`},Ut={class:`items`},Wt=[`onClick`],Gt={class:`name`};function Kt(i,a,o,u,d,f){let m=g(`info-icon`),h=g(`el-image`);return c(),e(`div`,null,[t(`div`,Vt,[t(`span`,Ht,n(i.$t(`midjourney.name.model`)),1),s(m,{content:i.$t(`midjourney.description.model`)},null,8,[`content`])]),t(`div`,Ut,[(c(!0),e(l,null,p(i.options,(a,o)=>(c(),e(`div`,{key:o,class:r({active:i.active===o,item:!0}),onClick:e=>i.value=a.value},[s(h,{src:a.image,fit:`cover`,class:`image`},null,8,[`src`]),t(`p`,Gt,n(a.label),1)],10,Wt))),128))])])}var qt=V(Bt,[[`render`,Kt],[`__scopeId`,`data-v-ebc6758e`]]),Jt=i({name:`QualitySelector`,components:{ElRadioButton:A,ElRadioGroup:j},computed:{version(){return this.$store.state.midjourney.config.version||``},isV8(){return this.version===`8`||this.version===`8.1`},options(){return this.isV8?[{label:this.$t(`midjourney.button.standard`),value:`1`},{label:this.$t(`midjourney.button.ultra`),value:`4`}]:[{label:this.$t(`midjourney.button.low`),value:`.25`},{label:this.$t(`midjourney.button.medium`),value:`.5`},{label:this.$t(`midjourney.button.high`),value:`1`}]},value:{get(){return this.$store.state.midjourney.config.quality},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,quality:e})}}},watch:{isV8(e){(e&&this.value!==`1`&&this.value!==`4`||!e&&this.value===`4`)&&(this.value=`1`)}},mounted(){this.value||=`1`}}),Yt={class:`field`},Xt={class:`text-sm font-bold`};function Zt(r,i,u,d,m,h){let _=g(`el-radio-button`),v=g(`el-radio-group`);return c(),e(`div`,Yt,[t(`span`,Xt,n(r.$t(`midjourney.name.quality`)),1),s(v,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`quality`},{default:f(()=>[(c(!0),e(l,null,p(r.options,e=>(c(),o(_,{key:e.value,label:e.value},{default:f(()=>[a(n(e.label),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])])}var Qt=V(Jt,[[`render`,Zt],[`__scopeId`,`data-v-10b2574d`]]),$t=i({name:`ResolutionSelector`,components:{ElSelect:S,ElOption:C},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`480p`,label:`480p`},{value:`720p`,label:`720p`}]}},computed:{value:{get(){return this.$store.state.midjourney?.config?.resolution},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,resolution:e})}}},mounted(){this.value||=L}}),en={class:`field`},tn={class:`title font-bold`};function nn(r,i,a,u,d,m){let h=g(`el-option`),_=g(`el-select`);return c(),e(`div`,en,[t(`h2`,tn,n(r.$t(`midjourney.name.resolution`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`midjourney.placeholder.select`)},{default:f(()=>[(c(!0),e(l,null,p(r.options,e=>(c(),o(h,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var rn=V($t,[[`render`,nn],[`__scopeId`,`data-v-12537f29`]]),an=i({name:`ImageWeightSelector`,components:{ElSlider:F,InfoIcon:$},computed:{value:{get(){return this.$store.state.midjourney.config.iw},set(e){console.debug(`set iw`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,iw:e})}}},mounted(){this.value||=1}}),on={class:`flex justify-between`},sn={class:`flex justify-start items-center`},cn={class:`text-sm font-bold`},ln={class:`flex justify-end items-center`},un={class:`w-full px-2`};function dn(r,i,a,o,l,u){let d=g(`info-icon`),f=g(`el-input-number`),p=g(`el-slider`);return c(),e(`div`,null,[t(`div`,on,[t(`div`,sn,[t(`span`,cn,n(r.$t(`midjourney.name.imageWeight`)),1),s(d,{content:r.$t(`midjourney.description.imageWeight`)},null,8,[`content`])]),t(`div`,ln,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),t(`div`,un,[s(p,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:0,max:2,step:.1},null,8,[`modelValue`])])])}var fn=V(an,[[`render`,dn],[`__scopeId`,`data-v-b4bf1f1e`]]),pn=i({name:`WeirdSelector`,components:{ElSlider:F,ElInputNumber:P,InfoIcon:$},computed:{value:{get(){return this.$store.state.midjourney.config.weird},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,weird:e})}}},mounted(){this.value||=0}}),mn={class:`flex justify-between`},hn={class:`flex justify-start items-center`},gn={class:`text-sm font-bold`},_n={class:`flex justify-end items-center`},vn={class:`w-full px-2`};function yn(r,i,a,o,l,u){let d=g(`info-icon`),f=g(`el-input-number`),p=g(`el-slider`);return c(),e(`div`,null,[t(`div`,mn,[t(`div`,hn,[t(`span`,gn,n(r.$t(`midjourney.name.weird`)),1),s(d,{content:r.$t(`midjourney.description.weird`)},null,8,[`content`])]),t(`div`,_n,[s(f,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),t(`div`,vn,[s(p,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:0,max:1e3,step:1},null,8,[`modelValue`])])])}var bn=V(pn,[[`render`,yn]]),xn=i({name:`VideoFromInput`,components:{VideoPlayer:fe},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{controls:[`play-large`,`play`,`progress`,`current-time`,`mute`,`captions`,`settings`,`fullscreen`]}}},computed:{config(){return this.$store.state.midjourney?.config}}}),Sn={class:`relative`},Cn={class:`flex mb-2`},wn={class:`text-sm font-bold`};function Tn(r,i,a,s,l,u){let d=g(`video-player`);return c(),e(`div`,Sn,[t(`div`,Cn,[t(`span`,wn,n(r.$t(`midjourney.name.extend`)),1)]),t(`div`,null,[r.config?.video_url?(c(),o(d,{key:0,src:r.config?.video_url,options:r.options},null,8,[`src`,`options`])):h(``,!0)])])}var En=V(xn,[[`render`,Tn]]),Dn=``,On=i({name:`StyleSelector`,components:{ElSelect:S,ElOption:C},data(){return{}},computed:{model(){return this.$store.state.midjourney.config.model},options(){return this.model?.includes(`niji`)?[{value:`cute`,label:this.$t(`midjourney.style.cute`)},{value:`expressive`,label:this.$t(`midjourney.style.expressive`)},{value:`scenic`,label:this.$t(`midjourney.style.scenic`)},{value:`original`,label:this.$t(`midjourney.style.original`)}]:[{value:`raw`,label:this.$t(`midjourney.style.raw`)}]},value:{get(){return this.$store.state.midjourney.config.style},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,style:e})}}},watch:{model(){this.value=``}},mounted(){this.value||=Dn}}),kn={class:`field`},An={class:`text-sm font-bold title`},jn={class:`float-left`},Mn={class:`float-right`};function Nn(r,i,a,u,d,m){let h=g(`el-option`),_=g(`el-select`);return c(),e(`div`,kn,[t(`span`,An,n(r.$t(`midjourney.name.style`)),1),s(_,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,class:`value`,placeholder:r.$t(`midjourney.placeholder.select`),clearable:``},{default:f(()=>[(c(!0),e(l,null,p(r.options,e=>(c(),o(h,{key:e.value,label:e.label,value:e.value},{default:f(()=>[t(`span`,jn,n(e.label),1),t(`span`,Mn,n(e.value),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Pn=V(On,[[`render`,Nn],[`__scopeId`,`data-v-00d50831`]]),Fn=i({name:`ElementsSelector`,components:{Check:y,ElTabs:w,ElTag:J,ElIcon:x,ElTabPane:T,ElImage:O,ElDialog:ae,ElButton:X,InfoIcon:$},emits:[`update:modelValue`],data(){return{tab:`styles`,choosing:!1,elements:{styles:{displayName:this.$t(`midjourney.styleCategory.styles`),items:[{image:`https://cdn.acedata.cloud/94ab394d-2fa3-4fe8-b3b3-41be85720fdb.png`,label:this.$t(`midjourney.styleTag.watercolour`),value:`Watercolour`},{image:`https://cdn.acedata.cloud/c3904cc5-3184-4639-be76-46f4860c1277.png`,label:this.$t(`midjourney.styleTag.oilPainting`),value:`Oil painting`},{image:`https://cdn.acedata.cloud/a0b764bb-13b1-419b-a8e8-855ee7ffc28a.png`,label:this.$t(`midjourney.styleTag.oldPhotograph`),value:`Old Photograph`},{image:`https://cdn.acedata.cloud/04f17d89-d913-4700-a422-99fa97fa79c9.png`,label:this.$t(`midjourney.styleTag.oneLineDrawing`),value:`One-line drawing`},{image:`https://cdn.acedata.cloud/281cfaac-ec59-4f5c-ab2b-f15d7481d752.png`,label:this.$t(`midjourney.styleTag.sketchDrawing`),value:`Sketch Drawing`},{image:`https://cdn.acedata.cloud/091d68cf-533c-4b76-90be-d5983b9ba80b.png`,label:this.$t(`midjourney.styleTag.gouache`),value:`Gouache`},{image:`https://cdn.acedata.cloud/a652c6b2-f0f6-4ef4-bf1b-9053e1daf85b.png`,label:this.$t(`midjourney.styleTag.filmStyle`),value:`Film style`},{image:`https://cdn.acedata.cloud/0aaafc79-9094-4a97-a07d-a01f88d276b1.png`,label:this.$t(`midjourney.styleTag.photorealistic`),value:`Photorealistic`},{image:`https://cdn.acedata.cloud/aa6489ad-8b40-46ae-83a6-f636772084e9.png`,label:this.$t(`midjourney.styleTag.logo`),value:`Logo`},{image:`https://cdn.acedata.cloud/e3e96805-6bcd-4608-b012-a8931e75662a.png`,label:this.$t(`midjourney.styleTag.cartoon`),value:`Cartoon`},{image:`https://cdn.acedata.cloud/11d53af4-ec2d-4256-8ddc-18105df57047.png`,label:this.$t(`midjourney.styleTag.marbleStatue`),value:`Marble Statue`},{image:`https://cdn.acedata.cloud/d0109889-d2a6-49ee-9f5c-49f2033966d8.png`,label:this.$t(`midjourney.styleTag.1800S`),value:`1800s`},{image:`https://cdn.acedata.cloud/86a3fb48-1ef0-422a-809a-580892aa0b9d.png`,label:this.$t(`midjourney.styleTag.1980S`),value:`1980s`},{image:`https://cdn.acedata.cloud/8b07aae4-b6f6-45ad-a556-7206b2945025.png`,label:this.$t(`midjourney.styleTag.isometricAnime`),value:`Isometric anime`,advanced:!0},{image:`https://cdn.acedata.cloud/3be49d3c-e431-4bce-b2bb-fc53f763b348.png`,label:this.$t(`midjourney.styleTag.analyticDrawing`),value:`Analytic drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/4d31c2dc-2a0b-4465-b3e8-bffd7c5fed25.png`,label:this.$t(`midjourney.styleTag.coloringBook`),value:`Coloring book`,advanced:!0},{image:`https://cdn.acedata.cloud/a19dde67-65b2-4923-8895-9e960cf050ee.png`,label:this.$t(`midjourney.styleTag.infographicDrawing`),value:`Infographic drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/f57db729-8692-4524-a373-b495d14ec77e.png`,label:this.$t(`midjourney.styleTag.doubleExposure`),value:`Double exposure`,advanced:!0},{image:`https://cdn.acedata.cloud/f8ff8db0-62dc-4414-b309-7fdf2021e45c.png`,label:this.$t(`midjourney.styleTag.diagrammaticDrawing`),value:`Diagrammatic drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/426447cf-dd10-4c91-b928-e7a3aa4c253a.png`,label:this.$t(`midjourney.styleTag.2DIllustration`),value:`2D illustration`,advanced:!0},{image:`https://cdn.acedata.cloud/25e0edfe-776f-4be0-9791-bb729cca81b3.png`,label:this.$t(`midjourney.styleTag.diagrammaticPortrait`),value:`Diagrammatic portrait`,advanced:!0},{image:`https://cdn.acedata.cloud/819c367c-ad03-4bf8-87a9-38ba53aa00f6.png`,label:this.$t(`midjourney.styleTag.pixelArt`),value:`Pixel art`,advanced:!0},{image:`https://cdn.acedata.cloud/2c4bbd7b-fc59-4f38-b844-762bf2366042.png`,label:this.$t(`midjourney.styleTag.darkFantasy`),value:`Dark fantasy`,advanced:!0},{image:`https://cdn.acedata.cloud/bd786eed-e3ee-4e3a-9473-acbd1ee4306c.png`,label:this.$t(`midjourney.styleTag.ukiyoEArt`),value:`Ukiyo-e art`,advanced:!0},{image:`https://cdn.acedata.cloud/1951d276-5502-428a-8694-1b311d8a5540.png`,label:this.$t(`midjourney.styleTag.paperQuilling`),value:`Paper quilling`,advanced:!0},{image:`https://cdn.acedata.cloud/4f9bcc9c-8b0e-47f4-87b9-4b4d78a8891a.png`,label:this.$t(`midjourney.styleTag.paperCutCraft`),value:`Paper cut craft`},{image:`https://cdn.acedata.cloud/4775f61f-446b-4312-b824-c91c6ecdb372.png`,label:this.$t(`midjourney.styleTag.iridescent`),value:`Iridescent`,advanced:!0},{image:`https://cdn.acedata.cloud/29fbc528-56f0-4eb0-a5a2-2312d53d55b4.png`,label:this.$t(`midjourney.styleTag.patchworkCollage`),value:`Patchwork collage`,advanced:!0},{image:`https://cdn.acedata.cloud/aa03b06a-fac8-45ec-830f-2a6e7ecab5c2.png`,label:this.$t(`midjourney.styleTag.opArt`),value:`Op art`,advanced:!0},{image:`https://cdn.acedata.cloud/29015f2a-3c9c-43c5-808a-23fbbb7bcf2f.png`,label:this.$t(`midjourney.styleTag.japaneseInk`),value:`Japanese ink`,advanced:!0},{image:`https://cdn.acedata.cloud/a65f8f7e-46a9-4ccf-8ee5-720d0c222471.png`,label:this.$t(`midjourney.styleTag.pastelDrawing`),value:`Pastel drawing`},{image:`https://cdn.acedata.cloud/a0cda2b1-b227-4230-8842-feab55edd6c7.png`,label:this.$t(`midjourney.styleTag.drippingArt`),value:`Dripping art`},{image:`https://cdn.acedata.cloud/c4aab372-ec55-4a7e-af94-4469f45c23c5.png`,label:this.$t(`midjourney.styleTag.tattooArt`),value:`Tattoo art`,advanced:!0},{image:`https://cdn.acedata.cloud/5040fbb2-6fa7-4e8f-86ac-f23c1c3e291c.png`,label:this.$t(`midjourney.styleTag.16Bit`),value:`16-Bit`,advanced:!0},{image:`https://cdn.acedata.cloud/b67249a1-36fa-443a-8b41-c167a5002e10.png`,label:this.$t(`midjourney.styleTag.8Bit`),value:`8-Bit`,advanced:!0},{image:`https://cdn.acedata.cloud/1c9600b4-6995-4dcb-b363-40ee38049151.png`,label:this.$t(`midjourney.styleTag.amber`),value:`Amber`,advanced:!0},{image:`https://cdn.acedata.cloud/e2d34946-3148-4f92-ad73-40f6f1208516.png`,label:this.$t(`midjourney.styleTag.anatomicalDrawing`),value:`Anatomical Drawing`,advanced:!0},{image:`https://cdn.acedata.cloud/19940f31-037e-4a8f-a71c-605e16ac9631.png`,label:this.$t(`midjourney.styleTag.ancient`),value:`Ancient`},{image:`https://cdn.acedata.cloud/b714b3d9-2f97-49fb-bf85-99a716bf0c78.png`,label:this.$t(`midjourney.styleTag.anime`),value:`Anime`,advanced:!0},{image:`https://cdn.acedata.cloud/d88c3080-cd54-4342-ac91-dac326ee1060.png`,label:this.$t(`midjourney.styleTag.arabic`),value:`Arabic`,advanced:!0},{image:`https://cdn.acedata.cloud/dc54b749-8e69-4252-9b90-fc1448fa9397.png`,label:this.$t(`midjourney.styleTag.blocky`),value:`Blocky`,advanced:!0},{image:`https://cdn.acedata.cloud/d8009295-2f4b-48d8-896e-46d0f5939923.png`,label:this.$t(`midjourney.styleTag.blueprint`),value:`Blueprint`,advanced:!0},{image:`https://cdn.acedata.cloud/5cc39277-16e0-46d6-9310-b0722479713b.png`,label:this.$t(`midjourney.styleTag.comicbook`),value:`Comicbook`,advanced:!0},{image:`https://cdn.acedata.cloud/b9900d01-20bc-408b-9637-779cc22c493c.png`,label:this.$t(`midjourney.styleTag.caribbean`),value:`Caribbean`,advanced:!0},{image:`https://cdn.acedata.cloud/fedabd4e-a9bb-4bb0-a4ec-8fc48bc74c78.png`,label:this.$t(`midjourney.styleTag.celestial`),value:`Celestial`,advanced:!0},{image:`https://cdn.acedata.cloud/00f1f097-1d72-435f-b47d-656f8e194dc2.png`,label:this.$t(`midjourney.styleTag.cellulose`),value:`Cellulose`,advanced:!0},{image:`https://cdn.acedata.cloud/a002bccf-6287-4b28-a5a7-c1cf5cb07734.png`,label:this.$t(`midjourney.styleTag.charcoalStyle`),value:`Charcoal Style`,advanced:!0},{image:`https://cdn.acedata.cloud/e218ab68-e430-4541-9501-02ee2d7aeda9.png`,label:this.$t(`midjourney.styleTag.chromatic`),value:`Chromatic`,advanced:!0},{image:`https://cdn.acedata.cloud/bd5a79d9-c73d-46c3-974f-932751ff8e46.png`,label:this.$t(`midjourney.styleTag.coral`),value:`Coral`,advanced:!0},{image:`https://cdn.acedata.cloud/58dd439c-cae7-434f-9a83-ac6aefd6e417.png`,label:this.$t(`midjourney.styleTag.conceptArt`),value:`Concept Art`,advanced:!0},{image:`https://cdn.acedata.cloud/767fe9f3-69d0-4e16-9060-41e6cf1b1fe1.png`,label:this.$t(`midjourney.styleTag.fibonacci`),value:`Fibonacci`,advanced:!0},{image:`https://cdn.acedata.cloud/4b78ebb1-5091-43d8-a020-88ffb3719edd.png`,label:this.$t(`midjourney.styleTag.cyberpunk`),value:`Cyberpunk`,advanced:!0},{image:`https://cdn.acedata.cloud/34d35d5c-a2e4-4e8e-aafd-3d3c08499389.png`,label:this.$t(`midjourney.styleTag.diabolic`),value:`Diabolic`,advanced:!0},{image:`https://cdn.acedata.cloud/8e29e2b4-4899-491d-a5dc-5ebbb1ff2758.png`,label:this.$t(`midjourney.styleTag.diffractionGrading`),value:`Diffraction Grading`,advanced:!0},{image:`https://cdn.acedata.cloud/996c6d93-94aa-438a-96d5-278e22e54f5f.png`,label:this.$t(`midjourney.styleTag.lightspeed`),value:`Lightspeed`,advanced:!0},{image:`https://cdn.acedata.cloud/57f3ad49-0940-44e2-a31a-a4872497bae7.png`,label:this.$t(`midjourney.styleTag.liquid`),value:`Liquid`,advanced:!0},{image:`https://cdn.acedata.cloud/a9ff43a9-dadf-4bbc-9a7a-72fd3908d39a.png`,label:this.$t(`midjourney.styleTag.dots`),value:`Dots`,advanced:!0},{image:`https://cdn.acedata.cloud/acff2bf9-1907-4a0f-be23-897c71caf60e.png`,label:this.$t(`midjourney.styleTag.dune`),value:`Dune`,advanced:!0},{image:`https://cdn.acedata.cloud/4a2abc45-ba65-4e2d-8399-8d44491c8a64.png`,label:this.$t(`midjourney.styleTag.drippingPaint`),value:`Dripping Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/7dc4e93f-07a8-45ec-9e8a-89c3f619fd40.png`,label:this.$t(`midjourney.styleTag.electronicCircuitry`),value:`Electronic Circuitry`,advanced:!0},{image:`https://cdn.acedata.cloud/cf502cba-ee64-41fd-a388-93f6357fc7cc.png`,label:this.$t(`midjourney.styleTag.electrical`),value:`Electrical`,advanced:!0},{image:`https://cdn.acedata.cloud/fd6a696b-3102-4301-8fce-5a7fd401231a.png`,label:this.$t(`midjourney.styleTag.futuristic`),value:`Futuristic`,advanced:!0},{image:`https://cdn.acedata.cloud/0fe8fca5-b3d9-4fab-b390-fff7c0f4f594.png`,label:this.$t(`midjourney.styleTag.etching`),value:`Etching`,advanced:!0},{image:`https://cdn.acedata.cloud/46577726-f0ab-4750-81c6-0d4d865ba4bd.png`,label:this.$t(`midjourney.styleTag.extraterrestrial`),value:`Extraterrestrial`,advanced:!0},{image:`https://cdn.acedata.cloud/faa06af4-9988-4e39-9f13-ecdd29e1e20a.png`,label:this.$t(`midjourney.styleTag.glitchart`),value:`Glitchart`,advanced:!0},{image:`https://cdn.acedata.cloud/4380f6af-aaeb-41fd-bcaf-2efadcc3e08f.png`,label:this.$t(`midjourney.styleTag.floral`),value:`Floral`,advanced:!0},{image:`https://cdn.acedata.cloud/096683c4-8e91-4ef0-8211-8a6dcef5298d.png`,label:this.$t(`midjourney.styleTag.fractal`),value:`Fractal`,advanced:!0},{image:`https://cdn.acedata.cloud/10ce713b-a5bc-400b-a0c8-bcec4f7e6548.png`,label:this.$t(`midjourney.styleTag.preHistoric`),value:`Pre Historic`,advanced:!0},{image:`https://cdn.acedata.cloud/6382ad4e-1818-4ab1-b493-10afdb43c196.png`,label:this.$t(`midjourney.styleTag.prokaryotic`),value:`Prokaryotic`,advanced:!0},{image:`https://cdn.acedata.cloud/48205fb3-e48b-4219-ad53-d307e1e686a7.png`,label:this.$t(`midjourney.styleTag.horror`),value:`Horror`,advanced:!0},{image:`https://cdn.acedata.cloud/d0567b20-8f93-4b16-a775-8ca0708a7a50.png`,label:this.$t(`midjourney.styleTag.iceAge`),value:`Ice Age`,advanced:!0},{image:`https://cdn.acedata.cloud/cc1455a5-c139-400d-8a54-121176f196e1.png`,label:this.$t(`midjourney.styleTag.jurassic`),value:`Jurassic`,advanced:!0},{image:`https://cdn.acedata.cloud/84e2bfe2-60bb-4323-936b-18dbb1c8cfa1.png`,label:this.$t(`midjourney.styleTag.knitted`),value:`Knitted`,advanced:!0},{image:`https://cdn.acedata.cloud/2e1ffddf-daa1-4e57-bc92-d16484ef8e34.png`,label:this.$t(`midjourney.styleTag.polka`),value:`Polka`,advanced:!0},{image:`https://cdn.acedata.cloud/9c2670df-3e39-45a7-ad76-ae17502d018f.png`,label:this.$t(`midjourney.styleTag.latex`),value:`Latex`,advanced:!0},{image:`https://cdn.acedata.cloud/d4de1735-235d-461d-b93f-2bf3c280ccfe.png`,label:this.$t(`midjourney.styleTag.pastel`),value:`Pastel`,advanced:!0},{image:`https://cdn.acedata.cloud/37f26555-f634-4964-8bac-ec8a955273d4.png`,label:this.$t(`midjourney.styleTag.mandala`),value:`Mandala`,advanced:!0},{image:`https://cdn.acedata.cloud/f62aa376-1378-45a6-abd0-71bc7bbe49c7.png`,label:this.$t(`midjourney.styleTag.molecular`),value:`Molecular`,advanced:!0},{image:`https://cdn.acedata.cloud/fc135428-1835-453d-afef-aaf72a7cfcbc.png`,label:this.$t(`midjourney.styleTag.merkaba`),value:`Merkaba`,advanced:!0},{image:`https://cdn.acedata.cloud/5caf594b-0f0c-455f-b8a8-8c15a189d0dc.png`,label:this.$t(`midjourney.styleTag.mitochondria`),value:`Mitochondria`,advanced:!0},{image:`https://cdn.acedata.cloud/088e3067-0abe-4f3d-bcb8-f6937e860d1e.png`,label:this.$t(`midjourney.styleTag.graffiti`),value:`Graffiti`,advanced:!0},{image:`https://cdn.acedata.cloud/06230561-916a-4bc5-ad85-9386cf27bf1c.png`,label:this.$t(`midjourney.styleTag.graphicNovel`),value:`Graphic Novel`,advanced:!0},{image:`https://cdn.acedata.cloud/e47f7931-d588-4c4a-87c8-3f7137e7f727.png`,label:this.$t(`midjourney.styleTag.multidimensional`),value:`Multidimensional`,advanced:!0},{image:`https://cdn.acedata.cloud/d2443c93-3227-4216-afd1-b86287ac5140.png`,label:this.$t(`midjourney.styleTag.nasa`),value:`NASA`,advanced:!0},{image:`https://cdn.acedata.cloud/a86a2f67-273c-4edf-9be9-ceecc983c93d.png`,label:this.$t(`midjourney.styleTag.nebula`),value:`Nebula`,advanced:!0},{image:`https://cdn.acedata.cloud/ad1e588c-5892-48ee-a7c2-103c2b4868fc.png`,label:this.$t(`midjourney.styleTag.neon`),value:`Neon`},{image:`https://cdn.acedata.cloud/5a133976-208e-460f-8296-a4ad19809490.png`,label:this.$t(`midjourney.styleTag.nuclear`),value:`Nuclear`,advanced:!0},{image:`https://cdn.acedata.cloud/c99f5082-314b-49e9-8875-b40319ed3cfc.png`,label:this.$t(`midjourney.styleTag.orbital`),value:`Orbital`,advanced:!0},{image:`https://cdn.acedata.cloud/63809059-6ae6-49ff-ad96-ed4ae45a2464.png`,label:this.$t(`midjourney.styleTag.rayTracing`),value:`Ray Tracing`,advanced:!0},{image:`https://cdn.acedata.cloud/cdcf0c05-e7ad-421e-b513-640bcc3d04cc.png`,label:this.$t(`midjourney.styleTag.realistic`),value:`Realistic`},{image:`https://cdn.acedata.cloud/019dc7be-b0e2-4da2-94d4-191226d58dbf.png`,label:this.$t(`midjourney.styleTag.renaissance`),value:`Renaissance`,advanced:!0},{image:`https://cdn.acedata.cloud/d46d3c03-a924-4a0f-b032-e8dbca6ad37e.png`,label:this.$t(`midjourney.styleTag.retro`),value:`Retro`},{image:`https://cdn.acedata.cloud/bc13e200-6865-474b-8fe4-cf0725cf3caf.png`,label:this.$t(`midjourney.styleTag.risograph`),value:`Risograph`,advanced:!0},{image:`https://cdn.acedata.cloud/f8533acc-807b-4f03-8f39-338ee6ff5d53.png`,label:this.$t(`midjourney.styleTag.origami`),value:`Origami`,advanced:!0},{image:`https://cdn.acedata.cloud/b0ff3593-aef3-4dd2-a5f4-548c6febb2e2.png`,label:this.$t(`midjourney.styleTag.ornamental`),value:`Ornamental`,advanced:!0},{image:`https://cdn.acedata.cloud/002c6a5d-b251-43bb-b713-d133f828c0a4.png`,label:this.$t(`midjourney.styleTag.space`),value:`Space`,advanced:!0},{image:`https://cdn.acedata.cloud/641327df-93cc-4746-a55e-667dbb8c1563.png`,label:this.$t(`midjourney.styleTag.splatterPaint`),value:`Splatter Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/42527f9e-6cf0-40a6-bc9b-361d2baf9bf9.png`,label:this.$t(`midjourney.styleTag.sprayPaint`),value:`Spray Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/98bf8e01-9dd8-434b-81df-77cfd3627243.png`,label:this.$t(`midjourney.styleTag.squiggles`),value:`Squiggles`,advanced:!0},{image:`https://cdn.acedata.cloud/26868352-5d9a-4bcc-9926-166927a2be35.png`,label:this.$t(`midjourney.styleTag.stitching`),value:`Stitching`,advanced:!0},{image:`https://cdn.acedata.cloud/23819218-bdbc-4746-a507-7664836a4f59.png`,label:this.$t(`midjourney.styleTag.veins`),value:`Veins`,advanced:!0},{image:`https://cdn.acedata.cloud/2fd3de3d-7211-4cce-b63b-a857d7621c72.png`,label:this.$t(`midjourney.styleTag.streetArt`),value:`Street Art`,advanced:!0},{image:`https://cdn.acedata.cloud/80422ede-79fb-4149-bd0a-85bf0ac75a3d.png`,label:this.$t(`midjourney.styleTag.surreal`),value:`Surreal`},{image:`https://cdn.acedata.cloud/94956306-55de-470b-8a2a-28354d0e556f.png`,label:this.$t(`midjourney.styleTag.symmetric`),value:`Symmetric`,advanced:!0},{image:`https://cdn.acedata.cloud/0098f2a0-b089-4e64-8a86-ffa137605087.png`,label:this.$t(`midjourney.styleTag.synthWave`),value:`Synth-wave`,advanced:!0},{image:`https://cdn.acedata.cloud/f50d33b2-9c91-4939-8f2d-7b5ce185d138.png`,label:this.$t(`midjourney.styleTag.technological`),value:`Technological`,advanced:!0},{image:`https://cdn.acedata.cloud/a446a6eb-444c-4073-8a8e-6f43e65491c2.png`,label:this.$t(`midjourney.styleTag.tron`),value:`Tron`,advanced:!0},{image:`https://cdn.acedata.cloud/8026ccad-aa11-4b0d-ad81-eb870a695a81.png`,label:this.$t(`midjourney.styleTag.tropical`),value:`Tropical`,advanced:!0},{image:`https://cdn.acedata.cloud/22c16c64-068c-470e-9b80-2849297aad9a.png`,label:this.$t(`midjourney.styleTag.ultraModern`),value:`Ultra Modern`},{image:`https://cdn.acedata.cloud/f67bd4b6-3f43-4da8-bdcb-67cd39cb38f9.png`,label:this.$t(`midjourney.styleTag.wormhole`),value:`Wormhole`,advanced:!0},{image:`https://cdn.acedata.cloud/2e2a1ca9-8791-41c6-9ff0-0ac21a13d1c5.png`,label:this.$t(`midjourney.styleTag.wrinkled`),value:`Wrinkled`,advanced:!0},{image:`https://cdn.acedata.cloud/3507c78d-a065-462c-a17c-fd5ed4677644.png`,label:this.$t(`midjourney.styleTag.volcanic`),value:`Volcanic`,advanced:!0},{image:`https://cdn.acedata.cloud/69263783-0610-45b0-9ec4-acac961da092.png`,label:this.$t(`midjourney.styleTag.wetPaint`),value:`Wet Paint`,advanced:!0},{image:`https://cdn.acedata.cloud/9022fc82-d6f7-47e2-90b1-ad96fbba5257.png`,label:this.$t(`midjourney.styleTag.wildWest`),value:`Wild West`,advanced:!0},{image:`https://cdn.acedata.cloud/23de882d-4e5d-40b5-9f00-d0573c443212.png`,label:this.$t(`midjourney.styleTag.wind`),value:`Wind`,advanced:!0},{image:`https://cdn.acedata.cloud/e3a58af1-79bc-48f3-871c-36472da2584b.png`,label:this.$t(`midjourney.styleTag.miniatureFaking`),value:`Miniature Faking`,advanced:!0}]},lighting:{displayName:this.$t(`midjourney.styleCategory.lighting`),items:[{image:`https://cdn.acedata.cloud/a4b9110f-e838-4c52-8ab8-f2637ea753df.png`,label:this.$t(`midjourney.styleTag.accentLighting`),value:`Accent Lighting`},{image:`https://cdn.acedata.cloud/c4c16a69-28d7-4b38-8ea2-3ce49d5c6b07.png`,label:this.$t(`midjourney.styleTag.backlight`),value:`Backlight`},{image:`https://cdn.acedata.cloud/7fd2cd5c-7671-4b40-85a0-230de9c37234.png`,label:this.$t(`midjourney.styleTag.blacklight`),value:`Blacklight`,advanced:!0},{image:`https://cdn.acedata.cloud/a08bff6e-8a0f-4d56-aa91-576f0a9921f2.png`,label:this.$t(`midjourney.styleTag.goldenHourLight`),value:`Golden hour light`,advanced:!0},{image:`https://cdn.acedata.cloud/3cd28696-493f-4b3e-9187-9d1a4c17e95b.png`,label:this.$t(`midjourney.styleTag.candlelight`),value:`Candlelight`},{image:`https://cdn.acedata.cloud/58c9a17e-f7d5-4481-abc8-9e9b66609a4d.png`,label:this.$t(`midjourney.styleTag.concertLighting`),value:`Concert Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/efb8893c-8bd6-4c7d-8e45-6e0626f69479.png`,label:this.$t(`midjourney.styleTag.crepuscularRays`),value:`Crepuscular Rays`,advanced:!0},{image:`https://cdn.acedata.cloud/27b90e83-09b0-4339-9b2c-48fe6fe45bdd.png`,label:this.$t(`midjourney.styleTag.directSunlight`),value:`Direct Sunlight`},{image:`https://cdn.acedata.cloud/d33cb17d-e2a5-4ca3-b68a-93904d2618d7.png`,label:this.$t(`midjourney.styleTag.dust`),value:`Dust`,advanced:!0},{image:`https://cdn.acedata.cloud/3af133d0-5a86-45a9-a16e-f23e6cc68b24.png`,label:this.$t(`midjourney.styleTag.studioLighting`),value:`Studio lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/6bc889b1-a563-4890-9117-7d3ded276caa.png`,label:this.$t(`midjourney.styleTag.rimLight`),value:`Rim light`,advanced:!0},{image:`https://cdn.acedata.cloud/d770265a-066b-413f-a405-a52d68e2f1c7.png`,label:this.$t(`midjourney.styleTag.volumetricLighting`),value:`Volumetric Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/7c83560a-6837-43b2-b296-f74db549accf.png`,label:this.$t(`midjourney.styleTag.fluorescent`),value:`Fluorescent`},{image:`https://cdn.acedata.cloud/6ffc8688-dfd0-4ede-a6bc-91bf8679adc9.png`,label:this.$t(`midjourney.styleTag.glowing`),value:`Glowing`,advanced:!0},{image:`https://cdn.acedata.cloud/63bc0645-ab94-4327-84b8-e226020c6c0f.png`,label:this.$t(`midjourney.styleTag.glowStick`),value:`Glow-stick`,advanced:!0},{image:`https://cdn.acedata.cloud/824111e9-7ebf-47ec-80ef-a6ad0a1d949b.png`,label:this.$t(`midjourney.styleTag.glowRadioactive`),value:`Glow Radioactive`,advanced:!0},{image:`https://cdn.acedata.cloud/9d23de16-57b3-42be-89d2-478de2666483.png`,label:this.$t(`midjourney.styleTag.lavaGlow`),value:`Lava Glow`,advanced:!0},{image:`https://cdn.acedata.cloud/d801ee47-02a0-455d-b333-76ad73a4fdcd.png`,label:this.$t(`midjourney.styleTag.moonlight`),value:`Moonlight`},{image:`https://cdn.acedata.cloud/6d1400a8-e168-46c9-89e8-5e701f8824b2.png`,label:this.$t(`midjourney.styleTag.naturalLighting`),value:`Natural Lighting`},{image:`https://cdn.acedata.cloud/9bb6c4ce-9076-41eb-8ace-43a4fa7e0c03.png`,label:this.$t(`midjourney.styleTag.neonLamp`),value:`Neon Lamp`},{image:`https://cdn.acedata.cloud/ac3fe310-3639-4fc0-b56e-4d69278bc2ca.png`,label:this.$t(`midjourney.styleTag.nightclubLighting`),value:`Nightclub Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/c9331a92-87d2-43b5-9319-24c8629bffd1.png`,label:this.$t(`midjourney.styleTag.nuclearWasteGlo`),value:`Nuclear Waste Glo`,advanced:!0},{image:`https://cdn.acedata.cloud/40ccdbfb-84a7-49f7-9999-92db58802c65.png`,label:this.$t(`midjourney.styleTag.quantumDot`),value:`Quantum Dot`,advanced:!0},{image:`https://cdn.acedata.cloud/d5411604-4e66-4187-9b37-48eb683be65e.png`,label:this.$t(`midjourney.styleTag.spotlight`),value:`Spotlight`},{image:`https://cdn.acedata.cloud/b1f16a4b-fb3d-4783-9c66-c3567e79baeb.png`,label:this.$t(`midjourney.styleTag.edgeLight`),value:`Edge light`,advanced:!0},{image:`https://cdn.acedata.cloud/97fecbc1-a164-48e2-bdf0-c69975c16d63.png`,label:this.$t(`midjourney.styleTag.coldLight`),value:`Cold light`},{image:`https://cdn.acedata.cloud/7087f2fe-f48c-4b72-95bc-c697b56e8b0e.png`,label:this.$t(`midjourney.styleTag.keyLighting`),value:`Key lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/5ab92c7e-bca1-4fbc-8975-6d9fb3f15626.png`,label:this.$t(`midjourney.styleTag.ambientLight`),value:`Ambient Light`,advanced:!0},{image:`https://cdn.acedata.cloud/ac80d283-5532-4664-bbe5-42fbb9582a63.png`,label:this.$t(`midjourney.styleTag.highKeyLighting`),value:`High key lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/add3524d-fc90-45a8-9edc-348bb1f79075.png`,label:this.$t(`midjourney.styleTag.lowKeyLighting`),value:`Low key lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/42174ff8-3080-4004-9ae2-c2ff919e1145.png`,label:this.$t(`midjourney.styleTag.motivatedLighting`),value:`Motivated lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/09f3d509-a366-44dc-be3b-b39712d0fac1.png`,label:this.$t(`midjourney.styleTag.3PointLighting`),value:`3 point lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/794a114e-cd4d-4e83-a187-5e979296d125.png`,label:this.$t(`midjourney.styleTag.strobeLight`),value:`Strobe light`,advanced:!0},{image:`https://cdn.acedata.cloud/9e6ec476-3ac8-4246-964f-a1d89a6d19e9.png`,label:this.$t(`midjourney.styleTag.sunLight`),value:`Sun light`},{image:`https://cdn.acedata.cloud/4360a40b-2126-43c2-be8e-e482978e1ea6.png`,label:this.$t(`midjourney.styleTag.ultraviolet`),value:`Ultraviolet`,advanced:!0},{image:`https://cdn.acedata.cloud/8b6bea86-9ed1-4fc8-9040-8fc2b64abbff.png`,label:this.$t(`midjourney.styleTag.beautifulLighting`),value:`Beautiful Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/a8d1f754-fb35-433d-8a36-e073b0fe6fa2.png`,label:this.$t(`midjourney.styleTag.moodyLighting`),value:`Moody Lighting`,advanced:!0},{image:`https://cdn.acedata.cloud/77270807-ca3b-4d02-a9b4-badf8aa48c36.png`,label:this.$t(`midjourney.styleTag.softLighting`),value:`Soft Lighting`}]},artists:{displayName:this.$t(`midjourney.styleCategory.artists`),items:[{image:`https://cdn.acedata.cloud/160cfc29-f258-4795-b663-f687adba19bf.png`,label:this.$t(`midjourney.styleTag.michelangelo`),value:`Michelangelo`},{image:`https://cdn.acedata.cloud/ed0bf2ad-138d-4c8d-bce9-a98299b1ee83.png`,label:this.$t(`midjourney.styleTag.monet`),value:`Monet`},{image:`https://cdn.acedata.cloud/58d9b130-e7b2-4eb8-a71e-7108b3bd4c26.png`,label:this.$t(`midjourney.styleTag.paulCezanne`),value:`Paul Cezanne`,advanced:!0},{image:`https://cdn.acedata.cloud/1247615a-6e75-49e6-842a-b0fb84016d3d.png`,label:this.$t(`midjourney.styleTag.markRothko`),value:`Mark Rothko`,advanced:!0},{image:`https://cdn.acedata.cloud/a7d9d9dd-8add-43d3-942e-8d1199fe277f.png`,label:this.$t(`midjourney.styleTag.paulKlee`),value:`Paul Klee`,advanced:!0},{image:`https://cdn.acedata.cloud/caf5701a-b652-4fab-8467-0c00303d01f3.png`,label:this.$t(`midjourney.styleTag.picasso`),value:`Picasso`},{image:`https://cdn.acedata.cloud/fbb63634-659a-4d2d-bc7b-0fb3399f7061.png`,label:this.$t(`midjourney.styleTag.pietMondrian`),value:`Piet Mondrian`,advanced:!0},{image:`https://cdn.acedata.cloud/29fb173b-17b4-4b05-a63c-e31ce161fe8c.png`,label:this.$t(`midjourney.styleTag.pierreAugusteRer`),value:`Pierre Auguste Rer`,advanced:!0},{image:`https://cdn.acedata.cloud/556f8a48-0b12-49a7-b150-aed40278d3f6.png`,label:this.$t(`midjourney.styleTag.rembrandt`),value:`Rembrandt`},{image:`https://cdn.acedata.cloud/b44d947e-2a14-4db2-880d-332c1aeeb303.png`,label:this.$t(`midjourney.styleTag.reneMagritte`),value:`Rene Magritte`,advanced:!0},{image:`https://cdn.acedata.cloud/0cfcda4a-7e7f-4ec4-ad4f-b4877a900a50.png`,label:this.$t(`midjourney.styleTag.royLichtenstein`),value:`Roy Lichtenstein`,advanced:!0},{image:`https://cdn.acedata.cloud/e592bf88-d9b8-4787-88dd-9ff8e7e9268c.png`,label:this.$t(`midjourney.styleTag.salvadorDali`),value:`Salvador Dali`,advanced:!0},{image:`https://cdn.acedata.cloud/3bbde342-565b-4ea0-8a4c-42b3c109c205.png`,label:this.$t(`midjourney.styleTag.sandroBotticelli`),value:`Sandro Botticelli`,advanced:!0},{image:`https://cdn.acedata.cloud/bfdf6d50-24ab-4b5c-a3de-c8d77d858b04.png`,label:this.$t(`midjourney.styleTag.takashiMurakami`),value:`Takashi Murakami`,advanced:!0},{image:`https://cdn.acedata.cloud/bc67c0ba-614f-46f0-a6ec-047fa561fc01.png`,label:this.$t(`midjourney.styleTag.vanGogh`),value:`Van Gogh`},{image:`https://cdn.acedata.cloud/984a18fa-8050-4084-95d5-732b7ede8e37.png`,label:this.$t(`midjourney.styleTag.wassilyKandinsky`),value:`Wassily Kandinsky`,advanced:!0},{image:`https://cdn.acedata.cloud/48bce45c-6b25-4678-9be8-40707c8e5f43.png`,label:this.$t(`midjourney.styleTag.matCollishaw`),value:`Mat Collishaw`,advanced:!0},{image:`https://cdn.acedata.cloud/6b2851d0-ec8d-4c07-86ed-1eafdd70e1fe.png`,label:this.$t(`midjourney.styleTag.yayoiKusama`),value:`Yayoi Kusama`,advanced:!0},{image:`https://cdn.acedata.cloud/9d691d5c-5560-409b-b998-c979b29902e6.png`,label:this.$t(`midjourney.styleTag.igorMorski`),value:`Igor Morski`,advanced:!0},{image:`https://cdn.acedata.cloud/950cb143-ab40-4bee-80f7-092d0c2a7bc4.png`,label:this.$t(`midjourney.styleTag.shinkaiMakoto`),value:`Shinkai Makoto`},{image:`https://cdn.acedata.cloud/94adf414-a1cc-4b84-b52d-18cd2586df17.png`,label:this.$t(`midjourney.styleTag.pixar`),value:`Pixar`},{image:`https://cdn.acedata.cloud/ccd4d148-e332-4d7e-bbe6-9f1dd68082a8.png`,label:this.$t(`midjourney.styleTag.kyotoAnime`),value:`Kyoto Anime`},{image:`https://cdn.acedata.cloud/b5f5f99a-be40-4fa7-a86a-fd51578a4052.png`,label:this.$t(`midjourney.styleTag.jerryPinkney`),value:`Jerry Pinkney`,advanced:!0},{image:`https://cdn.acedata.cloud/7a4dba74-21ad-4088-89da-6a48104d811d.png`,label:this.$t(`midjourney.styleTag.hayaoMiyazaki`),value:`Hayao Miyazaki`},{image:`https://cdn.acedata.cloud/28477b7e-85d4-4803-b525-938aa2ce3383.png`,label:this.$t(`midjourney.styleTag.beatrixPotter`),value:`Beatrix Potter`,advanced:!0},{image:`https://cdn.acedata.cloud/13854cb8-c478-43c9-9f51-8ac1933b1498.png`,label:this.$t(`midjourney.styleTag.jonKlassen`),value:`Jon Klassen`,advanced:!0},{image:`https://cdn.acedata.cloud/6685c7e0-ea11-488b-a8a0-610032020dfb.png`,label:this.$t(`midjourney.styleTag.kaySage`),value:`Kay Sage`,advanced:!0},{image:`https://cdn.acedata.cloud/cb0c3490-dcd4-488f-96e0-45b9ee671182.png`,label:this.$t(`midjourney.styleTag.jeffreyCatherineJones`),value:`Jeffrey Catherine Jones`,advanced:!0},{image:`https://cdn.acedata.cloud/72f000c5-d8d6-4015-acd4-79961e53ac50.png`,label:this.$t(`midjourney.styleTag.yaacovAgam`),value:`Yaacov Agam`,advanced:!0},{image:`https://cdn.acedata.cloud/f1bd0c4d-af96-4785-99bb-3a70b7f80834.png`,label:this.$t(`midjourney.styleTag.davidHockney`),value:`David Hockney`,advanced:!0},{image:`https://cdn.acedata.cloud/ad0e89d9-214a-4599-90f1-ee5dc0b5592d.png`,label:this.$t(`midjourney.styleTag.victorMoscoso`),value:`Victor Moscoso`,advanced:!0},{image:`https://cdn.acedata.cloud/c3b004e0-f583-4a75-b6cf-0cc60c89b2cf.png`,label:this.$t(`midjourney.styleTag.raphaelite`),value:`Raphaelite`},{image:`https://cdn.acedata.cloud/9c59d174-1e1f-4ef9-b657-1beb57f58088.png`,label:this.$t(`midjourney.styleTag.stefanKoidl`),value:`Stefan Koidl`,advanced:!0},{image:`https://cdn.acedata.cloud/09485865-35a8-4456-a34c-65a8a1c8d2c2.png`,label:this.$t(`midjourney.styleTag.suiIshida`),value:`Sui Ishida`,advanced:!0},{image:`https://cdn.acedata.cloud/31442dfd-d6a8-4674-aade-8543190251b4.png`,label:this.$t(`midjourney.styleTag.swoon`),value:`Swoon`,advanced:!0},{image:`https://cdn.acedata.cloud/842beff4-d333-4388-9880-eec6fd4baa6c.png`,label:this.$t(`midjourney.styleTag.tashaTudor`),value:`Tasha Tudor`,advanced:!0},{image:`https://cdn.acedata.cloud/68c419f3-6f2c-4fbd-a251-ce289d4a9890.png`,label:this.$t(`midjourney.styleTag.tintoretto`),value:`Tintoretto`,advanced:!0},{image:`https://cdn.acedata.cloud/9a3d95da-5019-4fdd-83b9-ec334e609c9d.png`,label:this.$t(`midjourney.styleTag.theodoreRobinsor`),value:`Theodore Robinsor`,advanced:!0},{image:`https://cdn.acedata.cloud/e11cb0a6-2f0e-4d8d-aa0e-8b7378423790.png`,label:this.$t(`midjourney.styleTag.titian`),value:`Titian`,advanced:!0},{image:`https://cdn.acedata.cloud/d3e59ba8-10e6-4d58-a732-e35d579cd3fc.png`,label:this.$t(`midjourney.styleTag.wlop`),value:`WLOP`,advanced:!0},{image:`https://cdn.acedata.cloud/70f22f51-9328-4070-b9aa-578db7d4c502.png`,label:this.$t(`midjourney.styleTag.yanjunCheng`),value:`Yanjun Cheng`,advanced:!0},{image:`https://cdn.acedata.cloud/e1203ff8-cb64-409e-8ba6-06f89645a843.png`,label:this.$t(`midjourney.styleTag.yojiShinkawa`),value:`Yoji Shinkawa`,advanced:!0},{image:`https://cdn.acedata.cloud/6b6d7746-e38b-44db-98d8-51d59ed7531f.png`,label:this.$t(`midjourney.styleTag.zhelongXu`),value:`Zhelong Xu`,advanced:!0},{image:`https://cdn.acedata.cloud/13b9621b-ff7e-4377-9550-0ca82d0f1afb.png`,label:this.$t(`midjourney.styleTag.alenaAenami`),value:`Alena Aenami`,advanced:!0},{image:`https://cdn.acedata.cloud/26d30765-3201-49e9-a4a9-c7c3b8c071ef.png`,label:this.$t(`midjourney.styleTag.anntonFadeevi`),value:`Annton Fadeevi`,advanced:!0},{image:`https://cdn.acedata.cloud/9b4c2bc7-16a8-4807-ad0e-ee9bdc80f1a0.png`,label:this.$t(`midjourney.styleTag.charlieBowater`),value:`Charlie Bowater`,advanced:!0},{image:`https://cdn.acedata.cloud/2f50d67e-3d7e-4e06-a198-5926ce7f357d.png`,label:this.$t(`midjourney.styleTag.coryLoftis`),value:`Cory Loftis`,advanced:!0},{image:`https://cdn.acedata.cloud/47823270-16a6-49cc-a11d-99122a037c68.png`,label:this.$t(`midjourney.styleTag.fenghuaZhong`),value:`Fenghua Zhong`,advanced:!0},{image:`https://cdn.acedata.cloud/1a66b5fd-cbf9-4e09-b817-6effed77b5c2.png`,label:this.$t(`midjourney.styleTag.gregRutkowski`),value:`Greg Rutkowski`,advanced:!0},{image:`https://cdn.acedata.cloud/d05a459a-132b-45a8-b2f3-a978eeeb44af.png`,label:this.$t(`midjourney.styleTag.hongSoonsang`),value:`Hong SoonSang`,advanced:!0},{image:`https://cdn.acedata.cloud/020dbf7f-f026-47bd-90f1-4049407409a1.png`,label:this.$t(`midjourney.styleTag.dennisStock`),value:`Dennis Stock`,advanced:!0},{image:`https://cdn.acedata.cloud/9c1ccc1d-121e-4182-aea0-04eac840869d.png`,label:this.$t(`midjourney.styleTag.michalLisowski`),value:`Michal Lisowski`,advanced:!0},{image:`https://cdn.acedata.cloud/3292404b-e654-4c06-bcd6-5e47a2adf329.png`,label:this.$t(`midjourney.styleTag.paulLehr`),value:`Paul Lehr`,advanced:!0},{image:`https://cdn.acedata.cloud/079c6053-23ad-4dc9-8166-64c5fe2f1e1a.png`,label:this.$t(`midjourney.styleTag.rossTran`),value:`Ross Tran`,advanced:!0},{image:`https://cdn.acedata.cloud/0f267ba1-c031-4008-9ead-630a4bec886a.png`,label:this.$t(`midjourney.styleTag.antonPieck`),value:`Anton Pieck`,advanced:!0},{image:`https://cdn.acedata.cloud/574dd25f-2116-4718-aed6-7d9be3636e22.png`,label:this.$t(`midjourney.styleTag.carlBarks`),value:`Carl Barks`,advanced:!0},{image:`https://cdn.acedata.cloud/38dcdfb5-0003-46f4-8c9d-5857c95f9e59.png`,label:this.$t(`midjourney.styleTag.alphonseMucha`),value:`Alphonse Mucha`,advanced:!0},{image:`https://cdn.acedata.cloud/65f2af96-e875-41f8-9797-3d34dbdf0ea4.png`,label:this.$t(`midjourney.styleTag.andyWarhol`),value:`Andy Warhol`,advanced:!0},{image:`https://cdn.acedata.cloud/801224a0-da77-4095-8799-d288d1ec3c3d.png`,label:this.$t(`midjourney.styleTag.banksy`),value:`Banksy`,advanced:!0},{image:`https://cdn.acedata.cloud/925c6c86-9b69-45ce-a10d-a2c64d4e0db2.png`,label:this.$t(`midjourney.styleTag.franciscoDeGoya`),value:`Francisco De Goya`,advanced:!0},{image:`https://cdn.acedata.cloud/fbb81b10-c579-4dcc-a76a-c099dc0b6c20.png`,label:this.$t(`midjourney.styleTag.caravaggio`),value:`Caravaggio`,advanced:!0},{image:`https://cdn.acedata.cloud/116efedd-42ea-404e-959e-607a9766001a.png`,label:this.$t(`midjourney.styleTag.diegoRivera`),value:`Diego Rivera`,advanced:!0},{image:`https://cdn.acedata.cloud/6f2c1d37-f8ae-4d72-8db1-d9fb04df7114.png`,label:this.$t(`midjourney.styleTag.davidHockney`),value:`David Hockney`,advanced:!0},{image:`https://cdn.acedata.cloud/b74b6b97-f6d7-4a34-840c-a81c69b9d941.png`,label:this.$t(`midjourney.styleTag.marcChagall`),value:`Marc Chagall`},{image:`https://cdn.acedata.cloud/f18ac9a3-a986-4670-813b-6fb81060ed48.png`,label:this.$t(`midjourney.styleTag.edgarDegas`),value:`Edgar Degas`,advanced:!0},{image:`https://cdn.acedata.cloud/275b32e5-9995-46cc-babc-43a0d1aa5d19.png`,label:this.$t(`midjourney.styleTag.eugeneDelacroix`),value:`Eugene Delacroix`,advanced:!0},{image:`https://cdn.acedata.cloud/500edde5-973c-4ba4-aae1-1a3d53a9b27f.png`,label:this.$t(`midjourney.styleTag.francisBacon`),value:`Francis Bacon`,advanced:!0},{image:`https://cdn.acedata.cloud/f7b5cc34-a796-4f45-823c-07122ec46ef6.png`,label:this.$t(`midjourney.styleTag.fridaKahlo`),value:`Frida Kahlo`,advanced:!0},{image:`https://cdn.acedata.cloud/7e41ead3-f54f-4d5f-8353-b2770d75c41b.png`,label:this.$t(`midjourney.styleTag.garaldBrom`),value:`Garald Brom`,advanced:!0},{image:`https://cdn.acedata.cloud/4a46247a-cd9b-48fd-b247-8268d9a891bf.png`,label:this.$t(`midjourney.styleTag.gustavKlimt`),value:`Gustav Klimt`,advanced:!0},{image:`https://cdn.acedata.cloud/3793eae9-61e9-4f16-9c0c-a77c194c45bc.png`,label:this.$t(`midjourney.styleTag.henriMatisse`),value:`Henri Matisse`,advanced:!0},{image:`https://cdn.acedata.cloud/dffa261d-755b-483d-88b7-058c09efd6af.png`,label:this.$t(`midjourney.styleTag.jackKirby`),value:`Jack Kirby`,advanced:!0},{image:`https://cdn.acedata.cloud/4cda1423-455b-463f-981d-b2af8ae1dd95.png`,label:this.$t(`midjourney.styleTag.jacksonPollock`),value:`Jackson Pollock`,advanced:!0},{image:`https://cdn.acedata.cloud/d318e4bc-d69f-4e7a-b6ae-49557e3cd569.png`,label:this.$t(`midjourney.styleTag.johannesVermeer`),value:`Johannes Vermeer`,advanced:!0},{image:`https://cdn.acedata.cloud/4ee7f9d2-01c0-4043-90f3-0174878a2ce7.png`,label:this.$t(`midjourney.styleTag.jeanMichelBasquiat`),value:`Jean Michel Basquiat`,advanced:!0},{image:`https://cdn.acedata.cloud/f60eb307-78b3-4f5e-bfd9-07603bc383c9.png`,label:this.$t(`midjourney.styleTag.marcelDuchamp`),value:`Marcel Duchamp`,advanced:!0}]},material:{displayName:this.$t(`midjourney.styleCategory.material`),items:[{image:`https://cdn.acedata.cloud/f2ce056d-6a89-4b40-b026-5a60cbb1efda.png`,label:this.$t(`midjourney.styleTag.aluminum`),value:`Aluminum`},{image:`https://cdn.acedata.cloud/069c6b1f-0666-4df6-bde6-a1729b33ade1.png`,label:this.$t(`midjourney.styleTag.brick`),value:`Brick`},{image:`https://cdn.acedata.cloud/39f2cbb9-be6a-4669-a7c3-b01dfbb2b563.png`,label:this.$t(`midjourney.styleTag.bronze`),value:`Bronze`},{image:`https://cdn.acedata.cloud/42b30429-2733-41a5-aa4c-e3e0cd50528a.png`,label:this.$t(`midjourney.styleTag.carbonFiber`),value:`Carbon Fiber`},{image:`https://cdn.acedata.cloud/90eeef27-6bdb-4f36-8e17-f1bb49881258.png`,label:this.$t(`midjourney.styleTag.cardboard`),value:`Cardboard`},{image:`https://cdn.acedata.cloud/470235fb-19a8-4ba8-ac9b-236abecf0985.png`,label:this.$t(`midjourney.styleTag.cellulose`),value:`Cellulose`},{image:`https://cdn.acedata.cloud/a8621e16-b046-4300-ab24-09602f734cb9.png`,label:this.$t(`midjourney.styleTag.ceramic`),value:`Ceramic`},{image:`https://cdn.acedata.cloud/af14acf6-92ff-42f8-ae14-ce4b63237bd5.png`,label:this.$t(`midjourney.styleTag.cotton`),value:`Cotton`},{image:`https://cdn.acedata.cloud/d93e6f18-3729-46cc-aa96-9662f2abae3d.png`,label:this.$t(`midjourney.styleTag.fabric`),value:`Fabric`},{image:`https://cdn.acedata.cloud/660533aa-dac7-4968-b27e-0f085b9a67a5.png`,label:this.$t(`midjourney.styleTag.fiberOptic`),value:`Fiber Optic`},{image:`https://cdn.acedata.cloud/94be6d51-5cb3-4362-8274-7d833a88bb79.png`,label:this.$t(`midjourney.styleTag.foil`),value:`Foil`},{image:`https://cdn.acedata.cloud/b89e102d-2fef-4619-8427-94c6bfbeb832.png`,label:this.$t(`midjourney.styleTag.yarn`),value:`Yarn`,advanced:!0},{image:`https://cdn.acedata.cloud/b72ef152-11a7-4c51-b6b4-dc4308995f9e.png`,label:this.$t(`midjourney.styleTag.glass`),value:`Glass`},{image:`https://cdn.acedata.cloud/bca80e91-46ba-4793-b29c-1b5c47b201d7.png`,label:this.$t(`midjourney.styleTag.gold`),value:`Gold`,advanced:!0},{image:`https://cdn.acedata.cloud/3d1e4da5-404b-4f89-8e06-988de47208bd.png`,label:this.$t(`midjourney.styleTag.gummies`),value:`Gummies`,advanced:!0},{image:`https://cdn.acedata.cloud/8afba6b0-a8a5-49c9-bfc5-ebd7b0e12443.png`,label:this.$t(`midjourney.styleTag.latex`),value:`Latex`},{image:`https://cdn.acedata.cloud/d5c39f1c-1be0-4065-80af-e1cb4e627cf2.png`,label:this.$t(`midjourney.styleTag.leather`),value:`Leather`},{image:`https://cdn.acedata.cloud/6e41e8bd-cb0b-4504-8655-a3b1b32ac11c.png`,label:this.$t(`midjourney.styleTag.magma`),value:`Magma`},{image:`https://cdn.acedata.cloud/f816fffa-4a7f-4d60-afcb-e19b0c36d176.png`,label:this.$t(`midjourney.styleTag.metallic`),value:`Metallic`},{image:`https://cdn.acedata.cloud/74c9fe01-37e6-4d05-831a-5778eb34c521.png`,label:this.$t(`midjourney.styleTag.nickel`),value:`Nickel`,advanced:!0},{image:`https://cdn.acedata.cloud/85186eac-1806-4739-9289-8d76aac359b3.png`,label:this.$t(`midjourney.styleTag.nylon`),value:`Nylon`},{image:`https://cdn.acedata.cloud/355d9507-62fa-4c69-986f-def2f2f930c5.png`,label:this.$t(`midjourney.styleTag.paper`),value:`Paper`},{image:`https://cdn.acedata.cloud/6c2626b2-191e-4b85-a97d-e561a2b5c79b.png`,label:this.$t(`midjourney.styleTag.plastic`),value:`Plastic`,advanced:!0},{image:`https://cdn.acedata.cloud/ff0d301d-8181-463c-a276-9b4805321afd.png`,label:this.$t(`midjourney.styleTag.quartz`),value:`Quartz`},{image:`https://cdn.acedata.cloud/7b90754d-2fa5-490e-a73b-d2887525d2e6.png`,label:this.$t(`midjourney.styleTag.wrap`),value:`Wrap`,advanced:!0},{image:`https://cdn.acedata.cloud/7411e62a-546e-4cd2-8446-73c4fb8f103b.png`,label:this.$t(`midjourney.styleTag.wooden`),value:`Wooden`},{image:`https://cdn.acedata.cloud/44e8830f-4be2-471d-a9d4-aaf4913e7451.png`,label:this.$t(`midjourney.styleTag.slime`),value:`Slime`,advanced:!0},{image:`https://cdn.acedata.cloud/16b10e75-a7e7-4b87-804a-2bfc9c18096f.png`,label:this.$t(`midjourney.styleTag.engraving`),value:`Engraving`},{image:`https://cdn.acedata.cloud/b66ec7e2-fd82-4edd-a523-34b87872f544.png`,label:this.$t(`midjourney.styleTag.ivory`),value:`Ivory`},{image:`https://cdn.acedata.cloud/098b954d-1197-414e-b4bd-68e3928b9eb3.png`,label:this.$t(`midjourney.styleTag.basalt`),value:`Basalt`,advanced:!0},{image:`https://cdn.acedata.cloud/b948dd7d-939b-48b5-b37c-09e0ebd6ede6.png`,label:this.$t(`midjourney.styleTag.pine`),value:`Pine`,advanced:!0},{image:`https://cdn.acedata.cloud/4c56fc7d-94c8-4055-9d6e-3bc6662c92d7.png`,label:this.$t(`midjourney.styleTag.diamond`),value:`Diamond`},{image:`https://cdn.acedata.cloud/70de6b75-bb29-4b2a-ae8a-016db33c8184.png`,label:this.$t(`midjourney.styleTag.amethyst`),value:`Amethyst`,advanced:!0},{image:`https://cdn.acedata.cloud/8d2b60e1-c98c-4de2-8a67-4b10c0d2482a.png`,label:this.$t(`midjourney.styleTag.ruby`),value:`Ruby`,advanced:!0},{image:`https://cdn.acedata.cloud/c0f01b99-32a6-4c34-a2d8-448fab08f126.png`,label:this.$t(`midjourney.styleTag.highPolished`),value:`High polished`,advanced:!0},{image:`https://cdn.acedata.cloud/5091142a-3959-40f3-9ea5-f41a29584735.png`,label:this.$t(`midjourney.styleTag.brushed`),value:`Brushed`,advanced:!0},{image:`https://cdn.acedata.cloud/3f84ddc5-5afe-41d1-85cc-2ded7a44d859.png`,label:this.$t(`midjourney.styleTag.matte`),value:`Matte`,advanced:!0},{image:`https://cdn.acedata.cloud/655f5114-b3dd-4b9a-a3cb-94a1a814fb11.png`,label:this.$t(`midjourney.styleTag.satin`),value:`Satin`,advanced:!0},{image:`https://cdn.acedata.cloud/6ec4178e-86e6-4026-aa86-e14eb4e92097.png`,label:this.$t(`midjourney.styleTag.sandblasted`),value:`Sandblasted`,advanced:!0},{image:`https://cdn.acedata.cloud/1c9a4277-5550-4cd4-852a-c785d8505a0f.png`,label:this.$t(`midjourney.styleTag.ebony`),value:`Ebony`,advanced:!0}]},camera:{displayName:this.$t(`midjourney.styleCategory.camera`),items:[{image:`https://cdn.acedata.cloud/9bcf851a-7b94-4554-864b-edcbe0f67017.png`,label:this.$t(`midjourney.styleTag.bokeh`),value:`Bokeh`},{image:`https://cdn.acedata.cloud/f4599568-5889-4da9-8852-8b5361c54412.png`,label:this.$t(`midjourney.styleTag.aerialView`),value:`Aerial view`},{image:`https://cdn.acedata.cloud/bea180e2-9078-42bd-9392-b0ee2b372430.png`,label:this.$t(`midjourney.styleTag.shotByDslr`),value:`Shot by DSLR`,advanced:!0},{image:`https://cdn.acedata.cloud/42444cbd-5442-4093-8911-645272c08863.png`,label:this.$t(`midjourney.styleTag.360Panorama`),value:`360Panorama`},{image:`https://cdn.acedata.cloud/99875464-0be7-44da-adf5-958d2c73eb31.png`,label:this.$t(`midjourney.styleTag.panorama`),value:`Panorama`},{image:`https://cdn.acedata.cloud/e3c3a204-9210-44da-b6fc-5f9a1fea52e0.png`,label:this.$t(`midjourney.styleTag.telephotoLens`),value:`Telephoto Lens`},{image:`https://cdn.acedata.cloud/7bd1f91d-cd6d-48d1-9f07-68382a54a552.png`,label:this.$t(`midjourney.styleTag.macroShot`),value:`Macro shot`},{image:`https://cdn.acedata.cloud/09aca457-2d96-4f60-b5ec-9fedf7a3fcb9.png`,label:this.$t(`midjourney.styleTag.microscopy`),value:`Microscopy`},{image:`https://cdn.acedata.cloud/fb39b4ab-d728-456b-8905-b4c0302f4094.png`,label:this.$t(`midjourney.styleTag.magnification`),value:`Magnification`},{image:`https://cdn.acedata.cloud/b9956b79-70b1-44af-bca3-5eddd412615a.png`,label:this.$t(`midjourney.styleTag.closeUp`),value:`Close up`},{image:`https://cdn.acedata.cloud/2c6b2c92-f790-44e1-bc65-b3182aa484bd.png`,label:this.$t(`midjourney.styleTag.fullBody`),value:`Full body`},{image:`https://cdn.acedata.cloud/05c7f5a8-4a79-4a1c-a4a9-792862ad118c.png`,label:this.$t(`midjourney.styleTag.portrait`),value:`Portrait`},{image:`https://cdn.acedata.cloud/aeb48a08-f0b6-47db-8c5d-ae6f0f92b93d.png`,label:this.$t(`midjourney.styleTag.profile`),value:`Profile`},{image:`https://cdn.acedata.cloud/dd655235-8f80-43b2-823f-bdb44864bee1.png`,label:this.$t(`midjourney.styleTag.pinholeLens`),value:`Pinhole Lens`,advanced:!0},{image:`https://cdn.acedata.cloud/7ad3f221-96f6-4014-953e-853c429d5d57.png`,label:this.$t(`midjourney.styleTag.wideView`),value:`Wide view`},{image:`https://cdn.acedata.cloud/698fbcc7-5ad1-40cb-a926-95189dc9e59b.png`,label:this.$t(`midjourney.styleTag.telescopeLens`),value:`Telescope Lens`,advanced:!0},{image:`https://cdn.acedata.cloud/2e41309b-f006-483f-9843-e15f4ced6be7.png`,label:this.$t(`midjourney.styleTag.satelliteImagery`),value:`Satellite Imagery`},{image:`https://cdn.acedata.cloud/79ad137d-3015-4335-a4e3-2ed29f9b850b.png`,label:this.$t(`midjourney.styleTag.headshot`),value:`Headshot`},{image:`https://cdn.acedata.cloud/d06164a9-ba01-457f-b8cc-f0b38a87b4d5.png`,label:this.$t(`midjourney.styleTag.extremeCloseup`),value:`Extreme closeup`,advanced:!0},{image:`https://cdn.acedata.cloud/b8e10ef3-b37c-45f0-b930-be729c8d17a1.png`,label:this.$t(`midjourney.styleTag.ultrawideShot`),value:`Ultrawide shot`},{image:`https://cdn.acedata.cloud/21eaa8a4-a8f1-448d-9f00-ff8fb0213046.png`,label:this.$t(`midjourney.styleTag.birdView`),value:`Bird view`,advanced:!0},{image:`https://cdn.acedata.cloud/43fadf68-dad1-45d2-bc22-54b1b2792a00.png`,label:this.$t(`midjourney.styleTag.topView`),value:`Top view`,advanced:!0},{image:`https://cdn.acedata.cloud/f8953e9e-6daf-4a70-a691-6f89e91f0b97.png`,label:this.$t(`midjourney.styleTag.frontView`),value:`Front view`,advanced:!0},{image:`https://cdn.acedata.cloud/f2228145-dc8f-4e06-be21-5d18bf50f7cf.png`,label:this.$t(`midjourney.styleTag.sideView`),value:`Side view`,advanced:!0},{image:`https://cdn.acedata.cloud/b218d1cc-60a7-4f62-a719-b852cd6ebf03.png`,label:this.$t(`midjourney.styleTag.backView`),value:`Back view`,advanced:!0},{image:`https://cdn.acedata.cloud/186522ef-7b09-40d8-a712-43dde1266bbf.png`,label:this.$t(`midjourney.styleTag.faceShot`),value:`Face shot`},{image:`https://cdn.acedata.cloud/6a0c1136-2817-42bb-b1e3-c65a130e70cf.png`,label:this.$t(`midjourney.styleTag.chestShot`),value:`Chest shot`},{image:`https://cdn.acedata.cloud/8ac3bf91-2066-420d-8da1-5d6214ad2668.png`,label:this.$t(`midjourney.styleTag.waistShot`),value:`Waist shot`},{image:`https://cdn.acedata.cloud/2558b92f-cb3b-410e-85cd-791eb7d29c60.png`,label:this.$t(`midjourney.styleTag.extraLongShot`),value:`Extra long shot`},{image:`https://cdn.acedata.cloud/0f5c9250-55a4-4eed-8ddf-af18cb52e243.png`,label:this.$t(`midjourney.styleTag.lookUp`),value:`look up`},{image:`https://cdn.acedata.cloud/5e0df52d-e986-4851-b6ae-dc0be744713d.png`,label:this.$t(`midjourney.styleTag.isometricview`),value:`isometricview`,advanced:!0},{image:`https://cdn.acedata.cloud/0d6491dd-1f64-423c-b63b-0f2e96a258e5.png`,label:this.$t(`midjourney.styleTag.highAngleView`),value:`High angle view`,advanced:!0},{image:`https://cdn.acedata.cloud/5b68beee-c079-4a8e-84c5-cb3cc0f6c77b.png`,label:this.$t(`midjourney.styleTag.lowAngleView`),value:`Low angle view`,advanced:!0}]},emotion:{displayName:this.$t(`midjourney.styleCategory.emotion`),items:[{image:`https://cdn.acedata.cloud/033c9cd1-f5cc-448f-8d0a-e6559bbd57e3.png`,label:this.$t(`midjourney.styleTag.happy`),value:`Happy`},{image:`https://cdn.acedata.cloud/d07fbadd-78e4-4a98-bcf8-45b4805c9239.png`,label:this.$t(`midjourney.styleTag.excited`),value:`Excited`},{image:`https://cdn.acedata.cloud/aa94049d-e8fc-4e0e-97b1-afa174d99b88.png`,label:this.$t(`midjourney.styleTag.angry`),value:`Angry`},{image:`https://cdn.acedata.cloud/ede7f1d3-5ce2-4b8f-9cb9-c4bd47b80cae.png`,label:this.$t(`midjourney.styleTag.ped`),value:`ped`},{image:`https://cdn.acedata.cloud/88f9e6ba-2961-497e-ae00-9af36fa2c2d4.png`,label:this.$t(`midjourney.styleTag.disgusted`),value:`Disgusted`},{image:`https://cdn.acedata.cloud/fe91b67b-2430-424a-bf72-1a299e61f049.png`,label:this.$t(`midjourney.styleTag.supnned`),value:`supnned`},{image:`https://cdn.acedata.cloud/24dcfb80-d987-48b0-9595-82276b2a1f94.png`,label:this.$t(`midjourney.styleTag.hopeful`),value:`Hopeful`},{image:`https://cdn.acedata.cloud/f2628539-bdf5-471d-9ceb-f0731c46b593.png`,label:this.$t(`midjourney.styleTag.anxious`),value:`Anxious`},{image:`https://cdn.acedata.cloud/f280d69a-eb1b-4259-b56d-66510f38ec82.png`,label:this.$t(`midjourney.styleTag.elated`),value:`Elated`},{image:`https://cdn.acedata.cloud/94b78236-ba14-4aab-8985-3921b2146fc9.png`,label:this.$t(`midjourney.styleTag.fearful`),value:`Fearful`},{image:`https://cdn.acedata.cloud/68576d87-224f-463f-85c9-5fbeb386a035.png`,label:this.$t(`midjourney.styleTag.hateful`),value:`Hateful`},{image:`https://cdn.acedata.cloud/e0413400-096f-4072-8faf-5ef82f8cc265.png`,label:this.$t(`midjourney.styleTag.apoow`),value:`Apoow`,advanced:!0},{image:`https://cdn.acedata.cloud/c0f4b0f4-1399-468f-873a-a04f4b7929f8.png`,label:this.$t(`midjourney.styleTag.dark`),value:`Dark`,advanced:!0},{image:`https://cdn.acedata.cloud/297d5f3f-ebc9-4c9f-b656-07359b313871.png`,label:this.$t(`midjourney.styleTag.brutal`),value:`Brutal`,advanced:!0}]},chinese:{displayName:this.$t(`midjourney.styleCategory.chinese`),items:[{image:`https://cdn.acedata.cloud/b29020e5-532d-4b30-94b0-cf5405242fc6.png`,label:this.$t(`midjourney.styleTag.hanfu`),value:`Hanfu`},{image:`https://cdn.acedata.cloud/e00eb48c-8240-4468-ac15-1a9d3349b636.png`,label:this.$t(`midjourney.styleTag.cheongsam`),value:`Cheongsam`},{image:`https://cdn.acedata.cloud/87d89bc5-cb61-4780-8894-c1564bdebd66.png`,label:this.$t(`midjourney.styleTag.chineseCostume`),value:`Chinese costume`},{image:`https://cdn.acedata.cloud/811453d2-2715-44fe-8609-b0d184486b19.png`,label:this.$t(`midjourney.styleTag.chineseDress`),value:`Chinese dress`},{image:`https://cdn.acedata.cloud/2463a720-b803-4d0d-9cac-6a7d5b61001d.png`,label:this.$t(`midjourney.styleTag.wuxia`),value:`Wuxia`},{image:`https://cdn.acedata.cloud/2fbee5a1-8a5c-4bfb-a52c-895ff3f53c3c.png`,label:this.$t(`midjourney.styleTag.chinesePhoenix`),value:`Chinese phoenix`},{image:`https://cdn.acedata.cloud/53fd3a51-7739-493f-aff0-daaea74b942c.png`,label:this.$t(`midjourney.styleTag.kungfu`),value:`Kungfu`},{image:`https://cdn.acedata.cloud/bc4c6bb0-82a5-4bbb-b4e3-96a14c52aed3.png`,label:this.$t(`midjourney.styleTag.kunquOpera`),value:`Kunqu opera`,advanced:!0},{image:`https://cdn.acedata.cloud/291ca1c1-069e-4067-8b9d-1c5c11c2ff14.png`,label:this.$t(`midjourney.styleTag.cloisonne`),value:`Cloisonne`,advanced:!0},{image:`https://cdn.acedata.cloud/17e87115-06ec-4f7b-9b8e-daf782cd4d59.png`,label:this.$t(`midjourney.styleTag.porcelain`),value:`Porcelain`},{image:`https://cdn.acedata.cloud/c9cc4712-24b9-4ff8-926b-02bd626df9a9.png`,label:this.$t(`midjourney.styleTag.embroidered`),value:`Embroidered`},{image:`https://cdn.acedata.cloud/7da286ae-d1e6-4a21-8ba5-10ff7bf9d379.png`,label:this.$t(`midjourney.styleTag.jade`),value:`Jade`},{image:`https://cdn.acedata.cloud/11a2d9f8-3c29-4b0b-ae10-525928f71bce.png`,label:this.$t(`midjourney.styleTag.chinesePavilion`),value:`Chinese pavilion`,advanced:!0},{image:`https://cdn.acedata.cloud/639b5e99-8210-4525-b63f-8b89019d07f3.png`,label:this.$t(`midjourney.styleTag.plumFlower`),value:`Plum flower`},{image:`https://cdn.acedata.cloud/cc87764c-2754-4cb7-8bc3-1070b31ec62b.png`,label:this.$t(`midjourney.styleTag.forbiddenCity`),value:`Forbidden city`,advanced:!0},{image:`https://cdn.acedata.cloud/26d2f2aa-ca26-4c0e-a8c7-86a81aafc475.png`,label:this.$t(`midjourney.styleTag.peony`),value:`Peony`,advanced:!0}]},special:{displayName:this.$t(`midjourney.styleCategory.special`),items:[{image:`https://cdn.acedata.cloud/0ca0fd15-cc8d-420e-acf5-6c489e03c7ff.png`,label:this.$t(`midjourney.styleTag.unrealEngine`),value:`Unreal engine`},{image:`https://cdn.acedata.cloud/ead8ba11-6634-409e-8fea-7b31ca3974bc.png`,label:this.$t(`midjourney.styleTag.octaneRender`),value:`Octane render`},{image:`https://cdn.acedata.cloud/209f1bd9-5d44-4699-97ad-fdde73304efb.png`,label:this.$t(`midjourney.styleTag.maxonCinema4D`),value:`Maxon cinema 4D`},{image:`https://cdn.acedata.cloud/93c31b69-7af4-4d1f-99d6-114a34133613.png`,label:this.$t(`midjourney.styleTag.quixelMegascansRender`),value:`Quixel megascans render`},{image:`https://cdn.acedata.cloud/9883f161-5069-414b-9d23-bd63806c5205.png`,label:this.$t(`midjourney.styleTag.coronaRender`),value:`Corona render`},{image:`https://cdn.acedata.cloud/9c28e4af-28b2-4b97-abd4-e4f42d014f3a.png`,label:this.$t(`midjourney.styleTag.vRay`),value:`V-ray`},{image:`https://cdn.acedata.cloud/01d71ceb-7d17-4318-9914-a6a5fe0abc11.png`,label:this.$t(`midjourney.styleTag.architecturalVisualisation`),value:`Architectural visualisation`},{image:`https://cdn.acedata.cloud/e7f2cd21-2efc-4e18-b38d-3c2cbd95c5ec.png`,label:this.$t(`midjourney.styleTag.dramaticContrast`),value:`Dramatic contrast`},{image:`https://cdn.acedata.cloud/8f113377-ba6e-4fb0-bd56-df8635ab6345.png`,label:this.$t(`midjourney.styleTag.goldAndBlackTone`),value:`Gold and black tone`},{image:`https://cdn.acedata.cloud/6da8b72d-5a67-4c06-b915-8c0b5314d9c8.png`,label:this.$t(`midjourney.styleTag.whiteAndPinkTone`),value:`White and pink tone`},{image:`https://cdn.acedata.cloud/09abd535-8ab6-451f-8bce-29859429244b.png`,label:this.$t(`midjourney.styleTag.redAndBlackTone`),value:`Red and black tone`},{image:`https://cdn.acedata.cloud/81115846-7676-4edb-b7cf-df816c90de7f.png`,label:this.$t(`midjourney.styleTag.neonShades`),value:`Neon shades`},{image:`https://cdn.acedata.cloud/dfcc7a8a-e145-4824-b12b-bd29292daa5f.png`,label:this.$t(`midjourney.styleTag.richColor`),value:`Rich color`},{image:`https://cdn.acedata.cloud/38b05148-73c6-4db3-bddd-b972f27f4671.png`,label:this.$t(`midjourney.styleTag.monotone`),value:`Monotone`},{image:`https://cdn.acedata.cloud/6f6704da-1854-43d7-811f-3145fea96909.png`,label:this.$t(`midjourney.styleTag.theLowPurityTone`),value:`The low-purity tone`},{image:`https://cdn.acedata.cloud/3724b5ef-e7dd-4234-b2a2-f71c6b69b4ac.png`,label:this.$t(`midjourney.styleTag.theHighPurityTone`),value:`The high-purity tone`}]}}}},computed:{value:{get(){return this.$store.state.midjourney.config.elements||[]},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,elements:e})}}},methods:{onToggle(e){this.value.includes(e)?this.value=this.value.filter(t=>t!==e):(this.value.push(e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,elements:this.value}))}}}),In={class:`flex justify-between`},Ln={class:`flex justify-start items-center`},Rn={class:`text-sm font-bold`},zn={class:`flex justify-end items-center`},Bn=[`onClick`],Vn={class:`name`};function Hn(i,u,d,m,h,_){let v=g(`info-icon`),y=g(`el-button`),b=g(`el-tag`),x=g(`check`),S=g(`el-icon`),C=g(`el-image`),w=g(`el-tab-pane`),T=g(`el-tabs`),E=g(`el-dialog`);return c(),e(`div`,null,[t(`div`,In,[t(`div`,Ln,[t(`span`,Rn,n(i.$t(`midjourney.field.elements`)),1),s(v,{content:i.$t(`midjourney.description.elements`)},null,8,[`content`])]),t(`div`,zn,[s(y,{round:``,type:`primary`,size:`small`,onClick:u[0]||=e=>i.choosing=!0},{default:f(()=>[a(n(i.$t(`midjourney.button.select`)),1)]),_:1})])]),t(`div`,null,[(c(!0),e(l,null,p(i.value,(e,t)=>(c(),o(b,{key:t,closable:``,effect:`dark`,round:``,class:`mr-1 mb-1`,onClose:t=>i.onToggle(e)},{default:f(()=>[a(n(e.label),1)]),_:2},1032,[`onClose`]))),128))]),s(E,{modelValue:i.choosing,"onUpdate:modelValue":u[2]||=e=>i.choosing=e,width:`70%`},{default:f(()=>[s(T,{modelValue:i.tab,"onUpdate:modelValue":u[1]||=e=>i.tab=e},{default:f(()=>[(c(!0),e(l,null,p(i.elements,(a,u)=>(c(),o(w,{key:u,label:a.displayName,name:u,class:`pane`},{default:f(()=>[(c(!0),e(l,null,p(a.items,(a,o)=>(c(),e(`div`,{key:o,class:r({hidden:a?.advanced,item:!0,active:i.value.includes(a)}),onClick:e=>i.onToggle(a)},[s(S,{class:`icon`},{default:f(()=>[s(x)]),_:1}),s(C,{src:a.image,fit:`fill`,class:`preview`},null,8,[`src`]),t(`span`,Vn,n(a.label),1)],10,Bn))),128))]),_:2},1032,[`label`,`name`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`modelValue`])])}var Un=V(Fn,[[`render`,Hn],[`__scopeId`,`data-v-48a019ff`]]),Wn=`fast`,Gn=i({name:`ModeSelector`,components:{ElButton:X,ElDropdown:N,ArrowDown:b,ElIcon:x,FontAwesomeIcon:Z,ElDropdownItem:ee},data(){return{options:[{label:this.$t(`midjourney.button.fast`),value:`fast`,icon:`fa-solid fa-wind`,color:`#2dc49c`},{label:this.$t(`midjourney.button.relax`),value:`relax`,icon:`fa-solid fa-mug-saucer`,color:`#ce65e6`},{label:this.$t(`midjourney.button.turbo`),value:`turbo`,icon:`fa-solid fa-bolt`,color:`#ff9900`}]}},computed:{activeOption(){return this.options.find(e=>e.value===this.value)},value:{get(){return this.$store.state.midjourney.config.mode},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,mode:e})}}},mounted(){this.value||=Wn},methods:{onCommand(e){console.log(`command`,e),this.value=e}}}),Kn={class:`ml-2`},qn={class:`ml-1 text-sm`};function Jn(r,i,a,d,m,_){let v=g(`font-awesome-icon`),y=g(`arrow-down`),b=g(`el-icon`),x=g(`el-button`),S=g(`el-dropdown-item`),C=g(`el-dropdown-menu`),w=g(`el-dropdown`);return c(),o(w,{trigger:`click`,onCommand:r.onCommand},{dropdown:f(()=>[s(C,null,{default:f(()=>[(c(!0),e(l,null,p(r.options,(e,r)=>(c(),o(S,{key:r,class:`flex items-center justify-between`,command:e.value},{default:f(()=>[e.icon?(c(),o(v,{key:0,icon:e.icon,style:u({color:e.color})},null,8,[`icon`,`style`])):h(``,!0),t(`span`,qn,n(e.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:f(()=>[s(x,{round:``},{default:f(()=>[r.activeOption?.icon?(c(),o(v,{key:0,icon:r.activeOption.icon,style:u({color:r.activeOption?.color})},null,8,[`icon`,`style`])):h(``,!0),t(`span`,Kn,n(r.activeOption?.label),1),s(b,{class:`el-icon--right`},{default:f(()=>[s(y)]),_:1})]),_:1})]),_:1},8,[`onCommand`])}var Yn=V(Gn,[[`render`,Jn],[`__scopeId`,`data-v-defbf635`]]),Xn=i({name:`PromptInput`,components:{PromptTextarea:ge},computed:{prompt:{get(){return this.$store.state.midjourney?.config.prompt},set(e){this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Zn(e,t,n,r,i,a){let s=g(`prompt-textarea`);return c(),o(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`midjourney.name.prompt`),info:e.$t(`midjourney.description.prompt`),placeholder:e.$t(`midjourney.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Qn=V(Xn,[[`render`,Zn]]),$n=i({name:`ReferenceImage`,components:{ElUpload:E,ElButton:X,InfoIcon:$,FontAwesomeIcon:Z,ImagePreview:Q},mixins:[q,U],emits:[`change`],data(){return{fileList:[],uploadUrl:H()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,references:e})}}},methods:{onExceed(){B.warning(this.$t(`midjourney.message.uploadReferencesExceed`))},onError(){B.error(this.$t(`midjourney.message.uploadReferencesError`))}}}),er={class:`relative`},tr={class:`flex justify-between`},nr={class:`flex justify-start items-center`},rr={class:`text-sm font-bold`};function ir(r,i,o,l,u,d){let p=g(`info-icon`),m=g(`image-preview`),h=g(`font-awesome-icon`),_=g(`el-button`),v=g(`el-upload`);return c(),e(`div`,er,[t(`div`,tr,[t(`div`,nr,[t(`span`,rr,n(r.$t(`midjourney.name.referenceImage`)),1),s(p,{content:r.$t(`midjourney.description.uploadReferences`)},null,8,[`content`])])]),s(v,{ref:`uploader`,"file-list":r.fileList,"onUpdate:fileList":i[0]||=e=>r.fileList=e,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,action:r.uploadUrl,"on-exceed":r.onExceed,"on-error":r.onError,headers:r.headers},{file:f(({file:e})=>[s(m,{url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:t=>r.fileList.splice(r.fileList.indexOf(e),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:f(()=>[s(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:f(()=>[s(h,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+n(r.$t(`midjourney.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`headers`])])}var ar=i({name:`ConfigPanel`,components:{ElButton:X,PromptInput:Qn,ModeSelector:Yn,ModelSelector:qt,ElementsSelector:Un,StyleSelector:Pn,QualitySelector:Qt,RatioSelector:Ae,VersionSelector:Xe,HdSelector:tt,StylizeSelector:At,AdvancedSelector:Ie,ChaosSelector:zt,WeirdSelector:bn,ImageWeightSelector:fn,ReferenceImage:V($n,[[`render`,ir],[`__scopeId`,`data-v-d991c11f`]]),ImageUrlInput:ct,EndImageUrlInput:ht,LoopSelector:We,ResolutionSelector:rn,ImageUrlInput2:St,Consumption:le,VideoFromInput:En,ElTabs:w,ElTabPane:T},emits:[`generate`],computed:{config(){return this.$store.state.midjourney.config},isV8(){return this.config?.version===`8`||this.config?.version===`8.1`},isNiji(){return!!this.config?.model?.includes(`niji`)},type:{get(){return this.$store.state.midjourney.config.type||`imagine`},set(e){console.debug(`set type`,e),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney.config,type:e})}},consumption(){return G(this.config,this.service?.cost)},service(){return this.$store.state.midjourney?.service}},mounted(){this.config.type||(this.type=R)}}),or={class:`flex flex-col h-full`},sr={class:`flex-1 overflow-y-auto p-5`},cr={class:`pt-2 px-1`},lr={class:`pt-2 px-1`},ur={class:`pt-2 px-1`},dr={class:`flex flex-col px-5 pb-5`},fr={class:`flex gap-1`};function pr(r,i,l,u,d,p){let _=g(`model-selector`),y=g(`prompt-input`),b=g(`reference-image`),x=g(`ratio-selector`),S=g(`quality-selector`),C=g(`version-selector`),w=g(`hd-selector`),T=g(`elements-selector`),E=g(`advanced-selector`),D=g(`stylize-selector`),O=g(`weird-selector`),k=g(`chaos-selector`),A=g(`image-weight-selector`),j=g(`style-selector`),M=g(`el-tab-pane`),ee=g(`video-from-input`),N=g(`image-url-input`),P=g(`end-image-url-input`),F=g(`loop-selector`),I=g(`resolution-selector`),L=g(`image-url-input2`),R=g(`el-tabs`),z=g(`consumption`),B=g(`mode-selector`),V=g(`el-button`);return c(),e(`div`,or,[t(`div`,sr,[s(R,{modelValue:r.type,"onUpdate:modelValue":i[0]||=e=>r.type=e,class:`demo-tabs`,stretch:``},{default:f(()=>[s(M,{label:r.$t(`midjourney.tab.images`),name:`imagine`},{default:f(()=>[t(`div`,cr,[s(_,{class:`mb-2`}),s(y,{class:`mb-4`}),s(b,{class:`mb-2`}),s(x,{class:`mb-4`}),s(S,{class:`mb-4`}),r.isNiji?h(``,!0):(c(),o(C,{key:0,class:`mb-4`})),r.isV8&&!r.isNiji?(c(),o(w,{key:1,class:`mb-4`})):h(``,!0),s(T,{class:`mb-2`}),s(E,{class:`mb-2`}),m(t(`div`,null,[s(D,{class:`mb-2`}),s(O,{class:`mb-2`}),s(k,{class:`mb-2`}),r.isV8?h(``,!0):(c(),o(A,{key:0,class:`mb-2`})),s(j,{class:`mb-2`})],512),[[v,r.config?.advanced]])])]),_:1},8,[`label`]),s(M,{label:r.$t(`midjourney.tab.videos`),name:`videos`},{default:f(()=>[t(`div`,lr,[m(s(ee,{class:`mb-4`},null,512),[[v,r.config?.action===`extend`]]),s(N,{class:`mb-2`}),s(P,{class:`mb-2`}),s(F,{class:`mb-2`}),s(I,{class:`mb-4`}),s(y,{class:`mb-4`})])]),_:1},8,[`label`]),s(M,{label:r.$t(`midjourney.tab.describe`),name:`describe`},{default:f(()=>[t(`div`,ur,[s(L,{class:`mb-2`})])]),_:1},8,[`label`])]),_:1},8,[`modelValue`])]),t(`div`,dr,[s(z,{value:r.consumption,service:r.service},null,8,[`value`,`service`]),t(`div`,fr,[r.type===`describe`?h(``,!0):(c(),o(B,{key:0})),r.config.action===`extend`?(c(),o(V,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:i[1]||=e=>r.$emit(`generate`)},{default:f(()=>[a(n(r.$t(`midjourney.button.extend`)),1)]),_:1})):(c(),o(V,{key:2,type:`primary`,class:`btn w-full`,round:``,onClick:i[2]||=e=>r.$emit(`generate`)},{default:f(()=>[a(n(r.$t(`midjourney.button.generate`)),1)]),_:1}))])])])}var mr=V(ar,[[`render`,pr]]),hr=i({name:`TaskPreview`,components:{ElImage:O,ImageWrapper:_e,ImagePreview:Q,ElButton:X,FontAwesomeIcon:Z,ElTooltip:D,ElAlert:k,ElTag:J,CopyToClipboard:se,VideoPlayer:fe,ApiCodeButton:pe},props:{modelValue:{type:Object,required:!0},full:{type:Boolean,default:!1}},emits:[`custom`],data(){return{midjourneyImagineState:te,actionMapping:{[K.GENERATE]:`Generate`,[K.UPSCALE1]:`U1`,[K.UPSCALE2]:`U2`,[K.UPSCALE3]:`U3`,[K.UPSCALE4]:`U4`,[K.VARIATION1]:`V1`,[K.VARIATION2]:`V2`,[K.VARIATION3]:`V3`,[K.VARIATION4]:`V4`,[K.VARIATION_STRONG]:`Vary (Strong)`,[K.VARIATION_SUBTLE]:`Vary (Subtle)`,[K.UPSCALE_CREATIVE]:`Upscale (Creative)`,[K.UPSCALE_SUBTLE]:`Upscale (Subtle)`,[K.ZOOM_OUT_2X]:`Zoom Out 2x`,[K.ZOOM_OUT_1_5X]:`Zoom Out 1.5x`,[K.UPSCALE_2X]:`Upscale 2x`,[K.UPSCALE_4X]:`Upscale 4x`,[K.REDO_UPSCALE_2X]:`Redo Upscale 2x`,[K.REDO_UPSCALE_4X]:`Redo Upscale 4x`,[K.REDO_UPSCALE_SUBTLE]:`Redo Upscale (Subtle)`,[K.REDO_UPSCALE_CREATIVE]:`Redo Upscale (Creative)`,[K.SQUARE]:`Make Square`,[K.PAN_LEFT]:`⬅️`,[K.PAN_UP]:`⬆️`,[K.PAN_DOWN]:`⬇️`,[K.PAN_RIGHT]:`➡️`,[K.REROLL]:`🔄`},descriptionMapping:{[K.GENERATE]:this.$t(`midjourney.action.generate`),[K.UPSCALE1]:this.$t(`midjourney.action.upscale1`),[K.UPSCALE2]:this.$t(`midjourney.action.upscale2`),[K.UPSCALE3]:this.$t(`midjourney.action.upscale3`),[K.UPSCALE4]:this.$t(`midjourney.action.upscale4`),[K.VARIATION1]:this.$t(`midjourney.action.variation1`),[K.VARIATION2]:this.$t(`midjourney.action.variation2`),[K.VARIATION3]:this.$t(`midjourney.action.variation3`),[K.VARIATION4]:this.$t(`midjourney.action.variation4`),[K.VARIATION_STRONG]:this.$t(`midjourney.action.variation_strong`),[K.VARIATION_SUBTLE]:this.$t(`midjourney.action.variation_subtle`),[K.ZOOM_OUT_2X]:this.$t(`midjourney.action.zoom_out_2x`),[K.ZOOM_OUT_1_5X]:this.$t(`midjourney.action.zoom_out_1_5x`),[K.UPSCALE_2X]:this.$t(`midjourney.action.upscale_2x`),[K.UPSCALE_4X]:this.$t(`midjourney.action.upscale_4x`),[K.UPSCALE_SUBTLE]:this.$t(`midjourney.action.upscale_subtle`),[K.UPSCALE_CREATIVE]:this.$t(`midjourney.action.upscale_creative`),[K.REDO_UPSCALE_2X]:this.$t(`midjourney.action.redo_upscale_2x`),[K.REDO_UPSCALE_4X]:this.$t(`midjourney.action.redo_upscale_4x`),[K.REDO_UPSCALE_SUBTLE]:this.$t(`midjourney.action.redo_upscale_subtle`),[K.REDO_UPSCALE_CREATIVE]:this.$t(`midjourney.action.redo_upscale_creative`),[K.SQUARE]:this.$t(`midjourney.action.square`),[K.PAN_LEFT]:this.$t(`midjourney.action.pan_left`),[K.PAN_UP]:this.$t(`midjourney.action.pan_up`),[K.PAN_DOWN]:this.$t(`midjourney.action.pan_down`),[K.PAN_RIGHT]:this.$t(`midjourney.action.pan_right`),[K.REROLL]:this.$t(`midjourney.action.reroll`)}}},computed:{application(){return this.$store.state.midjourney.application},config(){return this.$store.state.midjourney?.config},service(){return this.$store.state.midjourney?.service}},methods:{getActionDescriptionWithPrice(e,t){return`${this.descriptionMapping[e]} (${G({...this.config,action:e,mode:t},this.service?.cost)} ${this.$t(`service.unit.${this.service?.unit||`credits`}`)})`},onCustom(e){this.modelValue?.type===`imagine`&&this.$emit(`custom`,{action:e,image_id:this.modelValue?.response?.image_id})},onExtend(e,t){console.debug(`set config`,t),this.$store.commit(`midjourney/setConfig`,{...this.$store.state.midjourney?.config,video_id:t.video_id,video_url:t.video_urls?.[0],action:`extend`,type:`videos`,is_videos:!0})},onDownload(e){let t=document.createElement(`a`);t.href=e,t.download=e.split(`/`).pop(),t.click()}}}),gr={key:0,class:`item`},_r={class:`left`},vr={class:`preview`},yr={class:`bot`},br={class:`datetime`},xr={class:`info`},Sr={key:0,class:`prompt`},Cr={key:0},wr={key:1},Tr={key:1,class:`prompt`},Er={key:0},Dr={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Or={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},kr={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ar={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},jr={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Mr={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Nr={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Pr={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Fr={key:2},Ir={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Lr={key:1,class:`item`},Rr={class:`left`},zr={class:`preview`},Br={class:`bot`},Vr={class:`datetime`},Hr={class:`info`},Ur={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Wr={key:1,class:`prompt`},Gr={key:0},Kr={key:1},qr={key:2,class:`prompt`},Jr={key:0},Yr={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Xr={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Zr={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Qr={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$r={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ei={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ti={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ni={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},ri={key:0,class:`mb-4`},ii={key:1,class:r({operations:!0,"mt-2":!0,"mb-4":!0})},ai={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},oi={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},si={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ci={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},li={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ui={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},di={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},fi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},pi={key:2},mi={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},hi={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},gi={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},_i={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},vi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},yi={key:2,class:`item`},bi={class:`left`},xi={class:`preview`},Si={class:`bot`},Ci={class:`datetime`},wi={class:`info`},Ti={key:0,class:`prompt`},Ei={key:0},Di={key:1},Oi={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ki={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ai={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ji={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Mi={class:`mb-2`},Ni={class:`mb-2`},Pi={key:0},Fi={class:`text-sm text-[var(--el-text-color-primary)]`},Ii={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Li={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ri={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},zi={key:2},Bi={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Vi(i,u,_,y,b,x){let S=g(`el-image`),C=g(`font-awesome-icon`),w=g(`copy-to-clipboard`),T=g(`el-alert`),E=g(`image-wrapper`),D=g(`el-button`),O=g(`el-tooltip`),k=g(`api-code-button`),A=g(`image-preview`),j=g(`video-player`),M=g(`el-tag`);return c(),e(l,null,[i.modelValue?.type===`imagine`?(c(),e(`div`,gr,[t(`div`,_r,[s(S,{src:`https://cdn.acedata.cloud/wto43b.png`,class:`avatar`})]),t(`div`,vr,[t(`div`,yr,[a(n(i.$t(`midjourney.name.midjourneyBot`))+` `,1),t(`span`,br,n(i.$dayjs.format(``+new Date(parseFloat((i.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,xr,[i.modelValue?.request?.prompt?(c(),e(`p`,Sr,[a(n(i.modelValue?.request?.prompt)+` `,1),i.modelValue?.response?h(``,!0):(c(),e(`span`,Cr,` - (`+n(i.$t(`midjourney.status.pending`))+`) `,1)),i.modelValue?.response?.progress!==void 0&&i.modelValue?.response?.progress!==100?(c(),e(`span`,wr,` - (`+n(i.modelValue?.response?.progress)+`%) `,1)):h(``,!0),t(`span`,null,`(`+n(i.modelValue?.request?.mode)+`)`,1)])):h(``,!0),i.modelValue?.request?.image_id?(c(),e(`p`,Tr,[a(n(i.modelValue?.request?.image_id)+` - `+n(i.modelValue?.request?.action)+` `,1),i.modelValue?.response?h(``,!0):(c(),e(`span`,Er,` - (`+n(i.$t(`midjourney.status.pending`))+`) `,1)),t(`span`,null,`(`+n(i.modelValue?.request?.mode)+`)`,1)])):h(``,!0)]),i.modelValue?.response?.success===!1?(c(),e(`div`,{key:0,class:r({content:!0,full:i.full,failed:!0})},[s(T,{closable:!1,class:`failure`},{default:f(()=>[t(`p`,Dr,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])]),t(`p`,Or,[s(C,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.failureReason`))+`: `+n(i.modelValue?.response?.error?.message)+` `,1),s(w,{content:i.modelValue?.response?.error?.message},null,8,[`content`])]),i.modelValue?.elapsed?(c(),e(`p`,kr,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.elapsed`))+`: `+n(i.modelValue?.elapsed?.toFixed(2))+`s `,1)])):h(``,!0),t(`p`,Ar,[s(C,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.traceId`))+`: `+n(i.modelValue?.response?.trace_id)+` `,1),s(w,{content:i.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})],2)):h(``,!0),i.modelValue?.response?.success===!0?(c(),e(`div`,{key:1,class:r({content:!0,full:i.full})},[i.modelValue?.response?.raw_image_url?(c(),o(E,{key:0,src:i.modelValue?.response?.image_url,"raw-src":i.modelValue?.response?.raw_image_url},null,8,[`src`,`raw-src`])):h(``,!0),i.modelValue?.response?.actions?(c(),e(`div`,{key:1,class:r({operations:!0,full:i.full})},[(c(!0),e(l,null,p(i.modelValue?.response?.actions,(e,t)=>(c(),o(O,{key:t,class:`box-item`,effect:`dark`,content:i.getActionDescriptionWithPrice(e,i.modelValue?.request?.mode),placement:`top-start`},{default:f(()=>[m(s(D,{type:`info`,size:`small`,class:`btn-action`,onClick:t=>i.onCustom(e)},{default:f(()=>[a(n(i.actionMapping[e]),1)]),_:2},1032,[`onClick`]),[[v,i.actionMapping[e]]])]),_:2},1032,[`content`]))),128)),s(k,{path:`/midjourney/imagine`,body:i.modelValue?.request},null,8,[`body`])],2)):h(``,!0),s(T,{closable:!1,class:`mt-2 success`},{default:f(()=>[t(`p`,jr,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])]),i.modelValue?.elapsed?(c(),e(`p`,Mr,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.elapsed`))+`: `+n(i.modelValue?.elapsed?.toFixed(2))+`s `,1)])):h(``,!0),t(`p`,Nr,[s(C,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.traceId`))+`: `+n(i.modelValue?.trace_id)+` `,1),s(w,{content:i.modelValue?.trace_id},null,8,[`content`])]),t(`p`,Pr,[s(C,{icon:`fa-solid fa-image`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.imageId`))+`: `+n(i.modelValue?.response?.image_id)+` `,1),s(w,{content:i.modelValue?.response?.image_id},null,8,[`content`])])]),_:1})],2)):h(``,!0),i.modelValue?.response?h(``,!0):(c(),e(`div`,Fr,[s(T,{closable:!1,class:`mt-2 info`},{default:f(()=>[t(`p`,Ir,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])])]),_:1})]))])])):h(``,!0),i.modelValue?.type===`videos`?(c(),e(`div`,Lr,[t(`div`,Rr,[s(S,{src:`https://cdn.acedata.cloud/wto43b.png`,class:`avatar`})]),t(`div`,zr,[t(`div`,Br,[a(n(i.$t(`midjourney.name.midjourneyBot`))+` `,1),t(`span`,Vr,n(i.$dayjs.format(``+new Date(parseFloat((i.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,Hr,[i.modelValue?.request?.image_url||i.modelValue?.request?.end_image_url?(c(),e(`div`,Ur,[i.modelValue?.request?.image_url?(c(),o(A,{key:0,url:i.modelValue.request.image_url,name:i.$t(`midjourney.name.imageUrl`),closable:!1},null,8,[`url`,`name`])):h(``,!0),i.modelValue?.request?.end_image_url?(c(),o(A,{key:1,url:i.modelValue.request.end_image_url,name:i.$t(`midjourney.name.endImageUrl`),closable:!1},null,8,[`url`,`name`])):h(``,!0)])):h(``,!0),i.modelValue?.request?.prompt?(c(),e(`p`,Wr,[a(n(i.modelValue?.request?.prompt)+` `,1),i.modelValue?.response?h(``,!0):(c(),e(`span`,Gr,` - (`+n(i.$t(`midjourney.status.pending`))+`) `,1)),i.modelValue?.response?.progress!==void 0&&i.modelValue?.response?.progress!==100?(c(),e(`span`,Kr,` - (`+n(i.modelValue?.response?.progress)+`%) `,1)):h(``,!0),t(`span`,null,`(`+n(i.modelValue?.request?.mode)+`)`,1)])):h(``,!0),i.modelValue?.request?.video_id?(c(),e(`p`,qr,[a(n(i.modelValue?.request?.video_id)+` - `+n(i.modelValue?.request?.action)+` `,1),i.modelValue?.response?h(``,!0):(c(),e(`span`,Jr,` - (`+n(i.$t(`midjourney.status.pending`))+`) `,1)),t(`span`,null,`(`+n(i.modelValue?.request?.mode)+`)`,1)])):h(``,!0)]),i.modelValue?.response?.success===!1?(c(),e(`div`,{key:0,class:r({content:!0,full:i.full,failed:!0})},[s(T,{closable:!1,class:`failure`},{default:f(()=>[i.modelValue?.request?.action?(c(),e(`p`,Yr,[s(C,{icon:`fa-solid fa-bolt`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.action`))+`: `+n(i.modelValue?.request?.action),1)])):h(``,!0),i.modelValue?.request?.resolution?(c(),e(`p`,Xr,[s(C,{icon:`fa-solid fa-gauge-high`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.resolution`))+`: `+n(i.modelValue?.request?.resolution),1)])):h(``,!0),i.modelValue?.request?.mode?(c(),e(`p`,Zr,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.mode`))+`: `+n(i.modelValue?.request?.mode),1)])):h(``,!0),i.modelValue?.request?.loop===void 0?h(``,!0):(c(),e(`p`,Qr,[s(C,{icon:`fa-solid fa-arrows-rotate`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.loop`))+`: `+n(i.modelValue?.request?.loop?i.$t(`midjourney.field.on`):i.$t(`midjourney.field.off`)),1)])),t(`p`,$r,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])]),t(`p`,ei,[s(C,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.failureReason`))+`: `+n(i.modelValue?.response?.error?.message)+` `,1),s(w,{content:i.modelValue?.response?.error?.message},null,8,[`content`])]),i.modelValue?.elapsed?(c(),e(`p`,ti,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.elapsed`))+`: `+n(i.modelValue?.elapsed?.toFixed(2))+`s `,1)])):h(``,!0),t(`p`,ni,[s(C,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.traceId`))+`: `+n(i.modelValue?.response?.trace_id)+` `,1),s(w,{content:i.modelValue?.response?.trace_id},null,8,[`content`])])]),_:1})],2)):h(``,!0),i.modelValue?.response?.success===!0?(c(),e(`div`,{key:1,class:r({content:!0,full:i.full})},[i.modelValue?.response.video_urls?(c(),e(`div`,ri,[s(j,{src:i.modelValue?.response.video_urls[0]},null,8,[`src`])])):h(``,!0),i.modelValue?.response&&i.modelValue?.response?.video_urls?(c(),e(`div`,ii,[s(O,{class:`box-item`,effect:`dark`,content:i.$t(`luma.message.extendVideo`),placement:`top-start`},{default:f(()=>[s(D,{type:`info`,size:`small`,class:`btn-action`,onClick:u[0]||=d(e=>i.onExtend(e,i.modelValue?.response),[`stop`])},{default:f(()=>[a(n(i.$t(`midjourney.button.extend`)),1)]),_:1})]),_:1},8,[`content`]),s(O,{class:`box-item`,effect:`dark`,content:i.$t(`luma.message.downloadVideo`),placement:`top-start`},{default:f(()=>[s(D,{type:`info`,size:`small`,class:`btn-action`,onClick:u[1]||=d(e=>i.onDownload(i.modelValue.response.video_urls[0]),[`stop`])},{default:f(()=>[a(n(i.$t(`midjourney.button.download`)),1)]),_:1})]),_:1},8,[`content`]),s(k,{path:`/midjourney/videos`,body:i.modelValue?.request},null,8,[`body`])])):h(``,!0),s(T,{closable:!1,class:`mt-2 success`},{default:f(()=>[i.modelValue?.request?.action?(c(),e(`p`,ai,[s(C,{icon:`fa-solid fa-bolt`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.action`))+`: `+n(i.modelValue?.request?.action),1)])):h(``,!0),i.modelValue?.request?.resolution?(c(),e(`p`,oi,[s(C,{icon:`fa-solid fa-gauge-high`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.resolution`))+`: `+n(i.modelValue?.request?.resolution),1)])):h(``,!0),i.modelValue?.request?.mode?(c(),e(`p`,si,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.mode`))+`: `+n(i.modelValue?.request?.mode),1)])):h(``,!0),i.modelValue?.request?.loop===void 0?h(``,!0):(c(),e(`p`,ci,[s(C,{icon:`fa-solid fa-arrows-rotate`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.loop`))+`: `+n(i.modelValue?.request?.loop?i.$t(`midjourney.field.on`):i.$t(`midjourney.field.off`)),1)])),t(`p`,li,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])]),i.modelValue?.elapsed?(c(),e(`p`,ui,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.elapsed`))+`: `+n(i.modelValue?.elapsed?.toFixed(2))+`s `,1)])):h(``,!0),t(`p`,di,[s(C,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.traceId`))+`: `+n(i.modelValue?.trace_id)+` `,1),s(w,{content:i.modelValue?.trace_id},null,8,[`content`])]),t(`p`,fi,[s(C,{icon:`fa-solid fa-image`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.videoId`))+`: `+n(i.modelValue?.response?.video_id)+` `,1),s(w,{content:i.modelValue?.response?.video_id},null,8,[`content`])])]),_:1})],2)):h(``,!0),i.modelValue?.response?h(``,!0):(c(),e(`div`,pi,[s(T,{closable:!1,class:`info`},{default:f(()=>[i.modelValue?.request?.action?(c(),e(`p`,mi,[s(C,{icon:`fa-solid fa-bolt`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.action`))+`: `+n(i.modelValue?.request?.action),1)])):h(``,!0),i.modelValue?.request?.resolution?(c(),e(`p`,hi,[s(C,{icon:`fa-solid fa-gauge-high`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.resolution`))+`: `+n(i.modelValue?.request?.resolution),1)])):h(``,!0),i.modelValue?.request?.mode?(c(),e(`p`,gi,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.mode`))+`: `+n(i.modelValue?.request?.mode),1)])):h(``,!0),i.modelValue?.request?.loop===void 0?h(``,!0):(c(),e(`p`,_i,[s(C,{icon:`fa-solid fa-arrows-rotate`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.name.loop`))+`: `+n(i.modelValue?.request?.loop?i.$t(`midjourney.field.on`):i.$t(`midjourney.field.off`)),1)])),t(`p`,vi,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])])]),_:1})]))])])):h(``,!0),i.modelValue?.type===`describe`?(c(),e(`div`,yi,[t(`div`,bi,[s(S,{src:`https://cdn.acedata.cloud/wto43b.png`,class:`avatar`})]),t(`div`,xi,[t(`div`,Si,[a(n(i.$t(`midjourney.name.midjourneyBot`))+` `,1),t(`span`,Ci,n(i.$dayjs.format(``+new Date(parseFloat((i.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,wi,[i.modelValue?.request?.image_url?(c(),e(`p`,Ti,[a(n(i.modelValue?.request?.image_url)+` `,1),i.modelValue?.response?.descriptions?h(``,!0):(c(),e(`span`,Ei,` - (`+n(i.$t(`midjourney.status.describePending`))+`) `,1)),i.modelValue?.response?.descriptions?(c(),e(`span`,Di,` - (`+n(i.$t(`midjourney.status.describeComplete`))+`) `,1)):h(``,!0)])):h(``,!0)]),i.modelValue?.response&&!i.modelValue?.response?.descriptions?(c(),e(`div`,{key:0,class:r({content:!0,full:i.full,failed:!0})},[s(T,{closable:!1,class:`failure`},{default:f(()=>[t(`p`,Oi,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])]),t(`p`,ki,[s(C,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.failureReason`))+`: `+n(i.modelValue?.response?.error?.message)+` `,1),s(w,{content:i.modelValue?.response?.error?.message},null,8,[`content`])]),i.modelValue?.elapsed?(c(),e(`p`,Ai,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.elapsed`))+`: `+n(i.modelValue?.elapsed?.toFixed(2))+`s `,1)])):h(``,!0),t(`p`,ji,[s(C,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.traceId`))+`: `+n(i.modelValue?.trace_id)+` `,1),s(w,{content:i.modelValue?.trace_id},null,8,[`content`])])]),_:1})],2)):h(``,!0),i.modelValue?.response?.descriptions?(c(),e(`div`,{key:1,class:r({content:!0,full:i.full})},[t(`div`,Mi,[t(`div`,Ni,[(c(!0),e(l,null,p(i.modelValue.response.descriptions,(r,i)=>(c(),e(`div`,{key:i,class:`flex items-start`},[r===``?h(``,!0):(c(),e(`div`,Pi,[s(M,{effect:`dark`,size:`small`,type:`primary`,round:``,class:`mr-1`},{default:f(()=>[a(n(i+1),1)]),_:2},1024),t(`span`,Fi,[a(n(r)+` `,1),s(w,{content:r},null,8,[`content`])])]))]))),128))]),i.modelValue?.request?.image_url?(c(),o(E,{key:0,src:i.modelValue?.request?.image_url,"raw-src":i.modelValue?.request?.image_url,class:`image w-full rounded-lg`},null,8,[`src`,`raw-src`])):h(``,!0)]),t(`div`,{class:r({operations:!0,"mt-2":!0,"mb-2":!0,full:i.full})},[s(k,{path:`/midjourney/describe`,body:i.modelValue?.request},null,8,[`body`])],2),s(T,{closable:!1,class:`success`},{default:f(()=>[t(`p`,Ii,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])]),i.modelValue?.elapsed?(c(),e(`p`,Li,[s(C,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.elapsed`))+`: `+n(i.modelValue?.elapsed?.toFixed(2))+`s `,1)])):h(``,!0),t(`p`,Ri,[s(C,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.traceId`))+`: `+n(i.modelValue?.trace_id)+` `,1),s(w,{content:i.modelValue?.trace_id},null,8,[`content`])])]),_:1})],2)):h(``,!0),i.modelValue?.response?h(``,!0):(c(),e(`div`,zi,[s(T,{closable:!1,class:`info`},{default:f(()=>[t(`p`,Bi,[s(C,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+n(i.$t(`midjourney.field.taskId`))+`: `+n(i.modelValue?.id)+` `,1),s(w,{content:i.modelValue?.id},null,8,[`content`])])]),_:1})]))])])):h(``,!0)],64)}var Hi=i({name:`TaskList`,components:{TaskItem:V(hr,[[`render`,Vi],[`__scopeId`,`data-v-7a51ab7d`]]),BotPlaceholder:me,NoTasks:he,ScrollList:ue},props:{loading:{type:Boolean,default:!1},floatingLoader:{type:Boolean,default:!0}},emits:[`custom`,`extend`,`reach-top`],data(){return{job:0}},computed:{tasks(){return this.$store.state.midjourney.tasks?.items},application(){return this.$store.state.midjourney.application}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ui={key:0,class:`p-2 flex flex-col overflow-y-auto`},Wi={key:1,class:`w-full h-full flex items-center justify-center`};function Gi(t,n,r,i,a,u){let d=g(`bot-placeholder`),m=g(`no-tasks`),_=g(`task-item`),v=g(`scroll-list`);return t.tasks===void 0?(c(),e(`div`,Ui,[s(d)])):t.tasks&&t.tasks?.length===0?(c(),e(`div`,Wi,[s(m)])):t.tasks.length>0?(c(),o(v,{key:2,ref:`scrollList`,class:`p-2 py-3 h-full flex flex-col overflow-y-auto tasks`,loading:t.loading,"floating-loader":t.floatingLoader,onReachTop:n[2]||=e=>t.$emit(`reach-top`)},{default:f(()=>[(c(!0),e(l,null,p(t.tasks,e=>(c(),o(_,{key:e.id,"model-value":e,onExtend:n[0]||=e=>t.$emit(`extend`,e),onCustom:n[1]||=e=>t.$emit(`custom`,e)},null,8,[`model-value`]))),128))]),_:1},8,[`loading`,`floating-loader`])):h(``,!0)}var Ki=i({name:`MidjourneyIndex`,components:{ConfigPanel:mr,TaskList:V(Hi,[[`render`,Gi]]),Layout:Ce},mixins:[re],inject:[`initialized`],data(){return{operating:!1,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{tasks(){return this.$store.state.midjourney.tasks},credential(){return this.$store.state.midjourney.credential},config(){return this.$store.state.midjourney.config},loading(){return this.$store.state.midjourney.status.getApplications===oe.Request},tasksLoading(){return this.$store.state.midjourney.status.getTasks===oe.Request||this.fetchingTasks},application(){return this.$store.state.midjourney.application},finalPrompt(){let e=``;this.config.references&&this.config.references?.length>0&&(e+=`${this.config.references.join(` `)} `),this.config.prompt&&(e+=this.config.prompt),this.config.elements&&this.config.elements.length>0&&(e+=`,`+this.config.elements.map(e=>e.value).join(`,`));let t=this.config?.model?.includes(`niji`);return this.config?.model&&!e.includes(`--${this.config.model}`)&&(e+=` --${this.config.model}`),!t&&this.config?.version&&!e.includes(`--version `)&&!e.includes(`--v `)&&(e+=` --version ${this.config.version}`),this.config?.chaos&&this.config?.advanced&&!e.includes(`--chaos `)&&(e+=` --chaos ${this.config.chaos}`),this.config?.quality&&!e.includes(`--quality `)&&!e.includes(`--q `)&&this.config?.quality!==`1`&&(e+=` --quality ${this.config.quality}`),this.config?.ratio&&!e.includes(`--aspect `)&&!e.includes(`--ar `)&&this.config?.ratio!==`1:1`&&(e+=` --aspect ${this.config.ratio}`),this.config?.stylize&&!e.includes(`--stylize `)&&!e.includes(`--s `)&&this.config?.advanced&&this.config?.stylize!==100&&(e+=` --stylize ${this.config?.stylize}`),this.config?.weird&&!e.includes(`--weird `)&&!e.includes(`--w `)&&this.config?.advanced&&this.config?.weird!==0&&(e+=` --weird ${this.config.weird}`),this.config.ignore&&!e.includes(`--no `)&&(e+=` --no ${this.config.ignore}`),this.config?.iw&&!e.includes(`--iw `)&&this.config?.advanced&&this.config?.iw!==1&&(e+=` --iw ${this.config.iw}`),this.config?.style&&this.config?.advanced&&!e.includes(`--style`)&&(e+=` --style ${this.config?.style}`),!t&&this.config?.hd&&!e.includes(`--hd`)&&(e+=` --hd`),e=e.replace(/--(fast|relax|turbo) /g,``),this.config.prompt||this.config.references&&this.config.references?.length>0?e:``}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await de({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.loading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`midjourney/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplications`),await this.$store.dispatch(`midjourney/getApplications`),console.debug(`end onGetApplications`),await this.onGetTasks()},async onStartImagineTask(e){if(!Y())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}if(!e.prompt&&e.action===K.GENERATE){B.error(this.$t(`midjourney.message.promptRequired`));return}B.info(this.$t(`midjourney.message.startingTask`)),z(`midjourney`,W.imagine(e,{token:t})).then(()=>{B.success(this.$t(`midjourney.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?B.error(this.$t(`midjourney.message.usedUp`)):B.error(this.$t(`midjourney.message.startTaskFailed`)+e.response?.data?.error?.message)}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onStartVideosTask(e){if(!Y())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}if(!e.prompt){B.error(this.$t(`midjourney.message.promptRequired`));return}if(e.action!==ne.EXTEND&&!e.image_url){B.error(this.$t(`midjourney.message.imageUrlRequired`));return}B.info(this.$t(`midjourney.message.startingTask`)),z(`midjourney`,W.videos(e,{token:t})).then(()=>{B.success(this.$t(`midjourney.message.startVideosTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?B.error(this.$t(`midjourney.message.usedUp`)):B.error(this.$t(`midjourney.message.startVideosTaskFailed`)+e.response?.data?.error?.message)}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onStartDescribeTask(e){if(!Y())return;let t=this.credential?.token;if(!t){console.error(`no token specified`);return}B.info(this.$t(`midjourney.message.startingTask`)),z(`midjourney`,W.describe(e,{token:t})).then(()=>{B.success(this.$t(`midjourney.message.startDescribeTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?B.error(this.$t(`midjourney.message.usedUp`)):B.error(this.$t(`midjourney.message.startDescribeTaskFailed`)+e.response?.data?.error?.message)}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onCustom(e){let t={image_id:e.image_id,action:e.action,mode:this.config?.mode||`fast`,async:!0,version:this.config?.version,hd:this.config?.hd||!1,quality:this.config?.quality||`1`};this.onStartImagineTask(t)},async onGenerate(){if(ie(this.uploadTracker,e=>this.$t(e),e=>B.warning(e))){if(console.debug(`onGenerate`,this.config),this.config?.type===`videos`){let e={video_id:this.config?.video_id,image_url:this.config?.image_url,action:this.config?.action,prompt:this.config?.prompt,end_image_url:this.config?.end_image_url,resolution:this.config?.resolution,loop:this.config?.loop,mode:this.config?.mode||`fast`,async:!0};await this.onStartVideosTask(e)}else if(this.config?.type===`imagine`){let e=this.config?.version===`8`||this.config?.version===`8.1`,t=!!(this.finalPrompt&&this.finalPrompt.includes(`--sref`)),n=!!(e&&this.config?.references&&this.config.references.length>0),r={mode:this.config?.mode||`fast`,prompt:this.finalPrompt,action:K.GENERATE,translation:this.config?.translation,async:!0,version:this.config?.version,hd:this.config?.hd||!1,quality:this.config?.quality||`1`,style_reference:t,moodboard:n};await this.onStartImagineTask(r)}else if(this.config?.type===`describe`){if(!this.config?.image_url){B.error(this.$t(`midjourney.message.imageUrlRequired`));return}let e={image_url:this.config?.image_url,async:!0};await this.onStartDescribeTask(e)}}},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.loading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`midjourney/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},getTasksScrollElement(){return this.$refs.taskList?.getScrollElement?.()}}});function qi(e,t,n,r,i,a){let l=g(`config-panel`),u=g(`task-list`),d=g(`layout`);return c(),o(d,null,{config:f(()=>[s(l,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),results:f(()=>[s(u,{ref:`taskList`,loading:e.loadingMore,onCustom:e.onCustom,onReachTop:e.onReachTop},null,8,[`loading`,`onCustom`,`onReachTop`])]),_:1})}var Ji=V(Ki,[[`render`,qi]]);export{Ji as default};
|