@acedatacloud/nexior 3.246.0 → 3.248.0

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 (287) hide show
  1. package/dist/assets/{ApiCodeButton-B371cGlS.js → ApiCodeButton-CsgRae2o.js} +1 -1
  2. package/dist/assets/{Auth-26HdwWyz.js → Auth-D39vFQfy.js} +1 -1
  3. package/dist/assets/{BotPlaceholder-VQ9INowL.js → BotPlaceholder-B-UqCz8R.js} +1 -1
  4. package/dist/assets/{Callback-CPGWcoQ1.js → Callback-BWCD3rTH.js} +1 -1
  5. package/dist/assets/{Console-CraL0cQr.js → Console-DvfzR97a.js} +1 -1
  6. package/dist/assets/{Consumption-BR58QDMb.js → Consumption-BoW8Yj1Z.js} +1 -1
  7. package/dist/assets/{Conversation-BT1opEIy.js → Conversation-C1fxnual.js} +1 -1
  8. package/dist/assets/{CopyToClipboard-BV5FGTDL.js → CopyToClipboard-Ih2qsYgN.js} +1 -1
  9. package/dist/assets/Detail-D5m92Hja.js +2 -0
  10. package/dist/assets/{Extra-tty1CvK1.js → Extra-BPHm1V_3.js} +1 -1
  11. package/dist/assets/{FilePreview-BEYOXInX.js → FilePreview-DFWVNwz_.js} +1 -1
  12. package/dist/assets/{Hailuo-B4bml1kM.js → Hailuo-BxxRf4bb.js} +1 -1
  13. package/dist/assets/{History-DRvTXGFV.js → History-ylxLuWND.js} +1 -1
  14. package/dist/assets/{ImagePreview-Dtp_mint.js → ImagePreview-DeNxw7C3.js} +1 -1
  15. package/dist/assets/{ImageWrapper-D1cgkPLm.js → ImageWrapper-BvFBUaIt.js} +1 -1
  16. package/dist/assets/{Index-CdyytdQB.js → Index-1ADsBPjF.js} +1 -1
  17. package/dist/assets/{Index-7jCPd3_E.js → Index-42qOVFD_.js} +1 -1
  18. package/dist/assets/{Index-LFpFarMa.js → Index-4JCiMyP1.js} +1 -1
  19. package/dist/assets/{Index-CjzNoTd3.js → Index-8Yn6qcKT.js} +1 -1
  20. package/dist/assets/{Index-B0M3QRtt.js → Index-B27tQkpP.js} +1 -1
  21. package/dist/assets/{Index-CM10fVMF.js → Index-B6Ls62IP.js} +1 -1
  22. package/dist/assets/{Index-BQmmNMA5.js → Index-BIu85wjj.js} +1 -1
  23. package/dist/assets/{Index-CvQiyyTe.js → Index-BKH138yc.js} +1 -1
  24. package/dist/assets/{Index-zICCW6o2.js → Index-BlF-P0t4.js} +1 -1
  25. package/dist/assets/{Index-mHEDWqUu.js → Index-BnEYTHw0.js} +1 -1
  26. package/dist/assets/{Index-DhgrSQez.js → Index-BxxDhF-X.js} +1 -1
  27. package/dist/assets/{Index-yQKSZOZU.js → Index-C8colaGu.js} +1 -1
  28. package/dist/assets/{Index-CL5iyz2K.js → Index-CE-T_vEC.js} +1 -1
  29. package/dist/assets/{Index-Db1bnOTy.js → Index-CPRu7nTu.js} +1 -1
  30. package/dist/assets/{Index-CPVrVHrA.js → Index-CgcmGBAm.js} +1 -1
  31. package/dist/assets/{Index-dkmWugpq.js → Index-CvbFcVln.js} +1 -1
  32. package/dist/assets/{Index-BKeCqWqz.js → Index-D8HN16Kg.js} +1 -1
  33. package/dist/assets/{Index-C_8ENwVN.js → Index-D9Zf7USO.js} +1 -1
  34. package/dist/assets/{Index-3CteNsV0.js → Index-DMXFEBbF.js} +1 -1
  35. package/dist/assets/{Index-DD8rqZqG.js → Index-Du4BEkbn.js} +1 -1
  36. package/dist/assets/{Index-Cltc0Wkv.js → Index-Dw8I5m-D.js} +1 -1
  37. package/dist/assets/{Index-BIBv_vVH.js → Index-N31lJtmb.js} +1 -1
  38. package/dist/assets/{Index-yANu3cen.js → Index-Y311Iokk.js} +1 -1
  39. package/dist/assets/{Index-CBWJyghD.js → Index-qEaOyPFJ.js} +1 -1
  40. package/dist/assets/{Index-BxIJigl_.js → Index-xFJZlzEv.js} +1 -1
  41. package/dist/assets/{Invitees-BtCAmZWT.js → Invitees-BIsPj-vQ.js} +1 -1
  42. package/dist/assets/{List-DEwWYS6v.js → List--vQqmENx.js} +1 -1
  43. package/dist/assets/{List-C8kQAW1e.js → List-BH-D5zL-.js} +1 -1
  44. package/dist/assets/{List-CRO_URG8.js → List-DdSCo-VU.js} +1 -1
  45. package/dist/assets/{Main-CT6TQ8mz.js → Main-bt_58gJ5.js} +1 -1
  46. package/dist/assets/{Model-Crupk8et.js → Model-DJ-HECzw.js} +1 -1
  47. package/dist/assets/{Navigator-B2D2kd27.js → Navigator-ilndlwmM.js} +1 -1
  48. package/dist/assets/{NoTasks-pFw5z2ks.js → NoTasks-CBf4UVlo.js} +1 -1
  49. package/dist/assets/{NotFound-Cv5qmniz.js → NotFound-9_7Ar3e7.js} +1 -1
  50. package/dist/assets/{Pagination-oPUcInPC.js → Pagination-jQVkoh--.js} +1 -1
  51. package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-DyQfAbz9.js → Player.vue_vue_type_script_setup_true_lang-DqV0BSsX.js} +1 -1
  52. package/dist/assets/{Status-B4G_uMWi.js → Status-CBQ5PLv2.js} +1 -1
  53. package/dist/assets/{Subscribe-CjQSCaAM.js → Subscribe-BbwzEfz5.js} +1 -1
  54. package/dist/assets/{TabSwitcher-CLRc4cFy.js → TabSwitcher-D84M8GkF.js} +1 -1
  55. package/dist/assets/{Tts-ClM4Bz7o.js → Tts-BfypN4Ze.js} +1 -1
  56. package/dist/assets/{VideoPlayer-ChJIW0wl.js → VideoPlayer-2W03rLFF.js} +1 -1
  57. package/dist/assets/{_Uint8Array-DAIVRyTF.js → _Uint8Array-Cj-LmGzx.js} +1 -1
  58. package/dist/assets/{_baseClone-CgLO05UN.js → _baseClone-CD4xkhO5.js} +1 -1
  59. package/dist/assets/{_baseIteratee-BcmKw-xM.js → _baseIteratee-BcXwWZMY.js} +1 -1
  60. package/dist/assets/{_initCloneObject-Dk_YIBZb.js → _initCloneObject-CIlwXpy7.js} +1 -1
  61. package/dist/assets/{add-DRgY0lm-.js → add-BalBfSNC.js} +1 -1
  62. package/dist/assets/{all-wallets-CV-lb9I3.js → all-wallets-B5cxIWft.js} +1 -1
  63. package/dist/assets/{app-store-DddCoMxl.js → app-store-CPPDtNxC.js} +1 -1
  64. package/dist/assets/{apple-DRO77N-7.js → apple-Lyxd7bJJ.js} +1 -1
  65. package/dist/assets/{arrow-bottom-Czcr-qVx.js → arrow-bottom-D41EVk1z.js} +1 -1
  66. package/dist/assets/{arrow-bottom-circle-CZvNzbX6.js → arrow-bottom-circle-BB53yKrq.js} +1 -1
  67. package/dist/assets/{arrow-left-CYoi894j.js → arrow-left-CO27SOAw.js} +1 -1
  68. package/dist/assets/{arrow-right-CCWeJWJj.js → arrow-right-MWjfhSEn.js} +1 -1
  69. package/dist/assets/{arrow-top-DtFtleXt.js → arrow-top-DPABL4cq.js} +1 -1
  70. package/dist/assets/{avatar-BWpFNaB7.js → avatar-x4dsHW7W.js} +1 -1
  71. package/dist/assets/{bank-D7pqYo2D.js → bank-DncyfpIj.js} +1 -1
  72. package/dist/assets/{basic-CxJB5RLC.js → basic-BXJ5AuNC.js} +1 -1
  73. package/dist/assets/{browser-BtQeqbo-.js → browser-DOcoChNZ.js} +1 -1
  74. package/dist/assets/{byokCredential-CePMi4Or.js → byokCredential-DhmvNEV5.js} +1 -1
  75. package/dist/assets/{card-DQLvWiNe.js → card-BsSCLVt0.js} +1 -1
  76. package/dist/assets/{castArray-LOj3KWC8.js → castArray-9ufFSW5u.js} +1 -1
  77. package/dist/assets/chat-B_HOcIld.js +1 -0
  78. package/dist/assets/chat-BmceIzis.js +1 -0
  79. package/dist/assets/chat-BmyGGxp8.js +1 -0
  80. package/dist/assets/chat-COZaceBe.js +1 -0
  81. package/dist/assets/chat-Cg7w1tLG.js +1 -0
  82. package/dist/assets/chat-Ch5QN39P.js +1 -0
  83. package/dist/assets/chat-CoVVUBUU.js +1 -0
  84. package/dist/assets/chat-Cwzia3WL.js +1 -0
  85. package/dist/assets/chat-D2g6mCbx.js +1 -0
  86. package/dist/assets/chat-D5y4o62r.js +1 -0
  87. package/dist/assets/chat-D9ufeoXV.js +1 -0
  88. package/dist/assets/chat-DIKm4lJF.js +1 -0
  89. package/dist/assets/chat-DJe220pZ.js +1 -0
  90. package/dist/assets/chat-DWx8DmVN.js +1 -0
  91. package/dist/assets/chat-Dg2XzkIa.js +1 -0
  92. package/dist/assets/chat-DytLYjfu.js +1 -0
  93. package/dist/assets/{chat-ESn57CHO.js → chat-DyuRDrR2.js} +1 -1
  94. package/dist/assets/chat-rKPL6Bq2.js +1 -0
  95. package/dist/assets/chat-t0vRxpFl.js +1 -0
  96. package/dist/assets/{checkmark-u3UNYOIc.js → checkmark-CkpMJm4d.js} +1 -1
  97. package/dist/assets/{checkmark-bold-Bp4lR5W0.js → checkmark-bold-BCDV5X0-.js} +1 -1
  98. package/dist/assets/{chevron-bottom-B4iMHulh.js → chevron-bottom-CAXcvThb.js} +1 -1
  99. package/dist/assets/{chevron-left-CNFuv__p.js → chevron-left-Bg1Am-f6.js} +1 -1
  100. package/dist/assets/{chevron-right-Ba479Exc.js → chevron-right-Dzcv24St.js} +1 -1
  101. package/dist/assets/{chevron-top-CNrVnei0.js → chevron-top-DMIRMmDX.js} +1 -1
  102. package/dist/assets/{chrome-store-0IFwadcU.js → chrome-store-DWj8xFro.js} +1 -1
  103. package/dist/assets/{clock-CTEHTnAa.js → clock-C3pBpJSh.js} +1 -1
  104. package/dist/assets/{close-DjuxCJ9g.js → close-BD4gl98l.js} +1 -1
  105. package/dist/assets/{coinPlaceholder-WEwRdO0r.js → coinPlaceholder-Ci5GY26z.js} +1 -1
  106. package/dist/assets/{compass-sKDOLbtb.js → compass-BwsaSpWM.js} +1 -1
  107. package/dist/assets/{copy-B08hfe1J.js → copy-gAWigFZh.js} +1 -1
  108. package/dist/assets/{createTaskActions-DyNEF-qp.js → createTaskActions-D7Z85jNw.js} +1 -1
  109. package/dist/assets/{cursor-CGvoHemJ.js → cursor-C2PRo4vA.js} +1 -1
  110. package/dist/assets/{cursor-transparent-DICDIk-o.js → cursor-transparent-BVXelCvm.js} +1 -1
  111. package/dist/assets/{debounce-D9r3U3cl.js → debounce-zyhh1kFW.js} +1 -1
  112. package/dist/assets/{desktop-BeEBoD5s.js → desktop-jCWSCn8z.js} +1 -1
  113. package/dist/assets/{disconnect-wrcT_6GB.js → disconnect-CbpuKDT6.js} +1 -1
  114. package/dist/assets/{discord-BmhTCLOw.js → discord-C8ajtmWf.js} +1 -1
  115. package/dist/assets/{distribution-Bkpy70GX.js → distribution-3BQ7CTZO.js} +1 -1
  116. package/dist/assets/{dropdown--tI-7d5q.js → dropdown-D2lPdiU3.js} +1 -1
  117. package/dist/assets/{etherscan-DO2r33Yc.js → etherscan-CZafqnoh.js} +1 -1
  118. package/dist/assets/{exclamation-triangle-CDIwuKb2.js → exclamation-triangle-wxNgK7PY.js} +1 -1
  119. package/dist/assets/{extension-ByscwuzC.js → extension-Bk4_azOL.js} +1 -1
  120. package/dist/assets/{external-link-DHGs_wO7.js → external-link-Cqpda3PZ.js} +1 -1
  121. package/dist/assets/{facebook-BVNTr2tr.js → facebook-D68jkLNm.js} +1 -1
  122. package/dist/assets/{farcaster-DfoTjlzE.js → farcaster-CCQhcLCI.js} +1 -1
  123. package/dist/assets/{filters-BpCV9c7-.js → filters-Fmk3MdsS.js} +1 -1
  124. package/dist/assets/{github-YccRZtPU.js → github-YUft1BRX.js} +1 -1
  125. package/dist/assets/{google-C2NUJQ-0.js → google-D8WDx1KI.js} +1 -1
  126. package/dist/assets/{help-circle-BM8YFGG2.js → help-circle-CVpQTNC8.js} +1 -1
  127. package/dist/assets/{highlight-CInNOqMj.js → highlight-CYeIx3eC.js} +1 -1
  128. package/dist/assets/{id-D5H-Lded.js → id-B5K1HBmc.js} +1 -1
  129. package/dist/assets/{image-BsEfxO2E.js → image-DHXmKgFb.js} +1 -1
  130. package/dist/assets/{index-ESc5F-oa.js → index-6tKWZwSV.js} +1 -1
  131. package/dist/assets/{index--7T9Znd9.js → index-7YuxLUYH.js} +1 -1
  132. package/dist/assets/{index-DH5J_zLM.js → index-B3XMfsr2.js} +1 -1
  133. package/dist/assets/{index-CsUt_G5g.js → index-BILgzrZ9.js} +1 -1
  134. package/dist/assets/{index--fj6vK-H.js → index-BOikF7Vg.js} +1 -1
  135. package/dist/assets/{index-9dhmbSI2.js → index-BPVVKogl.js} +1 -1
  136. package/dist/assets/{index-Ds4AqnCT.js → index-BVMK7LIJ.js} +1 -1
  137. package/dist/assets/{index-BO9FSDV8.js → index-Bdx-E-Cj.js} +1 -1
  138. package/dist/assets/{index-X8FKA8cj.js → index-BfT8NvTD.js} +1 -1
  139. package/dist/assets/{index-CynHSjHx.js → index-Bi6VpZAJ.js} +1 -1
  140. package/dist/assets/{index-0oMiVQg4.js → index-BiSfH4hc.js} +1 -1
  141. package/dist/assets/{index-BDXJTtbW.js → index-BizFhdaE.js} +1 -1
  142. package/dist/assets/{index-CfVhno9R.js → index-BlZKDgtS.js} +1 -1
  143. package/dist/assets/{index-CIR9IoN_.js → index-BlwvWwLR.js} +1 -1
  144. package/dist/assets/{index-DHF4qHcL.js → index-Bo5vqu5t.js} +1 -1
  145. package/dist/assets/{index-BwEbps56.js → index-BsWkCEVF.js} +1 -1
  146. package/dist/assets/{index-DOCxyJuB.js → index-BuYvz3xq.js} +1 -1
  147. package/dist/assets/{index-D4SNAooQ.js → index-ByCbBTje.js} +1 -1
  148. package/dist/assets/{index-BAQEj4PQ.js → index-C-LQAwn0.js} +1 -1
  149. package/dist/assets/{index-aQNKDVId.js → index-C28h9Bo9.js} +1 -1
  150. package/dist/assets/{index-BQzb8I_q.js → index-CAxhlh39.js} +3 -3
  151. package/dist/assets/{index-CYBzpUIB.js → index-CBlw8dKJ.js} +1 -1
  152. package/dist/assets/{index-TxCnAivY.js → index-CEcR89i7.js} +1 -1
  153. package/dist/assets/{index-BiMhPWuy.js → index-CKq6CGXs.js} +2 -2
  154. package/dist/assets/{index-DOHqiABV.js → index-CLOxJQ_9.js} +1 -1
  155. package/dist/assets/{index-ChRCdNAE.js → index-CUJWzrdP.js} +1 -1
  156. package/dist/assets/{index-BkYTg4CU.js → index-CVH6GWSn.js} +14 -14
  157. package/dist/assets/{index-CElAJaqX.js → index-CbPrULOR.js} +1 -1
  158. package/dist/assets/{index-hvKoV2py.js → index-CeFL2poq.js} +1 -1
  159. package/dist/assets/{index-BPtecAoZ.js → index-CgP5_PId.js} +1 -1
  160. package/dist/assets/{index-DB1H9b-c.js → index-Cgu8wTIs.js} +1 -1
  161. package/dist/assets/{index-CVlx1eM8.js → index-CisFWmyE.js} +1 -1
  162. package/dist/assets/{index-BZeCPNam.js → index-D76ebHrC.js} +1 -1
  163. package/dist/assets/{index-DT0EA6J1.js → index-DAZIhRrh.js} +1 -1
  164. package/dist/assets/{index-Cf-mdV8F.js → index-DBWF3Lxz.js} +1 -1
  165. package/dist/assets/{index-CfVWlMiX.js → index-DEd6Cfa8.js} +1 -1
  166. package/dist/assets/{index-DcyzKT5Y.js → index-DFmUO6xF.js} +1 -1
  167. package/dist/assets/{index-U0ehRjih.js → index-DJjyFLlw.js} +1 -1
  168. package/dist/assets/{index-CAY55Rdz.js → index-DMefWGOk.js} +1 -1
  169. package/dist/assets/{index-Bs03c_by.js → index-D_FrsVa-.js} +1 -1
  170. package/dist/assets/{index-Ol0RUmrA.js → index-DbNDw8nS.js} +1 -1
  171. package/dist/assets/{index-v6nm2KQ5.js → index-Dbz6Whu6.js} +1 -1
  172. package/dist/assets/{index-BU3qnZLt.js → index-Dja9rj_K.js} +1 -1
  173. package/dist/assets/{index-C5joA9bJ.js → index-DkIf_ple.js} +1 -1
  174. package/dist/assets/{index-C9xWgdV-.js → index-Do9Df4CM.js} +1 -1
  175. package/dist/assets/{index-B9VQ4AML.js → index-DpLV-Pq9.js} +1 -1
  176. package/dist/assets/{index-BLfTuCtn.js → index-DpUw2nds.js} +5 -5
  177. package/dist/assets/{index-DCHfnZQR.js → index-Du5AFIP4.js} +1 -1
  178. package/dist/assets/{index-fsE4MUxW.js → index-Dw6ZevFg.js} +1 -1
  179. package/dist/assets/{index-DXzsWryd.js → index-Dweaf6GL.js} +1 -1
  180. package/dist/assets/{index-Ckkhl7Nv.js → index-Dz3Pj6U7.js} +1 -1
  181. package/dist/assets/{index-zTq1js5B.js → index-EBzcwoVz.js} +1 -1
  182. package/dist/assets/{index-CujaQWst.js → index-JCNQBsk6.js} +1 -1
  183. package/dist/assets/{index-Bnytlyuh.js → index-L5jgsIq7.js} +1 -1
  184. package/dist/assets/{index-BQfoAxfS.js → index-X7rR0bV_.js} +1 -1
  185. package/dist/assets/{index-DoUa0T7C.js → index-XXhfzQt9.js} +1 -1
  186. package/dist/assets/{index-BN-n_Vs4.js → index-aLp30AbD.js} +1 -1
  187. package/dist/assets/{index-C8OL6j-4.js → index-br52C4yM.js} +1 -1
  188. package/dist/assets/{index-CjQG9MXZ.js → index-faFCZsic.js} +1 -1
  189. package/dist/assets/{index-CehJyDUK.js → index-kjxsq5CZ.js} +1 -1
  190. package/dist/assets/{index-BUc1RmAr.js → index-o8lT9clY.js} +1 -1
  191. package/dist/assets/{index-lwh3PIck.js → index-pKQl0t5U.js} +1 -1
  192. package/dist/assets/{index-0_igEGjs.js → index-rn5VBDzX.js} +1 -1
  193. package/dist/assets/{index.browser.esm-Cg3tr24r.js → index.browser.esm-CHlxecDj.js} +1 -1
  194. package/dist/assets/{index.es-BOp1mIpX.js → index.es-CLQR2iBw.js} +1 -1
  195. package/dist/assets/{info-BqCt_3Mi.js → info-DuVw5mzG.js} +1 -1
  196. package/dist/assets/{info-circle-CITPqD-1.js → info-circle-C6GHZLcW.js} +1 -1
  197. package/dist/assets/{isEqual-Iwxodqbz.js → isEqual-CWBDsFs3.js} +1 -1
  198. package/dist/assets/{isPlainObject-Cq3-bkda.js → isPlainObject-Bsj5BOyI.js} +1 -1
  199. package/dist/assets/{lightbulb-DShRwhUB.js → lightbulb-CnLBNdvj.js} +1 -1
  200. package/dist/assets/{mail-DEVOkhSb.js → mail-DTqpstTi.js} +1 -1
  201. package/dist/assets/{midjourney-VkzuuFeA.js → midjourney-BDsYzL3n.js} +1 -1
  202. package/dist/assets/{mobile-Z9Dl057K.js → mobile-BFGzUche.js} +1 -1
  203. package/dist/assets/{more-B7CHUes1.js → more-BP58hcCv.js} +1 -1
  204. package/dist/assets/{network-placeholder-DEaW9Ek_.js → network-placeholder-DGmpeLqB.js} +1 -1
  205. package/dist/assets/{nftPlaceholder-ghg95Xej.js → nftPlaceholder-BbN-ReOL.js} +1 -1
  206. package/dist/assets/{off-Dc-aevsv.js → off-CuDhLkD6.js} +1 -1
  207. package/dist/assets/{order-PoS4tYCS.js → order-1qJ3GxaX.js} +1 -1
  208. package/dist/assets/{order-DR1p4snl.js → order-B8dtxAZ2.js} +1 -1
  209. package/dist/assets/{order-Dc3jGecP.js → order-BDzghU3p.js} +1 -1
  210. package/dist/assets/{order-lw2z4Xwu.js → order-BI5MxfoB.js} +1 -1
  211. package/dist/assets/{order-CdUP0km9.js → order-BfoUTh90.js} +1 -1
  212. package/dist/assets/{order-oV2DH1wd.js → order-BigJZUm-.js} +1 -1
  213. package/dist/assets/{order-BPa9GV24.js → order-BkfVszSt.js} +1 -1
  214. package/dist/assets/{order-BSBFR_z4.js → order-BulQDrR-.js} +1 -1
  215. package/dist/assets/{order-FHDAHJSs.js → order-CCmLKKdB.js} +1 -1
  216. package/dist/assets/{order-BthMl_T7.js → order-CSpGh4Zz.js} +1 -1
  217. package/dist/assets/{order-BvH2KuWv.js → order-CVHCRSWI.js} +1 -1
  218. package/dist/assets/{order-COT8r0lX.js → order-CerH81Qp.js} +1 -1
  219. package/dist/assets/{order-MiTGd2uO.js → order-CgCnV8Wc.js} +1 -1
  220. package/dist/assets/{order-DyX5hI1m.js → order-D8IX-Cp2.js} +1 -1
  221. package/dist/assets/{order-CLYks68p.js → order-D8kStYHA.js} +1 -1
  222. package/dist/assets/{order-BqZuGhd8.js → order-DNR8D2Y8.js} +1 -1
  223. package/dist/assets/{order-37lYCsIH.js → order-EP4isp-N.js} +1 -1
  224. package/dist/assets/{order-BS91zL2c.js → order-ReEYaOWl.js} +1 -1
  225. package/dist/assets/{order-pzeevjk7.js → order-XdBUMXLb.js} +1 -1
  226. package/dist/assets/{pagination-BrqD44nl.js → pagination-DiGyJEay.js} +1 -1
  227. package/dist/assets/{play-store-kKH-YqXP.js → play-store-CuatSCMT.js} +1 -1
  228. package/dist/assets/{plus-Dpid3xbd.js → plus-D9SjxQQI.js} +1 -1
  229. package/dist/assets/{price-BhkXfZ47.js → price-B1xKQHsz.js} +1 -1
  230. package/dist/assets/{producer-DSir6woQ.js → producer-DlXwdcbI.js} +1 -1
  231. package/dist/assets/{qr-code-DR8YSu8C.js → qr-code-w1eMa2kp.js} +1 -1
  232. package/dist/assets/{recycle-horizontal-CmGH-KxU.js → recycle-horizontal-cMqL1NnA.js} +1 -1
  233. package/dist/assets/{refresh-CdKcpRY0.js → refresh-e8l0YQDq.js} +1 -1
  234. package/dist/assets/{reown-logo-CHQ2gCdH.js → reown-logo-B7RaG0y6.js} +1 -1
  235. package/dist/assets/{search-Dr7eqD8f.js → search-DqfT7unL.js} +1 -1
  236. package/dist/assets/{secp256k1-CU7cl2hb.js → secp256k1-COspyfWe.js} +1 -1
  237. package/dist/assets/{secp256k1-B2Vc-qGJ.js → secp256k1-kYCozA5T.js} +1 -1
  238. package/dist/assets/{seedream-CUso1PWZ.js → seedream-gFX5-V03.js} +1 -1
  239. package/dist/assets/{send-Bn31TYif.js → send-Csm63skG.js} +1 -1
  240. package/dist/assets/{service-DuHg_zWq.js → service-WJQge7QR.js} +1 -1
  241. package/dist/assets/{solana-wallets-DdtZSddj.js → solana-wallets-CYfOS7UQ.js} +2 -2
  242. package/dist/assets/{solana-wallets-vue-BnL2Xwya.js → solana-wallets-vue-Bscgfmr7.js} +1 -1
  243. package/dist/assets/{suno-DjvHeQJ_.js → suno-BL7d1IKw.js} +1 -1
  244. package/dist/assets/{swapHorizontal-CM6fQuPD.js → swapHorizontal-yYNnzyqc.js} +1 -1
  245. package/dist/assets/{swapHorizontalBold-CUmjzUUM.js → swapHorizontalBold-Y1mQ7Tez.js} +1 -1
  246. package/dist/assets/{swapHorizontalMedium-CbYbtLNP.js → swapHorizontalMedium-DGx_6f7N.js} +1 -1
  247. package/dist/assets/{swapHorizontalRoundedBold-DqRiDuiH.js → swapHorizontalRoundedBold-C3C2ADWX.js} +1 -1
  248. package/dist/assets/{swapVertical-CV852hYr.js → swapVertical-CPtbqeHO.js} +1 -1
  249. package/dist/assets/{telegram-BWIKNA1L.js → telegram-Dzq8EJiJ.js} +1 -1
  250. package/dist/assets/{three-dots-C1TBZds3.js → three-dots-w_sA-jaR.js} +1 -1
  251. package/dist/assets/{twitch-DyYjw-uq.js → twitch-B0AyZCOx.js} +1 -1
  252. package/dist/assets/{twitterIcon-44ArNnL5.js → twitterIcon-VjusQ2hO.js} +1 -1
  253. package/dist/assets/{typescript-B0OiVzCL.js → typescript-BXdqla6u.js} +1 -1
  254. package/dist/assets/{use-form-item-Cn-D_EyX.js → use-form-item-BV_L9kB7.js} +1 -1
  255. package/dist/assets/validator-C6fRYUzr.js +1 -0
  256. package/dist/assets/{verify-Eiz2sEoK.js → verify-DCNYYOD8.js} +1 -1
  257. package/dist/assets/{verify-filled-6aHU_6lE.js → verify-filled-DGrdV_-Z.js} +1 -1
  258. package/dist/assets/{w3m-modal-nMw2hOL-.js → w3m-modal-DziCVLQh.js} +1 -1
  259. package/dist/assets/{wallet-D2RKxGIn.js → wallet-BVhzYpZk.js} +1 -1
  260. package/dist/assets/{wallet-placeholder-BiyT4dka.js → wallet-placeholder-CNSpuUe_.js} +1 -1
  261. package/dist/assets/{walletconnect-Clr7ooN2.js → walletconnect-D-F4V5Hy.js} +1 -1
  262. package/dist/assets/{warning-circle-CJEyB-B3.js → warning-circle-BGUzvH8t.js} +1 -1
  263. package/dist/assets/{web-BoxUFMvb.js → web-BA2ijAeV.js} +1 -1
  264. package/dist/assets/{web-kGNX0j4f.js → web-BqISh1Og.js} +1 -1
  265. package/dist/assets/{x-C6DYNl_h.js → x-BJuco_wc.js} +1 -1
  266. package/dist/index.html +1 -1
  267. package/package.json +1 -1
  268. package/dist/assets/Detail-DAhBpc6n.js +0 -2
  269. package/dist/assets/chat-BFvmXnGq.js +0 -1
  270. package/dist/assets/chat-BJ1O-acr.js +0 -1
  271. package/dist/assets/chat-BVnywm8V.js +0 -1
  272. package/dist/assets/chat-Bg5nzR2s.js +0 -1
  273. package/dist/assets/chat-Bi9bSam4.js +0 -1
  274. package/dist/assets/chat-BiKeApIc.js +0 -1
  275. package/dist/assets/chat-C6a-XWNv.js +0 -1
  276. package/dist/assets/chat-CcBdBoIQ.js +0 -1
  277. package/dist/assets/chat-DA19T0N-.js +0 -1
  278. package/dist/assets/chat-DDwlXTRr.js +0 -1
  279. package/dist/assets/chat-D_ldAckE.js +0 -1
  280. package/dist/assets/chat-Dh1tEg2g.js +0 -1
  281. package/dist/assets/chat-DktNImx9.js +0 -1
  282. package/dist/assets/chat-J4Z-vAUt.js +0 -1
  283. package/dist/assets/chat-UZtzKTY5.js +0 -1
  284. package/dist/assets/chat-VonUfVbJ.js +0 -1
  285. package/dist/assets/chat-mrd8Uqt-.js +0 -1
  286. package/dist/assets/chat-n5ursQ4V.js +0 -1
  287. package/dist/assets/validator-Bmf-GPsh.js +0 -1
