@acedatacloud/nexior 3.9.1 → 3.9.2

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 (66) hide show
  1. package/dist/assets/{Auth.b7a99f2b.js → Auth.e2ad88d5.js} +1 -1
  2. package/dist/assets/{Callback.61010670.js → Callback.caf41401.js} +1 -1
  3. package/dist/assets/Console.93239e66.css +1 -0
  4. package/dist/assets/Console.f38b1a2b.js +1 -0
  5. package/dist/assets/{Conversation.8c12b339.js → Conversation.bb9fd829.js} +1 -1
  6. package/dist/assets/{CopyToClipboard.2bd47880.js → CopyToClipboard.b346b5e1.js} +1 -1
  7. package/dist/assets/Detail.68cd25c4.css +1 -0
  8. package/dist/assets/Detail.6adb9734.js +1 -0
  9. package/dist/assets/{EditArray.84dcde4d.js → EditArray.d2b2a9e6.js} +1 -1
  10. package/dist/assets/Extra.87fc4c36.css +1 -0
  11. package/dist/assets/Extra.be164153.js +1 -0
  12. package/dist/assets/{FilePreview.dc669922.js → FilePreview.34a9b87f.js} +1 -1
  13. package/dist/assets/{History.7f4a3661.js → History.3b7a7f02.js} +1 -1
  14. package/dist/assets/{ImagePreview.61c59dc0.js → ImagePreview.9c91d469.js} +1 -1
  15. package/dist/assets/{ImageWrapper.cdf360d6.js → ImageWrapper.b54eeb82.js} +1 -1
  16. package/dist/assets/{Index.16e1d77b.js → Index.04f0bad1.js} +1 -1
  17. package/dist/assets/{Index.035b53bc.js → Index.13235424.js} +1 -1
  18. package/dist/assets/{Index.dad003eb.js → Index.1a48d72d.js} +1 -1
  19. package/dist/assets/{Index.50d007fc.js → Index.335077fe.js} +1 -1
  20. package/dist/assets/{Index.ce4b30a9.js → Index.3bfd18db.js} +1 -1
  21. package/dist/assets/{Index.379b7da4.js → Index.44235e83.js} +1 -1
  22. package/dist/assets/{Index.d3d0b0b9.js → Index.54ba9f29.js} +1 -1
  23. package/dist/assets/{Index.c207bae0.js → Index.654730ce.js} +1 -1
  24. package/dist/assets/{Index.43806c70.js → Index.a51e5572.js} +1 -1
  25. package/dist/assets/{Index.4d2caf51.js → Index.e0129777.js} +1 -1
  26. package/dist/assets/{Index.2bc25c40.js → Index.e49b8476.js} +1 -1
  27. package/dist/assets/{Index.c56e43a2.js → Index.fde1379b.js} +1 -1
  28. package/dist/assets/{InfoIcon.d7af8081.js → InfoIcon.b48777c3.js} +1 -1
  29. package/dist/assets/{Invitees.44fdc7c0.js → Invitees.e3de8edc.js} +1 -1
  30. package/dist/assets/List.61b0c52b.js +1 -0
  31. package/dist/assets/List.a93ed298.js +1 -0
  32. package/dist/assets/List.b5f5444a.css +1 -0
  33. package/dist/assets/List.c249d0a6.js +1 -0
  34. package/dist/assets/{Login.cb5bec07.js → Login.c5c797d1.js} +1 -1
  35. package/dist/assets/{Main.03bf3025.css → Main.8a409437.css} +1 -1
  36. package/dist/assets/{Main.a7e550c3.js → Main.f7e00063.js} +1 -1
  37. package/dist/assets/{Navigator.05693b71.css → Navigator.6193917a.css} +1 -1
  38. package/dist/assets/Navigator.92cd71a9.js +1 -0
  39. package/dist/assets/{NoTasks.a8c6fc1d.js → NoTasks.cb0a6880.js} +1 -1
  40. package/dist/assets/{Pagination.1d64e8f6.js → Pagination.a156e8cf.js} +1 -1
  41. package/dist/assets/Status.504fc1c0.js +1 -0
  42. package/dist/assets/Subscribe.7752b4d4.js +1 -0
  43. package/dist/assets/Subscribe.b90e7407.css +1 -0
  44. package/dist/assets/{VideoPlayer.bcff1065.js → VideoPlayer.8260ab2a.js} +1 -1
  45. package/dist/assets/{distribution.7e66d80f.js → distribution.1fcd6f1a.js} +1 -1
  46. package/dist/assets/{index.f5a81d59.js → index.6d87fb98.js} +1 -1
  47. package/dist/assets/{order.8669fbf9.js → order.becba54f.js} +1 -1
  48. package/dist/assets/{price.e9aa5d45.js → price.968aac08.js} +1 -1
  49. package/dist/index.html +1 -1
  50. package/package.json +1 -1
  51. package/dist/assets/Console.c5a5dbc8.css +0 -1
  52. package/dist/assets/Console.daf310f1.js +0 -1
  53. package/dist/assets/Detail.98c6a517.css +0 -1
  54. package/dist/assets/Detail.c7d74c2c.js +0 -1
  55. package/dist/assets/Extra.bbb29fc7.css +0 -1
  56. package/dist/assets/Extra.dd94961e.js +0 -1
  57. package/dist/assets/List.2ba9f680.js +0 -1
  58. package/dist/assets/List.4c319fb5.js +0 -1
  59. package/dist/assets/List.7a35b0d1.css +0 -1
  60. package/dist/assets/List.9bf4db0e.css +0 -1
  61. package/dist/assets/List.b3c9ba59.js +0 -1
  62. package/dist/assets/List.d51988d3.css +0 -1
  63. package/dist/assets/Navigator.0a582246.js +0 -1
  64. package/dist/assets/Status.43b4c3d7.js +0 -1
  65. package/dist/assets/Subscribe.019d1202.js +0 -1
  66. package/dist/assets/Subscribe.e024d864.css +0 -1
