@acedatacloud/nexior 2.0.3 → 2.0.4

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.
Files changed (39) hide show
  1. package/dist/assets/{Auth.505d3890.js → Auth.906c624b.js} +1 -1
  2. package/dist/assets/{Buy.f623721b.js → Buy.f45a76c5.js} +1 -1
  3. package/dist/assets/{Callback.f6f14c62.js → Callback.6ccd4621.js} +1 -1
  4. package/dist/assets/{Chatdoc.905ceb04.js → Chatdoc.073f1869.js} +1 -1
  5. package/dist/assets/{Console.a2dfe735.js → Console.dc27f292.js} +1 -1
  6. package/dist/assets/{Conversation.0d278259.js → Conversation.6e276866.js} +1 -1
  7. package/dist/assets/{Conversation.540ec80b.js → Conversation.cecd218d.js} +1 -1
  8. package/dist/assets/{CopyToClipboard.819eff00.js → CopyToClipboard.b839dc37.js} +1 -1
  9. package/dist/assets/{DarkSelector.e8084ee9.js → DarkSelector.551c7e93.js} +1 -1
  10. package/dist/assets/{Detail.b317d457.js → Detail.abf40872.js} +1 -1
  11. package/dist/assets/{History.719f7487.js → History.543ff2ec.js} +1 -1
  12. package/dist/assets/Index.2b296b8f.js +3 -0
  13. package/dist/assets/{Index.dcef2e16.js → Index.38393b05.js} +1 -1
  14. package/dist/assets/{Index.2f32020a.js → Index.678bd067.js} +1 -1
  15. package/dist/assets/{Index.e2d83f8d.js → Index.73b74d25.js} +1 -1
  16. package/dist/assets/{Index.83346a0a.js → Index.795d1945.js} +1 -1
  17. package/dist/assets/{Index.c5848fd4.js → Index.7a637dfd.js} +1 -1
  18. package/dist/assets/{Index.28d5d564.js → Index.9a22e9e8.js} +1 -1
  19. package/dist/assets/{Index.b51876b5.js → Index.bb75a3bc.js} +1 -1
  20. package/dist/assets/{Index.9a341ae7.js → Index.c558b30c.js} +1 -1
  21. package/dist/assets/{InfoIcon.7db79021.js → InfoIcon.c3ef3ef2.js} +1 -1
  22. package/dist/assets/{Invitees.938bd73d.js → Invitees.cf964064.js} +1 -1
  23. package/dist/assets/{List.79c0682c.js → List.40293304.js} +1 -1
  24. package/dist/assets/{List.e17c8a2d.js → List.49d8f880.js} +1 -1
  25. package/dist/assets/{List.ade5890a.js → List.f1ce7b3a.js} +1 -1
  26. package/dist/assets/{Login.856f6b4f.js → Login.7e9924c6.js} +1 -1
  27. package/dist/assets/{Main.07192447.js → Main.47eed7a0.js} +1 -1
  28. package/dist/assets/{Manage.a46411f3.js → Manage.8cece8f7.js} +1 -1
  29. package/dist/assets/{Navigator.f680e36d.js → Navigator.bc5e899a.js} +1 -1
  30. package/dist/assets/{Pagination.51a58cbf.js → Pagination.7f5197e4.js} +1 -1
  31. package/dist/assets/{Setting.4c245939.js → Setting.62f705d3.js} +1 -1
  32. package/dist/assets/{Status.d67ba0c9.js → Status.62050d4b.js} +1 -1
  33. package/dist/assets/{distribution.51dd5b09.js → distribution.8e74e282.js} +1 -1
  34. package/dist/assets/{index.af2ef6c6.js → index.e9d8864b.js} +1 -1
  35. package/dist/assets/{order.96e69ec1.js → order.eeeccf6f.js} +1 -1
  36. package/dist/assets/{price.e581a665.js → price.4d81ae80.js} +1 -1
  37. package/dist/index.html +1 -1
  38. package/package.json +1 -1
  39. package/dist/assets/Index.3237e565.js +0 -3