@@ -1,4 +1,4 @@
1
- import{F as D}from"./index.es-BOp1mIpX.js";import{E as G}from"./index-B9VQ4AML.js";import{E as be}from"./index-U0ehRjih.js";import{d as P,H as d,E as s,z as ee,C as o,y as i,D as l,q as n,F as a,O as M,N as z,J as u,x as $,Q as H,I as g,U as te,G as j,K as O,M as U,L as Ae}from"./vendor-vue-NSDaktjZ.js";import{H as E,bq as se,bp as Ue,du as ne,dv as ie,X,Y as ke,S as Y,ct as we,dw as Pe,cs as Ee,o as Ie}from"./index-BkYTg4CU.js";import{a as Re}from"./errorCode-Cqj9Td_Z.js";import{u as Le,a as Me,e as Fe}from"./uploadTrackerMixin--N-yU8Tl.js";import{s as L}from"./suno-DjvHeQJ_.js";import{a as ze}from"./suno-B9P6-pqW.js";import{E as De}from"./index-DH5J_zLM.js";import{E as ae,a as le}from"./index-DCHfnZQR.js";import{I as F,A as Ge,S as je,l as Be}from"./pagination-BrqD44nl.js";import{E as Z,a as K,b as Oe}from"./index-CAY55Rdz.js";import{E as re,a as de}from"./index-0_igEGjs.js";import{E as Ne}from"./index--fj6vK-H.js";import{E as k}from"./index-CVlx1eM8.js";import{P as He,N as We}from"./NoTasks-pFw5z2ks.js";import{E as ue}from"./index-D4SNAooQ.js";import{E as W}from"./index-zTq1js5B.js";import{E as ce}from"./index-DoUa0T7C.js";import{u as pe,F as he,_ as qe}from"./Player.vue_vue_type_script_setup_true_lang-DyQfAbz9.js";import{E as x}from"./index-Ds4AqnCT.js";import{E as B}from"./index-C8OL6j-4.js";import{E as Ke}from"./index-CsUt_G5g.js";import{E as Je,a as Qe}from"./index-ChRCdNAE.js";import{E as Ye,a as Xe}from"./index-lwh3PIck.js";import{C as Ze}from"./Consumption-BR58QDMb.js";import{a as xe}from"./price-BhkXfZ47.js";import{E as et}from"./index-BQfoAxfS.js";import{E as tt}from"./index-BwEbps56.js";import{E as Ce,b as Ve,a as Te}from"./index-aQNKDVId.js";import{E as ot}from"./index--7T9Znd9.js";import{a as st,E as nt}from"./index-DT0EA6J1.js";import{E as it}from"./index-BUc1RmAr.js";import"./use-form-item-Cn-D_EyX.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./validator-Bmf-GPsh.js";import"./index-fsE4MUxW.js";import"./index-0oMiVQg4.js";import"./typescript-B0OiVzCL.js";import"./strings-beZM2Y-f.js";import"./isEqual-Iwxodqbz.js";import"./_Uint8Array-DAIVRyTF.js";import"./castArray-LOj3KWC8.js";import"./debounce-D9r3U3cl.js";import"./_baseIteratee-BcmKw-xM.js";import"./index-v6nm2KQ5.js";import"./highlight-CInNOqMj.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./_baseClone-CgLO05UN.js";import"./_initCloneObject-Dk_YIBZb.js";import"./isPlainObject-Cq3-bkda.js";import"./index-DOHqiABV.js";import"./index-Cu41y2Fl.js";import"./index-Bs03c_by.js";import"./dropdown--tI-7d5q.js";const at=P({name:"LayoutSuno",components:{ElDrawer:be,ElButton:G,FontAwesomeIcon:D},data(){return{drawer:!1,preview:!1}},computed:{}}),lt={class:"main flex flex-row flex-1"},rt={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},dt={class:"result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"},ut={class:"preview h-full w-[300px] flex flex-col"};function ct(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("el-button"),p=l("el-drawer");return n(),d("div",lt,[s("div",rt,[ee(e.$slots,"config",{},void 0,!0)]),s("div",dt,[ee(e.$slots,"result",{},void 0,!0)]),s("div",ut,[ee(e.$slots,"preview",{},void 0,!0)]),o(f,{circle:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:i(()=>[o(v,{icon:"fa-solid fa-magic"})]),_:1}),o(p,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:i(()=>[ee(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const pt=E(at,[["render",ct],["__scopeId","data-v-abe843c9"]]),mt=P({name:"TypeSelector",components:{ElSelect:le,ElOption:ae,ElSwitch:De},data(){return{options:[{label:"v5.5",value:"chirp-v5-5",desc:this.$t("suno.model.v55desc")},{label:"v5",value:"chirp-v5",desc:this.$t("suno.model.v5desc")},{label:"v4.5+",value:"chirp-v4-5-plus",desc:this.$t("suno.model.v45plusdesc")},{label:"v4.5",value:"chirp-v4-5",desc:this.$t("suno.model.v45desc"),dividerAfter:!0},{label:"v4",value:"chirp-v4",desc:this.$t("suno.model.v4desc")},{label:"v3.5",value:"chirp-v3-5",desc:this.$t("suno.model.v35desc")},{label:"v3",value:"chirp-v3-0",desc:this.$t("suno.model.v3desc")}]}},computed:{custom:{get(){return this.$store.state.suno?.config?.custom||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,custom:e})}},instrumental:{get(){return this.$store.state.suno?.config?.instrumental||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,instrumental:e})}},model:{get(){return this.$store.state.suno?.config?.model},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e})}}},mounted(){this.model||(this.model=ze)}}),ft={class:"mb-3"},ht={class:"flex items-center mb-1"},gt={class:"text-sm font-bold"},$t={class:"model-option"},_t={class:"model-option-left"},vt={class:"model-option-name"},yt={class:"model-option-desc"},bt={key:0,class:"flex items-center justify-between mb-3"},kt={class:"text-sm font-bold"};function wt(e,t,r,c,y,w){const v=l("el-option"),f=l("el-select"),p=l("el-switch");return n(),d("div",null,[s("div",ft,[s("div",ht,[s("span",gt,a(e.$t("suno.name.model")),1)]),o(f,{modelValue:e.model,"onUpdate:modelValue":t[0]||(t[0]=_=>e.model=_),class:"w-full model-select",size:"default",placeholder:e.$t("suno.placeholder.select")},{default:i(()=>[(n(!0),d(M,null,z(e.options,_=>(n(),$(v,{key:_.value,label:_.label,value:_.value,class:H({"model-option-divider":_.dividerAfter})},{default:i(()=>[s("div",$t,[s("div",_t,[s("span",vt,a(_.label),1)]),s("span",yt,a(_.desc),1)])]),_:2},1032,["label","value","class"]))),128))]),_:1},8,["modelValue","placeholder"])]),e.custom?(n(),d("div",bt,[s("span",kt,a(e.$t("suno.name.instrumental")),1),o(p,{modelValue:e.instrumental,"onUpdate:modelValue":t[1]||(t[1]=_=>e.instrumental=_)},null,8,["modelValue"])])):u("",!0)])}const Ct=E(mt,[["render",wt],["__scopeId","data-v-16e4d6fc"]]),Vt=P({name:"UploadAudio",components:{ElUpload:Ne,ElButton:G,ElDialog:se,ElTabs:de,ElTabPane:re,InfoIcon:F,FontAwesomeIcon:D,ElRadioGroup:K,ElRadioButton:Z},mixins:[Le],emits:["change"],data(){return{fileList:[],uploadUrl:Ue()+"/api/v1/files/",dialogVisible:!1,activeTab:"browse",recording:!1,recordedBlob:null,recordedAudioUrl:null,audioPreviewUrl:null,recordTimer:null,recordSeconds:0,mediaRecorder:null,mediaStream:null,recordedChunks:[],uploadingRecord:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.suno?.config?.audio_id},set(){}},hasUploadedAudio(){const e=this.$store.state.suno?.config?.action;return e==="upload_extend"||e==="upload_cover"},uploadAction:{get(){return this.$store.state.suno?.config?.action||"upload_extend"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,action:e})}},formattedTime(){const e=Math.floor(this.recordSeconds/60).toString().padStart(2,"0"),t=(this.recordSeconds%60).toString().padStart(2,"0");return`${e}:${t}`}},watch:{urls:{handler(e){this.$emit("change",e)}}},beforeUnmount(){this.cleanupRecording()},methods:{onExceed(){k.warning(this.$t("suno.message.uploadReferencesExceed"))},onError(){k.error(this.$t("suno.message.uploadReferencesError"))},async onBrowseSuccess(){const e=this.urls?.[0];e&&(this.audioPreviewUrl=e,await this.onGenerateAudioId(e),this.dialogVisible=!1)},async onGenerateAudioId(e){const t={audio_url:e},r=this.credential?.token;if(!r){console.error("no token specified");return}k.info(this.$t("suno.message.startingUploadAudio"));try{const c=await L.upload(t,{token:r});console.debug("get upload music success",c.data);const y=c.data?.data.audio_id;this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_id:y,action:"upload_extend"}),k.success(this.$t("suno.message.startUploadAudioSuccess"))}catch(c){k.error(c?.response?.data?.error?.message||this.$t("suno.message.startUploadAudioFailed"))}},async startRecording(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){k.error(this.$t("suno.message.recordingUnsupported"));return}try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:!0}),this.recordedChunks=[],this.mediaRecorder=new MediaRecorder(this.mediaStream),this.mediaRecorder.ondataavailable=e=>{e.data&&e.data.size>0&&this.recordedChunks.push(e.data)},this.mediaRecorder.onstop=()=>{const e=new Blob(this.recordedChunks,{type:"audio/webm"});this.recordedBlob=e,this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=URL.createObjectURL(e),this.releaseStream()},this.mediaRecorder.start(),this.recording=!0,this.recordSeconds=0,this.recordTimer=window.setInterval(()=>{this.recordSeconds+=1,this.recordSeconds>=600&&this.stopRecording()},1e3)}catch(e){console.error("record error",e),k.error(this.$t("suno.message.recordingPermissionDenied"))}},stopRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),this.recording=!1},resetRecording(){this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedBlob=null,this.recordedAudioUrl=null,this.recordSeconds=0},async uploadRecording(){if(this.recordedBlob){this.uploadingRecord=!0;try{const e=new FormData,t=`recording-${Date.now()}.webm`;e.append("file",this.recordedBlob,t);const r=await fetch(this.uploadUrl,{method:"POST",headers:{Authorization:`Bearer ${this.$store.state.token.access}`},body:e});if(!r.ok)throw new Error(`upload failed: ${r.status}`);const c=await r.json(),y=c?.file_url||c?.data?.file_url;if(!y)throw new Error("no file_url in response");this.audioPreviewUrl=y,await this.onGenerateAudioId(y),this.dialogVisible=!1,this.resetRecording()}catch(e){console.error(e),k.error(e?.message||this.$t("suno.message.uploadReferencesError"))}finally{this.uploadingRecord=!1}}},releaseStream(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null)},cleanupRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.releaseStream(),this.recordedAudioUrl&&(URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=null)}}}),Tt={class:"relative"},St={class:"flex justify-between items-center mb-2"},At={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"},Pt={key:0,class:"mb-2"},Et=["src"],It={key:1,class:"mt-2"},Rt={class:"py-4"},Lt={class:"text-center py-6"},Mt={class:"text-sm"},Ft={class:"text-xs text-gray-400 mt-1"},zt={class:"py-4 text-center"},Dt={class:"recorder-display mb-4"},Gt={key:0,class:"text-red-500 flex items-center justify-center gap-2"},jt={class:"text-2xl font-mono"},Bt={key:1,class:"text-green-600"},Ot={key:2,class:"text-gray-400 text-2xl font-mono"},Nt={key:0,class:"mb-4"},Ht=["src"],Wt={class:"flex justify-center gap-3"};function qt(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-radio-button"),b=l("el-radio-group"),S=l("el-upload"),h=l("el-tab-pane"),V=l("el-tabs"),C=l("el-dialog");return n(),d("div",Tt,[s("div",St,[s("div",At,[s("span",Ut,a(e.$t("suno.name.referenceAudios")),1),o(v,{content:e.$t("suno.description.uploadAudios")},null,8,["content"])]),o(p,{round:"",type:"primary",size:"small",onClick:t[0]||(t[0]=I=>e.dialogVisible=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-plus",class:"icon mr-1"}),g(" "+a(e.$t("suno.button.addAudio")),1)]),_:1})]),e.audioPreviewUrl?(n(),d("div",Pt,[s("audio",{src:e.audioPreviewUrl,controls:"",class:"w-full"},null,8,Et)])):u("",!0),e.hasUploadedAudio?(n(),d("div",It,[o(b,{modelValue:e.uploadAction,"onUpdate:modelValue":t[1]||(t[1]=I=>e.uploadAction=I),size:"small"},{default:i(()=>[o(_,{value:"upload_extend"},{default:i(()=>[g(a(e.$t("suno.button.extend")),1)]),_:1}),o(_,{value:"upload_cover"},{default:i(()=>[g(a(e.$t("suno.button.upload_cover")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0),o(C,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[4]||(t[4]=I=>e.dialogVisible=I),title:e.$t("suno.name.addAudio"),width:"520px","close-on-click-modal":!1,"append-to-body":""},{default:i(()=>[o(V,{modelValue:e.activeTab,"onUpdate:modelValue":t[3]||(t[3]=I=>e.activeTab=I),class:"add-audio-tabs"},{default:i(()=>[o(h,{name:"browse",label:e.$t("suno.tab.browse")},{default:i(()=>[s("div",Rt,[o(S,{"file-list":e.fileList,"onUpdate:fileList":t[2]||(t[2]=I=>e.fileList=I),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,audio/*","show-file-list":!0,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onBrowseSuccess,headers:e.headers,drag:""},{default:i(()=>[s("div",Lt,[o(f,{icon:"fa-solid fa-upload",class:"text-4xl text-gray-400 mb-3"}),s("div",Mt,a(e.$t("suno.description.dropAudioHere")),1),s("div",Ft,a(e.$t("suno.description.audioFormats")),1)])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])]),_:1},8,["label"]),o(h,{name:"record",label:e.$t("suno.tab.record")},{default:i(()=>[s("div",zt,[s("div",Dt,[e.recording?(n(),d("div",Gt,[t[5]||(t[5]=s("span",{class:"recording-dot"},null,-1)),s("span",jt,a(e.formattedTime),1)])):e.recordedBlob?(n(),d("div",Bt,[o(f,{icon:"fa-solid fa-check-circle",class:"text-2xl mr-2"}),s("span",null,a(e.$t("suno.message.recordingReady"))+" ("+a(e.formattedTime)+")",1)])):(n(),d("div",Ot,"00:00"))]),e.recordedAudioUrl&&!e.recording?(n(),d("div",Nt,[s("audio",{src:e.recordedAudioUrl,controls:"",class:"w-full"},null,8,Ht)])):u("",!0),s("div",Wt,[!e.recording&&!e.recordedBlob?(n(),$(p,{key:0,type:"primary",round:"",onClick:e.startRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-microphone",class:"mr-1"}),g(" "+a(e.$t("suno.button.startRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recording?(n(),$(p,{key:1,type:"danger",round:"",onClick:e.stopRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-stop",class:"mr-1"}),g(" "+a(e.$t("suno.button.stopRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recordedBlob&&!e.recording?(n(),d(M,{key:2},[o(p,{round:"",onClick:e.resetRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),g(" "+a(e.$t("suno.button.reRecord")),1)]),_:1},8,["onClick"]),o(p,{type:"primary",round:"",loading:e.uploadingRecord,onClick:e.uploadRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-upload",class:"mr-1"}),g(" "+a(e.$t("suno.button.useRecording")),1)]),_:1},8,["loading","onClick"])],64)):u("",!0)])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])])}const Kt=E(Vt,[["render",qt],["__scopeId","data-v-5f17a1f4"]]),Jt="",ge=[{key:"lofi",label:"🎧 Lo-fi Chill",prompt:"a relaxing lo-fi hip hop beat for studying"},{key:"pop-love",label:"💕 Pop Love Song",prompt:"a catchy pop love song with sweet melodies"},{key:"rock-anthem",label:"🎸 Rock Anthem",prompt:"an energetic rock anthem with electric guitars"},{key:"jazz-night",label:"🎷 Jazz Night",prompt:"a smooth late-night jazz piece with saxophone"},{key:"edm-drop",label:"⚡ EDM Drop",prompt:"an intense EDM track with a massive drop"},{key:"folk-story",label:"🪕 Folk Story",prompt:"a warm folk song telling a story about traveling"},{key:"rnb-groove",label:"🎤 R&B Groove",prompt:"a smooth R&B groove with soulful vocals"},{key:"classical",label:"🎻 Classical",prompt:"an elegant classical piece for orchestra"},{key:"hip-hop",label:"🎤 Hip Hop",prompt:"a hard-hitting hip hop beat with bass"},{key:"country",label:"🤠 Country",prompt:"an upbeat country song with acoustic guitar and banjo"},{key:"reggae",label:"🌴 Reggae",prompt:"a laid-back reggae tune with island vibes"},{key:"latin",label:"💃 Latin",prompt:"a vibrant Latin dance track with percussion"},{key:"ambient",label:"🌊 Ambient",prompt:"a dreamy ambient soundscape for relaxation"},{key:"metal",label:"🤘 Metal",prompt:"a powerful metal song with heavy riffs and double bass drums"},{key:"soul",label:"🎵 Soul",prompt:"a heartfelt soul ballad with gospel harmonies"},{key:"synthwave",label:"🌃 Synthwave",prompt:"a retro synthwave track with 80s vibes"},{key:"kpop",label:"🇰🇷 K-Pop",prompt:"a catchy K-pop dance track with hook"},{key:"lullaby",label:"🌙 Lullaby",prompt:"a gentle lullaby for bedtime with soft piano"},{key:"cinematic",label:"🎬 Cinematic",prompt:"an epic cinematic orchestral score for a movie trailer"},{key:"blues",label:"🎸 Blues",prompt:"a soulful blues song with electric guitar bends"},{key:"disco",label:"🕺 Disco",prompt:"a funky disco track with groovy bassline"},{key:"punk",label:"🔥 Punk Rock",prompt:"a fast punk rock song with raw energy"},{key:"gospel",label:"⛪ Gospel",prompt:"an uplifting gospel choir song with piano"},{key:"trap",label:"🔊 Trap",prompt:"a dark trap beat with 808s and hi-hats"},{key:"bossa",label:"☕ Bossa Nova",prompt:"a gentle bossa nova with nylon guitar"},{key:"indie",label:"🎶 Indie",prompt:"a dreamy indie track with ethereal vocals"},{key:"cpop",label:"🇨🇳 C-Pop",prompt:"a beautiful Chinese pop ballad with emotional vocals"},{key:"jpop",label:"🇯🇵 J-Pop",prompt:"a cheerful J-pop song with anime vibes"},{key:"afrobeat",label:"🥁 Afrobeat",prompt:"a groovy Afrobeat track with layered percussion"},{key:"game",label:"🎮 Game BGM",prompt:"an adventurous video game background music"}],Qt=8;function $e(e){const t=[...e];for(let r=t.length-1;r>0;r--){const c=Math.floor(Math.random()*(r+1));[t[r],t[c]]=[t[c],t[r]]}return t}const Yt=P({name:"PromptInput",components:{FontAwesomeIcon:D,PromptTextarea:He},data(){return{shuffledTags:$e(ge)}},computed:{prompt:{get(){return this.$store.state.suno?.config?.prompt},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,prompt:e})}},visibleTags(){return this.shuffledTags.slice(0,Qt)}},mounted(){this.prompt||(this.prompt=Jt)},methods:{onTagClick(e){this.prompt=e.prompt},onRefreshTags(){this.shuffledTags=$e(ge)}}}),Xt={class:"inspo-tags"},Zt=["onClick"];function xt(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("prompt-textarea");return n(),$(f,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=p=>e.prompt=p),title:e.$t("suno.name.songDescription"),info:e.$t("suno.description.prompt"),placeholder:e.$t("suno.placeholder.prompt"),"min-rows":5,"max-rows":14},{after:i(()=>[s("div",Xt,[(n(!0),d(M,null,z(e.visibleTags,p=>(n(),d("button",{key:p.key,class:"inspo-tag",onClick:_=>e.onTagClick(p)},a(p.label),9,Zt))),128)),s("button",{class:"inspo-tag inspo-tag-refresh",onClick:t[0]||(t[0]=(...p)=>e.onRefreshTags&&e.onRefreshTags(...p))},[o(v,{icon:"fa-solid fa-arrows-rotate"})])])]),_:1},8,["modelValue","title","info","placeholder"])}const eo=E(Yt,[["render",xt],["__scopeId","data-v-58ffcd38"]]),to="",oo=P({name:"LyricInput",components:{ElInput:W,ElButton:G,ElTooltip:ue,ElDialog:se,FontAwesomeIcon:D,InfoIcon:F},data(){return{generatingLyrics:!1,enhancingLyrics:!1,enhancePrompt:"",lyricHistory:[],expanded:!1}},computed:{lyric:{get(){return this.$store.state.suno?.config?.lyric},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:e})}},config(){return this.$store.state.suno?.config},credential(){return this.$store.state.suno?.credential}},mounted(){this.lyric||(this.lyric=to)},methods:{pushHistory(){this.lyric&&(this.lyricHistory.push(this.lyric),this.lyricHistory.length>20&&this.lyricHistory.shift())},onUndo(){const e=this.lyricHistory.pop();e!==void 0&&(this.lyric=e)},onClear(){this.pushHistory(),this.lyric=""},async onEnhanceLyrics(){const e=this.credential?.token;if(!(!e||!this.lyric||!this.enhancePrompt)){this.pushHistory(),this.enhancingLyrics=!0,k.info(this.$t("suno.message.enhancingLyrics"));try{const t=`${this.enhancePrompt}
1
+ import{F as D}from"./index.es-CLQR2iBw.js";import{E as G}from"./index-DpLV-Pq9.js";import{E as be}from"./index-DJjyFLlw.js";import{d as P,H as d,E as s,z as ee,C as o,y as i,D as l,q as n,F as a,O as M,N as z,J as u,x as $,Q as H,I as g,U as te,G as j,K as O,M as U,L as Ae}from"./vendor-vue-NSDaktjZ.js";import{H as E,bq as se,bp as Ue,du as ne,dv as ie,X,Y as ke,S as Y,ct as we,dw as Pe,cs as Ee,o as Ie}from"./index-CVH6GWSn.js";import{a as Re}from"./errorCode-Cqj9Td_Z.js";import{u as Le,a as Me,e as Fe}from"./uploadTrackerMixin--N-yU8Tl.js";import{s as L}from"./suno-BL7d1IKw.js";import{a as ze}from"./suno-B9P6-pqW.js";import{E as De}from"./index-B3XMfsr2.js";import{E as ae,a as le}from"./index-Du5AFIP4.js";import{I as F,A as Ge,S as je,l as Be}from"./pagination-DiGyJEay.js";import{E as Z,a as K,b as Oe}from"./index-DMefWGOk.js";import{E as re,a as de}from"./index-rn5VBDzX.js";import{E as Ne}from"./index-BOikF7Vg.js";import{E as k}from"./index-CisFWmyE.js";import{P as He,N as We}from"./NoTasks-CBf4UVlo.js";import{E as ue}from"./index-ByCbBTje.js";import{E as W}from"./index-EBzcwoVz.js";import{E as ce}from"./index-XXhfzQt9.js";import{u as pe,F as he,_ as qe}from"./Player.vue_vue_type_script_setup_true_lang-DqV0BSsX.js";import{E as x}from"./index-BVMK7LIJ.js";import{E as B}from"./index-br52C4yM.js";import{E as Ke}from"./index-BILgzrZ9.js";import{E as Je,a as Qe}from"./index-CUJWzrdP.js";import{E as Ye,a as Xe}from"./index-pKQl0t5U.js";import{C as Ze}from"./Consumption-BoW8Yj1Z.js";import{a as xe}from"./price-B1xKQHsz.js";import{E as et}from"./index-X7rR0bV_.js";import{E as tt}from"./index-BsWkCEVF.js";import{E as Ce,b as Ve,a as Te}from"./index-C28h9Bo9.js";import{E as ot}from"./index-7YuxLUYH.js";import{a as st,E as nt}from"./index-DAZIhRrh.js";import{E as it}from"./index-o8lT9clY.js";import"./use-form-item-BV_L9kB7.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./validator-C6fRYUzr.js";import"./index-Dw6ZevFg.js";import"./index-BiSfH4hc.js";import"./typescript-BXdqla6u.js";import"./strings-beZM2Y-f.js";import"./isEqual-CWBDsFs3.js";import"./_Uint8Array-Cj-LmGzx.js";import"./castArray-9ufFSW5u.js";import"./debounce-zyhh1kFW.js";import"./_baseIteratee-BcXwWZMY.js";import"./index-Dbz6Whu6.js";import"./highlight-CYeIx3eC.js";import"./index-BLjywj98.js";import"./vendor-highlight-lEWW1Jxd.js";import"./_baseClone-CD4xkhO5.js";import"./_initCloneObject-CIlwXpy7.js";import"./isPlainObject-Bsj5BOyI.js";import"./index-CLOxJQ_9.js";import"./index-Cu41y2Fl.js";import"./index-D_FrsVa-.js";import"./dropdown-D2lPdiU3.js";const at=P({name:"LayoutSuno",components:{ElDrawer:be,ElButton:G,FontAwesomeIcon:D},data(){return{drawer:!1,preview:!1}},computed:{}}),lt={class:"main flex flex-row flex-1"},rt={class:"config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},dt={class:"result h-full flex flex-col flex-1 min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"},ut={class:"preview h-full w-[300px] flex flex-col"};function ct(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("el-button"),p=l("el-drawer");return n(),d("div",lt,[s("div",rt,[ee(e.$slots,"config",{},void 0,!0)]),s("div",dt,[ee(e.$slots,"result",{},void 0,!0)]),s("div",ut,[ee(e.$slots,"preview",{},void 0,!0)]),o(f,{circle:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:i(()=>[o(v,{icon:"fa-solid fa-magic"})]),_:1}),o(p,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),direction:"ltr","with-header":!1,size:"340px",class:"drawer"},{default:i(()=>[ee(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const pt=E(at,[["render",ct],["__scopeId","data-v-abe843c9"]]),mt=P({name:"TypeSelector",components:{ElSelect:le,ElOption:ae,ElSwitch:De},data(){return{options:[{label:"v5.5",value:"chirp-v5-5",desc:this.$t("suno.model.v55desc")},{label:"v5",value:"chirp-v5",desc:this.$t("suno.model.v5desc")},{label:"v4.5+",value:"chirp-v4-5-plus",desc:this.$t("suno.model.v45plusdesc")},{label:"v4.5",value:"chirp-v4-5",desc:this.$t("suno.model.v45desc"),dividerAfter:!0},{label:"v4",value:"chirp-v4",desc:this.$t("suno.model.v4desc")},{label:"v3.5",value:"chirp-v3-5",desc:this.$t("suno.model.v35desc")},{label:"v3",value:"chirp-v3-0",desc:this.$t("suno.model.v3desc")}]}},computed:{custom:{get(){return this.$store.state.suno?.config?.custom||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,custom:e})}},instrumental:{get(){return this.$store.state.suno?.config?.instrumental||!1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,instrumental:e})}},model:{get(){return this.$store.state.suno?.config?.model},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e})}}},mounted(){this.model||(this.model=ze)}}),ft={class:"mb-3"},ht={class:"flex items-center mb-1"},gt={class:"text-sm font-bold"},$t={class:"model-option"},_t={class:"model-option-left"},vt={class:"model-option-name"},yt={class:"model-option-desc"},bt={key:0,class:"flex items-center justify-between mb-3"},kt={class:"text-sm font-bold"};function wt(e,t,r,c,y,w){const v=l("el-option"),f=l("el-select"),p=l("el-switch");return n(),d("div",null,[s("div",ft,[s("div",ht,[s("span",gt,a(e.$t("suno.name.model")),1)]),o(f,{modelValue:e.model,"onUpdate:modelValue":t[0]||(t[0]=_=>e.model=_),class:"w-full model-select",size:"default",placeholder:e.$t("suno.placeholder.select")},{default:i(()=>[(n(!0),d(M,null,z(e.options,_=>(n(),$(v,{key:_.value,label:_.label,value:_.value,class:H({"model-option-divider":_.dividerAfter})},{default:i(()=>[s("div",$t,[s("div",_t,[s("span",vt,a(_.label),1)]),s("span",yt,a(_.desc),1)])]),_:2},1032,["label","value","class"]))),128))]),_:1},8,["modelValue","placeholder"])]),e.custom?(n(),d("div",bt,[s("span",kt,a(e.$t("suno.name.instrumental")),1),o(p,{modelValue:e.instrumental,"onUpdate:modelValue":t[1]||(t[1]=_=>e.instrumental=_)},null,8,["modelValue"])])):u("",!0)])}const Ct=E(mt,[["render",wt],["__scopeId","data-v-16e4d6fc"]]),Vt=P({name:"UploadAudio",components:{ElUpload:Ne,ElButton:G,ElDialog:se,ElTabs:de,ElTabPane:re,InfoIcon:F,FontAwesomeIcon:D,ElRadioGroup:K,ElRadioButton:Z},mixins:[Le],emits:["change"],data(){return{fileList:[],uploadUrl:Ue()+"/api/v1/files/",dialogVisible:!1,activeTab:"browse",recording:!1,recordedBlob:null,recordedAudioUrl:null,audioPreviewUrl:null,recordTimer:null,recordSeconds:0,mediaRecorder:null,mediaStream:null,recordedChunks:[],uploadingRecord:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state.suno?.config?.audio_id},set(){}},hasUploadedAudio(){const e=this.$store.state.suno?.config?.action;return e==="upload_extend"||e==="upload_cover"},uploadAction:{get(){return this.$store.state.suno?.config?.action||"upload_extend"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,action:e})}},formattedTime(){const e=Math.floor(this.recordSeconds/60).toString().padStart(2,"0"),t=(this.recordSeconds%60).toString().padStart(2,"0");return`${e}:${t}`}},watch:{urls:{handler(e){this.$emit("change",e)}}},beforeUnmount(){this.cleanupRecording()},methods:{onExceed(){k.warning(this.$t("suno.message.uploadReferencesExceed"))},onError(){k.error(this.$t("suno.message.uploadReferencesError"))},async onBrowseSuccess(){const e=this.urls?.[0];e&&(this.audioPreviewUrl=e,await this.onGenerateAudioId(e),this.dialogVisible=!1)},async onGenerateAudioId(e){const t={audio_url:e},r=this.credential?.token;if(!r){console.error("no token specified");return}k.info(this.$t("suno.message.startingUploadAudio"));try{const c=await L.upload(t,{token:r});console.debug("get upload music success",c.data);const y=c.data?.data.audio_id;this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_id:y,action:"upload_extend"}),k.success(this.$t("suno.message.startUploadAudioSuccess"))}catch(c){k.error(c?.response?.data?.error?.message||this.$t("suno.message.startUploadAudioFailed"))}},async startRecording(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){k.error(this.$t("suno.message.recordingUnsupported"));return}try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:!0}),this.recordedChunks=[],this.mediaRecorder=new MediaRecorder(this.mediaStream),this.mediaRecorder.ondataavailable=e=>{e.data&&e.data.size>0&&this.recordedChunks.push(e.data)},this.mediaRecorder.onstop=()=>{const e=new Blob(this.recordedChunks,{type:"audio/webm"});this.recordedBlob=e,this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=URL.createObjectURL(e),this.releaseStream()},this.mediaRecorder.start(),this.recording=!0,this.recordSeconds=0,this.recordTimer=window.setInterval(()=>{this.recordSeconds+=1,this.recordSeconds>=600&&this.stopRecording()},1e3)}catch(e){console.error("record error",e),k.error(this.$t("suno.message.recordingPermissionDenied"))}},stopRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),this.recording=!1},resetRecording(){this.recordedAudioUrl&&URL.revokeObjectURL(this.recordedAudioUrl),this.recordedBlob=null,this.recordedAudioUrl=null,this.recordSeconds=0},async uploadRecording(){if(this.recordedBlob){this.uploadingRecord=!0;try{const e=new FormData,t=`recording-${Date.now()}.webm`;e.append("file",this.recordedBlob,t);const r=await fetch(this.uploadUrl,{method:"POST",headers:{Authorization:`Bearer ${this.$store.state.token.access}`},body:e});if(!r.ok)throw new Error(`upload failed: ${r.status}`);const c=await r.json(),y=c?.file_url||c?.data?.file_url;if(!y)throw new Error("no file_url in response");this.audioPreviewUrl=y,await this.onGenerateAudioId(y),this.dialogVisible=!1,this.resetRecording()}catch(e){console.error(e),k.error(e?.message||this.$t("suno.message.uploadReferencesError"))}finally{this.uploadingRecord=!1}}},releaseStream(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null)},cleanupRecording(){this.recordTimer&&(window.clearInterval(this.recordTimer),this.recordTimer=null),this.releaseStream(),this.recordedAudioUrl&&(URL.revokeObjectURL(this.recordedAudioUrl),this.recordedAudioUrl=null)}}}),Tt={class:"relative"},St={class:"flex justify-between items-center mb-2"},At={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"},Pt={key:0,class:"mb-2"},Et=["src"],It={key:1,class:"mt-2"},Rt={class:"py-4"},Lt={class:"text-center py-6"},Mt={class:"text-sm"},Ft={class:"text-xs text-gray-400 mt-1"},zt={class:"py-4 text-center"},Dt={class:"recorder-display mb-4"},Gt={key:0,class:"text-red-500 flex items-center justify-center gap-2"},jt={class:"text-2xl font-mono"},Bt={key:1,class:"text-green-600"},Ot={key:2,class:"text-gray-400 text-2xl font-mono"},Nt={key:0,class:"mb-4"},Ht=["src"],Wt={class:"flex justify-center gap-3"};function qt(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-radio-button"),b=l("el-radio-group"),S=l("el-upload"),h=l("el-tab-pane"),V=l("el-tabs"),C=l("el-dialog");return n(),d("div",Tt,[s("div",St,[s("div",At,[s("span",Ut,a(e.$t("suno.name.referenceAudios")),1),o(v,{content:e.$t("suno.description.uploadAudios")},null,8,["content"])]),o(p,{round:"",type:"primary",size:"small",onClick:t[0]||(t[0]=I=>e.dialogVisible=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-plus",class:"icon mr-1"}),g(" "+a(e.$t("suno.button.addAudio")),1)]),_:1})]),e.audioPreviewUrl?(n(),d("div",Pt,[s("audio",{src:e.audioPreviewUrl,controls:"",class:"w-full"},null,8,Et)])):u("",!0),e.hasUploadedAudio?(n(),d("div",It,[o(b,{modelValue:e.uploadAction,"onUpdate:modelValue":t[1]||(t[1]=I=>e.uploadAction=I),size:"small"},{default:i(()=>[o(_,{value:"upload_extend"},{default:i(()=>[g(a(e.$t("suno.button.extend")),1)]),_:1}),o(_,{value:"upload_cover"},{default:i(()=>[g(a(e.$t("suno.button.upload_cover")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0),o(C,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[4]||(t[4]=I=>e.dialogVisible=I),title:e.$t("suno.name.addAudio"),width:"520px","close-on-click-modal":!1,"append-to-body":""},{default:i(()=>[o(V,{modelValue:e.activeTab,"onUpdate:modelValue":t[3]||(t[3]=I=>e.activeTab=I),class:"add-audio-tabs"},{default:i(()=>[o(h,{name:"browse",label:e.$t("suno.tab.browse")},{default:i(()=>[s("div",Rt,[o(S,{"file-list":e.fileList,"onUpdate:fileList":t[2]||(t[2]=I=>e.fileList=I),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,audio/*","show-file-list":!0,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onBrowseSuccess,headers:e.headers,drag:""},{default:i(()=>[s("div",Lt,[o(f,{icon:"fa-solid fa-upload",class:"text-4xl text-gray-400 mb-3"}),s("div",Mt,a(e.$t("suno.description.dropAudioHere")),1),s("div",Ft,a(e.$t("suno.description.audioFormats")),1)])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])]),_:1},8,["label"]),o(h,{name:"record",label:e.$t("suno.tab.record")},{default:i(()=>[s("div",zt,[s("div",Dt,[e.recording?(n(),d("div",Gt,[t[5]||(t[5]=s("span",{class:"recording-dot"},null,-1)),s("span",jt,a(e.formattedTime),1)])):e.recordedBlob?(n(),d("div",Bt,[o(f,{icon:"fa-solid fa-check-circle",class:"text-2xl mr-2"}),s("span",null,a(e.$t("suno.message.recordingReady"))+" ("+a(e.formattedTime)+")",1)])):(n(),d("div",Ot,"00:00"))]),e.recordedAudioUrl&&!e.recording?(n(),d("div",Nt,[s("audio",{src:e.recordedAudioUrl,controls:"",class:"w-full"},null,8,Ht)])):u("",!0),s("div",Wt,[!e.recording&&!e.recordedBlob?(n(),$(p,{key:0,type:"primary",round:"",onClick:e.startRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-microphone",class:"mr-1"}),g(" "+a(e.$t("suno.button.startRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recording?(n(),$(p,{key:1,type:"danger",round:"",onClick:e.stopRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-stop",class:"mr-1"}),g(" "+a(e.$t("suno.button.stopRecord")),1)]),_:1},8,["onClick"])):u("",!0),e.recordedBlob&&!e.recording?(n(),d(M,{key:2},[o(p,{round:"",onClick:e.resetRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),g(" "+a(e.$t("suno.button.reRecord")),1)]),_:1},8,["onClick"]),o(p,{type:"primary",round:"",loading:e.uploadingRecord,onClick:e.uploadRecording},{default:i(()=>[o(f,{icon:"fa-solid fa-upload",class:"mr-1"}),g(" "+a(e.$t("suno.button.useRecording")),1)]),_:1},8,["loading","onClick"])],64)):u("",!0)])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])])}const Kt=E(Vt,[["render",qt],["__scopeId","data-v-5f17a1f4"]]),Jt="",ge=[{key:"lofi",label:"🎧 Lo-fi Chill",prompt:"a relaxing lo-fi hip hop beat for studying"},{key:"pop-love",label:"💕 Pop Love Song",prompt:"a catchy pop love song with sweet melodies"},{key:"rock-anthem",label:"🎸 Rock Anthem",prompt:"an energetic rock anthem with electric guitars"},{key:"jazz-night",label:"🎷 Jazz Night",prompt:"a smooth late-night jazz piece with saxophone"},{key:"edm-drop",label:"⚡ EDM Drop",prompt:"an intense EDM track with a massive drop"},{key:"folk-story",label:"🪕 Folk Story",prompt:"a warm folk song telling a story about traveling"},{key:"rnb-groove",label:"🎤 R&B Groove",prompt:"a smooth R&B groove with soulful vocals"},{key:"classical",label:"🎻 Classical",prompt:"an elegant classical piece for orchestra"},{key:"hip-hop",label:"🎤 Hip Hop",prompt:"a hard-hitting hip hop beat with bass"},{key:"country",label:"🤠 Country",prompt:"an upbeat country song with acoustic guitar and banjo"},{key:"reggae",label:"🌴 Reggae",prompt:"a laid-back reggae tune with island vibes"},{key:"latin",label:"💃 Latin",prompt:"a vibrant Latin dance track with percussion"},{key:"ambient",label:"🌊 Ambient",prompt:"a dreamy ambient soundscape for relaxation"},{key:"metal",label:"🤘 Metal",prompt:"a powerful metal song with heavy riffs and double bass drums"},{key:"soul",label:"🎵 Soul",prompt:"a heartfelt soul ballad with gospel harmonies"},{key:"synthwave",label:"🌃 Synthwave",prompt:"a retro synthwave track with 80s vibes"},{key:"kpop",label:"🇰🇷 K-Pop",prompt:"a catchy K-pop dance track with hook"},{key:"lullaby",label:"🌙 Lullaby",prompt:"a gentle lullaby for bedtime with soft piano"},{key:"cinematic",label:"🎬 Cinematic",prompt:"an epic cinematic orchestral score for a movie trailer"},{key:"blues",label:"🎸 Blues",prompt:"a soulful blues song with electric guitar bends"},{key:"disco",label:"🕺 Disco",prompt:"a funky disco track with groovy bassline"},{key:"punk",label:"🔥 Punk Rock",prompt:"a fast punk rock song with raw energy"},{key:"gospel",label:"⛪ Gospel",prompt:"an uplifting gospel choir song with piano"},{key:"trap",label:"🔊 Trap",prompt:"a dark trap beat with 808s and hi-hats"},{key:"bossa",label:"☕ Bossa Nova",prompt:"a gentle bossa nova with nylon guitar"},{key:"indie",label:"🎶 Indie",prompt:"a dreamy indie track with ethereal vocals"},{key:"cpop",label:"🇨🇳 C-Pop",prompt:"a beautiful Chinese pop ballad with emotional vocals"},{key:"jpop",label:"🇯🇵 J-Pop",prompt:"a cheerful J-pop song with anime vibes"},{key:"afrobeat",label:"🥁 Afrobeat",prompt:"a groovy Afrobeat track with layered percussion"},{key:"game",label:"🎮 Game BGM",prompt:"an adventurous video game background music"}],Qt=8;function $e(e){const t=[...e];for(let r=t.length-1;r>0;r--){const c=Math.floor(Math.random()*(r+1));[t[r],t[c]]=[t[c],t[r]]}return t}const Yt=P({name:"PromptInput",components:{FontAwesomeIcon:D,PromptTextarea:He},data(){return{shuffledTags:$e(ge)}},computed:{prompt:{get(){return this.$store.state.suno?.config?.prompt},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,prompt:e})}},visibleTags(){return this.shuffledTags.slice(0,Qt)}},mounted(){this.prompt||(this.prompt=Jt)},methods:{onTagClick(e){this.prompt=e.prompt},onRefreshTags(){this.shuffledTags=$e(ge)}}}),Xt={class:"inspo-tags"},Zt=["onClick"];function xt(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("prompt-textarea");return n(),$(f,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=p=>e.prompt=p),title:e.$t("suno.name.songDescription"),info:e.$t("suno.description.prompt"),placeholder:e.$t("suno.placeholder.prompt"),"min-rows":5,"max-rows":14},{after:i(()=>[s("div",Xt,[(n(!0),d(M,null,z(e.visibleTags,p=>(n(),d("button",{key:p.key,class:"inspo-tag",onClick:_=>e.onTagClick(p)},a(p.label),9,Zt))),128)),s("button",{class:"inspo-tag inspo-tag-refresh",onClick:t[0]||(t[0]=(...p)=>e.onRefreshTags&&e.onRefreshTags(...p))},[o(v,{icon:"fa-solid fa-arrows-rotate"})])])]),_:1},8,["modelValue","title","info","placeholder"])}const eo=E(Yt,[["render",xt],["__scopeId","data-v-58ffcd38"]]),to="",oo=P({name:"LyricInput",components:{ElInput:W,ElButton:G,ElTooltip:ue,ElDialog:se,FontAwesomeIcon:D,InfoIcon:F},data(){return{generatingLyrics:!1,enhancingLyrics:!1,enhancePrompt:"",lyricHistory:[],expanded:!1}},computed:{lyric:{get(){return this.$store.state.suno?.config?.lyric},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:e})}},config(){return this.$store.state.suno?.config},credential(){return this.$store.state.suno?.credential}},mounted(){this.lyric||(this.lyric=to)},methods:{pushHistory(){this.lyric&&(this.lyricHistory.push(this.lyric),this.lyricHistory.length>20&&this.lyricHistory.shift())},onUndo(){const e=this.lyricHistory.pop();e!==void 0&&(this.lyric=e)},onClear(){this.pushHistory(),this.lyric=""},async onEnhanceLyrics(){const e=this.credential?.token;if(!(!e||!this.lyric||!this.enhancePrompt)){this.pushHistory(),this.enhancingLyrics=!0,k.info(this.$t("suno.message.enhancingLyrics"));try{const t=`${this.enhancePrompt}
2
2
 
3
3
  Original lyrics:
4
4
  ${this.lyric}`,c=(await L.lyric({prompt:t},{token:e})).data?.data;c?.text&&(this.lyric=c.text,this.enhancePrompt="",k.success(this.$t("suno.message.enhanceLyricsSuccess")))}catch{k.error(this.$t("suno.message.enhanceLyricsFailed"))}finally{this.enhancingLyrics=!1}}},async onGenerateLyrics(){const e=this.credential?.token;if(!e)return;let t;try{t=((await ce.prompt(this.$t("suno.message.lyricsThemePromptMessage"),this.$t("suno.message.lyricsThemePromptTitle"),{confirmButtonText:this.$t("common.button.confirm"),cancelButtonText:this.$t("common.button.cancel"),inputPlaceholder:this.$t("suno.placeholder.lyricsTheme"),inputValue:this.config?.title||"",inputType:"textarea",inputValidator:c=>typeof c=="string"&&c.trim().length>0||this.$t("suno.message.lyricsThemeRequired")})).value||"").trim()}catch{return}if(t){this.pushHistory(),this.generatingLyrics=!0,k.info(this.$t("suno.message.generatingLyrics"));try{const c=(await L.lyric({prompt:t},{token:e})).data?.data;c?.text&&(this.lyric=c.text,c?.title&&!this.config?.title&&this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric:c.text,title:c.title}),k.success(this.$t("suno.message.generateLyricsSuccess")))}catch{k.error(this.$t("suno.message.generateLyricsFailed"))}finally{this.generatingLyrics=!1}}}}}),so={class:"field"},no={class:"flex items-center justify-between mb-1"},io={class:"flex items-center"},ao={class:"text-sm font-bold"},lo={class:"flex items-center gap-1"},ro={class:"relative"},uo={class:"text-xs text-right text-[var(--el-text-color-secondary)] mt-1"},co={key:0,class:"enhance-bar"},po={key:0,class:"enhance-bar mt-3"},mo={class:"flex items-center justify-between"},fo={class:"flex items-center gap-1"};function ho(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-tooltip"),b=l("el-input"),S=l("el-dialog");return n(),d("div",so,[s("div",no,[s("div",io,[s("span",ao,a(e.$t("suno.name.lyrics")),1),o(v,{content:e.$t("suno.description.lyrics")},null,8,["content"])]),s("div",lo,[e.lyricHistory.length>0?(n(),$(_,{key:0,content:e.$t("suno.button.undo"),placement:"top"},{default:i(()=>[o(p,{size:"small",circle:"",onClick:e.onUndo},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left"})]),_:1},8,["onClick"])]),_:1},8,["content"])):u("",!0),e.lyric?(n(),$(_,{key:1,content:e.$t("suno.button.clear_lyrics"),placement:"top"},{default:i(()=>[o(p,{size:"small",circle:"",onClick:e.onClear},{default:i(()=>[o(f,{icon:"fa-solid fa-eraser"})]),_:1},8,["onClick"])]),_:1},8,["content"])):u("",!0),o(_,{content:e.$t("suno.button.expand_lyrics"),placement:"top"},{default:i(()=>[o(p,{size:"small",circle:"",onClick:t[0]||(t[0]=h=>e.expanded=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-expand"})]),_:1})]),_:1},8,["content"]),e.config?.action!=="extend"?(n(),$(p,{key:2,size:"small",loading:e.generatingLyrics,round:"",onClick:e.onGenerateLyrics},{default:i(()=>[e.generatingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.generate_lyrics")),1)]),_:1},8,["loading","onClick"])):u("",!0)])]),s("div",ro,[e.config?.action!=="extend"?(n(),$(b,{key:0,modelValue:e.lyric,"onUpdate:modelValue":t[1]||(t[1]=h=>e.lyric=h),rows:5,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.lyrics")},null,8,["modelValue","placeholder"])):(n(),$(b,{key:1,modelValue:e.lyric,"onUpdate:modelValue":t[2]||(t[2]=h=>e.lyric=h),rows:5,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.extend.lyrics")},null,8,["modelValue","placeholder"])),s("div",uo,a(e.lyric?.length||0)+"/5000",1)]),e.lyric&&e.config?.action!=="extend"?(n(),d("div",co,[o(b,{modelValue:e.enhancePrompt,"onUpdate:modelValue":t[3]||(t[3]=h=>e.enhancePrompt=h),size:"small",placeholder:e.$t("suno.placeholder.enhanceLyrics"),class:"enhance-input",onKeyup:te(e.onEnhanceLyrics,["enter"])},{append:i(()=>[o(p,{loading:e.enhancingLyrics,onClick:e.onEnhanceLyrics},{default:i(()=>[e.enhancingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.enhance_lyrics")),1)]),_:1},8,["loading","onClick"])]),_:1},8,["modelValue","placeholder","onKeyup"])])):u("",!0),o(S,{modelValue:e.expanded,"onUpdate:modelValue":t[7]||(t[7]=h=>e.expanded=h),title:e.$t("suno.name.lyrics"),width:"720px",top:"5vh","close-on-click-modal":!1,class:"lyrics-expand-dialog"},{footer:i(()=>[s("div",mo,[s("div",fo,[e.lyricHistory.length>0?(n(),$(p,{key:0,size:"small",onClick:e.onUndo},{default:i(()=>[o(f,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),g(" "+a(e.$t("suno.button.undo")),1)]),_:1},8,["onClick"])):u("",!0),e.lyric?(n(),$(p,{key:1,size:"small",onClick:e.onClear},{default:i(()=>[o(f,{icon:"fa-solid fa-eraser",class:"mr-1"}),g(" "+a(e.$t("suno.button.clear_lyrics")),1)]),_:1},8,["onClick"])):u("",!0),e.config?.action!=="extend"?(n(),$(p,{key:2,size:"small",loading:e.generatingLyrics,onClick:e.onGenerateLyrics},{default:i(()=>[e.generatingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.generate_lyrics")),1)]),_:1},8,["loading","onClick"])):u("",!0)]),o(p,{type:"primary",onClick:t[6]||(t[6]=h=>e.expanded=!1)},{default:i(()=>[g(a(e.$t("common.button.confirm")),1)]),_:1})])]),default:i(()=>[o(b,{modelValue:e.lyric,"onUpdate:modelValue":t[4]||(t[4]=h=>e.lyric=h),type:"textarea",rows:20,class:"lyrics-expanded",placeholder:e.$t("suno.placeholder.lyrics"),autofocus:""},null,8,["modelValue","placeholder"]),e.config?.action!=="extend"?(n(),d("div",po,[o(b,{modelValue:e.enhancePrompt,"onUpdate:modelValue":t[5]||(t[5]=h=>e.enhancePrompt=h),size:"small",placeholder:e.$t("suno.placeholder.enhanceLyrics"),class:"enhance-input",onKeyup:te(e.onEnhanceLyrics,["enter"])},{append:i(()=>[o(p,{loading:e.enhancingLyrics,onClick:e.onEnhanceLyrics},{default:i(()=>[e.enhancingLyrics?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.enhance_lyrics")),1)]),_:1},8,["loading","onClick"])]),_:1},8,["modelValue","placeholder","onKeyup"])])):u("",!0)]),_:1},8,["modelValue","title"])])}const go=E(oo,[["render",ho],["__scopeId","data-v-d7d2ec74"]]),_e=["Pop","Rock","Jazz","R&B","Hip Hop","Lo-fi","Electronic","Classical","Country","Blues","Folk","Reggae","Metal","Punk","Soul","Funk","Ambient","Indie","Latin","Acoustic","Dance","Disco","Gospel","K-Pop","J-Pop","C-Pop","Bossa Nova","Trap","Drill","House","Techno","Dubstep","Synthwave","Chill","Dreamy","Upbeat","Melancholic","Romantic","Epic","Cinematic","Orchestral","Piano","Guitar","Saxophone","Violin","Tribal","World Music","Afrobeat","Ska","Grunge"],$o=12;function ve(e){const t=[...e];for(let r=t.length-1;r>0;r--){const c=Math.floor(Math.random()*(r+1));[t[r],t[c]]=[t[c],t[r]]}return t}const _o=P({name:"StyleInput",components:{ElInput:W,ElButton:G,FontAwesomeIcon:D,InfoIcon:F},data(){return{optimizing:!1,shuffledTags:ve(_e)}},computed:{style:{get(){return this.$store.state.suno?.config?.style},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,style:e})}},credential(){return this.$store.state.suno?.credential},visibleTags(){return this.shuffledTags.slice(0,$o)}},methods:{onTagClick(e){const t=this.style||"";t.toLowerCase().includes(e.toLowerCase())||(this.style=t?`${t}, ${e}`:e)},onRefreshTags(){this.shuffledTags=ve(_e)},async onOptimizeStyle(){const e=this.credential?.token;if(!(!e||!this.style)){this.optimizing=!0,k.info(this.$t("suno.message.optimizingStyle"));try{const t=await L.style({prompt:this.style},{token:e}),r=t.data?.text||t.data?.data?.text;r&&(this.style=r,k.success(this.$t("suno.message.optimizeStyleSuccess")))}catch{k.error(this.$t("suno.message.optimizeStyleFailed"))}finally{this.optimizing=!1}}}}}),vo={class:"field"},yo={class:"flex items-center justify-between mb-1"},bo={class:"flex items-center"},ko={class:"text-sm font-bold"},wo={class:"relative"},Co={class:"text-xs text-right text-[var(--el-text-color-secondary)] mt-1"},Vo={class:"style-tags"},To=["onClick"];function So(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-input");return n(),d("div",vo,[s("div",yo,[s("div",bo,[s("span",ko,a(e.$t("suno.name.style")),1),o(v,{content:e.$t("suno.description.style")},null,8,["content"])]),o(p,{size:"small",loading:e.optimizing,round:"",onClick:e.onOptimizeStyle},{default:i(()=>[e.optimizing?u("",!0):(n(),$(f,{key:0,icon:"fa-solid fa-wand-magic-sparkles",class:"mr-1"})),g(" "+a(e.$t("suno.button.optimize_style")),1)]),_:1},8,["loading","onClick"])]),s("div",wo,[o(_,{modelValue:e.style,"onUpdate:modelValue":t[0]||(t[0]=b=>e.style=b),rows:2,type:"textarea",placeholder:e.$t("suno.placeholder.style")},null,8,["modelValue","placeholder"]),s("div",Co,a(e.style?.length||0)+"/1000",1)]),s("div",Vo,[(n(!0),d(M,null,z(e.visibleTags,b=>(n(),d("button",{key:b,class:"style-tag",onClick:S=>e.onTagClick(b)},a(b),9,To))),128)),s("button",{class:"style-tag style-tag-refresh",onClick:t[1]||(t[1]=(...b)=>e.onRefreshTags&&e.onRefreshTags(...b))},[o(f,{icon:"fa-solid fa-arrows-rotate"})])])])}const Ao=E(_o,[["render",So],["__scopeId","data-v-ddebb076"]]),Uo=P({name:"TitleInput",components:{ElInput:W,InfoIcon:F},computed:{title:{get(){return this.$store.state.suno?.config?.title},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,title:e})}}}}),Po={class:"field"},Eo={class:"flex items-center mb-1"},Io={class:"text-sm font-bold"};function Ro(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-input");return n(),d("div",Po,[s("div",Eo,[s("span",Io,a(e.$t("suno.name.title")),1),o(v,{content:e.$t("suno.description.title")},null,8,["content"])]),o(f,{modelValue:e.title,"onUpdate:modelValue":t[0]||(t[0]=p=>e.title=p),placeholder:e.$t("suno.placeholder.title")},null,8,["modelValue","placeholder"])])}const Lo=E(Uo,[["render",Ro]]),Mo=P({name:"ExtendFromInput",components:{ElImage:B,ElIcon:X,ElInputNumber:x,VideoPlay:ie,VideoPause:ne},data(){return{}},computed:{audio(){return this.$store.state.suno?.config?.audio},value:{get(){return this.$store.state.suno?.config?.continue_at},set(e){console.debug("set continue_at",e),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,continue_at:e?parseInt(e):void 0})}}},mounted(){this.value||(this.value=void 0)},methods:{handleChange(e){if(e===void 0){this.value=void 0;return}e<0?this.value=0:e>this.audio?.duration?this.value=this.audio?.duration:this.value=e},useFormatDuring:pe,onPlay(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"}),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"paused"}),console.log("on pause")},onClick(e){this.$store.state?.suno?.audio?.id!==e.id&&this.onPlay({...e,progress:0})}}}),Fo={class:"field"},zo={class:"box"},Do={class:"title font-bold"},Go={class:"input-wrapper"},jo={class:"task"},Bo={class:"left"},Oo={key:2,class:"duration"},No={class:"info"},Ho={class:"title"},Wo={class:"style"};function qo(e,t,r,c,y,w){const v=l("el-input-number"),f=l("el-image"),p=l("video-pause"),_=l("el-icon"),b=l("video-play"),S=O("loading");return n(),d("div",Fo,[s("div",zo,[s("h2",Do,a(e.$t("suno.name.extend")),1),s("div",Go,[o(v,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=h=>e.value=h),class:"value",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.extend.continue_at"),onChange:e.handleChange},null,8,["modelValue","max","placeholder","onChange"])])]),s("div",jo,[e.audio?(n(),d("div",{key:0,class:"audio",onClick:t[3]||(t[3]=h=>e.onClick(e.audio))},[j((n(),d("div",Bo,[o(f,{src:e.audio?.image_url,class:"cover",fit:"cover"},null,8,["src"]),e.audio?.audio_url&&e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),d("div",{key:0,class:"overlay",onClick:t[1]||(t[1]=h=>e.onPause(e.audio))},[o(_,null,{default:i(()=>[o(p)]),_:1})])):u("",!0),e.audio?.audio_url&&(e.$store.state?.suno?.audio?.id!==e.audio.id||e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),d("div",{key:1,class:"overlay",onClick:t[2]||(t[2]=h=>e.onPlay(e.audio))},[o(_,null,{default:i(()=>[o(b)]),_:1})])):u("",!0),e.audio?.duration?(n(),d("div",Oo,a(e.useFormatDuring(e.audio?.duration)),1)):u("",!0)])),[[S,!e.audio?.audio_url]]),s("div",No,[s("h2",Ho,a(e.audio?.title),1),s("p",Wo,a(e.audio?.style),1)])])):u("",!0)])])}const Ko=E(Mo,[["render",qo],["__scopeId","data-v-bcce4821"]]),Jo=P({name:"CoverFromInput",components:{ElImage:B,ElIcon:X,VideoPlay:ie,VideoPause:ne},data(){return{}},computed:{audio(){return this.$store.state.suno?.config?.audio},value:{get(){return this.$store.state.suno?.config?.continue_at},set(e){console.debug("set continue_at",e),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,continue_at:e?parseInt(e):void 0})}}},mounted(){this.value||(this.value=void 0)},methods:{handleChange(e){e<0?this.value=0:e>this.audio?.duration?this.value=this.audio?.duration:this.value=e},useFormatDuring:pe,onPlay(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"}),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"paused"}),console.log("on pause")},onClick(e){this.$store.state?.suno?.audio?.id!==e.id&&this.onPlay({...e,progress:0})}}}),Qo={class:"field"},Yo={class:"box"},Xo={class:"title font-bold"},Zo={class:"task"},xo={class:"left"},es={key:2,class:"duration"},ts={class:"info"},os={class:"title"},ss={class:"style"};function ns(e,t,r,c,y,w){const v=l("el-image"),f=l("video-pause"),p=l("el-icon"),_=l("video-play"),b=O("loading");return n(),d("div",Qo,[s("div",Yo,[s("h2",Xo,a(e.$t("suno.name.cover")),1)]),s("div",Zo,[e.audio?(n(),d("div",{key:0,class:"audio",onClick:t[2]||(t[2]=S=>e.onClick(e.audio))},[j((n(),d("div",xo,[o(v,{src:e.audio?.image_url,class:"cover",fit:"cover"},null,8,["src"]),e.audio?.audio_url&&e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),d("div",{key:0,class:"overlay",onClick:t[0]||(t[0]=S=>e.onPause(e.audio))},[o(p,null,{default:i(()=>[o(f)]),_:1})])):u("",!0),e.audio?.audio_url&&(e.$store.state?.suno?.audio?.id!==e.audio.id||e.$store.state?.suno?.audio?.id===e.audio.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),d("div",{key:1,class:"overlay",onClick:t[1]||(t[1]=S=>e.onPlay(e.audio))},[o(p,null,{default:i(()=>[o(_)]),_:1})])):u("",!0),e.audio?.duration?(n(),d("div",es,a(e.useFormatDuring(e.audio?.duration)),1)):u("",!0)])),[[b,!e.audio?.audio_url]]),s("div",ts,[s("h2",os,a(e.audio?.title),1),s("p",ss,a(e.audio?.style),1)])])):u("",!0)])])}const is=E(Jo,[["render",ns],["__scopeId","data-v-06640216"]]),as=P({name:"VocalGenderSelector",components:{ElRadioGroup:K,ElRadioButton:Z,InfoIcon:F},computed:{vocalGender:{get(){return this.$store.state.suno?.config?.vocal_gender||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,vocal_gender:e||void 0})}}}}),ls={class:"flex items-center mb-1"},rs={class:"text-sm font-bold"};function ds(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-radio-button"),p=l("el-radio-group");return n(),d("div",null,[s("div",ls,[s("span",rs,a(e.$t("suno.name.vocalGender")),1),o(v,{content:e.$t("suno.description.vocalGender")},null,8,["content"])]),o(p,{modelValue:e.vocalGender,"onUpdate:modelValue":t[0]||(t[0]=_=>e.vocalGender=_),size:"small"},{default:i(()=>[o(f,{value:""},{default:i(()=>[g(a(e.$t("suno.gender.auto")),1)]),_:1}),o(f,{value:"f"},{default:i(()=>[g(a(e.$t("suno.gender.female")),1)]),_:1}),o(f,{value:"m"},{default:i(()=>[g(a(e.$t("suno.gender.male")),1)]),_:1})]),_:1},8,["modelValue"])])}const us=E(as,[["render",ds]]),cs=P({name:"AdvancedParams",components:{ElCollapse:Qe,ElCollapseItem:Je,ElInput:W,ElSlider:Ke,ElRadioGroup:K,ElRadioButton:Z},data(){return{activeNames:[]}},computed:{config(){return this.$store.state.suno?.config},isV5OrAbove(){const e=this.config?.model||"";return["chirp-v5","chirp-v5-5"].includes(e)},styleNegative:{get(){return this.$store.state.suno?.config?.style_negative||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,style_negative:e||void 0})}},lyricPrompt:{get(){return this.$store.state.suno?.config?.lyric_prompt||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyric_prompt:e||void 0})}},weirdness:{get(){return this.$store.state.suno?.config?.weirdness??0},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,weirdness:e||void 0})}},styleInfluence:{get(){return this.$store.state.suno?.config?.style_influence??50},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,style_influence:e})}},variationCategory:{get(){return this.$store.state.suno?.config?.variation_category||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,variation_category:e||void 0})}},audioWeight:{get(){return this.$store.state.suno?.config?.audio_weight??50},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,audio_weight:e})}},lyricsMode:{get(){return this.$store.state.suno?.config?.lyrics_mode||"manual"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,lyrics_mode:e})}}}}),ps={key:0,class:"mb-3"},ms={class:"flex items-center mb-1"},fs={class:"text-xs font-bold"},hs={key:1,class:"mb-3"},gs={class:"flex items-center mb-1"},$s={class:"text-xs font-bold"},_s={key:2,class:"mb-3"},vs={class:"flex items-center justify-between mb-1"},ys={class:"text-xs font-bold"},bs={class:"text-xs text-[var(--el-text-color-secondary)]"},ks={key:3,class:"mb-3"},ws={class:"flex items-center justify-between mb-1"},Cs={class:"text-xs font-bold"},Vs={class:"text-xs text-[var(--el-text-color-secondary)]"},Ts={key:4,class:"mb-3"},Ss={class:"flex items-center mb-1"},As={class:"text-xs font-bold"},Us={key:5,class:"mb-3"},Ps={class:"flex items-center justify-between mb-1"},Es={class:"text-xs font-bold"},Is={class:"text-xs text-[var(--el-text-color-secondary)]"},Rs={key:6,class:"mb-3"},Ls={class:"flex items-center mb-1"},Ms={class:"text-xs font-bold"};function Fs(e,t,r,c,y,w){const v=l("el-input"),f=l("el-slider"),p=l("el-radio-button"),_=l("el-radio-group"),b=l("el-collapse-item"),S=l("el-collapse");return n(),$(S,{modelValue:e.activeNames,"onUpdate:modelValue":t[7]||(t[7]=h=>e.activeNames=h),class:"advanced-collapse"},{default:i(()=>[o(b,{title:e.$t("suno.name.advancedParams"),name:"advanced"},{default:i(()=>[e.config?.custom?(n(),d("div",ps,[s("div",ms,[s("span",fs,a(e.$t("suno.name.styleNegative")),1)]),o(v,{modelValue:e.styleNegative,"onUpdate:modelValue":t[0]||(t[0]=h=>e.styleNegative=h),size:"small",placeholder:e.$t("suno.placeholder.styleNegative")},null,8,["modelValue","placeholder"])])):u("",!0),e.config?.custom&&!e.config?.instrumental?(n(),d("div",hs,[s("div",gs,[s("span",$s,a(e.$t("suno.name.lyricPrompt")),1)]),o(v,{modelValue:e.lyricPrompt,"onUpdate:modelValue":t[1]||(t[1]=h=>e.lyricPrompt=h),size:"small",placeholder:e.$t("suno.placeholder.lyricPrompt")},null,8,["modelValue","placeholder"])])):u("",!0),e.config?.custom?(n(),d("div",_s,[s("div",vs,[s("span",ys,a(e.$t("suno.name.weirdness")),1),s("span",bs,a(e.weirdness??0),1)]),o(f,{modelValue:e.weirdness,"onUpdate:modelValue":t[2]||(t[2]=h=>e.weirdness=h),min:0,max:100,step:1},null,8,["modelValue"])])):u("",!0),e.config?.custom?(n(),d("div",ks,[s("div",ws,[s("span",Cs,a(e.$t("suno.name.styleInfluence")),1),s("span",Vs,a(e.styleInfluence??50),1)]),o(f,{modelValue:e.styleInfluence,"onUpdate:modelValue":t[3]||(t[3]=h=>e.styleInfluence=h),min:0,max:100,step:1},null,8,["modelValue"])])):u("",!0),e.isV5OrAbove?(n(),d("div",Ts,[s("div",Ss,[s("span",As,a(e.$t("suno.name.variationCategory")),1)]),o(_,{modelValue:e.variationCategory,"onUpdate:modelValue":t[4]||(t[4]=h=>e.variationCategory=h),size:"small"},{default:i(()=>[o(p,{value:""},{default:i(()=>[g(a(e.$t("suno.gender.auto")),1)]),_:1}),o(p,{value:"high"},{default:i(()=>[g(a(e.$t("suno.variation.high")),1)]),_:1}),o(p,{value:"low"},{default:i(()=>[g(a(e.$t("suno.variation.low")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0),e.config?.action==="cover"?(n(),d("div",Us,[s("div",Ps,[s("span",Es,a(e.$t("suno.name.audioWeight")),1),s("span",Is,a(e.audioWeight??50),1)]),o(f,{modelValue:e.audioWeight,"onUpdate:modelValue":t[5]||(t[5]=h=>e.audioWeight=h),min:0,max:100,step:1},null,8,["modelValue"])])):u("",!0),e.config?.custom&&!e.config?.instrumental?(n(),d("div",Rs,[s("div",Ls,[s("span",Ms,a(e.$t("suno.name.lyricsMode")),1)]),o(_,{modelValue:e.lyricsMode,"onUpdate:modelValue":t[6]||(t[6]=h=>e.lyricsMode=h),size:"small"},{default:i(()=>[o(p,{value:"manual"},{default:i(()=>[g(a(e.$t("suno.lyricsMode.manual")),1)]),_:1}),o(p,{value:"auto"},{default:i(()=>[g(a(e.$t("suno.lyricsMode.auto")),1)]),_:1})]),_:1},8,["modelValue"])])):u("",!0)]),_:1},8,["title"])]),_:1},8,["modelValue"])}const zs=E(cs,[["render",Fs],["__scopeId","data-v-1e19b619"]]),Ds=P({name:"ReplaceSectionInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},replaceSectionStart:{get(){return this.$store.state.suno?.config?.replace_section_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,replace_section_start:e})}},replaceSectionEnd:{get(){return this.$store.state.suno?.config?.replace_section_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,replace_section_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),Gs={class:"field"},js={class:"flex items-center mb-2"},Bs={class:"text-sm font-bold m-0"},Os={key:0,class:"task mb-2"},Ns={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},Hs={class:"info flex-1 min-w-0"},Ws={class:"text-sm font-bold m-0 truncate"},qs={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},Ks={class:"flex gap-2"};function Js(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",Gs,[s("div",js,[s("h2",Bs,a(e.$t("suno.name.replaceSection")),1),o(v,{content:e.$t("suno.description.replaceSection")},null,8,["content"])]),e.audio?(n(),d("div",Os,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",Ns,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",Hs,[s("h2",Ws,a(e.audio?.title),1),s("p",qs,a(e.audio?.style),1)])])])):u("",!0),s("div",Ks,[o(p,{modelValue:e.replaceSectionStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.replaceSectionStart=b),class:"flex-1",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.replaceSectionStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.replaceSectionEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.replaceSectionEnd=b),class:"flex-1",min:e.replaceSectionStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.replaceSectionEnd")},null,8,["modelValue","min","max","placeholder"])])])}const Qs=E(Ds,[["render",Js]]),Ys=P({name:"OverpaintingInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},overpaintingStart:{get(){return this.$store.state.suno?.config?.overpainting_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,overpainting_start:e})}},overpaintingEnd:{get(){return this.$store.state.suno?.config?.overpainting_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,overpainting_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),Xs={class:"field"},Zs={class:"flex items-center mb-2"},xs={class:"text-sm font-bold m-0"},en={key:0,class:"task mb-2"},tn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},on={class:"info flex-1 min-w-0"},sn={class:"text-sm font-bold m-0 truncate"},nn={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},an={class:"flex gap-2"};function ln(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",Xs,[s("div",Zs,[s("h2",xs,a(e.$t("suno.name.overpaintingRange")),1),o(v,{content:e.$t("suno.description.overpainting")},null,8,["content"])]),e.audio?(n(),d("div",en,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",tn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",on,[s("h2",sn,a(e.audio?.title),1),s("p",nn,a(e.audio?.style),1)])])])):u("",!0),s("div",an,[o(p,{modelValue:e.overpaintingStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.overpaintingStart=b),class:"flex-1",size:"small",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.overpaintingStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.overpaintingEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.overpaintingEnd=b),class:"flex-1",size:"small",min:e.overpaintingStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.overpaintingEnd")},null,8,["modelValue","min","max","placeholder"])])])}const rn=E(Ys,[["render",ln]]),dn=P({name:"UnderpaintingInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},underpaintingStart:{get(){return this.$store.state.suno?.config?.underpainting_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,underpainting_start:e})}},underpaintingEnd:{get(){return this.$store.state.suno?.config?.underpainting_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,underpainting_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),un={class:"field"},cn={class:"flex items-center mb-2"},pn={class:"text-sm font-bold m-0"},mn={key:0,class:"task mb-2"},fn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},hn={class:"info flex-1 min-w-0"},gn={class:"text-sm font-bold m-0 truncate"},$n={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},_n={class:"flex gap-2"};function vn(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",un,[s("div",cn,[s("h2",pn,a(e.$t("suno.name.underpaintingRange")),1),o(v,{content:e.$t("suno.description.underpainting")},null,8,["content"])]),e.audio?(n(),d("div",mn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",fn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",hn,[s("h2",gn,a(e.audio?.title),1),s("p",$n,a(e.audio?.style),1)])])])):u("",!0),s("div",_n,[o(p,{modelValue:e.underpaintingStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.underpaintingStart=b),class:"flex-1",size:"small",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.underpaintingStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.underpaintingEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.underpaintingEnd=b),class:"flex-1",size:"small",min:e.underpaintingStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.underpaintingEnd")},null,8,["modelValue","min","max","placeholder"])])])}const yn=E(dn,[["render",vn]]),bn=P({name:"SamplesInput",components:{ElInputNumber:x,ElImage:B,InfoIcon:F},computed:{audio(){return this.$store.state.suno?.config?.audio},samplesStart:{get(){return this.$store.state.suno?.config?.samples_start},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,samples_start:e})}},samplesEnd:{get(){return this.$store.state.suno?.config?.samples_end},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,samples_end:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),kn={class:"field"},wn={class:"flex items-center mb-2"},Cn={class:"text-sm font-bold m-0"},Vn={key:0,class:"task mb-2"},Tn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},Sn={class:"info flex-1 min-w-0"},An={class:"text-sm font-bold m-0 truncate"},Un={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"},Pn={class:"flex gap-2"};function En(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-input-number"),_=O("loading");return n(),d("div",kn,[s("div",wn,[s("h2",Cn,a(e.$t("suno.name.samplesRange")),1),o(v,{content:e.$t("suno.description.samples")},null,8,["content"])]),e.audio?(n(),d("div",Vn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=b=>e.onClick(e.audio))},[j((n(),d("div",Tn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[_,!e.audio?.audio_url]]),s("div",Sn,[s("h2",An,a(e.audio?.title),1),s("p",Un,a(e.audio?.style),1)])])])):u("",!0),s("div",Pn,[o(p,{modelValue:e.samplesStart,"onUpdate:modelValue":t[1]||(t[1]=b=>e.samplesStart=b),class:"flex-1",size:"small",min:0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.samplesStart")},null,8,["modelValue","max","placeholder"]),o(p,{modelValue:e.samplesEnd,"onUpdate:modelValue":t[2]||(t[2]=b=>e.samplesEnd=b),class:"flex-1",size:"small",min:e.samplesStart||0,max:e.audio?.duration,controls:!1,placeholder:e.$t("suno.placeholder.samplesEnd")},null,8,["modelValue","min","max","placeholder"])])])}const In=E(bn,[["render",En]]),Rn=[.5,.75,1,1.25,1.5,2],Ln=P({name:"AdjustSpeedInput",components:{ElRadioGroup:K,ElRadioButton:Z,ElImage:B,InfoIcon:F},data(){return{options:Rn}},computed:{audio(){return this.$store.state.suno?.config?.audio},speed:{get(){const e=this.$store.state.suno?.config?.speed;return typeof e=="number"?e:1},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,speed:e})}}},methods:{onClick(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"})}}}),Mn={class:"field"},Fn={class:"flex items-center mb-2"},zn={class:"text-sm font-bold m-0"},Dn={key:0,class:"task mb-2"},Gn={class:"left relative w-[50px] h-[50px] mr-3 flex-shrink-0"},jn={class:"info flex-1 min-w-0"},Bn={class:"text-sm font-bold m-0 truncate"},On={class:"text-xs text-[var(--el-text-color-secondary)] m-0 truncate"};function Nn(e,t,r,c,y,w){const v=l("info-icon"),f=l("el-image"),p=l("el-radio-button"),_=l("el-radio-group"),b=O("loading");return n(),d("div",Mn,[s("div",Fn,[s("h2",zn,a(e.$t("suno.name.adjustSpeed")),1),o(v,{content:e.$t("suno.description.adjustSpeed")},null,8,["content"])]),e.audio?(n(),d("div",Dn,[s("div",{class:"audio flex items-center",onClick:t[0]||(t[0]=S=>e.onClick(e.audio))},[j((n(),d("div",Gn,[o(f,{src:e.audio?.image_url,class:"w-full h-full rounded",fit:"cover"},null,8,["src"])])),[[b,!e.audio?.audio_url]]),s("div",jn,[s("h2",Bn,a(e.audio?.title),1),s("p",On,a(e.audio?.style),1)])])])):u("",!0),o(_,{modelValue:e.speed,"onUpdate:modelValue":t[1]||(t[1]=S=>e.speed=S),size:"small",class:"speed-group"},{default:i(()=>[(n(!0),d(M,null,z(e.options,S=>(n(),$(p,{key:S,value:S},{default:i(()=>[g(a(S)+"x",1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])}const Hn=E(Ln,[["render",Nn],["__scopeId","data-v-ba834628"]]),Wn=P({name:"VoiceCreateDialog",components:{ElDialog:se,ElForm:Xe,ElFormItem:Ye,ElInput:W,ElButton:G,ElRadioGroup:K,ElRadio:Oe},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","created"],data(){return{sourceType:"song",form:{name:"",description:"",audio_id:"",audio_url:""},loading:!1}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},token(){return this.$store.state.suno?.credential?.token},canSubmit(){return!(!this.form.name||this.sourceType==="song"&&!this.form.audio_id||this.sourceType==="upload"&&!this.form.audio_url)}},methods:{onClose(){this.visible=!1,this.resetForm()},resetForm(){this.form={name:"",description:"",audio_id:"",audio_url:""},this.sourceType="song"},async onSubmit(){if(this.token){this.loading=!0;try{this.sourceType==="song"?await L.persona({audio_id:this.form.audio_id,name:this.form.name,description:this.form.description},{token:this.token}):await L.voices({audio_url:this.form.audio_url,name:this.form.name,description:this.form.description},{token:this.token}),k.success(this.$t("suno.voice.createSuccess")),this.$emit("created"),this.onClose()}catch{k.error(this.$t("suno.voice.createFailed"))}finally{this.loading=!1}}}}});function qn(e,t,r,c,y,w){const v=l("el-input"),f=l("el-form-item"),p=l("el-radio"),_=l("el-radio-group"),b=l("el-form"),S=l("el-button"),h=l("el-dialog");return n(),$(h,{modelValue:e.visible,"onUpdate:modelValue":t[5]||(t[5]=V=>e.visible=V),title:e.$t("suno.voice.createTitle"),width:"480px","close-on-click-modal":!1,onClose:e.onClose},{footer:i(()=>[o(S,{onClick:e.onClose},{default:i(()=>[g(a(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),o(S,{type:"primary",loading:e.loading,disabled:!e.canSubmit,onClick:e.onSubmit},{default:i(()=>[g(a(e.$t("suno.voice.create")),1)]),_:1},8,["loading","disabled","onClick"])]),default:i(()=>[o(b,{"label-position":"top",class:"voice-create-form"},{default:i(()=>[o(f,{label:e.$t("suno.voice.name")},{default:i(()=>[o(v,{modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=V=>e.form.name=V),placeholder:e.$t("suno.voice.namePlaceholder"),maxlength:"50"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(f,{label:e.$t("suno.voice.description")},{default:i(()=>[o(v,{modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=V=>e.form.description=V),type:"textarea",rows:2,placeholder:e.$t("suno.voice.descriptionPlaceholder"),maxlength:"200"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(f,{label:e.$t("suno.voice.sourceType")},{default:i(()=>[o(_,{modelValue:e.sourceType,"onUpdate:modelValue":t[2]||(t[2]=V=>e.sourceType=V),class:"w-full"},{default:i(()=>[o(p,{value:"song"},{default:i(()=>[g(a(e.$t("suno.voice.fromSong")),1)]),_:1}),o(p,{value:"upload"},{default:i(()=>[g(a(e.$t("suno.voice.fromUpload")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.sourceType==="song"?(n(),$(f,{key:0,label:e.$t("suno.voice.audioId")},{default:i(()=>[o(v,{modelValue:e.form.audio_id,"onUpdate:modelValue":t[3]||(t[3]=V=>e.form.audio_id=V),placeholder:e.$t("suno.voice.audioIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):u("",!0),e.sourceType==="upload"?(n(),$(f,{key:1,label:e.$t("suno.voice.audioUrl")},{default:i(()=>[o(v,{modelValue:e.form.audio_url,"onUpdate:modelValue":t[4]||(t[4]=V=>e.form.audio_url=V),placeholder:e.$t("suno.voice.audioUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):u("",!0)]),_:1})]),_:1},8,["modelValue","title","onClose"])}const Kn=E(Wn,[["render",qn]]),Jn=P({name:"VoiceManager",components:{ElButton:G,ElIcon:X,ElTabs:de,ElTabPane:re,ElTooltip:ue,Loading:ke,FontAwesomeIcon:D,VoiceCreateDialog:Kn},data(){return{showCreateDialog:!1,loading:!1,deletingId:null,activeTab:"all"}},computed:{personas(){return this.$store.state.suno?.personas||[]},favoriteIds(){return this.$store.state.suno?.favoritePersonaIds||[]},favoritePersonas(){return this.personas.filter(e=>e.persona_id&&this.favoriteIds.includes(e.persona_id))},visiblePersonas(){return this.activeTab==="favorites"?this.favoritePersonas:this.personas},selectedPersonaId(){return this.$store.state.suno?.config?.persona_id}},watch:{"$store.state.suno.credential":{handler(){this.loadPersonas()},immediate:!0}},methods:{isFavorite(e){return!!e&&this.favoriteIds.includes(e)},onToggleFavorite(e){e.persona_id&&this.$store.commit("suno/togglePersonaFavorite",e.persona_id)},async loadPersonas(){if(this.$store.state.suno?.credential?.token){this.loading=!0;try{await this.$store.dispatch("suno/getPersonas")}finally{this.loading=!1}}},selectPersona(e){const t={...this.$store.state.suno?.config};t.persona_id===e.persona_id?t.persona_id=void 0:t.persona_id=e.persona_id,this.$store.dispatch("suno/setConfig",t)},async onDelete(e){try{await ce.confirm(this.$t("suno.voice.confirmDelete"),this.$t("suno.voice.delete"),{type:"warning",confirmButtonText:this.$t("common.button.confirm"),cancelButtonText:this.$t("common.button.cancel")})}catch{return}if(!e.persona_id)return;this.deletingId=e.persona_id;const t=await this.$store.dispatch("suno/deletePersona",e.persona_id);if(this.deletingId=null,t){if(k.success(this.$t("suno.voice.deleteSuccess")),this.selectedPersonaId===e.persona_id){const r={...this.$store.state.suno?.config,persona_id:void 0};this.$store.dispatch("suno/setConfig",r)}this.favoriteIds.includes(e.persona_id)&&this.$store.commit("suno/togglePersonaFavorite",e.persona_id)}else k.error(this.$t("suno.voice.deleteFailed"))},async onCreated(){await this.loadPersonas()}}}),Qn={class:"voice-manager"},Yn={class:"flex items-center justify-between mb-3"},Xn={class:"text-sm font-medium"},Zn={key:0,class:"text-center py-6"},xn={key:1,class:"text-center py-6 text-gray-400 text-sm"},ei={key:2,class:"voice-list"},ti=["onClick"],oi={class:"flex-1 min-w-0"},si={class:"voice-name"},ni={key:0,class:"voice-desc"};function ii(e,t,r,c,y,w){const v=l("font-awesome-icon"),f=l("el-button"),p=l("el-tab-pane"),_=l("el-tabs"),b=l("loading"),S=l("el-icon"),h=l("el-tooltip"),V=l("voice-create-dialog");return n(),d("div",Qn,[s("div",Yn,[s("span",Xn,a(e.$t("suno.voice.title")),1),o(f,{type:"primary",size:"small",onClick:t[0]||(t[0]=C=>e.showCreateDialog=!0)},{default:i(()=>[o(v,{icon:"fa-solid fa-plus",class:"mr-1"}),g(" "+a(e.$t("suno.voice.create")),1)]),_:1})]),o(_,{modelValue:e.activeTab,"onUpdate:modelValue":t[1]||(t[1]=C=>e.activeTab=C),class:"voice-tabs",size:"small"},{default:i(()=>[o(p,{name:"all",label:e.$t("suno.voice.tabAll")+" ("+(e.personas?.length||0)+")"},null,8,["label"]),o(p,{name:"favorites",label:e.$t("suno.voice.tabFavorites")+" ("+e.favoritePersonas.length+")"},null,8,["label"])]),_:1},8,["modelValue"]),e.loading?(n(),d("div",Zn,[o(S,{class:"is-loading"},{default:i(()=>[o(b)]),_:1})])):e.visiblePersonas.length===0?(n(),d("div",xn,a(e.activeTab==="favorites"?e.$t("suno.voice.emptyFavorites"):e.$t("suno.voice.empty")),1)):(n(),d("div",ei,[(n(!0),d(M,null,z(e.visiblePersonas,C=>(n(),d("div",{key:C.persona_id,class:H(["voice-item",{active:e.selectedPersonaId===C.persona_id}]),onClick:I=>e.selectPersona(C)},[s("div",oi,[s("div",si,[o(v,{icon:C.source_type==="voice"?"fa-solid fa-microphone":"fa-solid fa-music",class:"mr-1.5 text-xs opacity-60"},null,8,["icon"]),g(" "+a(C.name||C.persona_id),1)]),C.description?(n(),d("div",ni,a(C.description),1)):u("",!0)]),s("div",{class:"voice-actions",onClick:t[2]||(t[2]=U(()=>{},["stop"]))},[o(h,{content:e.isFavorite(C.persona_id)?e.$t("suno.voice.unfavorite"):e.$t("suno.voice.favorite"),placement:"top"},{default:i(()=>[o(f,{size:"small",text:"",class:H({"voice-fav-active":e.isFavorite(C.persona_id)}),onClick:I=>e.onToggleFavorite(C)},{default:i(()=>[o(v,{icon:e.isFavorite(C.persona_id)?"fa-solid fa-star":"fa-regular fa-star"},null,8,["icon"])]),_:2},1032,["class","onClick"])]),_:2},1032,["content"]),o(f,{type:"danger",size:"small",text:"",loading:e.deletingId===C.persona_id,onClick:I=>e.onDelete(C)},{default:i(()=>[o(v,{icon:"fa-solid fa-trash"})]),_:1},8,["loading","onClick"])])],10,ti))),128))])),o(V,{modelValue:e.showCreateDialog,"onUpdate:modelValue":t[3]||(t[3]=C=>e.showCreateDialog=C),onCreated:e.onCreated},null,8,["modelValue","onCreated"])])}const ai=E(Jn,[["render",ii],["__scopeId","data-v-8b8e36d9"]]),li=P({name:"PersonaInput",components:{ElSelect:le,ElOption:ae,ElButton:G,ElDrawer:be,FontAwesomeIcon:D,InfoIcon:F,VoiceManager:ai},data(){return{showManager:!1}},computed:{personaId:{get(){return this.$store.state.suno?.config?.persona_id||""},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,persona_id:e||void 0})}},personas(){return this.$store.state.suno?.personas||[]}}}),ri={class:"field"},di={class:"flex items-center justify-between mb-2"},ui={class:"flex items-center"},ci={class:"text-sm font-bold"},pi={class:"flex items-center justify-between w-full"},mi={key:0,class:"text-xs text-gray-400 ml-2"};function fi(e,t,r,c,y,w){const v=l("info-icon"),f=l("font-awesome-icon"),p=l("el-button"),_=l("el-option"),b=l("el-select"),S=l("voice-manager"),h=l("el-drawer");return n(),d("div",ri,[s("div",di,[s("div",ui,[s("span",ci,a(e.$t("suno.name.persona")),1),o(v,{content:e.$t("suno.description.persona")},null,8,["content"])]),o(p,{size:"small",round:"",onClick:t[0]||(t[0]=V=>e.showManager=!0)},{default:i(()=>[o(f,{icon:"fa-solid fa-microphone",class:"mr-1"}),g(" "+a(e.$t("suno.voice.manage")),1)]),_:1})]),o(b,{modelValue:e.personaId,"onUpdate:modelValue":t[1]||(t[1]=V=>e.personaId=V),placeholder:e.$t("suno.placeholder.personaId"),clearable:"",filterable:"",class:"w-full"},{default:i(()=>[(n(!0),d(M,null,z(e.personas,V=>(n(),$(_,{key:V.persona_id||"",value:V.persona_id||"",label:V.name||V.persona_id||""},{default:i(()=>[s("div",pi,[s("span",null,a(V.name||V.persona_id),1),V.source_type?(n(),d("span",mi,a(V.source_type),1)):u("",!0)])]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"]),o(h,{modelValue:e.showManager,"onUpdate:modelValue":t[2]||(t[2]=V=>e.showManager=V),title:e.$t("suno.voice.title"),size:"380px",direction:"rtl"},{default:i(()=>[o(S)]),_:1},8,["modelValue","title"])])}const hi=E(li,[["render",fi]]),gi=P({name:"PresetPanel",components:{TypeSelector:Ct,PromptInput:eo,LyricInput:go,StyleInput:Ao,TitleInput:Lo,ExtendFromInput:Ko,CoverFromInput:is,UploadAudio:Kt,VocalGenderSelector:us,AdvancedParams:zs,ReplaceSectionInput:Qs,OverpaintingInput:rn,UnderpaintingInput:yn,SamplesInput:In,AdjustSpeedInput:Hn,PersonaInput:hi,FontAwesomeIcon:D,ElButton:G,ElTabs:de,ElTabPane:re,Consumption:Ze},emits:["generate"],computed:{config(){return this.$store.state.suno?.config},mode:{get(){return this.$store.state.suno?.config?.custom?"custom":"simple"},set(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,custom:e==="custom"})}},consumption(){return xe(this.config,this.service?.cost)},service(){return this.$store.state.suno?.service},supportsVocalGender(){const e=this.config?.model||"";return["chirp-v4-5-plus","chirp-v5","chirp-v5-5"].includes(e)},supportsPersona(){const e=this.config?.action;return!e||e==="generate"||e==="artist_consistency"||e==="artist_consistency_vox"},generateButtonText(){const e=this.config?.action;return e==="extend"?this.$t("suno.button.extend"):e==="cover"?this.$t("suno.button.cover_music"):e==="remaster"?this.$t("suno.button.remaster"):e==="replace_section"?this.$t("suno.button.replace_section"):e==="mashup"?this.$t("suno.button.mashup"):e==="stems"?this.$t("suno.button.get_stems"):e==="concat"?this.$t("suno.button.concat_music"):e==="upload_cover"?this.$t("suno.button.upload_cover"):e==="artist_consistency"?this.$t("suno.button.artist_consistency"):e==="artist_consistency_vox"?this.$t("suno.button.artist_consistency_vox"):e==="overpainting"?this.$t("suno.button.overpainting"):e==="underpainting"?this.$t("suno.button.underpainting"):e==="samples"?this.$t("suno.button.samples"):e==="adjust_speed"?this.$t("suno.button.adjust_speed"):this.$t("suno.button.generate")}},methods:{onGenerate(){this.$emit("generate")},onClearAll(){this.$store.commit("suno/setConfig",{custom:!1,sounds:!1,instrumental:!1,lyric:"",style:"",title:"",lyrics_mode:"manual",model:this.$store.state.suno?.config?.model})}}}),$i={class:"flex flex-col h-full"},_i={class:"flex-1 overflow-y-auto p-5"},vi={class:"pt-2 px-1"},yi={class:"pt-2 px-1"},bi={class:"flex flex-col items-center justify-center px-5 pb-5 gap-2"},ki={class:"flex gap-2 w-full"};function wi(e,t,r,c,y,w){const v=l("type-selector"),f=l("upload-audio"),p=l("prompt-input"),_=l("extend-from-input"),b=l("cover-from-input"),S=l("replace-section-input"),h=l("overpainting-input"),V=l("underpainting-input"),C=l("samples-input"),I=l("adjust-speed-input"),A=l("advanced-params"),N=l("el-tab-pane"),q=l("lyric-input"),J=l("style-input"),Q=l("title-input"),m=l("vocal-gender-selector"),T=l("persona-input"),R=l("el-tabs"),oe=l("consumption"),me=l("font-awesome-icon"),fe=l("el-button");return n(),d("div",$i,[s("div",_i,[o(R,{modelValue:e.mode,"onUpdate:modelValue":t[0]||(t[0]=Se=>e.mode=Se),class:"suno-mode-tabs",stretch:""},{default:i(()=>[o(N,{label:e.$t("suno.mode.simple"),name:"simple"},{default:i(()=>[s("div",vi,[o(v,{class:"mb-4"}),o(f,{class:"mb-4"}),o(p,{class:"mb-4"}),e.config?.action==="extend"?(n(),$(_,{key:0,class:"mb-4"})):u("",!0),e.config?.action==="cover"?(n(),$(b,{key:1,class:"mb-4"})):u("",!0),e.config?.action==="replace_section"?(n(),$(S,{key:2,class:"mb-4"})):u("",!0),e.config?.action==="overpainting"?(n(),$(h,{key:3,class:"mb-4"})):u("",!0),e.config?.action==="underpainting"?(n(),$(V,{key:4,class:"mb-4"})):u("",!0),e.config?.action==="samples"?(n(),$(C,{key:5,class:"mb-4"})):u("",!0),e.config?.action==="adjust_speed"?(n(),$(I,{key:6,class:"mb-4"})):u("",!0),o(A,{class:"mb-4"})])]),_:1},8,["label"]),o(N,{label:e.$t("suno.mode.custom"),name:"custom"},{default:i(()=>[s("div",yi,[o(v,{class:"mb-4"}),o(f,{class:"mb-4"}),e.config?.instrumental?u("",!0):(n(),$(q,{key:0,class:"mb-4"})),o(J,{class:"mb-4"}),o(Q,{class:"mb-4"}),!e.config?.instrumental&&e.supportsVocalGender?(n(),$(m,{key:1,class:"mb-4"})):u("",!0),e.supportsPersona?(n(),$(T,{key:2,class:"mb-4"})):u("",!0),e.config?.action==="extend"?(n(),$(_,{key:3,class:"mb-4"})):u("",!0),e.config?.action==="cover"?(n(),$(b,{key:4,class:"mb-4"})):u("",!0),e.config?.action==="replace_section"?(n(),$(S,{key:5,class:"mb-4"})):u("",!0),e.config?.action==="overpainting"?(n(),$(h,{key:6,class:"mb-4"})):u("",!0),e.config?.action==="underpainting"?(n(),$(V,{key:7,class:"mb-4"})):u("",!0),e.config?.action==="samples"?(n(),$(C,{key:8,class:"mb-4"})):u("",!0),e.config?.action==="adjust_speed"?(n(),$(I,{key:9,class:"mb-4"})):u("",!0),o(A,{class:"mb-4"})])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),s("div",bi,[o(oe,{value:e.consumption,service:e.service},null,8,["value","service"]),s("div",ki,[o(fe,{class:"flex-1",onClick:e.onClearAll},{default:i(()=>[o(me,{icon:"fa-solid fa-broom",class:"mr-1"}),g(" "+a(e.$t("suno.button.clear_all")),1)]),_:1},8,["onClick"]),o(fe,{type:"primary",class:"flex-1",round:"",onClick:e.onGenerate},{default:i(()=>[o(me,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+a(e.generateButtonText),1)]),_:1},8,["onClick"])])])])}const Ci=E(gi,[["render",wi],["__scopeId","data-v-c62324e6"]]),ye=we("suno"),Vi=P({name:"TaskPreview",components:{ElImage:B,ElIcon:X,ElTooltip:ue,FontAwesomeIcon:D,VideoPlay:ie,VideoPause:ne,ElDropdown:Te,ElDropdownMenu:Ve,ElDropdownItem:Ce,ElInput:W,ElProgress:tt,ElCheckbox:et,Loading:ke,ApiCodeDialog:Ge},props:{modelValue:{type:Object,required:!0}},data(){return{isFetchingVideoUrl:!1,isFetchingWav:!1,isFetchingMidi:!1,editingAudioId:null,editingTitle:"",apiCodeVisible:!1,apiCodePath:"/suno/audios",apiCodeBody:{}}},computed:{loading(){return this.$store.state.suno?.status?.getApplications===Y.Request},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},task(){return this.$store.state.suno?.tasks},audios(){const e=this.modelValue?.response?.data??[],t=this.modelValue?.request?.action;return t?e.map(r=>({...r,action:t})):e},application(){return this.$store.state.suno?.application},active(){return this.$store.state.suno?.tasks?.active},isMashupMode(){return this.$store.state.suno?.config?.action==="mashup"},mashupAudioIds(){return this.$store.state.suno?.config?.mashup_audio_ids||[]}},methods:{useFormatDuring:pe,onViewCode(){const e=this.modelValue?.request||{},t={};Object.entries(e).forEach(([r,c])=>{r==="application_id"||r==="callback_url"||c!=null&&(typeof c=="string"&&c===""||Array.isArray(c)&&c.length===0||(t[r]=c))}),this.apiCodeBody=t,this.apiCodePath="/suno/audios",this.apiCodeVisible=!0},onPlay(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"playing"}),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",{...this.$store.state.suno.audio,...e,state:"paused"}),console.log("on pause")},onClick(e){this.$store.state?.suno?.audio?.id!==e.id&&this.onPlay({...e,progress:0})},onExtend(e,t){e.stopPropagation(),console.log("on extend"),console.debug("set config",t),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:t.model,custom:!0,instrumental:!1,style:t.style,action:"extend",audio:t,audio_id:t.id,continue_at:t.duration})},onDownload(e,t){e&&e.stopPropagation(),console.log("on download",t);const c=new URL(t).pathname,y=c.substring(c.lastIndexOf("/")+1);console.log("on preview",y),fetch(t).then(w=>w.blob()).then(w=>{he.saveAs(w,y)})},async handleVideoDownload(e){if(e.video_url){this.onDownload(null,e.video_url);return}if(!this.isFetchingVideoUrl)try{this.isFetchingVideoUrl=!0;const t=await this.fetchVideoUrlFromApi(e?.id);console.log(`get videoUrl: ${t}`),e.video_url=t,this.onDownload(null,t)}catch(t){console.error("get videoUrl failed:",t),k.error(this.$t("suno.message.getVideoUrlFailed"))}finally{this.isFetchingVideoUrl=!1}},async fetchVideoUrlFromApi(e){return new Promise((t,r)=>{const c={audio_id:e},y=this.credential?.token;if(!y){console.error("no token specified"),r(new Error("No token specified"));return}L.mp4(c,{token:y}).then(w=>{const v=w.data?.data?.video_url;v?t(v):r(new Error("Video URL not found in response"))}).catch(w=>{r(w)})})},onPreview(e,t){e.stopPropagation(),console.log("on preview",t),window.open(t,"_blank")},async onGetStems(e){await this.onGenerateAudioUrl("stems",e)},onCover(e){console.log("on cover"),console.debug("set config",e),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,instrumental:!1,style:e.style,action:"cover",audio:e,audio_id:e.id})},async onConcatMusic(e){await this.onGenerateAudioUrl("concat",e)},async onRemaster(e){await this.onGenerateAudioUrl("remaster",e)},async onGetAllStems(e){await this.onGenerateAudioUrl("all_stems",e)},onReplaceSection(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,instrumental:!1,style:e.style,action:"replace_section",audio:e,audio_id:e.id,replace_section_start:0,replace_section_end:Math.min(30,e.duration||30)})},onMashup(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"mashup",audio:e,audio_id:e.id,mashup_audio_ids:[e.id]})},onOverpainting(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"overpainting",audio:e,audio_id:e.id,overpainting_start:0,overpainting_end:Math.min(30,e.duration||30)})},onUnderpainting(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"underpainting",audio:e,audio_id:e.id,underpainting_start:0,underpainting_end:Math.min(30,e.duration||30)})},onSamples(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"samples",audio:e,audio_id:e.id,samples_start:0,samples_end:Math.min(30,e.duration||30)})},onArtistConsistency(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"artist_consistency",audio:e,audio_id:e.id})},onAdjustSpeed(e){this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:e.model,custom:!0,style:e.style,action:"adjust_speed",audio:e,audio_id:e.id,speed:1})},onReusePrompt(e){const t=this.modelValue?.request??{};if(!(t.prompt||t.lyric||t.style||t.title||t.lyric_prompt||t.style_negative||t.persona_id)){k.warning(this.$t("suno.message.reusePromptEmpty"));return}this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,model:t.model??e.model,custom:t.custom??!1,instrumental:t.instrumental??!1,prompt:t.prompt??"",lyric:t.lyric??"",lyric_prompt:t.lyric_prompt??"",lyrics_mode:t.lyrics_mode??"manual",title:t.title??"",style:t.style??"",style_negative:t.style_negative??"",vocal_gender:t.vocal_gender,weirdness:t.weirdness,style_influence:t.style_influence,variation_category:t.variation_category,audio_weight:t.audio_weight,persona_id:t.persona_id,action:void 0,audio:void 0,audio_id:void 0,mashup_audio_ids:void 0,continue_at:void 0,speed:void 0,replace_section_start:void 0,replace_section_end:void 0,overpainting_start:void 0,overpainting_end:void 0,underpainting_start:void 0,underpainting_end:void 0,samples_start:void 0,samples_end:void 0}),k.success(this.$t("suno.message.reusePromptSuccess"))},async onExtractVocals(e){const t=this.credential?.token;t&&(k.info(this.$t("suno.message.extractingVocals")),L.vox({audio_id:e,callback_url:ye},{token:t}).then(()=>{k.success(this.$t("suno.message.extractVocalsSuccess"))}).catch(r=>{k.error(r?.response?.data?.error?.message||this.$t("suno.message.extractVocalsFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()}))},async onGetTiming(e){const t=this.credential?.token;t&&(k.info(this.$t("suno.message.fetchingTiming")),L.timing({audio_id:e},{token:t}).then(r=>{k.success(this.$t("suno.message.fetchTimingSuccess")),console.debug("timing data",r.data)}).catch(r=>{k.error(r?.response?.data?.error?.message||this.$t("suno.message.fetchTimingFailed"))}))},async handleWavDownload(e){if(!e?.id||this.isFetchingWav)return;const t=this.credential?.token;if(t)try{this.isFetchingWav=!0,k.info(this.$t("suno.message.fetchingWav"));const c=(await L.wav({audio_id:e.id},{token:t})).data?.data?.[0]?.file_url;c?this.onDownload(null,c):k.error(this.$t("suno.message.fetchWavFailed"))}catch(r){const c=r?.response?.data?.error?.message;k.error(c||this.$t("suno.message.fetchWavFailed"))}finally{this.isFetchingWav=!1}},async handleMidiDownload(e){if(!e?.id||this.isFetchingMidi)return;const t=this.credential?.token;if(t)try{this.isFetchingMidi=!0,k.info(this.$t("suno.message.fetchingMidi"));const c=(await L.midi({audio_id:e.id},{token:t})).data?.data;if(!c?.length){k.error(this.$t("suno.message.fetchMidiFailed"));return}const y=(e.title||e.id||"suno").replace(/[^\w.-]+/g,"_")+".json",w=new Blob([JSON.stringify(c,null,2)],{type:"application/json"});he.saveAs(w,y)}catch(r){const c=r?.response?.data?.error?.message;k.error(c||this.$t("suno.message.fetchMidiFailed"))}finally{this.isFetchingMidi=!1}},async onGenerateAudioUrl(e,t){const r={action:e,audio_id:t,callback_url:ye},c=this.credential?.token;if(!c){console.error("no token specified");return}k.info(this.$t("suno.message.startingTask")),L.audio(r,{token:c}).then(()=>{k.success(this.$t("suno.message.startTaskSuccess"))}).catch(y=>{k.error(y?.response?.data?.error?.message||this.$t("suno.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})},isMashupSelected(e){return!!e.id&&this.mashupAudioIds.includes(e.id)},onToggleMashup(e){if(!e.id)return;const t=[...this.mashupAudioIds],r=t.indexOf(e.id);r!==-1?t.splice(r,1):t.push(e.id),this.$store.commit("suno/setConfig",{...this.$store.state.suno?.config,mashup_audio_ids:t})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".tasks");e&&(e.scrollTop=e.scrollHeight)},1e3)},onStartTitleEdit(e){this.editingAudioId=e.id??null,this.editingTitle=e.title||"",this.$nextTick(()=>{this.$refs.titleInput?.focus?.()})},onSaveTitleEdit(e){if(this.editingAudioId!==e.id)return;const t=this.editingTitle.trim();if(t&&t!==e.title){const r=this.$store.state.suno?.tasks;if(r?.items)for(const c of r.items){const w=(c?.response?.data??[]).find(v=>v.id===e.id);if(w){w.title=t;break}}}this.editingAudioId=null,this.editingTitle=""},onCancelTitleEdit(){this.editingAudioId=null,this.editingTitle=""},async onDelete(e){try{await ce.confirm(this.$t("suno.message.confirmDelete"),{confirmButtonText:this.$t("suno.button.delete"),cancelButtonText:this.$t("common.button.cancel"),type:"warning"})}catch{return}const t=this.$store.state.suno?.tasks;if(t?.items)for(const r of t.items){const c=r?.response?.data??[],y=c.findIndex(w=>w.id===e.id);if(y!==-1){if(c.splice(y,1),c.length===0){const w=t.items.indexOf(r);w!==-1&&t.items.splice(w,1)}break}}this.$store.state?.suno?.audio?.id===e.id&&this.$store.dispatch("suno/setAudio",null),k.success(this.$t("suno.message.deleteSuccess"))},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("suno/getTasks",{limit:30,offset:0})}}}),Ti={class:"task"},Si=["onClick"],Ai=["onClick"],Ui={class:"left"},Pi=["onClick"],Ei=["onClick"],Ii={key:2,class:"duration"},Ri={class:"info"},Li={key:1,class:"title-row"},Mi={class:"title"},Fi={class:"style"},zi={key:2,class:"progress-row"},Di={class:"progress-text"},Gi={class:"right"},ji={class:"el-dropdown-link"},Bi={class:"flex items-center min-w-[120px]"},Oi={class:"flex items-center min-w-[120px]"},Ni={class:"flex items-center min-w-[120px]"},Hi={class:"el-dropdown-link"};function Wi(e,t,r,c,y,w){const v=l("el-checkbox"),f=l("el-image"),p=l("video-pause"),_=l("el-icon"),b=l("video-play"),S=l("el-input"),h=l("font-awesome-icon"),V=l("el-progress"),C=l("el-tooltip"),I=l("Loading"),A=l("el-dropdown-item"),N=l("el-dropdown-menu"),q=l("el-dropdown"),J=l("api-code-dialog"),Q=O("loading");return n(),d("div",Ti,[(n(!0),d(M,null,z(e.audios,m=>(n(),d("div",{key:m.id,class:H(["audio",{"mashup-selected":e.isMashupSelected(m)}]),onClick:U(T=>e.onClick(m),["stop"])},[e.isMashupMode&&m?.audio_url?(n(),d("div",{key:0,class:"mashup-check",onClick:U(T=>e.onToggleMashup(m),["stop"])},[o(v,{"model-value":e.isMashupSelected(m),onClick:t[0]||(t[0]=U(()=>{},["stop"]))},null,8,["model-value"])],8,Ai)):u("",!0),j((n(),d("div",Ui,[o(f,{src:m?.image_url,class:"cover",fit:"cover",lazy:""},null,8,["src"]),m?.audio_url&&e.$store.state?.suno?.audio?.id===m.id&&e.$store.state?.suno?.audio?.state==="playing"?(n(),d("div",{key:0,class:"overlay",onClick:U(T=>e.onPause(m),["stop"])},[o(_,null,{default:i(()=>[o(p)]),_:1})],8,Pi)):u("",!0),m?.audio_url&&(e.$store.state?.suno?.audio?.id!==m.id||e.$store.state?.suno?.audio?.id===m.id&&e.$store.state?.suno?.audio?.state==="paused")?(n(),d("div",{key:1,class:"overlay",onClick:U(T=>e.onPlay(m),["stop"])},[o(_,null,{default:i(()=>[o(b)]),_:1})],8,Ei)):u("",!0),m?.duration?(n(),d("div",Ii,a(e.useFormatDuring(m?.duration)),1)):u("",!0)])),[[Q,!m?.audio_url]]),s("div",Ri,[e.editingAudioId===m.id?(n(),d("div",{key:0,class:"title-edit",onClick:t[2]||(t[2]=U(()=>{},["stop"]))},[o(S,{ref_for:!0,ref:"titleInput",modelValue:e.editingTitle,"onUpdate:modelValue":t[1]||(t[1]=T=>e.editingTitle=T),size:"small",onKeyup:[te(T=>e.onSaveTitleEdit(m),["enter"]),te(e.onCancelTitleEdit,["escape"])],onBlur:T=>e.onSaveTitleEdit(m)},null,8,["modelValue","onKeyup","onBlur"])])):(n(),d("div",Li,[s("h2",Mi,a(m?.title),1),m?.audio_url?(n(),$(h,{key:0,icon:"fa-solid fa-pen",class:"edit-icon",onClick:U(T=>e.onStartTitleEdit(m),["stop"])},null,8,["onClick"])):u("",!0)])),s("p",Fi,a(m?.style),1),!m?.audio_url&&m?.progress!=null&&m?.progress<100?(n(),d("div",zi,[o(V,{percentage:Math.round(m.progress),"stroke-width":4,"show-text":!1,status:"warning",class:"progress-bar"},null,8,["percentage"]),s("span",Di,a(e.$t("suno.name.generating"))+" "+a(Math.round(m.progress))+"%",1)])):u("",!0)]),s("div",Gi,[o(q,null,{dropdown:i(()=>[o(N,null,{default:i(()=>[o(A,{disabled:e.isFetchingVideoUrl,onClick:T=>e.handleVideoDownload(m)},{default:i(()=>[s("div",Bi,[e.isFetchingVideoUrl?(n(),$(_,{key:0,class:"is-loading mr-2"},{default:i(()=>[o(I)]),_:1})):u("",!0),s("span",null,a(e.$t("suno.button.download_video")),1)])]),_:1},8,["disabled","onClick"]),m?.audio_url?(n(),$(A,{key:0,onClick:U(T=>e.onDownload(T,m?.audio_url),["stop"])},{default:i(()=>[g(a(e.$t("suno.button.download_audio")),1)]),_:1},8,["onClick"])):u("",!0),o(A,{disabled:e.isFetchingWav,onClick:T=>e.handleWavDownload(m)},{default:i(()=>[s("div",Oi,[e.isFetchingWav?(n(),$(_,{key:0,class:"is-loading mr-2"},{default:i(()=>[o(I)]),_:1})):u("",!0),s("span",null,a(e.$t("suno.button.download_wav")),1)])]),_:1},8,["disabled","onClick"]),o(A,{disabled:e.isFetchingMidi,onClick:T=>e.handleMidiDownload(m)},{default:i(()=>[s("div",Ni,[e.isFetchingMidi?(n(),$(_,{key:0,class:"is-loading mr-2"},{default:i(()=>[o(I)]),_:1})):u("",!0),s("span",null,a(e.$t("suno.button.download_midi")),1)])]),_:1},8,["disabled","onClick"])]),_:2},1024)]),default:i(()=>[s("span",ji,[o(C,{effect:"dark",content:e.$t("suno.button.download"),placement:"top"},{default:i(()=>[m?.audio_url||m?.video_url?(n(),$(h,{key:0,icon:"fa-solid fa-download",class:"icon icon-download"})):u("",!0)]),_:2},1032,["content"])])]),_:2},1024),o(q,null,{dropdown:i(()=>[o(N,{class:"suno-action-menu"},{default:i(()=>[m?.audio_url?(n(),$(A,{key:0,onClick:U(T=>e.onExtend(T,m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-forward",class:"menu-icon"}),g(" "+a(e.$t("suno.button.extend")),1)]),_:1},8,["onClick"])):u("",!0),o(A,{onClick:U(T=>e.onCover(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-music",class:"menu-icon"}),g(" "+a(e.$t("suno.button.cover_music")),1)]),_:1},8,["onClick"]),m?.id?(n(),$(A,{key:1,onClick:U(T=>e.onMashup(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-shuffle",class:"menu-icon"}),g(" "+a(e.$t("suno.button.mashup")),1)]),_:1},8,["onClick"])):u("",!0),m?.id&&m?.action==="extend"?(n(),$(A,{key:2,onClick:U(T=>e.onConcatMusic(m?.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-link",class:"menu-icon"}),g(" "+a(e.$t("suno.button.concat_music")),1)]),_:1},8,["onClick"])):u("",!0),t[4]||(t[4]=s("div",{class:"menu-divider"},null,-1)),m?.id?(n(),$(A,{key:3,onClick:U(T=>e.onReplaceSection(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-scissors",class:"menu-icon"}),g(" "+a(e.$t("suno.button.replace_section")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:4,onClick:U(T=>e.onOverpainting(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-microphone",class:"menu-icon"}),g(" "+a(e.$t("suno.button.overpainting")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:5,onClick:U(T=>e.onUnderpainting(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-guitar",class:"menu-icon"}),g(" "+a(e.$t("suno.button.underpainting")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:6,onClick:U(T=>e.onSamples(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-drum",class:"menu-icon"}),g(" "+a(e.$t("suno.button.samples")),1)]),_:1},8,["onClick"])):u("",!0),t[5]||(t[5]=s("div",{class:"menu-divider"},null,-1)),m.id?(n(),$(A,{key:7,onClick:U(T=>e.onGetStems(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-layer-group",class:"menu-icon"}),g(" "+a(e.$t("suno.button.get_stems")),1)]),_:1},8,["onClick"])):u("",!0),m.id?(n(),$(A,{key:8,onClick:U(T=>e.onGetAllStems(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-bars-staggered",class:"menu-icon"}),g(" "+a(e.$t("suno.button.all_stems")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:9,onClick:U(T=>e.onRemaster(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-wand-magic-sparkles",class:"menu-icon"}),g(" "+a(e.$t("suno.button.remaster")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:10,onClick:U(T=>e.onExtractVocals(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-headphones",class:"menu-icon"}),g(" "+a(e.$t("suno.button.extract_vocals")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:11,onClick:U(T=>e.onArtistConsistency(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-palette",class:"menu-icon"}),g(" "+a(e.$t("suno.button.artist_consistency")),1)]),_:1},8,["onClick"])):u("",!0),m?.id?(n(),$(A,{key:12,onClick:U(T=>e.onAdjustSpeed(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-gauge-high",class:"menu-icon"}),g(" "+a(e.$t("suno.button.adjust_speed")),1)]),_:1},8,["onClick"])):u("",!0),t[6]||(t[6]=s("div",{class:"menu-divider"},null,-1)),o(A,{onClick:U(T=>e.onReusePrompt(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-rotate-left",class:"menu-icon"}),g(" "+a(e.$t("suno.button.reuse_prompt")),1)]),_:1},8,["onClick"]),m?.id?(n(),$(A,{key:13,onClick:U(T=>e.onGetTiming(m.id),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-clock",class:"menu-icon"}),g(" "+a(e.$t("suno.button.get_timing")),1)]),_:1},8,["onClick"])):u("",!0),o(A,{onClick:U(e.onViewCode,["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-code",class:"menu-icon"}),g(" "+a(e.$t("common.button.viewCode")),1)]),_:1},8,["onClick"]),t[7]||(t[7]=s("div",{class:"menu-divider"},null,-1)),m?.id?(n(),$(A,{key:14,class:"delete-item",onClick:U(T=>e.onDelete(m),["stop"])},{default:i(()=>[o(h,{icon:"fa-solid fa-trash",class:"menu-icon delete-icon"}),g(" "+a(e.$t("suno.button.delete")),1)]),_:1},8,["onClick"])):u("",!0)]),_:2},1024)]),default:i(()=>[s("span",Hi,[o(C,{effect:"dark",content:e.$t("suno.button.more"),placement:"top"},{default:i(()=>[m?.audio_url||m?.video_url?(n(),$(h,{key:0,icon:"fa-solid fa-ellipsis",class:"icon icon-ellipsis"})):u("",!0)]),_:2},1032,["content"])])]),_:2},1024)])],10,Si))),128)),o(J,{visible:e.apiCodeVisible,"onUpdate:visible":t[3]||(t[3]=m=>e.apiCodeVisible=m),method:"POST",path:e.apiCodePath,body:e.apiCodeBody,token:e.$store.state.suno?.credential?.token||""},null,8,["visible","path","body","token"])])}const qi=E(Vi,[["render",Wi]]),Ki=P({name:"RecentPanel",components:{ElSkeletonItem:nt,ElSkeleton:st,ElInput:W,ElButton:G,ElDropdown:Te,ElDropdownMenu:Ve,ElDropdownItem:Ce,ElPopover:ot,ElRadioGroup:K,ElRadioButton:Z,ElSelect:le,ElOption:ae,FontAwesomeIcon:D,TaskPreview:qi,Player:qe,NoTasks:We,ScrollList:je},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0,searchQuery:"",sortBy:"newest",filterType:"all",filterDuration:"all",filterVideo:"all",filterModel:"all"}},computed:{tasks(){return{...this.$store.state.suno?.tasks,items:this.$store.state.suno?.tasks?.items?.slice()}},sortLabel(){return this.sortBy==="newest"?this.$t("suno.sort.newest"):this.$t("suno.sort.oldest")},activeFilterCount(){let e=0;return this.filterType!=="all"&&e++,this.filterDuration!=="all"&&e++,this.filterVideo!=="all"&&e++,this.filterModel&&this.filterModel!=="all"&&e++,e},availableModels(){const e=this.tasks?.items||[],t=new Set;for(const r of e){const c=r?.response?.data??[];for(const y of c)y.model&&t.add(y.model)}return Array.from(t).sort()},filteredTasks(){let e=this.tasks?.items||[];if(this.searchQuery){const t=this.searchQuery.toLowerCase();e=e.filter(r=>(r?.response?.data??[]).some(y=>y.title?.toLowerCase().includes(t)||y.style?.toLowerCase().includes(t)||y.prompt?.toLowerCase().includes(t)))}return this.activeFilterCount>0&&(e=e.filter(t=>{const r=t?.request??{},c=t?.response?.data??[];return this.filterType==="vocal"&&r.instrumental===!0||this.filterType==="instrumental"&&r.instrumental!==!0?!1:this.filterDuration!=="all"||this.filterVideo!=="all"||this.filterModel&&this.filterModel!=="all"?c.some(y=>!(this.filterDuration==="short"&&!(typeof y.duration=="number"&&y.duration<60)||this.filterDuration==="medium"&&!(typeof y.duration=="number"&&y.duration>=60&&y.duration<=180)||this.filterDuration==="long"&&!(typeof y.duration=="number"&&y.duration>180)||this.filterVideo==="with"&&!y.video_url||this.filterVideo==="without"&&y.video_url||this.filterModel&&this.filterModel!=="all"&&y.model!==this.filterModel)):!0})),this.sortBy==="oldest"&&(e=[...e].reverse()),e}},methods:{onSortChange(e){this.sortBy=e},onResetFilters(){this.filterType="all",this.filterDuration="all",this.filterVideo="all",this.filterModel="all"},getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ji={key:0,class:"tasks"},Qi={class:"left w-[70px] p-[10px] flex items-center"},Yi={class:"main w-[calc(100%-70px)] flex-1 p-[10px]"},Xi={key:0,class:"task-toolbar"},Zi={key:0,class:"filter-badge"},xi={class:"filter-popover"},ea={class:"filter-row"},ta={class:"filter-label"},oa={class:"filter-row"},sa={class:"filter-label"},na={class:"filter-row"},ia={class:"filter-label"},aa={key:0,class:"filter-row"},la={class:"filter-label"},ra={class:"filter-actions"},da={key:2,class:"w-full flex-1 flex items-center justify-center"},ua={class:"text-sm text-gray-400"},ca={key:3,class:"w-full flex-1 flex flex-col items-center justify-center gap-2"},pa={class:"text-sm text-gray-400"},ma={key:4,class:"w-full flex-1 flex items-center justify-center"},fa={class:"h-20"};function ha(e,t,r,c,y,w){const v=l("el-skeleton-item"),f=l("el-skeleton"),p=l("font-awesome-icon"),_=l("el-input"),b=l("el-button"),S=l("el-dropdown-item"),h=l("el-dropdown-menu"),V=l("el-dropdown"),C=l("el-radio-button"),I=l("el-radio-group"),A=l("el-option"),N=l("el-select"),q=l("el-popover"),J=l("task-preview"),Q=l("scroll-list"),m=l("no-tasks"),T=l("player");return n(),d(M,null,[e.tasks?.items===void 0?(n(),d("div",Ji,[(n(),d(M,null,z(3,R=>s("div",{key:R,class:"flex"},[s("div",Qi,[o(f,{animated:""},{template:i(()=>[o(v,{variant:"image",class:"avatar w-[50px] h-[50px]"})]),_:1})]),s("div",Yi,[o(f,{animated:""},{template:i(()=>[o(v,{variant:"p",class:"w-[200px] h-[15px] mb-[5px] mt-[10px]"}),o(v,{variant:"text"})]),_:1})])])),64))])):(n(),d(M,{key:1},[e.tasks?.items?.length?(n(),d("div",Xi,[o(_,{modelValue:e.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=R=>e.searchQuery=R),size:"small",placeholder:e.$t("suno.placeholder.searchSongs"),clearable:"",class:"task-search"},{prefix:i(()=>[o(p,{icon:"fa-solid fa-magnifying-glass",class:"text-xs"})]),_:1},8,["modelValue","placeholder"]),o(V,{trigger:"click",onCommand:e.onSortChange},{dropdown:i(()=>[o(h,null,{default:i(()=>[o(S,{command:"newest",class:H({"is-active":e.sortBy==="newest"})},{default:i(()=>[g(a(e.$t("suno.sort.newest")),1)]),_:1},8,["class"]),o(S,{command:"oldest",class:H({"is-active":e.sortBy==="oldest"})},{default:i(()=>[g(a(e.$t("suno.sort.oldest")),1)]),_:1},8,["class"])]),_:1})]),default:i(()=>[o(b,{size:"small",class:"sort-btn"},{default:i(()=>[o(p,{icon:"fa-solid fa-arrow-down-wide-short",class:"mr-1"}),g(" "+a(e.sortLabel),1)]),_:1})]),_:1},8,["onCommand"]),o(q,{trigger:"click",placement:"bottom-end",width:260},{reference:i(()=>[o(b,{size:"small",class:H(["filter-btn",{"has-active-filter":e.activeFilterCount>0}])},{default:i(()=>[o(p,{icon:"fa-solid fa-filter",class:"mr-1"}),g(" "+a(e.$t("suno.filter.title"))+" ",1),e.activeFilterCount>0?(n(),d("span",Zi,a(e.activeFilterCount),1)):u("",!0)]),_:1},8,["class"])]),default:i(()=>[s("div",xi,[s("div",ea,[s("div",ta,a(e.$t("suno.filter.type")),1),o(I,{modelValue:e.filterType,"onUpdate:modelValue":t[1]||(t[1]=R=>e.filterType=R),size:"small"},{default:i(()=>[o(C,{value:"all"},{default:i(()=>[g(a(e.$t("suno.filter.typeAll")),1)]),_:1}),o(C,{value:"vocal"},{default:i(()=>[g(a(e.$t("suno.filter.typeVocal")),1)]),_:1}),o(C,{value:"instrumental"},{default:i(()=>[g(a(e.$t("suno.filter.typeInstrumental")),1)]),_:1})]),_:1},8,["modelValue"])]),s("div",oa,[s("div",sa,a(e.$t("suno.filter.duration")),1),o(I,{modelValue:e.filterDuration,"onUpdate:modelValue":t[2]||(t[2]=R=>e.filterDuration=R),size:"small"},{default:i(()=>[o(C,{value:"all"},{default:i(()=>[g(a(e.$t("suno.filter.durationAll")),1)]),_:1}),o(C,{value:"short"},{default:i(()=>[g(a(e.$t("suno.filter.durationShort")),1)]),_:1}),o(C,{value:"medium"},{default:i(()=>[g(a(e.$t("suno.filter.durationMedium")),1)]),_:1}),o(C,{value:"long"},{default:i(()=>[g(a(e.$t("suno.filter.durationLong")),1)]),_:1})]),_:1},8,["modelValue"])]),s("div",na,[s("div",ia,a(e.$t("suno.filter.video")),1),o(I,{modelValue:e.filterVideo,"onUpdate:modelValue":t[3]||(t[3]=R=>e.filterVideo=R),size:"small"},{default:i(()=>[o(C,{value:"all"},{default:i(()=>[g(a(e.$t("suno.filter.videoAll")),1)]),_:1}),o(C,{value:"with"},{default:i(()=>[g(a(e.$t("suno.filter.videoWith")),1)]),_:1}),o(C,{value:"without"},{default:i(()=>[g(a(e.$t("suno.filter.videoWithout")),1)]),_:1})]),_:1},8,["modelValue"])]),e.availableModels.length>0?(n(),d("div",aa,[s("div",la,a(e.$t("suno.filter.model")),1),o(N,{modelValue:e.filterModel,"onUpdate:modelValue":t[4]||(t[4]=R=>e.filterModel=R),size:"small",placeholder:e.$t("suno.filter.modelAll"),clearable:""},{default:i(()=>[o(A,{label:e.$t("suno.filter.modelAll"),value:"all"},null,8,["label"]),(n(!0),d(M,null,z(e.availableModels,R=>(n(),$(A,{key:R,label:R,value:R},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):u("",!0),s("div",ra,[o(b,{size:"small",text:"",onClick:e.onResetFilters},{default:i(()=>[g(a(e.$t("suno.filter.reset")),1)]),_:1},8,["onClick"])])])]),_:1})])):u("",!0),e.filteredTasks?.length>0?(n(),$(Q,{key:1,ref:"scrollList",class:"flex-1 w-full overflow-y-auto tasks p-2",loading:e.loading,onReachTop:t[5]||(t[5]=R=>e.$emit("reach-top"))},{default:i(()=>[(n(!0),d(M,null,z(e.filteredTasks,(R,oe)=>(n(),$(J,{key:oe,"model-value":R,class:"preview"},null,8,["model-value"]))),128))]),_:1},8,["loading"])):e.searchQuery&&e.tasks?.items?.length>0?(n(),d("div",da,[s("p",ua,a(e.$t("suno.message.noSearchResults")),1)])):e.activeFilterCount>0&&e.tasks?.items?.length>0?(n(),d("div",ca,[s("p",pa,a(e.$t("suno.message.noFilterResults")),1),o(b,{size:"small",text:"",onClick:e.onResetFilters},{default:i(()=>[g(a(e.$t("suno.filter.reset")),1)]),_:1},8,["onClick"])])):e.tasks?.items?.length===0?(n(),d("div",ma,[o(m)])):u("",!0)],64)),j(s("div",fa,[o(T,{namespace:"suno"})],512),[[Ae,!!e.$store?.state?.suno?.audio?.object]])],64)}const ga=E(Ki,[["render",ha],["__scopeId","data-v-6ce376c9"]]),$a=P({name:"TaskPreview",components:{IconPicture:Pe,ElImage:B,ElAvatar:it,ElIcon:X},computed:{audio(){return this.$store.state.suno?.audio}}}),_a={key:0,class:"size-full overflow-hidden"},va={class:"relative h-[300px]"},ya={class:"flex items-center justify-center size-full bg-[var(--el-bg-color)]"},ba={class:"absolute bottom-0 left-0 right-0 m-0 p-4 text-white z-10 bg-gradient-to-t from-black/70 to-transparent"},ka={class:"p-4"},wa={class:"flex items-center font-bold mb-2"},Ca={class:"text-[var(--el-text-color-regular)] mb-2"},Va={class:"text-xs text-[var(--el-text-color-regular)]"},Ta={class:"mt-4 text-sm leading-[25px] whitespace-pre-wrap"},Sa={key:1,class:"w-full h-full"};function Aa(e,t,r,c,y,w){const v=l("icon-picture"),f=l("el-icon"),p=l("el-image"),_=l("el-avatar");return e.audio?.object?(n(),d("div",_a,[s("div",va,[o(p,{src:e.audio.image_url,fit:"cover",class:"size-full"},{error:i(()=>[s("div",ya,[o(f,{class:"text-3xl"},{default:i(()=>[o(v)]),_:1})])]),_:1},8,["src"]),s("h2",ba,a(e.audio?.title),1)]),s("div",ka,[s("div",wa,[o(_,{size:30,src:e.audio?.image_url,class:"mr-2"},null,8,["src"]),s("span",null,a(e.audio?.title),1)]),s("p",Ca,a(e.audio?.style),1),s("p",Va,a(e.$dayjs.format(e.audio?.created_at)),1),s("div",Ta,[s("p",null,a(e.audio?.lyric),1)])])])):(n(),d("div",Sa))}const Ua=E($a,[["render",Aa]]),Pa=we("suno"),Ea=P({name:"SunoIndex",components:{Layout:pt,ConfigPanel:Ci,RecentPanel:ga,PreviewPanel:Ua},mixins:[Me],inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.suno?.status?.getApplications===Y.Request},tasksLoading(){return this.$store.state.suno?.status?.getTasks===Y.Request||this.fetchingTasks},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.getApplications===Y.Request},needApply(){return this.$store.state.suno.status.getApplications===Y.Success&&!this.application},application(){return this.$store.state.suno.application},tasks(){return this.$store.state.suno.tasks},applications(){return this.$store.state.suno.applications}},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 Be({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("suno/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplications"),await this.$store.dispatch("suno/getApplications"),console.debug("end onGetApplications"),await this.onGetTasks()},onApply(){Ie.create({application:this.application}).then(({data:e})=>{this.application=e,k.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{e?.response?.data?.code===Re&&k.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){await this.$nextTick();const 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);const{limit:t=5,createdAtMin:r,createdAtMax:c}=e||{};console.debug("limit",t,"createdAtMin",r,"createdAtMax",c),this.fetchingTasks=!0;try{await this.$store.dispatch("suno/getTasks",{limit:t,createdAtMin:r,createdAtMax:c})}finally{this.fetchingTasks=!1}},async onGenerateAudio(){if(!Fe(this.uploadTracker,r=>this.$t(r),r=>k.warning(r)))return;const e={...this.config,callback_url:Pa};if(!this.hasSunoInput(e)){k.error(this.$t("suno.message.promptRequired"));return}this.hasText(e.prompt)&&(e.prompt=e.prompt.trim());const t=this.credential?.token;if(!t){console.error("no token specified");return}k.info(this.$t("suno.message.startingTask")),Ee("suno",L.audio(e,{token:t})).then(()=>{k.success(this.$t("suno.message.startTaskSuccess"))}).catch(r=>{k.error(r?.response?.data?.error?.message||this.$t("suno.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},hasSunoInput(e){return[e.prompt,e.lyric,e.lyric_prompt,e.style,e.title].some(r=>this.hasText(r))||this.hasText(e.audio_id)||Array.isArray(e.mashup_audio_ids)&&e.mashup_audio_ids.length>0}}});function Ia(e,t,r,c,y,w){const v=l("config-panel"),f=l("recent-panel"),p=l("preview-panel"),_=l("layout");return n(),$(_,null,{config:i(()=>[o(v,{onGenerate:e.onGenerateAudio},null,8,["onGenerate"])]),result:i(()=>[o(f,{ref:"recentPanel",class:"panel recent",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),preview:i(()=>[o(p)]),_:1})}const Gl=E(Ea,[["render",Ia],["__scopeId","data-v-b9beee12"]]);export{Gl as default};