@@ -1 +1 @@
1
- import"./vendor-others.c752dc81.js";import{ar as A}from"./vendor-fortawesome.2b4acb38.js";import{_ as k,aB as $e,aC as ge,aD as be,D as K,O as we,aE as ye,a1 as ke}from"./index.f5a81d59.js";import{R as Ie,u as R,p as J,x as Q,y as E,t as Ve,m as Ee,I as Ue,s as Se}from"./vendor-element-plus.e3d8a038.js";import{H as I,al as n,o as l,e as p,f as a,I as H,V as o,M as _,T as r,S as b,L as S,R as h,$ as _e,P as q,U as fe,ai as Le}from"./vendor-@vue.ddcf0365.js";import{I as P}from"./InfoIcon.d7af8081.js";import{I as he}from"./ImagePreview.61c59dc0.js";import{F as Ce}from"./FilePreview.dc669922.js";import{V as ve}from"./VideoPlayer.bcff1065.js";import{C as Ne}from"./CopyToClipboard.2bd47880.js";import{B as Te,N as je}from"./NoTasks.a8c6fc1d.js";import"./vendor-markdown.0185da35.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.b1bdae55.js";const Pe=I({name:"LayoutLuma",components:{ElDrawer:Ie,ElButton:R,FontAwesomeIcon:A},data(){return{drawer:!1}}}),Ae={class:"main"},Re={class:"config"},Ge={class:"result"};function De(e,t,s,d,$,w){const c=n("font-awesome-icon"),m=n("el-button"),u=n("el-drawer");return l(),p("div",Ae,[a("div",Re,[H(e.$slots,"config",{},void 0,!0)]),a("div",Ge,[H(e.$slots,"result",{},void 0,!0)]),o(m,{round:"",class:"menu",onClick:t[0]||(t[0]=g=>e.drawer=!0)},{default:_(()=>[o(c,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),o(u,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=g=>e.drawer=g),"with-header":!1,size:"340px",class:"drawer"},{default:_(()=>[H(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var Me=k(Pe,[["render",De],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const Be=I({name:"EnhancementSelector",components:{ElSwitch:J,InfoIcon:P},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.enhancement},set(e){var t;console.debug("set enhancement",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=$e)}}),Fe={class:"relative"},Oe={class:"flex justify-between"},ze={class:"flex justify-start items-center"},qe={class:"text-sm font-bold"},He={class:"flex justify-end items-center"};function Ke(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-switch");return l(),p("div",Fe,[a("div",Oe,[a("div",ze,[a("span",qe,r(e.$t("luma.name.enhancement")),1),o(c,{content:e.$t("luma.description.enhancement")},null,8,["content"])]),a("div",He,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=u=>e.value=u),class:"value"},null,8,["modelValue"])])])])}var Je=k(Be,[["render",Ke],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const Qe=I({name:"CustomSelector",components:{ElSwitch:J,InfoIcon:P},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=ge)}}),We={class:"relative"},Xe={class:"flex justify-between"},Ye={class:"flex justify-start items-center"},Ze={class:"text-sm font-bold"},xe={class:"flex justify-end items-center"};function et(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-switch");return l(),p("div",We,[a("div",Xe,[a("div",Ye,[a("span",Ze,r(e.$t("luma.name.custom")),1),o(c,{content:e.$t("luma.description.custom")},null,8,["content"])]),a("div",xe,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=u=>e.value=u),class:"value"},null,8,["modelValue"])])])])}var tt=k(Qe,[["render",et],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const ot=I({name:"LoopSelector",components:{ElSwitch:J,InfoIcon:P},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.loop},set(e){var t;console.debug("set loop",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=be)}}),st={class:"relative"},nt={class:"flex justify-between"},at={class:"flex justify-start items-center"},it={class:"text-sm font-bold"},lt={class:"flex justify-end items-center"};function rt(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-switch");return l(),p("div",st,[a("div",nt,[a("div",at,[a("span",it,r(e.$t("luma.name.loop")),1),o(c,{content:e.$t("luma.description.loop")},null,8,["content"])]),a("div",lt,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=u=>e.value=u),class:"value"},null,8,["modelValue"])])])])}var ct=k(ot,[["render",rt],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const ut=I({name:"EndImage",components:{ElUpload:Q,ElButton:R,ImagePreview:he,InfoIcon:P,FontAwesomeIcon:A},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.luma)==null?void 0:t.config)==null?void 0:s.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onExceed(){E.warning(this.$t("luma.message.uploadReferencesExceed"))},onError(){E.error(this.$t("luma.message.uploadReferencesError"))},onSetEndImageUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),mt={class:"relative"},dt={class:"flex justify-between"},pt={class:"flex justify-start items-center"},_t={class:"text-sm font-bold"};function ft(e,t,s,d,$,w){const c=n("info-icon"),m=n("image-preview"),u=n("font-awesome-icon"),g=n("el-button"),f=n("el-upload");return l(),p("div",mt,[a("div",dt,[a("div",pt,[a("span",_t,r(e.$t("luma.name.endImageUrl")),1),o(c,{content:e.$t("luma.description.endImageUrl")},null,8,["content"])])]),o(f,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=i=>e.fileList=i),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:5,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:i})=>{var v;return[o(m,{url:i.url||((v=i.response)==null?void 0:v.file_url),name:i.name,percentage:i.percentage,onRemove:U=>e.fileList.splice(e.fileList.indexOf(i),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(g,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(u,{icon:"fa-solid fa-upload",class:"icon mr-1"}),b(" "+r(e.$t("luma.button.uploadEndImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}var ht=k(ut,[["render",ft],["__scopeId","data-v-65f364cf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageInput.vue"]]);const vt=I({name:"StartImage",components:{ElUpload:Q,ElButton:R,ImagePreview:he,InfoIcon:P,FontAwesomeIcon:A},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.luma)==null?void 0:t.config)==null?void 0:s.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){E.warning(this.$t("luma.message.uploadReferencesExceed"))},onError(){E.error(this.$t("luma.message.uploadReferencesError"))},onSetStartImageUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),$t={class:"relative"},gt={class:"flex justify-between"},bt={class:"flex justify-start items-center"},wt={class:"text-sm font-bold"};function yt(e,t,s,d,$,w){const c=n("info-icon"),m=n("image-preview"),u=n("font-awesome-icon"),g=n("el-button"),f=n("el-upload");return l(),p("div",$t,[a("div",gt,[a("div",bt,[a("span",wt,r(e.$t("luma.name.startImageUrl")),1),o(c,{content:e.$t("luma.description.startImageUrl")},null,8,["content"])])]),o(f,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=i=>e.fileList=i),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:5,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:i})=>{var v;return[o(m,{url:i.url||((v=i.response)==null?void 0:v.file_url),name:i.name,percentage:i.percentage,onRemove:U=>e.fileList.splice(e.fileList.indexOf(i),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(g,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(u,{icon:"fa-solid fa-upload",class:"icon mr-1"}),b(" "+r(e.$t("luma.button.uploadStartImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}var kt=k(vt,[["render",yt],["__scopeId","data-v-d7812e54"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageInput.vue"]]);const It=I({name:"UploadVideo",components:{ElUpload:Q,ElButton:R,InfoIcon:P,FilePreview:Ce,FontAwesomeIcon:A},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.video_url},set(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,video_url:e})}}},mounted(){this.value||(this.value=void 0)},methods:{onExceed(){E.warning(this.$t("luma.message.uploadVideoExceed"))},onError(){E.error(this.$t("luma.message.uploadVideoError"))},beforeUpload(e){const t=e.type==="video/mp4",s=e.size/1024/1024<10;return t?s?!0:(E.error(this.$t("luma.message.uploadVideoSizeExceed")),!1):(E.error(this.$t("luma.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,video_url:e,action:"extend"})},async onSuccess(){this.onSetVideoUrl()}}}),Vt={class:"relative"},Et={class:"flex justify-between"},Ut={class:"flex justify-start items-center"},St={class:"text-sm font-bold"};function Lt(e,t,s,d,$,w){const c=n("info-icon"),m=n("file-preview"),u=n("font-awesome-icon"),g=n("el-button"),f=n("el-upload");return l(),p("div",Vt,[a("div",Et,[a("div",Ut,[a("span",St,r(e.$t("luma.name.videoUrl")),1),o(c,{content:e.$t("luma.description.videoUrl")},null,8,["content"])])]),o(f,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=i=>e.fileList=i),accept:".mp4",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:i})=>{var v;return[o(m,{url:i.url||((v=i.response)==null?void 0:v.file_url),name:i.name,percentage:i.percentage,onRemove:U=>e.fileList.splice(e.fileList.indexOf(i),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(g,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(u,{icon:"fa-solid fa-upload",class:"icon mr-1"}),b(" "+r(e.$t("luma.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}var Ct=k(It,[["render",Lt],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const Nt="",Tt=I({name:"PromptInput",components:{ElInput:Ve,InfoIcon:P},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,prompt:e})}}},mounted(){this.value||(this.value=Nt)}}),jt={class:"field"},Pt={class:"box"},At={class:"title font-bold"};function Rt(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-input");return l(),p("div",jt,[a("div",Pt,[a("h2",At,r(e.$t("luma.name.prompt")),1),o(c,{content:e.$t("luma.description.prompt"),class:"info"},null,8,["content"])]),o(m,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=u=>e.prompt=u),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("luma.placeholder.prompt"),maxlength:2e3,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Gt=k(Tt,[["render",Rt],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const Dt=I({name:"ExtendFromInput",components:{VideoPlayer:ve},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}},computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}}}),Mt={class:"relative"},Bt={class:"flex mb-2"},Ft={class:"text-sm font-bold"};function Ot(e,t,s,d,$,w){var m,u;const c=n("video-player");return l(),p("div",Mt,[a("div",Bt,[a("span",Ft,r(e.$t("luma.name.extend")),1)]),a("div",null,[(m=e.config)!=null&&m.video_url?(l(),S(c,{key:0,src:(u=e.config)==null?void 0:u.video_url},null,8,["src"])):h("v-if",!0)])])}var zt=k(Dt,[["render",Ot],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const qt=I({name:"PresetPanel",components:{LoopSelector:ct,StartImageInput:kt,EndImageInput:ht,EnhancementSelector:Je,ElButton:R,FontAwesomeIcon:A,PromptInput:Gt,ExtendFromInput:zt,CustomSelector:tt,UploadVideo:Ct},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Ht={class:"panel"},Kt={class:"config"},Jt={class:"actions"};function Qt(e,t,s,d,$,w){var N,T,j,G,D,M,B,F,O;const c=n("extend-from-input"),m=n("prompt-input"),u=n("custom-selector"),g=n("upload-video"),f=n("start-image-input"),i=n("end-image-input"),v=n("enhancement-selector"),U=n("loop-selector"),L=n("font-awesome-icon"),C=n("el-button");return l(),p("div",Ht,[a("div",Kt,[((N=e.config)==null?void 0:N.video_id)||((T=e.config)==null?void 0:T.video_url)?(l(),S(c,{key:0,class:"mb-4"})):h("v-if",!0),o(m,{class:"mb-4"}),(j=e.config)!=null&&j.video_id?h("v-if",!0):(l(),S(u,{key:1,class:"mb-4"})),(G=e.config)!=null&&G.custom?(l(),S(g,{key:2,class:"mb-4"})):h("v-if",!0),!(((D=e.config)==null?void 0:D.video_id)||((M=e.config)==null?void 0:M.video_url))&&!((B=e.config)!=null&&B.custom)?(l(),S(f,{key:3,class:"mb-4"})):h("v-if",!0),o(i,{class:"mb-4"}),o(v,{class:"mb-4"}),o(U,{class:"mb-4"}),a("div",Jt,[((F=e.config)==null?void 0:F.video_url)!==void 0||((O=e.config)==null?void 0:O.custom)?(l(),S(C,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:_(()=>[o(L,{icon:"fa-solid fa-magic",class:"mr-2"}),b(" "+r(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(l(),S(C,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:_(()=>[o(L,{icon:"fa-solid fa-magic",class:"mr-2"}),b(" "+r(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var Wt=k(qt,[["render",Qt],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const Xt=I({name:"TaskPreview",components:{ElImage:Ee,CopyToClipboard:Ne,FontAwesomeIcon:A,ElAlert:Ue,VideoPlayer:ve,ElTooltip:Se,ElButton:R},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){var e;return(e=this.$store.state.luma)==null?void 0:e.application},config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onExtend(e,t){var s;console.debug("set config",t),this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,video_id:t.video_id,prompt:t.prompt,action:"extend",thumbnail_url:t.thumbnail_url,video_url:t.video_url})},onDownload(e,t){window.open(t,"_blank")}}}),Yt={class:"preview"},Zt={class:"left"},xt={class:"main"},eo={class:"bot"},to={class:"datetime"},oo={class:"info"},so={key:0,class:"prompt mt-2"},no={key:0},ao={key:1},io={key:0,class:q({content:!0,failed:!0})},lo={key:0,class:"mb-4"},ro={key:1,class:q({operations:!0,"mt-2":!0,"mb-4":!0})},co={class:"mb-2"},uo={key:1,class:q({content:!0})},mo={class:"mb-2"},po={class:"mb-2"},_o={class:"mb-2"},fo={key:2,class:q({content:!0})},ho={class:"description"};function vo(e,t,s,d,$,w){var U,L,C,N,T,j,G,D,M,B,F,O,W,X,Y,Z,x,ee,te,oe,se,ne,ae;const c=n("el-image"),m=n("video-player"),u=n("el-button"),g=n("el-tooltip"),f=n("font-awesome-icon"),i=n("copy-to-clipboard"),v=n("el-alert");return l(),p("div",Yt,[a("div",Zt,[o(c,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",xt,[a("div",eo,[b(r(e.$t("luma.name.lumaBot"))+" ",1),a("span",to,r(e.$dayjs.format(""+new Date(parseFloat((((U=e.modelValue)==null?void 0:U.created_at)||"").toString())*1e3))),1)]),a("div",oo,[(C=(L=e.modelValue)==null?void 0:L.request)!=null&&C.prompt?(l(),p("p",so,[b(r((T=(N=e.modelValue)==null?void 0:N.request)==null?void 0:T.prompt)+" ",1),(j=e.modelValue)!=null&&j.response?h("v-if",!0):(l(),p("span",no," - ("+r(e.$t("luma.status.pending"))+") ",1)),((D=(G=e.modelValue)==null?void 0:G.response)==null?void 0:D.state)==="processing"||((B=(M=e.modelValue)==null?void 0:M.response)==null?void 0:B.state)==="pending"?(l(),p("span",ao," - ("+r(e.$t("luma.status.processing"))+") ",1)):h("v-if",!0)])):h("v-if",!0)]),h(" Display success message "),((O=(F=e.modelValue)==null?void 0:F.response)==null?void 0:O.success)===!0?(l(),p("div",io,[e.modelValue.response.video_url?(l(),p("div",lo,[o(m,{src:e.modelValue.response.video_url},null,8,["src"])])):h("v-if",!0),((W=e.modelValue)==null?void 0:W.response)&&!((X=e.config)!=null&&X.custom)?(l(),p("div",ro,[o(g,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:_(()=>[o(u,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=_e(V=>{var y;return e.onExtend(V,(y=e.modelValue)==null?void 0:y.response)},["stop"]))},{default:_(()=>[b(r(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"]),o(g,{class:"box-item",effect:"dark",content:e.$t("luma.message.downloadVideo"),placement:"top-start"},{default:_(()=>[o(u,{type:"info",size:"small",class:"btn-action",onClick:t[1]||(t[1]=_e(V=>{var y,z;return e.onDownload(V,(z=(y=e.modelValue)==null?void 0:y.response)==null?void 0:z.video_url)},["stop"]))},{default:_(()=>[b(r(e.$t("luma.button.download")),1)]),_:1})]),_:1},8,["content"])])):h("v-if",!0),o(v,{closable:!1,class:"mt-2 success"},{default:_(()=>{var V,y;return[a("p",co,[o(f,{icon:"fa-solid fa-magic",class:"mr-1"}),b(" "+r(e.$t("luma.name.taskId"))+": "+r((V=e.modelValue)==null?void 0:V.id)+" ",1),o(i,{content:(y=e.modelValue)==null?void 0:y.id},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),((Z=(Y=e.modelValue)==null?void 0:Y.response)==null?void 0:Z.state)==="failed"||((ee=(x=e.modelValue)==null?void 0:x.response)==null?void 0:ee.success)===!1?(l(),p("div",uo,[o(v,{closable:!1,class:"failure"},{template:_(()=>[o(f,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),b(" "+r(e.$t("luma.name.failure")),1)]),default:_(()=>{var V,y,z,ie,le,re,ce,ue,me,de,pe;return[a("p",mo,[o(f,{icon:"fa-solid fa-magic",class:"mr-1"}),b(" "+r(e.$t("luma.name.taskId"))+": "+r((V=e.modelValue)==null?void 0:V.id)+" ",1),o(i,{content:(y=e.modelValue)==null?void 0:y.id},null,8,["content"])]),a("p",po,[o(f,{icon:"fa-solid fa-circle-info",class:"mr-1"}),b(" "+r(e.$t("luma.name.failureReason"))+": "+r((le=(ie=(z=e.modelValue)==null?void 0:z.response)==null?void 0:ie.error)==null?void 0:le.message)+" ",1),o(i,{content:(ue=(ce=(re=e.modelValue)==null?void 0:re.response)==null?void 0:ce.error)==null?void 0:ue.message},null,8,["content"])]),a("p",_o,[o(f,{icon:"fa-solid fa-hashtag",class:"mr-1"}),b(" "+r(e.$t("luma.name.traceId"))+": "+r((me=e.modelValue)==null?void 0:me.trace_id)+" ",1),o(i,{content:(pe=(de=e.modelValue)==null?void 0:de.response)==null?void 0:pe.trace_id},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),!((te=e.modelValue)!=null&&te.response)||((se=(oe=e.modelValue)==null?void 0:oe.response)==null?void 0:se.state)==="processing"||((ae=(ne=e.modelValue)==null?void 0:ne.response)==null?void 0:ae.state)==="pending"?(l(),p("div",fo,[o(v,{closable:!1,class:"info"},{template:_(()=>[o(f,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),b(" "+r(e.$t("luma.name.failure")),1)]),default:_(()=>{var V,y;return[a("p",ho,[o(f,{icon:"fa-solid fa-magic",class:"mr-1"}),b(" "+r(e.$t("luma.name.taskId"))+": "+r((V=e.modelValue)==null?void 0:V.id)+" ",1),o(i,{content:(y=e.modelValue)==null?void 0:y.id},null,8,["content"])])]}),_:1})])):h("v-if",!0)])])}var $o=k(Xt,[["render",vo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const go=I({name:"RecentPanel",components:{BotPlaceholder:Te,TaskPreview:$o,NoTasks:je},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){var e,t,s,d;return{...(e=this.$store.state.luma)==null?void 0:e.tasks,items:(d=(s=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:s.items)==null?void 0:d.slice()}}},methods:{onHandleScroll(){const e=this.$refs.panel;console.log("reach-top reach-top reach-top"),e.scrollTop===0&&this.$emit("reach-top")}}}),bo={key:0},wo={key:1,class:"tasks w-full h-full overflow-y-auto"},yo={key:2};function ko(e,t,s,d,$,w){var g,f,i,v,U,L,C,N;const c=n("bot-placeholder"),m=n("task-preview"),u=n("no-tasks");return l(),p(fe,null,[((g=e.tasks)==null?void 0:g.items)===void 0?(l(),p("div",bo,[o(c)])):((i=(f=e.tasks)==null?void 0:f.items)==null?void 0:i.length)&&((U=(v=e.tasks)==null?void 0:v.items)==null?void 0:U.length)>0?(l(),p("div",wo,[(l(!0),p(fe,null,Le((L=e.tasks)==null?void 0:L.items,(T,j)=>(l(),S(m,{key:j,"model-value":T},null,8,["model-value"]))),128))])):h("v-if",!0),((N=(C=e.tasks)==null?void 0:C.items)==null?void 0:N.length)===0?(l(),p("div",yo,[o(u)])):h("v-if",!0)],64)}var Io=k(go,[["render",ko],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const Vo="https://webhook.acedata.cloud/luma",Eo=I({name:"LumaIndex",components:{ConfigPanel:Wt,Layout:Me,RecentPanel:Io},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===we.Request},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){var s,d;((s=e==null?void 0:e.items)==null?void 0:s.length)>((d=t==null?void 0:t.items)==null?void 0:d.length)&&console.debug("new tasks detected")},deep:!0}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job),clearInterval(this.timer)},methods:{async onReachTop(){var e,t,s;console.debug("reached top"),await this.onGetTasks({createdAtMax:(s=(t=(e=this.tasks)==null?void 0:e.items)==null?void 0:t[0])==null?void 0:s.created_at})},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(){setTimeout(()=>{const e=document.querySelector(".tasks");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(e){if(this.loading){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:s,createdAtMax:d}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",d),await this.$store.dispatch("luma/getTasks",{limit:t,createdAtMin:s,createdAtMax:d})},async onGenerate(){var s;const e={...this.config,callback_url:Vo},t=(s=this.credential)==null?void 0:s.token;if(!t){console.error("no token specified");return}E.info(this.$t("luma.message.startingTask")),ye.generate(e,{token:t}).then(()=>{E.success(this.$t("luma.message.startTaskSuccess"))}).catch(d=>{var w,c;const $=(w=d==null?void 0:d.response)==null?void 0:w.data;((c=$==null?void 0:$.error)==null?void 0:c.code)===ke?E.error(this.$t("luma.message.usedUp")):E.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}});function Uo(e,t,s,d,$,w){const c=n("config-panel"),m=n("recent-panel"),u=n("layout");return l(),S(u,null,{config:_(()=>[o(c,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:_(()=>[o(m,{onReachTop:e.onReachTop},null,8,["onReachTop"])]),_:1})}var Oo=k(Eo,[["render",Uo],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{Oo as default};
1
+ import"./vendor-others.c752dc81.js";import{ar as A}from"./vendor-fortawesome.2b4acb38.js";import{_ as k,aB as $e,aC as ge,aD as be,D as K,O as we,aE as ye,a1 as ke}from"./index.6d87fb98.js";import{R as Ie,u as R,p as J,x as Q,y as E,t as Ve,m as Ee,I as Ue,s as Se}from"./vendor-element-plus.e3d8a038.js";import{H as I,al as n,o as l,e as p,f as a,I as H,V as o,M as _,T as r,S as b,L as S,R as h,$ as _e,P as q,U as fe,ai as Le}from"./vendor-@vue.ddcf0365.js";import{I as P}from"./InfoIcon.b48777c3.js";import{I as he}from"./ImagePreview.9c91d469.js";import{F as Ce}from"./FilePreview.34a9b87f.js";import{V as ve}from"./VideoPlayer.8260ab2a.js";import{C as Ne}from"./CopyToClipboard.b346b5e1.js";import{B as Te,N as je}from"./NoTasks.cb0a6880.js";import"./vendor-markdown.0185da35.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.b1bdae55.js";const Pe=I({name:"LayoutLuma",components:{ElDrawer:Ie,ElButton:R,FontAwesomeIcon:A},data(){return{drawer:!1}}}),Ae={class:"main"},Re={class:"config"},Ge={class:"result"};function De(e,t,s,d,$,w){const c=n("font-awesome-icon"),m=n("el-button"),u=n("el-drawer");return l(),p("div",Ae,[a("div",Re,[H(e.$slots,"config",{},void 0,!0)]),a("div",Ge,[H(e.$slots,"result",{},void 0,!0)]),o(m,{round:"",class:"menu",onClick:t[0]||(t[0]=g=>e.drawer=!0)},{default:_(()=>[o(c,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),o(u,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=g=>e.drawer=g),"with-header":!1,size:"340px",class:"drawer"},{default:_(()=>[H(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var Me=k(Pe,[["render",De],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const Be=I({name:"EnhancementSelector",components:{ElSwitch:J,InfoIcon:P},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.enhancement},set(e){var t;console.debug("set enhancement",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,enhancement:e})}}},mounted(){this.value===void 0&&(this.value=$e)}}),Fe={class:"relative"},Oe={class:"flex justify-between"},ze={class:"flex justify-start items-center"},qe={class:"text-sm font-bold"},He={class:"flex justify-end items-center"};function Ke(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-switch");return l(),p("div",Fe,[a("div",Oe,[a("div",ze,[a("span",qe,r(e.$t("luma.name.enhancement")),1),o(c,{content:e.$t("luma.description.enhancement")},null,8,["content"])]),a("div",He,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=u=>e.value=u),class:"value"},null,8,["modelValue"])])])])}var Je=k(Be,[["render",Ke],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const Qe=I({name:"CustomSelector",components:{ElSwitch:J,InfoIcon:P},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,custom:e})}}},mounted(){this.value===void 0&&(this.value=ge)}}),We={class:"relative"},Xe={class:"flex justify-between"},Ye={class:"flex justify-start items-center"},Ze={class:"text-sm font-bold"},xe={class:"flex justify-end items-center"};function et(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-switch");return l(),p("div",We,[a("div",Xe,[a("div",Ye,[a("span",Ze,r(e.$t("luma.name.custom")),1),o(c,{content:e.$t("luma.description.custom")},null,8,["content"])]),a("div",xe,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=u=>e.value=u),class:"value"},null,8,["modelValue"])])])])}var tt=k(Qe,[["render",et],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const ot=I({name:"LoopSelector",components:{ElSwitch:J,InfoIcon:P},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.loop},set(e){var t;console.debug("set loop",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,loop:e})}}},mounted(){this.value===void 0&&(this.value=be)}}),st={class:"relative"},nt={class:"flex justify-between"},at={class:"flex justify-start items-center"},it={class:"text-sm font-bold"},lt={class:"flex justify-end items-center"};function rt(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-switch");return l(),p("div",st,[a("div",nt,[a("div",at,[a("span",it,r(e.$t("luma.name.loop")),1),o(c,{content:e.$t("luma.description.loop")},null,8,["content"])]),a("div",lt,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=u=>e.value=u),class:"value"},null,8,["modelValue"])])])])}var ct=k(ot,[["render",rt],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const ut=I({name:"EndImage",components:{ElUpload:Q,ElButton:R,ImagePreview:he,InfoIcon:P,FontAwesomeIcon:A},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.luma)==null?void 0:t.config)==null?void 0:s.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onExceed(){E.warning(this.$t("luma.message.uploadReferencesExceed"))},onError(){E.error(this.$t("luma.message.uploadReferencesError"))},onSetEndImageUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),mt={class:"relative"},dt={class:"flex justify-between"},pt={class:"flex justify-start items-center"},_t={class:"text-sm font-bold"};function ft(e,t,s,d,$,w){const c=n("info-icon"),m=n("image-preview"),u=n("font-awesome-icon"),g=n("el-button"),f=n("el-upload");return l(),p("div",mt,[a("div",dt,[a("div",pt,[a("span",_t,r(e.$t("luma.name.endImageUrl")),1),o(c,{content:e.$t("luma.description.endImageUrl")},null,8,["content"])])]),o(f,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=i=>e.fileList=i),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:5,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:i})=>{var v;return[o(m,{url:i.url||((v=i.response)==null?void 0:v.file_url),name:i.name,percentage:i.percentage,onRemove:U=>e.fileList.splice(e.fileList.indexOf(i),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(g,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(u,{icon:"fa-solid fa-upload",class:"icon mr-1"}),b(" "+r(e.$t("luma.button.uploadEndImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}var ht=k(ut,[["render",ft],["__scopeId","data-v-65f364cf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageInput.vue"]]);const vt=I({name:"StartImage",components:{ElUpload:Q,ElButton:R,ImagePreview:he,InfoIcon:P,FontAwesomeIcon:A},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t,s;return(s=(t=(e=this.$store.state)==null?void 0:e.luma)==null?void 0:t.config)==null?void 0:s.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){E.warning(this.$t("luma.message.uploadReferencesExceed"))},onError(){E.error(this.$t("luma.message.uploadReferencesError"))},onSetStartImageUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),$t={class:"relative"},gt={class:"flex justify-between"},bt={class:"flex justify-start items-center"},wt={class:"text-sm font-bold"};function yt(e,t,s,d,$,w){const c=n("info-icon"),m=n("image-preview"),u=n("font-awesome-icon"),g=n("el-button"),f=n("el-upload");return l(),p("div",$t,[a("div",gt,[a("div",bt,[a("span",wt,r(e.$t("luma.name.startImageUrl")),1),o(c,{content:e.$t("luma.description.startImageUrl")},null,8,["content"])])]),o(f,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=i=>e.fileList=i),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:5,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:i})=>{var v;return[o(m,{url:i.url||((v=i.response)==null?void 0:v.file_url),name:i.name,percentage:i.percentage,onRemove:U=>e.fileList.splice(e.fileList.indexOf(i),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(g,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(u,{icon:"fa-solid fa-upload",class:"icon mr-1"}),b(" "+r(e.$t("luma.button.uploadStartImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}var kt=k(vt,[["render",yt],["__scopeId","data-v-d7812e54"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageInput.vue"]]);const It=I({name:"UploadVideo",components:{ElUpload:Q,ElButton:R,InfoIcon:P,FilePreview:Ce,FontAwesomeIcon:A},data(){return{fileList:[],uploadUrl:K()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.video_url},set(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,video_url:e})}}},mounted(){this.value||(this.value=void 0)},methods:{onExceed(){E.warning(this.$t("luma.message.uploadVideoExceed"))},onError(){E.error(this.$t("luma.message.uploadVideoError"))},beforeUpload(e){const t=e.type==="video/mp4",s=e.size/1024/1024<10;return t?s?!0:(E.error(this.$t("luma.message.uploadVideoSizeExceed")),!1):(E.error(this.$t("luma.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){var t,s;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,video_url:e,action:"extend"})},async onSuccess(){this.onSetVideoUrl()}}}),Vt={class:"relative"},Et={class:"flex justify-between"},Ut={class:"flex justify-start items-center"},St={class:"text-sm font-bold"};function Lt(e,t,s,d,$,w){const c=n("info-icon"),m=n("file-preview"),u=n("font-awesome-icon"),g=n("el-button"),f=n("el-upload");return l(),p("div",Vt,[a("div",Et,[a("div",Ut,[a("span",St,r(e.$t("luma.name.videoUrl")),1),o(c,{content:e.$t("luma.description.videoUrl")},null,8,["content"])])]),o(f,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=i=>e.fileList=i),accept:".mp4",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:_(({file:i})=>{var v;return[o(m,{url:i.url||((v=i.response)==null?void 0:v.file_url),name:i.name,percentage:i.percentage,onRemove:U=>e.fileList.splice(e.fileList.indexOf(i),1)},null,8,["url","name","percentage","onRemove"])]}),default:_(()=>[o(g,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:_(()=>[o(u,{icon:"fa-solid fa-upload",class:"icon mr-1"}),b(" "+r(e.$t("luma.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}var Ct=k(It,[["render",Lt],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const Nt="",Tt=I({name:"PromptInput",components:{ElInput:Ve,InfoIcon:P},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("luma/setConfig",{...(t=this.$store.state.luma)==null?void 0:t.config,prompt:e})}}},mounted(){this.value||(this.value=Nt)}}),jt={class:"field"},Pt={class:"box"},At={class:"title font-bold"};function Rt(e,t,s,d,$,w){const c=n("info-icon"),m=n("el-input");return l(),p("div",jt,[a("div",Pt,[a("h2",At,r(e.$t("luma.name.prompt")),1),o(c,{content:e.$t("luma.description.prompt"),class:"info"},null,8,["content"])]),o(m,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=u=>e.prompt=u),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("luma.placeholder.prompt"),maxlength:2e3,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Gt=k(Tt,[["render",Rt],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const Dt=I({name:"ExtendFromInput",components:{VideoPlayer:ve},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}},computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}}}),Mt={class:"relative"},Bt={class:"flex mb-2"},Ft={class:"text-sm font-bold"};function Ot(e,t,s,d,$,w){var m,u;const c=n("video-player");return l(),p("div",Mt,[a("div",Bt,[a("span",Ft,r(e.$t("luma.name.extend")),1)]),a("div",null,[(m=e.config)!=null&&m.video_url?(l(),S(c,{key:0,src:(u=e.config)==null?void 0:u.video_url},null,8,["src"])):h("v-if",!0)])])}var zt=k(Dt,[["render",Ot],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const qt=I({name:"PresetPanel",components:{LoopSelector:ct,StartImageInput:kt,EndImageInput:ht,EnhancementSelector:Je,ElButton:R,FontAwesomeIcon:A,PromptInput:Gt,ExtendFromInput:zt,CustomSelector:tt,UploadVideo:Ct},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Ht={class:"panel"},Kt={class:"config"},Jt={class:"actions"};function Qt(e,t,s,d,$,w){var N,T,j,G,D,M,B,F,O;const c=n("extend-from-input"),m=n("prompt-input"),u=n("custom-selector"),g=n("upload-video"),f=n("start-image-input"),i=n("end-image-input"),v=n("enhancement-selector"),U=n("loop-selector"),L=n("font-awesome-icon"),C=n("el-button");return l(),p("div",Ht,[a("div",Kt,[((N=e.config)==null?void 0:N.video_id)||((T=e.config)==null?void 0:T.video_url)?(l(),S(c,{key:0,class:"mb-4"})):h("v-if",!0),o(m,{class:"mb-4"}),(j=e.config)!=null&&j.video_id?h("v-if",!0):(l(),S(u,{key:1,class:"mb-4"})),(G=e.config)!=null&&G.custom?(l(),S(g,{key:2,class:"mb-4"})):h("v-if",!0),!(((D=e.config)==null?void 0:D.video_id)||((M=e.config)==null?void 0:M.video_url))&&!((B=e.config)!=null&&B.custom)?(l(),S(f,{key:3,class:"mb-4"})):h("v-if",!0),o(i,{class:"mb-4"}),o(v,{class:"mb-4"}),o(U,{class:"mb-4"}),a("div",Jt,[((F=e.config)==null?void 0:F.video_url)!==void 0||((O=e.config)==null?void 0:O.custom)?(l(),S(C,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:_(()=>[o(L,{icon:"fa-solid fa-magic",class:"mr-2"}),b(" "+r(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(l(),S(C,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:_(()=>[o(L,{icon:"fa-solid fa-magic",class:"mr-2"}),b(" "+r(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var Wt=k(qt,[["render",Qt],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const Xt=I({name:"TaskPreview",components:{ElImage:Ee,CopyToClipboard:Ne,FontAwesomeIcon:A,ElAlert:Ue,VideoPlayer:ve,ElTooltip:Se,ElButton:R},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){var e;return(e=this.$store.state.luma)==null?void 0:e.application},config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onExtend(e,t){var s;console.debug("set config",t),this.$store.commit("luma/setConfig",{...(s=this.$store.state.luma)==null?void 0:s.config,video_id:t.video_id,prompt:t.prompt,action:"extend",thumbnail_url:t.thumbnail_url,video_url:t.video_url})},onDownload(e,t){window.open(t,"_blank")}}}),Yt={class:"preview"},Zt={class:"left"},xt={class:"main"},eo={class:"bot"},to={class:"datetime"},oo={class:"info"},so={key:0,class:"prompt mt-2"},no={key:0},ao={key:1},io={key:0,class:q({content:!0,failed:!0})},lo={key:0,class:"mb-4"},ro={key:1,class:q({operations:!0,"mt-2":!0,"mb-4":!0})},co={class:"mb-2"},uo={key:1,class:q({content:!0})},mo={class:"mb-2"},po={class:"mb-2"},_o={class:"mb-2"},fo={key:2,class:q({content:!0})},ho={class:"description"};function vo(e,t,s,d,$,w){var U,L,C,N,T,j,G,D,M,B,F,O,W,X,Y,Z,x,ee,te,oe,se,ne,ae;const c=n("el-image"),m=n("video-player"),u=n("el-button"),g=n("el-tooltip"),f=n("font-awesome-icon"),i=n("copy-to-clipboard"),v=n("el-alert");return l(),p("div",Yt,[a("div",Zt,[o(c,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",xt,[a("div",eo,[b(r(e.$t("luma.name.lumaBot"))+" ",1),a("span",to,r(e.$dayjs.format(""+new Date(parseFloat((((U=e.modelValue)==null?void 0:U.created_at)||"").toString())*1e3))),1)]),a("div",oo,[(C=(L=e.modelValue)==null?void 0:L.request)!=null&&C.prompt?(l(),p("p",so,[b(r((T=(N=e.modelValue)==null?void 0:N.request)==null?void 0:T.prompt)+" ",1),(j=e.modelValue)!=null&&j.response?h("v-if",!0):(l(),p("span",no," - ("+r(e.$t("luma.status.pending"))+") ",1)),((D=(G=e.modelValue)==null?void 0:G.response)==null?void 0:D.state)==="processing"||((B=(M=e.modelValue)==null?void 0:M.response)==null?void 0:B.state)==="pending"?(l(),p("span",ao," - ("+r(e.$t("luma.status.processing"))+") ",1)):h("v-if",!0)])):h("v-if",!0)]),h(" Display success message "),((O=(F=e.modelValue)==null?void 0:F.response)==null?void 0:O.success)===!0?(l(),p("div",io,[e.modelValue.response.video_url?(l(),p("div",lo,[o(m,{src:e.modelValue.response.video_url},null,8,["src"])])):h("v-if",!0),((W=e.modelValue)==null?void 0:W.response)&&!((X=e.config)!=null&&X.custom)?(l(),p("div",ro,[o(g,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:_(()=>[o(u,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=_e(V=>{var y;return e.onExtend(V,(y=e.modelValue)==null?void 0:y.response)},["stop"]))},{default:_(()=>[b(r(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"]),o(g,{class:"box-item",effect:"dark",content:e.$t("luma.message.downloadVideo"),placement:"top-start"},{default:_(()=>[o(u,{type:"info",size:"small",class:"btn-action",onClick:t[1]||(t[1]=_e(V=>{var y,z;return e.onDownload(V,(z=(y=e.modelValue)==null?void 0:y.response)==null?void 0:z.video_url)},["stop"]))},{default:_(()=>[b(r(e.$t("luma.button.download")),1)]),_:1})]),_:1},8,["content"])])):h("v-if",!0),o(v,{closable:!1,class:"mt-2 success"},{default:_(()=>{var V,y;return[a("p",co,[o(f,{icon:"fa-solid fa-magic",class:"mr-1"}),b(" "+r(e.$t("luma.name.taskId"))+": "+r((V=e.modelValue)==null?void 0:V.id)+" ",1),o(i,{content:(y=e.modelValue)==null?void 0:y.id},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),((Z=(Y=e.modelValue)==null?void 0:Y.response)==null?void 0:Z.state)==="failed"||((ee=(x=e.modelValue)==null?void 0:x.response)==null?void 0:ee.success)===!1?(l(),p("div",uo,[o(v,{closable:!1,class:"failure"},{template:_(()=>[o(f,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),b(" "+r(e.$t("luma.name.failure")),1)]),default:_(()=>{var V,y,z,ie,le,re,ce,ue,me,de,pe;return[a("p",mo,[o(f,{icon:"fa-solid fa-magic",class:"mr-1"}),b(" "+r(e.$t("luma.name.taskId"))+": "+r((V=e.modelValue)==null?void 0:V.id)+" ",1),o(i,{content:(y=e.modelValue)==null?void 0:y.id},null,8,["content"])]),a("p",po,[o(f,{icon:"fa-solid fa-circle-info",class:"mr-1"}),b(" "+r(e.$t("luma.name.failureReason"))+": "+r((le=(ie=(z=e.modelValue)==null?void 0:z.response)==null?void 0:ie.error)==null?void 0:le.message)+" ",1),o(i,{content:(ue=(ce=(re=e.modelValue)==null?void 0:re.response)==null?void 0:ce.error)==null?void 0:ue.message},null,8,["content"])]),a("p",_o,[o(f,{icon:"fa-solid fa-hashtag",class:"mr-1"}),b(" "+r(e.$t("luma.name.traceId"))+": "+r((me=e.modelValue)==null?void 0:me.trace_id)+" ",1),o(i,{content:(pe=(de=e.modelValue)==null?void 0:de.response)==null?void 0:pe.trace_id},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),!((te=e.modelValue)!=null&&te.response)||((se=(oe=e.modelValue)==null?void 0:oe.response)==null?void 0:se.state)==="processing"||((ae=(ne=e.modelValue)==null?void 0:ne.response)==null?void 0:ae.state)==="pending"?(l(),p("div",fo,[o(v,{closable:!1,class:"info"},{template:_(()=>[o(f,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),b(" "+r(e.$t("luma.name.failure")),1)]),default:_(()=>{var V,y;return[a("p",ho,[o(f,{icon:"fa-solid fa-magic",class:"mr-1"}),b(" "+r(e.$t("luma.name.taskId"))+": "+r((V=e.modelValue)==null?void 0:V.id)+" ",1),o(i,{content:(y=e.modelValue)==null?void 0:y.id},null,8,["content"])])]}),_:1})])):h("v-if",!0)])])}var $o=k(Xt,[["render",vo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const go=I({name:"RecentPanel",components:{BotPlaceholder:Te,TaskPreview:$o,NoTasks:je},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){var e,t,s,d;return{...(e=this.$store.state.luma)==null?void 0:e.tasks,items:(d=(s=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:s.items)==null?void 0:d.slice()}}},methods:{onHandleScroll(){const e=this.$refs.panel;console.log("reach-top reach-top reach-top"),e.scrollTop===0&&this.$emit("reach-top")}}}),bo={key:0},wo={key:1,class:"tasks w-full h-full overflow-y-auto"},yo={key:2};function ko(e,t,s,d,$,w){var g,f,i,v,U,L,C,N;const c=n("bot-placeholder"),m=n("task-preview"),u=n("no-tasks");return l(),p(fe,null,[((g=e.tasks)==null?void 0:g.items)===void 0?(l(),p("div",bo,[o(c)])):((i=(f=e.tasks)==null?void 0:f.items)==null?void 0:i.length)&&((U=(v=e.tasks)==null?void 0:v.items)==null?void 0:U.length)>0?(l(),p("div",wo,[(l(!0),p(fe,null,Le((L=e.tasks)==null?void 0:L.items,(T,j)=>(l(),S(m,{key:j,"model-value":T},null,8,["model-value"]))),128))])):h("v-if",!0),((N=(C=e.tasks)==null?void 0:C.items)==null?void 0:N.length)===0?(l(),p("div",yo,[o(u)])):h("v-if",!0)],64)}var Io=k(go,[["render",ko],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const Vo="https://webhook.acedata.cloud/luma",Eo=I({name:"LumaIndex",components:{ConfigPanel:Wt,Layout:Me,RecentPanel:Io},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===we.Request},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){var s,d;((s=e==null?void 0:e.items)==null?void 0:s.length)>((d=t==null?void 0:t.items)==null?void 0:d.length)&&console.debug("new tasks detected")},deep:!0}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job),clearInterval(this.timer)},methods:{async onReachTop(){var e,t,s;console.debug("reached top"),await this.onGetTasks({createdAtMax:(s=(t=(e=this.tasks)==null?void 0:e.items)==null?void 0:t[0])==null?void 0:s.created_at})},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(){setTimeout(()=>{const e=document.querySelector(".tasks");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(e){if(this.loading){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:s,createdAtMax:d}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",d),await this.$store.dispatch("luma/getTasks",{limit:t,createdAtMin:s,createdAtMax:d})},async onGenerate(){var s;const e={...this.config,callback_url:Vo},t=(s=this.credential)==null?void 0:s.token;if(!t){console.error("no token specified");return}E.info(this.$t("luma.message.startingTask")),ye.generate(e,{token:t}).then(()=>{E.success(this.$t("luma.message.startTaskSuccess"))}).catch(d=>{var w,c;const $=(w=d==null?void 0:d.response)==null?void 0:w.data;((c=$==null?void 0:$.error)==null?void 0:c.code)===ke?E.error(this.$t("luma.message.usedUp")):E.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}});function Uo(e,t,s,d,$,w){const c=n("config-panel"),m=n("recent-panel"),u=n("layout");return l(),S(u,null,{config:_(()=>[o(c,{onGenerate:e.onGenerate},null,8,["onGenerate"])]),result:_(()=>[o(m,{onReachTop:e.onReachTop},null,8,["onReachTop"])]),_:1})}var Oo=k(Eo,[["render",Uo],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{Oo as default};