@@ -1 +1 @@
1
- var i=Object.defineProperty;var n=(r,t,e)=>t in r?i(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>(n(r,typeof t!="symbol"?t+"":t,e),e);import{t as a}from"./index.af2ef6c6.js";class y{constructor(){s(this,"key","orders")}async getAll(t){return await a.get(`/${this.key}/`,{params:t})}async get(t){return await a.get(`/${this.key}/${t}`)}async create(t){return await a.post(`/${this.key}/`,t)}async update(t,e){return await a.put(`/${this.key}/${t}`,e)}async refresh(t){return await a.post(`/${this.key}/${t}/refresh/`)}async pay(t,e){return await a.post(`/${this.key}/${t}/pay/`,e)}async updatePrice(t,e){return await a.post(`/${this.key}/${t}/update-price/`,e)}async finish(t){return await a.post(`/${this.key}/${t}/finish/`)}async delete(t){return await a.delete(`/${this.key}/${t}`)}}const c=new y;export{c as o};
1
+ var i=Object.defineProperty;var n=(r,t,e)=>t in r?i(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>(n(r,typeof t!="symbol"?t+"":t,e),e);import{t as a}from"./index.e9d8864b.js";class y{constructor(){s(this,"key","orders")}async getAll(t){return await a.get(`/${this.key}/`,{params:t})}async get(t){return await a.get(`/${this.key}/${t}`)}async create(t){return await a.post(`/${this.key}/`,t)}async update(t,e){return await a.put(`/${this.key}/${t}`,e)}async refresh(t){return await a.post(`/${this.key}/${t}/refresh/`)}async pay(t,e){return await a.post(`/${this.key}/${t}/pay/`,e)}async updatePrice(t,e){return await a.post(`/${this.key}/${t}/update-price/`,e)}async finish(t){return await a.post(`/${this.key}/${t}/finish/`)}async delete(t){return await a.delete(`/${this.key}/${t}`)}}const c=new y;export{c as o};
@@ -1 +1 @@
1
- import{u as s,C as u}from"./index.af2ef6c6.js";const i=n=>{const t=s.state.exchange;let{value:r,currency:e=s.state.currency||"usd"}=n;const c=u[e];if(!t)return{value:r,currency:e,label:c};const a=`usd-${e}`,o=t[a];return o&&(r=r*o),console.log("new price",{value:r,currency:e}),{value:r,currency:e,label:c}},g=n=>{var c;let{value:t,defaultValue:r}=n;if(t===void 0&&(t=r),t===void 0)return"";const e=i({value:t});return`${e.label}${(c=e.value)==null?void 0:c.toFixed(2)}`};export{g};
1
+ import{u as s,C as u}from"./index.e9d8864b.js";const i=n=>{const t=s.state.exchange;let{value:r,currency:e=s.state.currency||"usd"}=n;const c=u[e];if(!t)return{value:r,currency:e,label:c};const a=`usd-${e}`,o=t[a];return o&&(r=r*o),console.log("new price",{value:r,currency:e}),{value:r,currency:e,label:c}},g=n=>{var c;let{value:t,defaultValue:r}=n;if(t===void 0&&(t=r),t===void 0)return"";const e=i({value:t});return`${e.label}${(c=e.value)==null?void 0:c.toFixed(2)}`};export{g};
package/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
6
6
  <title>Nexior</title>
7
- <script type="module" crossorigin src="/assets/index.af2ef6c6.js"></script>
7
+ <script type="module" crossorigin src="/assets/index.e9d8864b.js"></script>
8
8
  <link rel="modulepreload" href="/assets/vendor-@vue.31495dbd.js">
9
9
  <link rel="modulepreload" href="/assets/vendor-element-plus.eeef3ee7.js">
10
10
  <link rel="modulepreload" href="/assets/vendor-others.decd85ac.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/nexior",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "author": "Germey Technology <dev@germey.tech>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +0,0 @@
1
- var pe=Object.defineProperty,_e=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var te=(e,t,o)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,h=(e,t)=>{for(var o in t||(t={}))he.call(t,o)&&te(e,o,t[o]);if(ee)for(var o of ee(t))fe.call(t,o)&&te(e,o,t[o]);return e},f=(e,t)=>_e(e,me(t));import{J as U,V as $e,K as oe,P as ve,L as ge}from"./vendor-others.decd85ac.js";import{ag as ne}from"./vendor-fortawesome.3ae42787.js";import{_ as y,ah as se,H as W,w as ye,ai as we}from"./index.af2ef6c6.js";import{O as ke,i as ie,s as be,t as Se,S as re,N as M,o as ae,W as le,Y as Pe,Z as Ie,R as ce,p as xe,A as Ae,Q as Ne,_ as Ce,$ as Te,a0 as Ee,K as G}from"./vendor-element-plus.eeef3ee7.js";import{H as w,al as u,o as p,e as _,S as b,f as r,I as O,V as i,M as k,U as v,W as R,ai as q,L as T,T as je,av as Ve,O as ue,m as E,u as $,A as de,s as Le,R as De,P as Fe}from"./vendor-@vue.31495dbd.js";import{A as Ge,i as Re}from"./Status.d67ba0c9.js";import{I as B}from"./InfoIcon.7db79021.js";import"./vendor-axios.168e6950.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const Ue=w({name:"LayoutSuno",components:{ElDrawer:ke,ElButton:ie,FontAwesomeIcon:ne},data(){return{drawer:!1,preview:!1}},computed:{isPlaying(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.player)==null?void 0:t.isPlaying}}}),ze={class:"main"},Oe={class:"config"},qe={class:"result"},Me={class:"preview"};function Be(e,t,o,s,a,d){const n=u("font-awesome-icon"),l=u("el-button"),m=u("el-drawer");return p(),_("div",ze,[b(" \u6700\u5DE6\u4FA7\u914D\u7F6E\u680F "),r("div",Oe,[O(e.$slots,"config",{},void 0,!0)]),b(" \u4E2D\u95F4\u6B4C\u66F2\u5217\u8868\u680F "),r("div",qe,[O(e.$slots,"result",{},void 0,!0)]),b(" \u6700\u53F3\u8FB9\u6B4C\u66F2\u9884\u89C8\u680F "),r("div",Me,[O(e.$slots,"preview",{},void 0,!0)]),i(l,{round:"",class:"menu",onClick:t[0]||(t[0]=g=>e.drawer=!0)},{default:k(()=>[i(n,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),i(m,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=g=>e.drawer=g),"with-header":!1,size:"340px",class:"drawer"},{default:k(()=>[O(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"]),b(` <el-drawer v-model="isPlaying" :with-header="false" size="340px" class="preview_drawer">
2
- <slot name="preview" />
3
- </el-drawer> `)])}var We=y(Ue,[["render",Be],["__scopeId","data-v-0621513c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Suno.vue"]]);const He=w({name:"VersionSelector",components:{ElSelect:be,ElOption:Se,ElSwitch:re},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{label:this.$t("suno.model.model1"),value:"chirp-v2-xxl-alpha"},{label:this.$t("suno.model.model2"),value:"chirp-v3-0"},{label:this.$t("suno.model.model3"),value:"chirp-v3-5"}]}},computed:{custom:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{custom:e}))}},model:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.model},set(e){var t;console.debug("set model",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{model:e}))}}},mounted(){this.model||(console.debug("set default type",se),this.model=se)}}),Ke={class:"field"},Ye={class:"title"};function Je(e,t,o,s,a,d){const n=u("el-switch"),l=u("el-option"),m=u("el-select");return p(),_("div",Ke,[r("h2",Ye,v(e.$t("suno.name.type")),1),i(n,{modelValue:e.custom,"onUpdate:modelValue":t[0]||(t[0]=g=>e.custom=g),class:"value"},null,8,["modelValue"]),i(m,{modelValue:e.model,"onUpdate:modelValue":t[1]||(t[1]=g=>e.model=g),class:"value",placeholder:e.$t("suno.placeholder.select")},{default:k(()=>[(p(!0),_(R,null,q(e.options,g=>(p(),T(l,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}var Qe=y(He,[["render",Je],["__scopeId","data-v-6d5f21aa"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/TypeSelector.vue"]]);const Ze="",Xe=w({name:"PromptInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=Ze)}}),et={class:"field"},tt={class:"box"},st={class:"title"};function ot(e,t,o,s,a,d){const n=u("info-icon"),l=u("el-input");return p(),_("div",et,[r("div",tt,[r("h2",st,v(e.$t("suno.name.prompt")),1),i(n,{content:e.$t("suno.description.prompt"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=m=>e.prompt=m),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("suno.placeholder.prompt"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var nt=y(Xe,[["render",ot],["__scopeId","data-v-11b65236"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/PromptInput.vue"]]);const it="",rt=w({name:"LyricInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{lyric:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.lyric},set(e){var t;console.debug("set lyric",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{lyric:e}))}},config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}},mounted(){this.value||(this.value=it)}}),at={class:"field"},lt={class:"box"},ct={class:"title"};function ut(e,t,o,s,a,d){const n=u("info-icon"),l=u("el-input");return p(),_("div",at,[r("div",lt,[r("h2",ct,v(e.$t("suno.name.lyrics")),1),i(n,{content:e.$t("suno.description.lyrics"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.lyric,"onUpdate:modelValue":t[0]||(t[0]=m=>e.lyric=m),rows:3,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.lyrics"),maxlength:3e3,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var dt=y(rt,[["render",ut],["__scopeId","data-v-b47f1748"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/LyricInput.vue"]]);const pt=w({name:"StyleInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{style:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.style},set(e){var t;console.debug("set style",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{style:e}))}},config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}}}),_t={class:"field"},mt={class:"title-container"},ht={class:"title"};function ft(e,t,o,s,a,d){const n=u("info-icon"),l=u("el-input");return p(),_("div",_t,[r("div",mt,[r("h2",ht,v(e.$t("suno.name.style")),1),i(n,{content:e.$t("suno.description.style"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.style,"onUpdate:modelValue":t[0]||(t[0]=m=>e.style=m),rows:3,type:"textarea",class:"style",placeholder:e.$t("suno.placeholder.style"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var $t=y(pt,[["render",ft],["__scopeId","data-v-075e574a"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/StyleInput.vue"]]);const vt="",gt=w({name:"TitleInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{title:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.title},set(e){var t;console.debug("set title",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{title:e}))}},instrumental:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.instrumental},set(e){var t;console.debug("set instrumental",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{instrumental:e}))}}},mounted(){this.value||(this.value=vt)}}),yt={class:"field"},wt={class:"title-container"},kt={class:"title"};function bt(e,t,o,s,a,d){const n=u("info-icon"),l=u("el-input");return p(),_("div",yt,[r("div",wt,[r("h2",kt,v(e.$t("suno.name.title")),1),i(n,{content:e.$t("suno.description.title"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.title,"onUpdate:modelValue":t[0]||(t[0]=m=>e.title=m),rows:3,type:"textarea",class:"title",placeholder:e.$t("suno.placeholder.title"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var St=y(gt,[["render",bt],["__scopeId","data-v-f9bac2fa"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/TitleInput.vue"]]);const Pt=!1,It=w({name:"InstrumentSwitch",components:{ElSwitch:re},data(){return{}},computed:{instrumental:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.instrumental},set(e){var t;console.debug("set instrumental",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{instrumental:e}))}}},mounted(){this.instrumental===void 0&&(this.instrumental=Pt)}}),xt={class:"field"},At={class:"title inline-block"};function Nt(e,t,o,s,a,d){const n=u("el-switch");return p(),_("div",xt,[i(n,{modelValue:e.instrumental,"onUpdate:modelValue":t[0]||(t[0]=l=>e.instrumental=l),class:"value mr-2"},null,8,["modelValue"]),r("h2",At,v(e.$t("suno.name.instrumental")),1)])}var Ct=y(It,[["render",Nt],["__scopeId","data-v-78764cec"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/InstrumentSwitch.vue"]]);const Tt=w({name:"PresetPanel",components:{TypeSelector:Qe,PromptInput:nt,LyricInput:dt,InstrumentSwitch:Ct,StyleInput:$t,TitleInput:St,FontAwesomeIcon:ne,ElButton:ie},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Et={class:"panel"},jt={class:"config"},Vt={class:"actions"};function Lt(e,t,o,s,a,d){var S,P,I,x;const n=u("type-selector"),l=u("instrument-switch"),m=u("prompt-input"),g=u("lyric-input"),A=u("style-input"),c=u("title-input"),C=u("font-awesome-icon"),N=u("el-button");return p(),_("div",Et,[r("div",jt,[i(n,{class:"mb-4"}),i(l,{class:"mb-4 instrument"}),(S=e.config)!=null&&S.custom?b("v-if",!0):(p(),T(m,{key:0,class:"mb-4"})),((P=e.config)==null?void 0:P.custom)&&!e.config.instrumental?(p(),T(g,{key:1,class:"mb-4"})):b("v-if",!0),(I=e.config)!=null&&I.custom?(p(),T(A,{key:2,class:"mb-4"})):b("v-if",!0),(x=e.config)!=null&&x.custom?(p(),T(c,{key:3,class:"mb-4"})):b("v-if",!0),r("div",Vt,[i(N,{type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:k(()=>[i(C,{icon:"fa-solid fa-magic",class:"mr-2"}),je(" "+v(e.$t("suno.button.generate")),1)]),_:1},8,["onClick"])])])])}var Dt=y(Tt,[["render",Lt],["__scopeId","data-v-38bb3c66"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/ConfigPanel.vue"]]);function H(e){const t=Math.floor(e)%60;e=Math.floor(e/60);const o=e%60,s=o<10?`0${o}`:o,a=t<10?`0${t}`:t;return s+":"+a}const Ft=w({name:"TaskPreview",components:{ElImage:ae,ElIcon:le,VideoPlay:Pe,VideoPause:Ie},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{task(){var e;return(e=this.$store.state.suno)==null?void 0:e.tasks},audios(){var t,o,s,a,d;let e=[];return Array.isArray((o=(t=this.modelValue)==null?void 0:t.response)==null?void 0:o.data)&&((d=(a=(s=this.modelValue)==null?void 0:s.response)==null?void 0:a.data)==null||d.forEach(n=>{let l=n;e.push(l)})),console.log("audios",e),e},application(){var e;return(e=this.$store.state.suno)==null?void 0:e.application},active(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.tasks)==null?void 0:t.active}},methods:{useFormatDuring:H,onPlay(e){this.$store.dispatch("suno/setAudio",f(h(h({},this.$store.state.suno.audio),e),{state:"playing"})),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",f(h(h({},this.$store.state.suno.audio),e),{state:"paused"})),console.log("on pause")},onClick(e){var t,o,s;((s=(o=(t=this.$store.state)==null?void 0:t.suno)==null?void 0:o.audio)==null?void 0:s.id)!==e.id&&this.onPlay(f(h({},e),{progress:0}))}}}),Gt={class:"task"},Rt=["onClick"],Ut={class:"left"},zt=["onClick"],Ot=["onClick"],qt={key:2,class:"duration"},Mt={class:"info"},Bt={class:"title"},Wt={class:"style"};function Ht(e,t,o,s,a,d){const n=u("el-image"),l=u("video-pause"),m=u("el-icon"),g=u("video-play"),A=Ve("loading");return p(),_("div",Gt,[(p(!0),_(R,null,q(e.audios,(c,C)=>{var N,S,P,I,x,V,L,D,F,j,z,Y,J,Q,Z;return p(),_("div",{key:C,class:"audio",onClick:X=>e.onClick(c)},[ue((p(),_("div",Ut,[i(n,{src:c==null?void 0:c.image_url,class:"cover",fit:"cover"},null,8,["src"]),(c==null?void 0:c.audio_url)&&((P=(S=(N=e.$store.state)==null?void 0:N.suno)==null?void 0:S.audio)==null?void 0:P.id)===c.id&&((V=(x=(I=e.$store.state)==null?void 0:I.suno)==null?void 0:x.audio)==null?void 0:V.state)==="playing"?(p(),_("div",{key:0,class:"overlay",onClick:X=>e.onPause(c)},[i(m,null,{default:k(()=>[i(l)]),_:1})],8,zt)):b("v-if",!0),(c==null?void 0:c.audio_url)&&(((F=(D=(L=e.$store.state)==null?void 0:L.suno)==null?void 0:D.audio)==null?void 0:F.id)!==c.id||((Y=(z=(j=e.$store.state)==null?void 0:j.suno)==null?void 0:z.audio)==null?void 0:Y.id)===c.id&&((Z=(Q=(J=e.$store.state)==null?void 0:J.suno)==null?void 0:Q.audio)==null?void 0:Z.state)==="paused")?(p(),_("div",{key:1,class:"overlay",onClick:X=>e.onPlay(c)},[i(m,null,{default:k(()=>[i(g)]),_:1})],8,Ot)):b("v-if",!0),c!=null&&c.duration?(p(),_("div",qt,v(e.useFormatDuring(c==null?void 0:c.duration)),1)):b("v-if",!0)])),[[A,!(c!=null&&c.audio_url)||!(c!=null&&c.video_url)]]),r("div",Mt,[r("h2",Bt,v(c==null?void 0:c.title),1),r("p",Wt,v(c==null?void 0:c.style),1)])],8,Rt)}),128))])}var Kt=y(Ft,[["render",Ht],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/task/Preview.vue"]]);const Yt={class:"player-slider"},Jt=w({setup(e){const t=U(),o=E({get:()=>{var n,l;return(l=(n=t.state.suno)==null?void 0:n.audio)==null?void 0:l.progress},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:n}))}),s=E({get:()=>{var n,l;return(l=(n=t.state.suno)==null?void 0:n.audio)==null?void 0:l.duration},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{duration:n}))}),a=()=>{},d=n=>t.dispatch("suno/setAudio",f(h({},t.state.suno.audio),{progress:n}));return(n,l)=>(p(),_("div",Yt,[i($(ce),{modelValue:$(o),"onUpdate:modelValue":l[0]||(l[0]=m=>de(o)?o.value=m:null),"show-tooltip":!1,min:0,max:$(s),onChange:d,onInput:a},null,8,["modelValue","max"])]))}});var Qt=y(Jt,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerSlider.vue"]]),Zt="/assets/disk.4907c891.png";const Xt={class:"flex player-song"},es=["src"],ts={class:"ml-2 text-xs flex flex-col justify-between"},ss={class:"w-52 2xl:w-96 cursor-pointer truncate"},os={class:"flex"},ns={class:"ml-2 text-dc"},is=w({setup(e){const t=U(),o=E({get:()=>t.state.suno.audio,set:s=>t.commit("suno/setAudio",s)});return Le(o,(s,a)=>{if((s==null?void 0:s.audio_url)!==(a==null?void 0:a.audio_url)){console.log("audio changed",s),s.object&&(console.log("111",s.object),s.object.pause(),delete s.object);const d=new Audio(s.audio_url);d.currentTime=0,s.state==="playing"?d.play():d.pause(),d.addEventListener("timeupdate",()=>{t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:d.currentTime}))}),t.commit("suno/setAudio",f(h({},t.state.suno.audio),{object:d}))}else if((s==null?void 0:s.progress)!==(a==null?void 0:a.progress)&&Math.abs(s.progress-s.object.currentTime)>2){console.log("progress changed",s.progress);const d=t.state.suno.audio;d.object&&(d.object.currentTime=d.progress)}else(s==null?void 0:s.state)!==(a==null?void 0:a.state)&&(console.log("state changed",s.state),s.object&&(s.state==="playing"?s.object.play():s.object.pause()));(s==null?void 0:s.volume)!==(a==null?void 0:a.volume)&&(console.log("volume changed",s.volume),s.object&&(s.object.volume=s.volume/100))}),(s,a)=>{var d,n,l;return p(),_("div",Xt,[r("img",{alt:"",class:"w-11 h-11 rounded",src:((d=$(o))==null?void 0:d.image_url)||$(Zt)},null,8,es),r("div",ts,[r("div",ss,[r("div",os,[r("span",null,v(((n=$(o))==null?void 0:n.title)||"Music"),1),r("span",ns,"- "+v(((l=$(o))==null?void 0:l.style)||"SmallRuralDog"),1)])])])])}}});var rs=y(is,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerSong.vue"]]);const as={class:"flex justify-end items-center gap-x-2.5"},ls={class:"text-xs"},cs=w({setup(e){const t=U(),o=E({get:()=>{var a,d;return(d=(a=t.state.suno)==null?void 0:a.audio)==null?void 0:d.progress},set:a=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:a}))}),s=E({get:()=>{var a,d;return(d=(a=t.state.suno)==null?void 0:a.audio)==null?void 0:d.duration},set:a=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{duration:a}))});return(a,d)=>(p(),_("div",as,[r("span",ls,v($(H)($(o)))+" / "+v($(H)($(s))),1)]))}});var us=y(cs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerAction.vue"]]);const ds=w({props:{icon:{type:null,required:!0},theme:{type:String,required:!1},size:{type:[Number,String],required:!1},spin:{type:Boolean,required:!1},fill:{type:[String,Array],required:!1},strokeLinecap:{type:String,required:!1},strokeLinejoin:{type:String,required:!1},strokeWidth:{type:Number,required:!1}},setup(e){return(t,o)=>(p(),T(De(e.icon),{theme:e.theme,size:e.size,spin:e.spin,fill:e.fill,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,"stroke-width":e.strokeWidth},null,8,["theme","size","spin","fill","stroke-linecap","stroke-linejoin","stroke-width"]))}});var K=y(ds,[["__file","/home/runner/work/Nexior/Nexior/src/components/common/IconPark.vue"]]);const ps={class:"player-volume flex flex-col items-center pt-2"},_s={class:"text-sm mt-3"},ms={class:"mt-2"},hs=w({setup(e){const t=U(),o=E({get:()=>{var n;return(n=t.state.suno.audio)==null?void 0:n.volume},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{volume:n}))}),s=E({get:()=>{var n;return(n=t.state.suno.audio)==null?void 0:n.muted},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{muted:n}))}),a=()=>t.dispatch("suno/toggleMuted"),d=n=>t.dispatch("suno/setVolume",n);return(n,l)=>(p(),_("div",ps,[r("div",null,[i($(ce),{modelValue:$(o),"onUpdate:modelValue":l[0]||(l[0]=m=>de(o)?o.value=m:null),vertical:"",height:"100px","show-tooltip":!1,max:100,min:0,size:"small",disabled:$(s),onInput:d},null,8,["modelValue","disabled"])]),r("div",_s,v($(o)),1),r("div",ms,[i(K,{icon:$(s)?$($e):$(oe),size:"16",theme:"filled",class:"hover-text",onClick:a},null,8,["icon"])])]))}});var fs=y(hs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerVolumeSlider.vue"]]);const $s={class:"flex items-center justify-center gap-x-3"},vs=w({setup(e){const t=U(),o=()=>t.dispatch("suno/setAudio",f(h({},t.state.suno.audio),{state:t.state.suno.audio.state==="playing"?"paused":"playing"})),s=E(()=>t.state.suno.audio);return(a,d)=>{var n;return p(),_("div",$s,[i(K,{icon:((n=$(s))==null?void 0:n.state)==="playing"?$(ve):$(ge),size:"45",theme:"filled",class:"control",onClick:o},null,8,["icon"]),i($(xe),{placement:"top",width:"50px"},{reference:k(()=>[i(K,{icon:$(oe),size:"20","stroke-width":3,class:"hover-text"},null,8,["icon"])]),default:k(()=>[i(fs)]),_:1})])}}});var gs=y(vs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerController.vue"]]);const ys={class:"flex flex-col items-stretch h-20"},ws={class:"flex grow px-5 items-center"},ks={class:"flex-1"},bs={class:"flex-1"},Ss={class:"flex-1"},Ps=w({setup(e){return(t,o)=>(p(),_("div",ys,[i(Qt),r("div",ws,[r("div",ks,[i(rs)]),r("div",bs,[i(gs)]),r("div",Ss,[i(us)])])]))}});var Is=y(Ps,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/Player.vue"]]);const xs=w({name:"RecentPanel",components:{TaskPreview:Kt,ElSkeleton:Ae,ElSkeletonItem:Ne,Player:Is},data(){return{job:0}},computed:{tasks(){var e,t,o,s;return f(h({},(e=this.$store.state.suno)==null?void 0:e.tasks),{items:(s=(o=(t=this.$store.state.suno)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:s.slice().reverse()})}}}),As={class:"panel recent"},Ns={key:0,class:"tasks"},Cs={class:"left"},Ts={class:"main"},Es={key:1,class:"tasks"},js={key:2,class:"description"},Vs={class:"flex-1 flex flex-col"},Ls={class:"h-20"};function Ds(e,t,o,s,a,d){var A,c,C,N,S,P,I,x,V,L,D,F;const n=u("el-skeleton-item"),l=u("el-skeleton"),m=u("task-preview"),g=u("player");return p(),_(R,null,[r("div",As,[((A=e.tasks)==null?void 0:A.items)===void 0?(p(),_("div",Ns,[(p(),_(R,null,q(3,j=>r("div",{key:j,class:"task placeholder"},[r("div",Cs,[i(l,{animated:""},{template:k(()=>[i(n,{variant:"image",class:"avatar"})]),_:1})]),r("div",Ts,[i(l,{animated:""},{template:k(()=>[i(n,{variant:"p",class:"title"}),i(n,{variant:"text",style:{"margin-right":"16px"}}),i(n,{variant:"text",style:{width:"80%"}})]),_:1})])])),64))])):((C=(c=e.tasks)==null?void 0:c.items)==null?void 0:C.length)&&((S=(N=e.tasks)==null?void 0:N.items)==null?void 0:S.length)>0?(p(),_("div",Es,[(p(!0),_(R,null,q((P=e.tasks)==null?void 0:P.items,(j,z)=>(p(),T(m,{key:z,"model-value":j,class:"preview"},null,8,["model-value"]))),128))])):b("v-if",!0),((x=(I=e.tasks)==null?void 0:I.items)==null?void 0:x.length)===0?(p(),_("p",js,v(e.$t("suno.message.noTasks")),1)):b("v-if",!0)]),ue(r("div",Vs,[r("div",Ls,[i(g)])],512),[[Fe,!!((F=(D=(L=(V=e.$store)==null?void 0:V.state)==null?void 0:L.suno)==null?void 0:D.audio)!=null&&F.object)]])],64)}var Fs=y(xs,[["render",Ds],["__scopeId","data-v-9a683526"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/RecentPanel.vue"]]);const Gs=w({name:"TaskPreview",components:{ElScrollbar:Ce,IconPicture:Te,ElImage:ae,ElAvatar:Ee,ElIcon:le},data(){return{showCloseIcon:!0}},computed:{audio(){var e;return(e=this.$store.state.suno)==null?void 0:e.audio}},methods:{closeCard(){this.showCloseIcon=!this.showCloseIcon}}}),Rs={key:0,class:"card"},Us={class:"image-container"},zs={class:"image-slot"},Os={class:"title"},qs={class:"content"},Ms={class:"artist"},Bs={class:"style"},Ws={class:"time"},Hs={class:"lyrics"},Ks={key:1,class:"gradient-background"};function Ys(e,t,o,s,a,d){const n=u("icon-picture"),l=u("el-icon"),m=u("el-image"),g=u("el-avatar"),A=u("el-scrollbar");return p(),T(A,{class:"right-panel"},{default:k(()=>{var c,C,N,S,P,I,x;return[(c=e.audio)!=null&&c.object?(p(),_("div",Rs,[r("div",Us,[i(m,{src:e.audio.image_url,fit:"cover"},{error:k(()=>[r("div",zs,[i(l,null,{default:k(()=>[i(n)]),_:1})])]),_:1},8,["src"]),r("h2",Os,v((C=e.audio)==null?void 0:C.title),1)]),r("div",qs,[r("div",Ms,[i(g,{size:30,src:(N=e.audio)==null?void 0:N.image_url},null,8,["src"]),r("span",null,v((S=e.audio)==null?void 0:S.prompt),1)]),r("p",Bs,v((P=e.audio)==null?void 0:P.style),1),r("p",Ws,v(e.$dayjs.format((I=e.audio)==null?void 0:I.created_at)),1),r("div",Hs,[r("p",null,v((x=e.audio)==null?void 0:x.lyric),1)])])])):(p(),_("div",Ks))]}),_:1})}var Js=y(Gs,[["render",Ys],["__scopeId","data-v-19e67a48"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/PreviewPanel.vue"]]);const Qs="https://webhook.acedata.cloud/suno",Zs=w({name:"SunoIndex",components:{Layout:We,ApplicationStatus:Ge,ConfigPanel:Dt,RecentPanel:Fs,PreviewPanel:Js},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.suno)==null?void 0:e.status)==null?void 0:t.getApplication)===W.Request},service(){return this.$store.state.suno.service},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},initializing(){return this.$store.state.suno.status.getApplication===W.Request},needApply(){return this.$store.state.suno.status.getApplication===W.Success&&!this.application},application(){return this.$store.state.suno.application},tasks(){return this.$store.state.suno.tasks}},watch:{tasks:{handler(e,t){var o,s;((o=e==null?void 0:e.items)==null?void 0:o.length)>((s=t==null?void 0:t.items)==null?void 0:s.length)&&(console.debug("new tasks detected"),this.onScrollDown())},deep:!0}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job),clearInterval(this.timer)},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("suno/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("suno/getApplication"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){ye.create({application:this.application}).then(({data:e})=>{this.application=e,G.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,o;((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.code)===Re&&G.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},1e3)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("suno/getTasks",{limit:30,offset:0})},async onGenerateAudio(){var o;const e=f(h({},this.config),{callback_url:Qs}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}G.success(this.$t("suno.message.startingTask")),we.audio(e,{token:t}).then(()=>{G.success(this.$t("suno.message.startTaskSuccess"))}).catch(()=>{G.error(this.$t("suno.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function Xs(e,t,o,s,a,d){const n=u("config-panel"),l=u("application-status"),m=u("recent-panel"),g=u("preview-panel"),A=u("layout");return p(),T(A,null,{config:k(()=>[i(n,{onGenerate:e.onGenerateAudio},null,8,["onGenerate"])]),result:k(()=>[i(l,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),i(m,{class:"panel recent"})]),preview:k(()=>[i(g)]),_:1})}var _o=y(Zs,[["render",Xs],["__scopeId","data-v-11d62c6c"],["__file","/home/runner/work/Nexior/Nexior/src/pages/suno/Index.vue"]]);export{_o as default};