@acedatacloud/nexior 3.248.0 → 3.250.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 (270) hide show
  1. package/dist/assets/{ApiCodeButton-CsgRae2o.js → ApiCodeButton-KImik0Hj.js} +1 -1
  2. package/dist/assets/{Auth-D39vFQfy.js → Auth-Dvp_dmzL.js} +1 -1
  3. package/dist/assets/{BotPlaceholder-B-UqCz8R.js → BotPlaceholder-CMYMEEaw.js} +1 -1
  4. package/dist/assets/{Callback-BWCD3rTH.js → Callback-Tet9xmMR.js} +1 -1
  5. package/dist/assets/{Console-DvfzR97a.js → Console-iF97uhfM.js} +1 -1
  6. package/dist/assets/{Consumption-BoW8Yj1Z.js → Consumption-CGedPCiJ.js} +1 -1
  7. package/dist/assets/{Conversation-C1fxnual.js → Conversation-NJ_oj4WJ.js} +1 -1
  8. package/dist/assets/{CopyToClipboard-Ih2qsYgN.js → CopyToClipboard-Q-XQyK-j.js} +1 -1
  9. package/dist/assets/Detail-BClurI_j.js +2 -0
  10. package/dist/assets/{Detail-6rh4qrUH.css → Detail-C39hIHXk.css} +1 -1
  11. package/dist/assets/{Extra-BPHm1V_3.js → Extra-BTG6-T_S.js} +1 -1
  12. package/dist/assets/{FilePreview-DFWVNwz_.js → FilePreview-CubARadp.js} +1 -1
  13. package/dist/assets/{Hailuo-BxxRf4bb.js → Hailuo-DNPxYcb4.js} +1 -1
  14. package/dist/assets/{History-ylxLuWND.js → History-DE28fWrw.js} +1 -1
  15. package/dist/assets/{ImagePreview-DeNxw7C3.js → ImagePreview-BJv6h1fY.js} +1 -1
  16. package/dist/assets/{ImageWrapper-BvFBUaIt.js → ImageWrapper-C61yTdg8.js} +1 -1
  17. package/dist/assets/{Index-CPRu7nTu.js → Index-2Rju_aq_.js} +1 -1
  18. package/dist/assets/{Index-8Yn6qcKT.js → Index-435WWuDv.js} +1 -1
  19. package/dist/assets/{Index-Du4BEkbn.js → Index-5E7NUF-l.js} +1 -1
  20. package/dist/assets/{Index-Y311Iokk.js → Index-6BJrfAgC.js} +1 -1
  21. package/dist/assets/{Index-DMXFEBbF.js → Index-8j6jJrHt.js} +1 -1
  22. package/dist/assets/{Index-CvbFcVln.js → Index-B7dL6Nom.js} +1 -1
  23. package/dist/assets/{Index-D8HN16Kg.js → Index-BJ4ehJgv.js} +1 -1
  24. package/dist/assets/{Index-CE-T_vEC.js → Index-BJSEK4IE.js} +1 -1
  25. package/dist/assets/{Index-D9Zf7USO.js → Index-BVdHAwsY.js} +1 -1
  26. package/dist/assets/{Index-B6Ls62IP.js → Index-B_g9JOpa.js} +1 -1
  27. package/dist/assets/{Index-N31lJtmb.js → Index-BfH5RxIV.js} +1 -1
  28. package/dist/assets/{Index-1ADsBPjF.js → Index-BiVLJoRJ.js} +1 -1
  29. package/dist/assets/{Index-BlF-P0t4.js → Index-BqLiPIeV.js} +1 -1
  30. package/dist/assets/{Index-qEaOyPFJ.js → Index-C4hnmcLw.js} +1 -1
  31. package/dist/assets/{Index-BxxDhF-X.js → Index-CAsKc7kx.js} +1 -1
  32. package/dist/assets/{Index-4JCiMyP1.js → Index-CHRD2JcM.js} +1 -1
  33. package/dist/assets/{Index-Dw8I5m-D.js → Index-CS3c37aX.js} +1 -1
  34. package/dist/assets/{Index-CgcmGBAm.js → Index-CZZgvx3y.js} +1 -1
  35. package/dist/assets/{Index-BIu85wjj.js → Index-Cg4NapBw.js} +1 -1
  36. package/dist/assets/{Index-42qOVFD_.js → Index-CxaC45UB.js} +1 -1
  37. package/dist/assets/{Index-xFJZlzEv.js → Index-DFOXk98o.js} +1 -1
  38. package/dist/assets/{Index-BnEYTHw0.js → Index-DMdgs1xq.js} +1 -1
  39. package/dist/assets/{Index-B27tQkpP.js → Index-Dqhw9NCU.js} +1 -1
  40. package/dist/assets/{Index-BKH138yc.js → Index-I9RBCQow.js} +1 -1
  41. package/dist/assets/{Index-C8colaGu.js → Index-WYId_VP0.js} +1 -1
  42. package/dist/assets/{Invitees-BIsPj-vQ.js → Invitees-ih9TNU3Z.js} +1 -1
  43. package/dist/assets/{List-DdSCo-VU.js → List-BW-fEX4p.js} +1 -1
  44. package/dist/assets/{List-BH-D5zL-.js → List-BqAh6Dxb.js} +1 -1
  45. package/dist/assets/{List--vQqmENx.js → List-DKx5DBLo.js} +1 -1
  46. package/dist/assets/{Main-bt_58gJ5.js → Main-B9aS_JH8.js} +1 -1
  47. package/dist/assets/{Model-DJ-HECzw.js → Model-CR69TkGd.js} +1 -1
  48. package/dist/assets/{Navigator-ilndlwmM.js → Navigator-D5sTiOvt.js} +1 -1
  49. package/dist/assets/{NoTasks-CBf4UVlo.js → NoTasks-D-UFCvW1.js} +1 -1
  50. package/dist/assets/{NotFound-9_7Ar3e7.js → NotFound-CLlzNZqP.js} +1 -1
  51. package/dist/assets/{Pagination-jQVkoh--.js → Pagination-Syf59Jsj.js} +1 -1
  52. package/dist/assets/{Player.vue_vue_type_script_setup_true_lang-DqV0BSsX.js → Player.vue_vue_type_script_setup_true_lang-BAiJNm4L.js} +1 -1
  53. package/dist/assets/{Status-CBQ5PLv2.js → Status-DFMURS5y.js} +1 -1
  54. package/dist/assets/{Subscribe-BbwzEfz5.js → Subscribe-BmFtCXTP.js} +1 -1
  55. package/dist/assets/{TabSwitcher-D84M8GkF.js → TabSwitcher-BwuvjkHa.js} +1 -1
  56. package/dist/assets/{Tts-BfypN4Ze.js → Tts-BE3sY5H8.js} +1 -1
  57. package/dist/assets/{VideoPlayer-2W03rLFF.js → VideoPlayer-DIjQhbFB.js} +1 -1
  58. package/dist/assets/{_Uint8Array-Cj-LmGzx.js → _Uint8Array-CoBPw-4B.js} +1 -1
  59. package/dist/assets/{_baseClone-CD4xkhO5.js → _baseClone-CXvBLrp-.js} +1 -1
  60. package/dist/assets/{_baseIteratee-BcXwWZMY.js → _baseIteratee-BQd_p9ZJ.js} +1 -1
  61. package/dist/assets/{_initCloneObject-CIlwXpy7.js → _initCloneObject-jUCkAHqV.js} +1 -1
  62. package/dist/assets/{add-BalBfSNC.js → add-DXtro0dq.js} +1 -1
  63. package/dist/assets/{all-wallets-B5cxIWft.js → all-wallets-B4CqS-9f.js} +1 -1
  64. package/dist/assets/{app-store-CPPDtNxC.js → app-store-BJC1WiIL.js} +1 -1
  65. package/dist/assets/{apple-Lyxd7bJJ.js → apple-CuLOSa1j.js} +1 -1
  66. package/dist/assets/{arrow-bottom-D41EVk1z.js → arrow-bottom-DRE7E_38.js} +1 -1
  67. package/dist/assets/{arrow-bottom-circle-BB53yKrq.js → arrow-bottom-circle-DIV_tq-R.js} +1 -1
  68. package/dist/assets/{arrow-left-CO27SOAw.js → arrow-left-bgL-vby8.js} +1 -1
  69. package/dist/assets/{arrow-right-MWjfhSEn.js → arrow-right-BL_brhAS.js} +1 -1
  70. package/dist/assets/{arrow-top-DPABL4cq.js → arrow-top-NSRDBAjD.js} +1 -1
  71. package/dist/assets/{avatar-x4dsHW7W.js → avatar-CKnYylh0.js} +1 -1
  72. package/dist/assets/{bank-DncyfpIj.js → bank-DCNttBAW.js} +1 -1
  73. package/dist/assets/{basic-BXJ5AuNC.js → basic-CXRYnFC6.js} +1 -1
  74. package/dist/assets/{browser-DOcoChNZ.js → browser-CHUxGdzo.js} +1 -1
  75. package/dist/assets/{byokCredential-DhmvNEV5.js → byokCredential-BWESv5nx.js} +1 -1
  76. package/dist/assets/{card-BsSCLVt0.js → card-CWIfHWag.js} +1 -1
  77. package/dist/assets/{castArray-9ufFSW5u.js → castArray-CLZ9yDJI.js} +1 -1
  78. package/dist/assets/{chat-DyuRDrR2.js → chat-Bgxd6R1D.js} +1 -1
  79. package/dist/assets/{checkmark-bold-BCDV5X0-.js → checkmark-bold-CrGOJN4G.js} +1 -1
  80. package/dist/assets/{checkmark-CkpMJm4d.js → checkmark-r_j9Om87.js} +1 -1
  81. package/dist/assets/{chevron-bottom-CAXcvThb.js → chevron-bottom-CUxcoy-6.js} +1 -1
  82. package/dist/assets/{chevron-left-Bg1Am-f6.js → chevron-left-DZhHwzqD.js} +1 -1
  83. package/dist/assets/{chevron-right-Dzcv24St.js → chevron-right-B-JSILcf.js} +1 -1
  84. package/dist/assets/{chevron-top-DMIRMmDX.js → chevron-top-RokXmGE4.js} +1 -1
  85. package/dist/assets/{chrome-store-DWj8xFro.js → chrome-store-D__qwAwc.js} +1 -1
  86. package/dist/assets/{clock-C3pBpJSh.js → clock-MYjVYzpL.js} +1 -1
  87. package/dist/assets/{close-BD4gl98l.js → close-VPXZZG7V.js} +1 -1
  88. package/dist/assets/{coinPlaceholder-Ci5GY26z.js → coinPlaceholder-BCyRD76n.js} +1 -1
  89. package/dist/assets/{compass-BwsaSpWM.js → compass-nIzmpNN5.js} +1 -1
  90. package/dist/assets/{copy-gAWigFZh.js → copy-cDFjCa4y.js} +1 -1
  91. package/dist/assets/{createTaskActions-D7Z85jNw.js → createTaskActions-DOOT6z5d.js} +1 -1
  92. package/dist/assets/{cursor-C2PRo4vA.js → cursor-DeaW1U0H.js} +1 -1
  93. package/dist/assets/{cursor-transparent-BVXelCvm.js → cursor-transparent-CknMrNeU.js} +1 -1
  94. package/dist/assets/{debounce-zyhh1kFW.js → debounce-CpFyKjsm.js} +1 -1
  95. package/dist/assets/{desktop-jCWSCn8z.js → desktop-yhus9b2t.js} +1 -1
  96. package/dist/assets/{disconnect-CbpuKDT6.js → disconnect-D6ftWNbk.js} +1 -1
  97. package/dist/assets/{discord-C8ajtmWf.js → discord-Dq9EGYs8.js} +1 -1
  98. package/dist/assets/{distribution-3BQ7CTZO.js → distribution-DsuFFAH3.js} +1 -1
  99. package/dist/assets/{dropdown-D2lPdiU3.js → dropdown-DwqX5tDq.js} +1 -1
  100. package/dist/assets/{etherscan-CZafqnoh.js → etherscan-BaepXFVB.js} +1 -1
  101. package/dist/assets/{exclamation-triangle-wxNgK7PY.js → exclamation-triangle-BfmClZLE.js} +1 -1
  102. package/dist/assets/{extension-Bk4_azOL.js → extension-DChtu92t.js} +1 -1
  103. package/dist/assets/{external-link-Cqpda3PZ.js → external-link-HE3lQCVx.js} +1 -1
  104. package/dist/assets/{facebook-D68jkLNm.js → facebook-rzrYbE9G.js} +1 -1
  105. package/dist/assets/{farcaster-CCQhcLCI.js → farcaster-Cd8sxNUH.js} +1 -1
  106. package/dist/assets/{filters-Fmk3MdsS.js → filters-CLo57kbI.js} +1 -1
  107. package/dist/assets/{github-YUft1BRX.js → github-Ez4Excj_.js} +1 -1
  108. package/dist/assets/{google-D8WDx1KI.js → google-BT8e2Ctk.js} +1 -1
  109. package/dist/assets/{help-circle-CVpQTNC8.js → help-circle-Daj_9msH.js} +1 -1
  110. package/dist/assets/{highlight-CYeIx3eC.js → highlight-DwJ8Mh9r.js} +1 -1
  111. package/dist/assets/{id-B5K1HBmc.js → id-BaJBJwE7.js} +1 -1
  112. package/dist/assets/{image-DHXmKgFb.js → image-BVL9_2WM.js} +1 -1
  113. package/dist/assets/{index-CisFWmyE.js → index-0twyrQyu.js} +1 -1
  114. package/dist/assets/{index-CgP5_PId.js → index-5Ii-zLsP.js} +1 -1
  115. package/dist/assets/{index-CUJWzrdP.js → index-8eWxZvt2.js} +1 -1
  116. package/dist/assets/{index-br52C4yM.js → index-A3OooEmk.js} +1 -1
  117. package/dist/assets/{index-X7rR0bV_.js → index-B0_MnTqa.js} +1 -1
  118. package/dist/assets/{index-CeFL2poq.js → index-B1Vb4r-e.js} +1 -1
  119. package/dist/assets/{index-BfT8NvTD.js → index-B1daSV1q.js} +1 -1
  120. package/dist/assets/{index-CAxhlh39.js → index-B3GHkjOH.js} +3 -3
  121. package/dist/assets/{index-pKQl0t5U.js → index-BH_JCcAL.js} +1 -1
  122. package/dist/assets/{index-DBWF3Lxz.js → index-BKL8u7ZH.js} +1 -1
  123. package/dist/assets/{index-Dbz6Whu6.js → index-BL8qXqXU.js} +1 -1
  124. package/dist/assets/{index-B3XMfsr2.js → index-BM1d7Rsc.js} +1 -1
  125. package/dist/assets/{index-BVMK7LIJ.js → index-BMs4wFsr.js} +1 -1
  126. package/dist/assets/{index-Bi6VpZAJ.js → index-BP630wyo.js} +1 -1
  127. package/dist/assets/{index-BlZKDgtS.js → index-BQdCWJJY.js} +1 -1
  128. package/dist/assets/{index-kjxsq5CZ.js → index-BTuDH5Nb.js} +1 -1
  129. package/dist/assets/{index-DbNDw8nS.js → index-B_DkL6nx.js} +1 -1
  130. package/dist/assets/{index-7YuxLUYH.js → index-BflfghPL.js} +1 -1
  131. package/dist/assets/{index-JCNQBsk6.js → index-Bsl-lu8r.js} +1 -1
  132. package/dist/assets/{index-BPVVKogl.js → index-BxHHHl1d.js} +1 -1
  133. package/dist/assets/{index-6tKWZwSV.js → index-Bxj9PwNx.js} +1 -1
  134. package/dist/assets/{index-D76ebHrC.js → index-Bzt8E-Bx.js} +1 -1
  135. package/dist/assets/{index-DEd6Cfa8.js → index-C-SHSbwb.js} +1 -1
  136. package/dist/assets/{index-CVH6GWSn.js → index-C4AD7fSs.js} +4 -4
  137. package/dist/assets/{index-Bdx-E-Cj.js → index-C6xsA0q7.js} +1 -1
  138. package/dist/assets/{index-BILgzrZ9.js → index-CKvLNQvc.js} +1 -1
  139. package/dist/assets/{index-Dz3Pj6U7.js → index-CUw9VHAD.js} +1 -1
  140. package/dist/assets/{index-Dweaf6GL.js → index-CXtrML83.js} +1 -1
  141. package/dist/assets/{index-DMefWGOk.js → index-C_mlP_bt.js} +1 -1
  142. package/dist/assets/{index-EBzcwoVz.js → index-Chlz7iYD.js} +1 -1
  143. package/dist/assets/{index-CBlw8dKJ.js → index-CkYypmaE.js} +1 -1
  144. package/dist/assets/{index-BOikF7Vg.js → index-Cq9Xgk1b.js} +1 -1
  145. package/dist/assets/{index-DJjyFLlw.js → index-CsKdYMSj.js} +1 -1
  146. package/dist/assets/{index-BizFhdaE.js → index-CvRjpO-T.js} +1 -1
  147. package/dist/assets/{index-DAZIhRrh.js → index-Cx8Ul4AK.js} +1 -1
  148. package/dist/assets/{index-XXhfzQt9.js → index-D-v9cown.js} +1 -1
  149. package/dist/assets/{index-CbPrULOR.js → index-DBDIRA_L.js} +1 -1
  150. package/dist/assets/{index-C28h9Bo9.js → index-DBXKb4X-.js} +1 -1
  151. package/dist/assets/{index-rn5VBDzX.js → index-DG52arNb.js} +1 -1
  152. package/dist/assets/{index-Do9Df4CM.js → index-DLtPSm3C.js} +1 -1
  153. package/dist/assets/{index-DpLV-Pq9.js → index-DNkBxdDH.js} +1 -1
  154. package/dist/assets/{index-ByCbBTje.js → index-DNsnzdeL.js} +1 -1
  155. package/dist/assets/{index-BuYvz3xq.js → index-DRRkzO3z.js} +1 -1
  156. package/dist/assets/{index-L5jgsIq7.js → index-DVPs2yck.js} +1 -1
  157. package/dist/assets/{index-DkIf_ple.js → index-DWk1yXCx.js} +1 -1
  158. package/dist/assets/{index-BiSfH4hc.js → index-D_X7ynCK.js} +1 -1
  159. package/dist/assets/{index-BsWkCEVF.js → index-Dd3H2oaD.js} +1 -1
  160. package/dist/assets/{index-BlwvWwLR.js → index-DkCZHrmJ.js} +1 -1
  161. package/dist/assets/{index-o8lT9clY.js → index-DqTQC__r.js} +1 -1
  162. package/dist/assets/{index-CLOxJQ_9.js → index-Dqi3fani.js} +1 -1
  163. package/dist/assets/{index-Bo5vqu5t.js → index-DrRLGHXw.js} +1 -1
  164. package/dist/assets/{index-aLp30AbD.js → index-DuT29Cab.js} +1 -1
  165. package/dist/assets/{index-D_FrsVa-.js → index-L0R_3wQh.js} +1 -1
  166. package/dist/assets/{index-DpUw2nds.js → index-O0gAJHQA.js} +5 -5
  167. package/dist/assets/{index-CEcR89i7.js → index-TL5uNbmX.js} +1 -1
  168. package/dist/assets/{index-Cgu8wTIs.js → index-gVsWO0C3.js} +1 -1
  169. package/dist/assets/{index-Dja9rj_K.js → index-hF0JTwJ4.js} +1 -1
  170. package/dist/assets/{index-Dw6ZevFg.js → index-idQT3YsL.js} +1 -1
  171. package/dist/assets/{index-DFmUO6xF.js → index-k-kC_JkY.js} +1 -1
  172. package/dist/assets/{index-Du5AFIP4.js → index-om0ofn9z.js} +1 -1
  173. package/dist/assets/{index-faFCZsic.js → index-tW8EglYo.js} +1 -1
  174. package/dist/assets/{index-C-LQAwn0.js → index-uunIxiy-.js} +1 -1
  175. package/dist/assets/{index-CKq6CGXs.js → index-zc4M21Kd.js} +2 -2
  176. package/dist/assets/{index.browser.esm-CHlxecDj.js → index.browser.esm-D5RGIMHz.js} +1 -1
  177. package/dist/assets/{index.es-CLQR2iBw.js → index.es-uCMW2I5V.js} +1 -1
  178. package/dist/assets/{info-DuVw5mzG.js → info-OsJSFtHx.js} +1 -1
  179. package/dist/assets/{info-circle-C6GHZLcW.js → info-circle-BBmbgwPZ.js} +1 -1
  180. package/dist/assets/{isEqual-CWBDsFs3.js → isEqual-C5Nb4Pdq.js} +1 -1
  181. package/dist/assets/{isPlainObject-Bsj5BOyI.js → isPlainObject-BSq8Hp0j.js} +1 -1
  182. package/dist/assets/{lightbulb-CnLBNdvj.js → lightbulb-DJKoG14M.js} +1 -1
  183. package/dist/assets/{mail-DTqpstTi.js → mail-BIZPALz9.js} +1 -1
  184. package/dist/assets/{midjourney-BDsYzL3n.js → midjourney-Dvj9cl5n.js} +1 -1
  185. package/dist/assets/{mobile-BFGzUche.js → mobile-CY_eZ1Tp.js} +1 -1
  186. package/dist/assets/{more-BP58hcCv.js → more-BXbPVQBr.js} +1 -1
  187. package/dist/assets/{network-placeholder-DGmpeLqB.js → network-placeholder-D--qlFwz.js} +1 -1
  188. package/dist/assets/{nftPlaceholder-BbN-ReOL.js → nftPlaceholder-bBcX2oYt.js} +1 -1
  189. package/dist/assets/{off-CuDhLkD6.js → off-7J472r5W.js} +1 -1
  190. package/dist/assets/order-03apkk4w.js +1 -0
  191. package/dist/assets/order-Bo-tnXB3.js +1 -0
  192. package/dist/assets/order-C94zB2DA.js +1 -0
  193. package/dist/assets/{order-BkfVszSt.js → order-CM5eYuK0.js} +1 -1
  194. package/dist/assets/order-CdpPmQpG.js +1 -0
  195. package/dist/assets/order-CnCQGMJh.js +1 -0
  196. package/dist/assets/order-CwX_tpSV.js +1 -0
  197. package/dist/assets/order-CzIgaSX4.js +1 -0
  198. package/dist/assets/order-D2XQBvdp.js +1 -0
  199. package/dist/assets/order-D97e7T7u.js +1 -0
  200. package/dist/assets/order-DCTvXGft.js +1 -0
  201. package/dist/assets/order-DZurK8Ek.js +1 -0
  202. package/dist/assets/order-DamR_aAT.js +1 -0
  203. package/dist/assets/order-Dc0Ec8sh.js +1 -0
  204. package/dist/assets/order-DcR5etPG.js +1 -0
  205. package/dist/assets/order-Dh3F9166.js +1 -0
  206. package/dist/assets/order-DhEagMXF.js +1 -0
  207. package/dist/assets/order-JbPHacDg.js +1 -0
  208. package/dist/assets/order-rAaEPzDi.js +1 -0
  209. package/dist/assets/{pagination-DiGyJEay.js → pagination-Chv4DSYj.js} +1 -1
  210. package/dist/assets/{play-store-CuatSCMT.js → play-store-f0Snpv7K.js} +1 -1
  211. package/dist/assets/{plus-D9SjxQQI.js → plus-BWkRbpzE.js} +1 -1
  212. package/dist/assets/{price-B1xKQHsz.js → price-DD3frJF5.js} +1 -1
  213. package/dist/assets/{producer-DlXwdcbI.js → producer-D1WOO1iI.js} +1 -1
  214. package/dist/assets/{qr-code-w1eMa2kp.js → qr-code-DwfikLnM.js} +1 -1
  215. package/dist/assets/{recycle-horizontal-cMqL1NnA.js → recycle-horizontal-6oxEX8K1.js} +1 -1
  216. package/dist/assets/{refresh-e8l0YQDq.js → refresh-Bth8mlA5.js} +1 -1
  217. package/dist/assets/{reown-logo-B7RaG0y6.js → reown-logo-BP5XvISo.js} +1 -1
  218. package/dist/assets/{search-DqfT7unL.js → search-DEZ6AH9J.js} +1 -1
  219. package/dist/assets/{secp256k1-COspyfWe.js → secp256k1-CEI98oxc.js} +1 -1
  220. package/dist/assets/{secp256k1-kYCozA5T.js → secp256k1-_jXrL_ky.js} +1 -1
  221. package/dist/assets/{seedream-gFX5-V03.js → seedream-BGbHiD7C.js} +1 -1
  222. package/dist/assets/{send-Csm63skG.js → send-v-bJ-DJh.js} +1 -1
  223. package/dist/assets/{service-WJQge7QR.js → service-BItLuKFW.js} +1 -1
  224. package/dist/assets/{solana-wallets-CYfOS7UQ.js → solana-wallets-DQNMW0qS.js} +2 -2
  225. package/dist/assets/{solana-wallets-vue-Bscgfmr7.js → solana-wallets-vue-BZFBml2u.js} +1 -1
  226. package/dist/assets/{suno-BL7d1IKw.js → suno-elezGpVv.js} +1 -1
  227. package/dist/assets/{swapHorizontal-yYNnzyqc.js → swapHorizontal-DEbGSu_q.js} +1 -1
  228. package/dist/assets/{swapHorizontalBold-Y1mQ7Tez.js → swapHorizontalBold-D9x2ai3W.js} +1 -1
  229. package/dist/assets/{swapHorizontalMedium-DGx_6f7N.js → swapHorizontalMedium-ElZ47lBT.js} +1 -1
  230. package/dist/assets/{swapHorizontalRoundedBold-C3C2ADWX.js → swapHorizontalRoundedBold-BRrU9bqS.js} +1 -1
  231. package/dist/assets/{swapVertical-CPtbqeHO.js → swapVertical-BTcf4Mhm.js} +1 -1
  232. package/dist/assets/{telegram-Dzq8EJiJ.js → telegram-C1OIMvWb.js} +1 -1
  233. package/dist/assets/{three-dots-w_sA-jaR.js → three-dots-CwLa-iNd.js} +1 -1
  234. package/dist/assets/{twitch-B0AyZCOx.js → twitch-B9veuxt9.js} +1 -1
  235. package/dist/assets/{twitterIcon-VjusQ2hO.js → twitterIcon-BmiN3N00.js} +1 -1
  236. package/dist/assets/{typescript-BXdqla6u.js → typescript-DdRrnJs7.js} +1 -1
  237. package/dist/assets/{use-form-item-BV_L9kB7.js → use-form-item-CpjZhom3.js} +1 -1
  238. package/dist/assets/validator-BPNvyIRK.js +1 -0
  239. package/dist/assets/{verify-DCNYYOD8.js → verify-DrFtZybx.js} +1 -1
  240. package/dist/assets/{verify-filled-DGrdV_-Z.js → verify-filled-mc5hRyJs.js} +1 -1
  241. package/dist/assets/{w3m-modal-DziCVLQh.js → w3m-modal-D9i02gRI.js} +1 -1
  242. package/dist/assets/{wallet-BVhzYpZk.js → wallet-DAACLVO6.js} +1 -1
  243. package/dist/assets/{wallet-placeholder-CNSpuUe_.js → wallet-placeholder-cv_5Qufh.js} +1 -1
  244. package/dist/assets/{walletconnect-D-F4V5Hy.js → walletconnect-BOMxFrwb.js} +1 -1
  245. package/dist/assets/{warning-circle-BGUzvH8t.js → warning-circle-B55CJkma.js} +1 -1
  246. package/dist/assets/{web-BA2ijAeV.js → web-1Q5sxP36.js} +1 -1
  247. package/dist/assets/{web-BqISh1Og.js → web-lQuKVB97.js} +1 -1
  248. package/dist/assets/{x-BJuco_wc.js → x-DxVkZ1vE.js} +1 -1
  249. package/dist/index.html +3 -3
  250. package/package.json +1 -1
  251. package/dist/assets/Detail-D5m92Hja.js +0 -2
  252. package/dist/assets/order-1qJ3GxaX.js +0 -1
  253. package/dist/assets/order-B8dtxAZ2.js +0 -1
  254. package/dist/assets/order-BDzghU3p.js +0 -1
  255. package/dist/assets/order-BI5MxfoB.js +0 -1
  256. package/dist/assets/order-BfoUTh90.js +0 -1
  257. package/dist/assets/order-BigJZUm-.js +0 -1
  258. package/dist/assets/order-BulQDrR-.js +0 -1
  259. package/dist/assets/order-CCmLKKdB.js +0 -1
  260. package/dist/assets/order-CSpGh4Zz.js +0 -1
  261. package/dist/assets/order-CVHCRSWI.js +0 -1
  262. package/dist/assets/order-CerH81Qp.js +0 -1
  263. package/dist/assets/order-CgCnV8Wc.js +0 -1
  264. package/dist/assets/order-D8IX-Cp2.js +0 -1
  265. package/dist/assets/order-D8kStYHA.js +0 -1
  266. package/dist/assets/order-DNR8D2Y8.js +0 -1
  267. package/dist/assets/order-EP4isp-N.js +0 -1
  268. package/dist/assets/order-ReEYaOWl.js +0 -1
  269. package/dist/assets/order-XdBUMXLb.js +0 -1
  270. package/dist/assets/validator-C6fRYUzr.js +0 -1
@@ -1 +1 @@
1
- import{o as k}from"./order-BkfVszSt.js";import{P as E}from"./Pagination-jQVkoh--.js";import{C}from"./CopyToClipboard-Ih2qsYgN.js";import{O as D}from"./order-CB3uOPHS.js";import{I as S,H as I}from"./index-CVH6GWSn.js";import{g as O}from"./price-B1xKQHsz.js";import{E as v}from"./index-Dz3Pj6U7.js";import{E as P}from"./index-DpLV-Pq9.js";import{E as F,a as N}from"./index-aLp30AbD.js";import{E as A,a as B}from"./index-CgP5_PId.js";import{d as T,x as f,y as t,C as o,E as i,F as r,G as q,H as m,I as n,J as z,D as s,K as H,q as l}from"./vendor-vue-NSDaktjZ.js";import"./index-Du5AFIP4.js";import"./index-ByCbBTje.js";import"./index-Dw6ZevFg.js";import"./typescript-BXdqla6u.js";import"./index-BiSfH4hc.js";import"./strings-beZM2Y-f.js";import"./isEqual-CWBDsFs3.js";import"./_Uint8Array-Cj-LmGzx.js";import"./castArray-9ufFSW5u.js";import"./use-form-item-BV_L9kB7.js";import"./index-EBzcwoVz.js";import"./index-CLOxJQ_9.js";import"./debounce-zyhh1kFW.js";import"./_baseIteratee-BcXwWZMY.js";import"./index-Dbz6Whu6.js";import"./index.es-CLQR2iBw.js";import"./index-BLjywj98.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-BuyEbX8F.js";import"./_initCloneObject-CIlwXpy7.js";import"./isPlainObject-Bsj5BOyI.js";import"./index-X7rR0bV_.js";const L=T({name:"ConsoleOrderList",components:{Pagination:E,CopyToClipboard:C,ElRow:B,ElCol:A,ElTable:N,ElTableColumn:F,ElButton:P,ElTag:S,ElCard:v},data(){return{OrderState:D,orders:[],loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){return parseInt(this.$route.query.page?.toString()||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{getPriceString:O,onPageChange(e){this.$router.push({name:this.$route.name?.toString(),query:{page:e}})},onFetchData(){this.loading=!0,k.getAll({ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit,user_id:this.$store.getters.user.id}).then(({data:e})=>{this.orders=e.items,this.loading=!1,this.total=e.count}).catch(()=>{this.loading=!1})}}}),V={class:"title"},R={class:"key"},j={class:"cursor-pointer"},G={class:"price"},X={class:"description"},J={key:0},K={key:1,class:"state state-paid"},M={key:2,class:"state state-finished"},Q={key:3,class:"state state-expired"},U={key:4,class:"state state-failed"},W={class:"created-at"},Y={class:"flex items-center justify-center flex-wrap"},Z={class:"float-right"};function x(e,ee,te,ae,oe,re){const c=s("el-col"),u=s("el-row"),_=s("copy-to-clipboard"),d=s("el-table-column"),p=s("el-tag"),h=s("el-button"),g=s("el-table"),b=s("el-card"),w=s("pagination"),y=H("loading");return l(),f(u,{class:"panel"},{default:t(()=>[o(c,{span:24},{default:t(()=>[o(u,null,{default:t(()=>[o(c,{span:24},{default:t(()=>[i("h2",V,r(e.$t("common.title.allOrders")),1)]),_:1})]),_:1}),o(u,null,{default:t(()=>[o(c,{span:24},{default:t(()=>[o(b,{shadow:"hover"},{default:t(()=>[q((l(),f(g,{data:e.orders,stripe:"","empty-text":e.$t("common.message.noData"),class:"min-h-[calc(100vh-300px)] mb-[50px]"},{default:t(()=>[o(d,{prop:"id",label:e.$t("order.field.id"),"class-name":"text-center",width:"200px"},{default:t(a=>[i("span",R,r(a.row.id),1),i("span",j,[o(_,{content:a.row.id,class:"inline-block"},null,8,["content"])])]),_:1},8,["label"]),o(d,{label:e.$t("order.field.price"),width:"100px"},{default:t(a=>[i("span",G,r(e.getPriceString({value:a.row?.price})),1)]),_:1},8,["label"]),o(d,{label:e.$t("order.field.description"),width:"270px","class-name":"hidden md:table-cell","label-class-name":"hidden md:table-cell"},{default:t(a=>[i("span",X,r(a.row.description),1)]),_:1},8,["label"]),o(d,{prop:"state",label:e.$t("order.field.state"),"class-name":"text-center",width:"160px"},{default:t(a=>[a.row.state===e.OrderState?.PENDING?(l(),m("span",J,[o(p,{type:"info",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.pending")),1)]),_:1})])):a.row.state===e.OrderState?.PAID?(l(),m("span",K,[o(p,{type:"success",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.paid")),1)]),_:1})])):a.row.state===e.OrderState?.FINISHED?(l(),m("span",M,[o(p,{type:"success",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.finished")),1)]),_:1})])):a.row.state===e.OrderState?.EXPIRED?(l(),m("span",Q,[o(p,{type:"danger",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.expired")),1)]),_:1})])):a.row.state===e.OrderState?.FAILED?(l(),m("span",U,[o(p,{type:"danger",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.failed")),1)]),_:1})])):z("",!0)]),_:1},8,["label"]),o(d,{label:e.$t("order.field.createdAt"),width:"250px","class-name":"hidden sm:table-cell","label-class-name":"hidden sm:table-cell"},{default:t(a=>[i("span",W,r(e.$dayjs.format(a.row.created_at)),1)]),_:1},8,["label"]),o(d,{"min-width":"130px",fixed:"right"},{default:t(a=>[i("div",Y,[a.row.state!==e.OrderState.PAID&&a.row.state!==e.OrderState.FINISHED&&a.row.state!==e.OrderState.EXPIRED&&a.row.state!==e.OrderState.FAILED?(l(),f(h,{key:0,type:"primary",size:"small",onClick:$=>e.$router.push({name:"console-order-detail",params:{id:a.row.id}})},{default:t(()=>[n(r(e.$t("order.button.continuePay")),1)]),_:1},8,["onClick"])):(l(),f(h,{key:1,size:"small",onClick:$=>e.$router.push({name:"console-order-detail",params:{id:a.row.id}})},{default:t(()=>[n(r(e.$t("order.button.checkDetail")),1)]),_:1},8,["onClick"]))])]),_:1})]),_:1},8,["data","empty-text"])),[[y,e.loading]])]),_:1})]),_:1})]),_:1}),o(u,null,{default:t(()=>[o(c,{span:10,offset:14},{default:t(()=>[i("div",Z,[o(w,{"current-page":e.page,"page-size":e.limit,total:e.total,onChange:e.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}const Ve=I(L,[["render",x]]);export{Ve as default};
1
+ import{o as k}from"./order-CM5eYuK0.js";import{P as E}from"./Pagination-Syf59Jsj.js";import{C}from"./CopyToClipboard-Q-XQyK-j.js";import{O as D}from"./order-CB3uOPHS.js";import{I as S,H as I}from"./index-C4AD7fSs.js";import{g as O}from"./price-DD3frJF5.js";import{E as v}from"./index-CUw9VHAD.js";import{E as P}from"./index-DNkBxdDH.js";import{E as F,a as N}from"./index-DuT29Cab.js";import{E as A,a as B}from"./index-5Ii-zLsP.js";import{d as T,x as f,y as t,C as o,E as i,F as r,G as q,H as m,I as n,J as z,D as s,K as H,q as l}from"./vendor-vue-NSDaktjZ.js";import"./index-om0ofn9z.js";import"./index-DNsnzdeL.js";import"./index-idQT3YsL.js";import"./typescript-DdRrnJs7.js";import"./index-D_X7ynCK.js";import"./strings-beZM2Y-f.js";import"./isEqual-C5Nb4Pdq.js";import"./_Uint8Array-CoBPw-4B.js";import"./castArray-CLZ9yDJI.js";import"./use-form-item-CpjZhom3.js";import"./index-Chlz7iYD.js";import"./index-Dqi3fani.js";import"./debounce-CpFyKjsm.js";import"./_baseIteratee-BQd_p9ZJ.js";import"./index-BL8qXqXU.js";import"./index.es-uCMW2I5V.js";import"./index-BLjywj98.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./index-BuyEbX8F.js";import"./_initCloneObject-jUCkAHqV.js";import"./isPlainObject-BSq8Hp0j.js";import"./index-B0_MnTqa.js";const L=T({name:"ConsoleOrderList",components:{Pagination:E,CopyToClipboard:C,ElRow:B,ElCol:A,ElTable:N,ElTableColumn:F,ElButton:P,ElTag:S,ElCard:v},data(){return{OrderState:D,orders:[],loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){return parseInt(this.$route.query.page?.toString()||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{getPriceString:O,onPageChange(e){this.$router.push({name:this.$route.name?.toString(),query:{page:e}})},onFetchData(){this.loading=!0,k.getAll({ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit,user_id:this.$store.getters.user.id}).then(({data:e})=>{this.orders=e.items,this.loading=!1,this.total=e.count}).catch(()=>{this.loading=!1})}}}),V={class:"title"},R={class:"key"},j={class:"cursor-pointer"},G={class:"price"},X={class:"description"},J={key:0},K={key:1,class:"state state-paid"},M={key:2,class:"state state-finished"},Q={key:3,class:"state state-expired"},U={key:4,class:"state state-failed"},W={class:"created-at"},Y={class:"flex items-center justify-center flex-wrap"},Z={class:"float-right"};function x(e,ee,te,ae,oe,re){const c=s("el-col"),u=s("el-row"),_=s("copy-to-clipboard"),d=s("el-table-column"),p=s("el-tag"),h=s("el-button"),g=s("el-table"),b=s("el-card"),w=s("pagination"),y=H("loading");return l(),f(u,{class:"panel"},{default:t(()=>[o(c,{span:24},{default:t(()=>[o(u,null,{default:t(()=>[o(c,{span:24},{default:t(()=>[i("h2",V,r(e.$t("common.title.allOrders")),1)]),_:1})]),_:1}),o(u,null,{default:t(()=>[o(c,{span:24},{default:t(()=>[o(b,{shadow:"hover"},{default:t(()=>[q((l(),f(g,{data:e.orders,stripe:"","empty-text":e.$t("common.message.noData"),class:"min-h-[calc(100vh-300px)] mb-[50px]"},{default:t(()=>[o(d,{prop:"id",label:e.$t("order.field.id"),"class-name":"text-center",width:"200px"},{default:t(a=>[i("span",R,r(a.row.id),1),i("span",j,[o(_,{content:a.row.id,class:"inline-block"},null,8,["content"])])]),_:1},8,["label"]),o(d,{label:e.$t("order.field.price"),width:"100px"},{default:t(a=>[i("span",G,r(e.getPriceString({value:a.row?.price})),1)]),_:1},8,["label"]),o(d,{label:e.$t("order.field.description"),width:"270px","class-name":"hidden md:table-cell","label-class-name":"hidden md:table-cell"},{default:t(a=>[i("span",X,r(a.row.description),1)]),_:1},8,["label"]),o(d,{prop:"state",label:e.$t("order.field.state"),"class-name":"text-center",width:"160px"},{default:t(a=>[a.row.state===e.OrderState?.PENDING?(l(),m("span",J,[o(p,{type:"info",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.pending")),1)]),_:1})])):a.row.state===e.OrderState?.PAID?(l(),m("span",K,[o(p,{type:"success",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.paid")),1)]),_:1})])):a.row.state===e.OrderState?.FINISHED?(l(),m("span",M,[o(p,{type:"success",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.finished")),1)]),_:1})])):a.row.state===e.OrderState?.EXPIRED?(l(),m("span",Q,[o(p,{type:"danger",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.expired")),1)]),_:1})])):a.row.state===e.OrderState?.FAILED?(l(),m("span",U,[o(p,{type:"danger",class:"mx-1",effect:"dark",round:""},{default:t(()=>[n(r(e.$t("order.state.failed")),1)]),_:1})])):z("",!0)]),_:1},8,["label"]),o(d,{label:e.$t("order.field.createdAt"),width:"250px","class-name":"hidden sm:table-cell","label-class-name":"hidden sm:table-cell"},{default:t(a=>[i("span",W,r(e.$dayjs.format(a.row.created_at)),1)]),_:1},8,["label"]),o(d,{"min-width":"130px",fixed:"right"},{default:t(a=>[i("div",Y,[a.row.state!==e.OrderState.PAID&&a.row.state!==e.OrderState.FINISHED&&a.row.state!==e.OrderState.EXPIRED&&a.row.state!==e.OrderState.FAILED?(l(),f(h,{key:0,type:"primary",size:"small",onClick:$=>e.$router.push({name:"console-order-detail",params:{id:a.row.id}})},{default:t(()=>[n(r(e.$t("order.button.continuePay")),1)]),_:1},8,["onClick"])):(l(),f(h,{key:1,size:"small",onClick:$=>e.$router.push({name:"console-order-detail",params:{id:a.row.id}})},{default:t(()=>[n(r(e.$t("order.button.checkDetail")),1)]),_:1},8,["onClick"]))])]),_:1})]),_:1},8,["data","empty-text"])),[[y,e.loading]])]),_:1})]),_:1})]),_:1}),o(u,null,{default:t(()=>[o(c,{span:10,offset:14},{default:t(()=>[i("div",Z,[o(w,{"current-page":e.page,"page-size":e.limit,total:e.total,onChange:e.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}const Ve=I(L,[["render",x]]);export{Ve as default};
@@ -1 +1 @@
1
- import{N as E}from"./Navigator-ilndlwmM.js";import{A as N}from"./Status-CBQ5PLv2.js";import{a4 as d,a5 as u,bp as z,bq as I,H as v,o as k,S as C}from"./index-CVH6GWSn.js";import{a as x}from"./errorCode-Cqj9Td_Z.js";import{E as D}from"./index-DpLV-Pq9.js";import{E as U}from"./index-X7rR0bV_.js";import{E as L}from"./index-Dja9rj_K.js";import{E as y}from"./index-CisFWmyE.js";import{d as w,x as _,y as $,E as m,F as h,C as l,I as R,D as a,q as A,c as B,H as V,J as P}from"./vendor-vue-NSDaktjZ.js";import"./midjourney-BpOMf6EO.js";import"./luma-DcySqBv2.js";import"./kling-DwJwIwVI.js";import"./veo-Dg8Zhpd-.js";import"./sora-Dyuoglk1.js";import"./pixverse-g-p4CgDy.js";import"./flux-BDAe6Szo.js";import"./hailuo-C8Dw-0xR.js";import"./suno-B9P6-pqW.js";import"./producer-BGNC4QeM.js";import"./serp-BcjVM9iR.js";import"./wan-DKq-jYOo.js";import"./webextrator-B5rnj1Le.js";import"./fish-B2JG6AjH.js";import"./avatar-x4dsHW7W.js";import"./index.es-CLQR2iBw.js";import"./index-C28h9Bo9.js";import"./index-ByCbBTje.js";import"./index-Dw6ZevFg.js";import"./typescript-BXdqla6u.js";import"./index-BiSfH4hc.js";import"./dropdown-D2lPdiU3.js";import"./castArray-9ufFSW5u.js";import"./byokCredential-DhmvNEV5.js";import"./vendor-axios-B8_nURbH.js";import"./index-Du5AFIP4.js";import"./strings-beZM2Y-f.js";import"./isEqual-CWBDsFs3.js";import"./_Uint8Array-Cj-LmGzx.js";import"./use-form-item-BV_L9kB7.js";import"./index-EBzcwoVz.js";import"./index-CLOxJQ_9.js";import"./debounce-zyhh1kFW.js";import"./_baseIteratee-BcXwWZMY.js";import"./index-Dbz6Whu6.js";import"./index-pKQl0t5U.js";import"./_baseClone-CD4xkhO5.js";import"./_initCloneObject-CIlwXpy7.js";import"./index-aLp30AbD.js";import"./isPlainObject-Bsj5BOyI.js";import"./index-B3XMfsr2.js";import"./validator-C6fRYUzr.js";import"./index-XXhfzQt9.js";import"./index-o8lT9clY.js";import"./index-br52C4yM.js";import"./index-BuyEbX8F.js";import"./index-Dz3Pj6U7.js";import"./index-D76ebHrC.js";import"./index-D_FrsVa-.js";import"./index-7YuxLUYH.js";import"./CopyToClipboard-Ih2qsYgN.js";import"./index-BLjywj98.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";function S(t){if(!t?.expired_at)return!1;try{return new Date(t?.expired_at)<new Date}catch{return!1}}function O(t){return console.debug("application remaining amount",t,t?.remaining_amount),t?.remaining_amount&&t?.remaining_amount<0}function f(t){if(!t)return console.debug("application is undefined, return false"),!1;const i=O(t),o=S(t);return console.debug("is application exhausted",i),console.debug("is application expired",o),!i&&!o}function F(t,i){if(console.debug("start to execute getFinalApplication",t,i),i){const e=t?.find(c=>c.id===i.id);if(e)return console.debug("current application is preserved (respect user selection)",e),e}console.debug("get final application from applications",t);const o=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.PERIOD);if(console.debug("application1",o),f(o))return console.debug("application with global scope and Period type",o),o;const s=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.USAGE);if(console.debug("application2",s),f(s))return console.debug("application with global scope and Usage type",s),s;const p=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.PERIOD);if(console.debug("application3",p),f(p))return console.debug("application with Period type",p),p;const n=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.USAGE);return console.debug("application4",n),f(n)?(console.debug("application with Usage type",n),n):o||s||p||n}const G=w({name:"ApplicationConfirm",components:{ElDialog:I,ElDivider:L,ElCheckbox:U,ElButton:D},props:{visible:{type:Boolean,required:!1,default:!1}},emits:["update:visible","apply"],data(){return{checked:!0}},watch:{},methods:{getBaseUrlPlatform:z,onApply(){if(!this.checked){y.error(this.$t("application.message.notAgreePolicy"));return}this.$emit("apply")}}}),M={class:"content py-[10px] px-[40px]"},T={class:"my-4"},W={class:"policy mb-[10px]"},q={class:"policy-title text-[12px] relative -bottom-[3px]"},H=["href"];function J(t,i,o,s,p,n){const e=a("el-divider"),c=a("el-checkbox"),g=a("el-button"),b=a("el-dialog");return A(),_(b,{"model-value":t.visible,width:"500px",title:t.$t("application.message.welcome"),center:"",onClose:i[1]||(i[1]=r=>t.$emit("update:visible",!1))},{default:$(()=>[m("div",M,[m("p",T,h(t.$t("application.message.notApplied")),1),l(e,{class:"my-2"}),m("div",W,[l(c,{modelValue:t.checked,"onUpdate:modelValue":i[0]||(i[0]=r=>t.checked=r),size:"large",class:"policy-checkbox mr-[10px]"},null,8,["modelValue"]),m("span",q,h(t.$t("application.message.readPolicy")),1),m("a",{class:"policy-title text-[12px] relative -bottom-[3px] text-[var(--el-color-primary)] cursor-pointer no-underline",target:"_blank",href:t.getBaseUrlPlatform()+"/terms"},"  "+h(t.$t("application.message.policy")),9,H)]),l(g,{round:"",type:"primary",onClick:t.onApply},{default:$(()=>[R(h(t.$t("common.button.start")),1)]),_:1},8,["onClick"])])]),_:1},8,["model-value","title"])}const j=v(G,[["render",J]]),K=w({name:"LayoutMain",components:{Navigator:E,ApplicationStatus:N,ApplicationConfirm:j},provide(){return{initialized:B(()=>this.initialized)}},data(){return{initialized:!1,applying:!1,mobile:window.innerWidth<768,initializeRunId:0}},computed:{appName(){return this.$route.meta.appName},application(){return this.$store.state[this.appName]?.application},applications(){const t=this.$store.state[this.appName]?.applications??[];console.debug("individualApplications",t);const i=this.$store.state.applications??[];return console.debug("globalApplications",i),i.concat(t)},loading(){return this.$store.state[this.appName]?.status?.getApplications===C.Request},service(){return this.$store.state[this.appName]?.service},userId(){return this.$store.state.user?.id}},watch:{appName(){this.initialize()},userId(t,i){t&&t!==i&&this.initialize()}},mounted(){this.initialize(),window.addEventListener("resize",this.onResize)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{onResize(){this.mobile=window.innerWidth<768},async initialize(){const t=++this.initializeRunId;if(this.initialized=!1,console.debug("Fetching all individual and global applications for",this.appName),await Promise.allSettled([this.$store.dispatch("getApplications"),this.$store.dispatch(`${this.appName}/getApplications`)]),t!==this.initializeRunId)return;console.debug("Fetched all applications",this.applications),this.$store.state.applications?.length===0&&await this.onAutoApply();const i=this.$store.state[this.appName]?.application;console.debug("current application",i);const o=F(this.applications,i);console.debug("final application",o),o&&(console.debug("set final application",o,o?.type),await this.$store.dispatch(`${this.appName}/setApplication`,o)),console.debug("finished initialization"),this.initialized=!0},onApply(){this.onAutoApply()},async onAutoApply(){try{await k.create({type:u.USAGE,scope:d.GLOBAL,user_id:this.$store.getters.user.id}),this.applying=!1,await this.$store.dispatch("getApplications"),this.showWelcomeToast()}catch(t){t?.response?.data?.code===x?await this.$store.dispatch("getApplications"):y.error(this.$t("application.message.applyFailed"))}},showWelcomeToast(){const t=this.$store.state.applications?.[0],i=Math.floor(t?.remaining_amount??0),o=i>0?this.$t("application.message.welcomeWithCredits",{credits:i}):this.$t("application.message.welcomeNoCredits");y({message:o,type:"success",duration:6e3,showClose:!0})}}}),Q={class:"wrapper"};function X(t,i,o,s,p,n){const e=a("router-view"),c=a("navigator"),g=a("application-status"),b=a("application-confirm");return A(),V("div",Q,[l(e,{class:"main"}),l(c,{class:"navigator",direction:t.mobile?"row":"column"},null,8,["direction"]),t.application?(A(),_(g,{key:0,class:"status-floating fixed right-2 z-[200]",application:t.application,applications:t.applications,"show-price":!1,authenticated:!!t.$store.state.token.access,service:t.service,onSelect:i[0]||(i[0]=r=>t.$store.dispatch(`${t.appName}/setApplication`,r))},null,8,["application","applications","authenticated","service"])):P("",!0),l(b,{modelValue:t.applying,"onUpdate:modelValue":i[1]||(i[1]=r=>t.applying=r),modelModifiers:{visible:!0},onApply:t.onApply},null,8,["modelValue","onApply"])])}const ni=v(K,[["render",X],["__scopeId","data-v-d59ada2a"]]);export{ni as default};
1
+ import{N as E}from"./Navigator-D5sTiOvt.js";import{A as N}from"./Status-DFMURS5y.js";import{a4 as d,a5 as u,bp as z,bq as I,H as v,o as k,S as C}from"./index-C4AD7fSs.js";import{a as x}from"./errorCode-Cqj9Td_Z.js";import{E as D}from"./index-DNkBxdDH.js";import{E as U}from"./index-B0_MnTqa.js";import{E as L}from"./index-hF0JTwJ4.js";import{E as y}from"./index-0twyrQyu.js";import{d as w,x as _,y as $,E as m,F as h,C as l,I as R,D as a,q as A,c as B,H as V,J as P}from"./vendor-vue-NSDaktjZ.js";import"./midjourney-BpOMf6EO.js";import"./luma-DcySqBv2.js";import"./kling-DwJwIwVI.js";import"./veo-Dg8Zhpd-.js";import"./sora-Dyuoglk1.js";import"./pixverse-g-p4CgDy.js";import"./flux-BDAe6Szo.js";import"./hailuo-C8Dw-0xR.js";import"./suno-B9P6-pqW.js";import"./producer-BGNC4QeM.js";import"./serp-BcjVM9iR.js";import"./wan-DKq-jYOo.js";import"./webextrator-B5rnj1Le.js";import"./fish-B2JG6AjH.js";import"./avatar-CKnYylh0.js";import"./index.es-uCMW2I5V.js";import"./index-DBXKb4X-.js";import"./index-DNsnzdeL.js";import"./index-idQT3YsL.js";import"./typescript-DdRrnJs7.js";import"./index-D_X7ynCK.js";import"./dropdown-DwqX5tDq.js";import"./castArray-CLZ9yDJI.js";import"./byokCredential-BWESv5nx.js";import"./vendor-axios-B8_nURbH.js";import"./index-om0ofn9z.js";import"./strings-beZM2Y-f.js";import"./isEqual-C5Nb4Pdq.js";import"./_Uint8Array-CoBPw-4B.js";import"./use-form-item-CpjZhom3.js";import"./index-Chlz7iYD.js";import"./index-Dqi3fani.js";import"./debounce-CpFyKjsm.js";import"./_baseIteratee-BQd_p9ZJ.js";import"./index-BL8qXqXU.js";import"./index-BH_JCcAL.js";import"./_baseClone-CXvBLrp-.js";import"./_initCloneObject-jUCkAHqV.js";import"./index-DuT29Cab.js";import"./isPlainObject-BSq8Hp0j.js";import"./index-BM1d7Rsc.js";import"./validator-BPNvyIRK.js";import"./index-D-v9cown.js";import"./index-DqTQC__r.js";import"./index-A3OooEmk.js";import"./index-BuyEbX8F.js";import"./index-CUw9VHAD.js";import"./index-Bzt8E-Bx.js";import"./index-L0R_3wQh.js";import"./index-BflfghPL.js";import"./CopyToClipboard-Q-XQyK-j.js";import"./index-BLjywj98.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";function S(t){if(!t?.expired_at)return!1;try{return new Date(t?.expired_at)<new Date}catch{return!1}}function O(t){return console.debug("application remaining amount",t,t?.remaining_amount),t?.remaining_amount&&t?.remaining_amount<0}function f(t){if(!t)return console.debug("application is undefined, return false"),!1;const i=O(t),o=S(t);return console.debug("is application exhausted",i),console.debug("is application expired",o),!i&&!o}function F(t,i){if(console.debug("start to execute getFinalApplication",t,i),i){const e=t?.find(c=>c.id===i.id);if(e)return console.debug("current application is preserved (respect user selection)",e),e}console.debug("get final application from applications",t);const o=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.PERIOD);if(console.debug("application1",o),f(o))return console.debug("application with global scope and Period type",o),o;const s=t?.find(e=>e.scope===d.GLOBAL&&e.type===u.USAGE);if(console.debug("application2",s),f(s))return console.debug("application with global scope and Usage type",s),s;const p=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.PERIOD);if(console.debug("application3",p),f(p))return console.debug("application with Period type",p),p;const n=t?.find(e=>(e.scope===d.INDIVIDUAL&&e?.type)===u.USAGE);return console.debug("application4",n),f(n)?(console.debug("application with Usage type",n),n):o||s||p||n}const G=w({name:"ApplicationConfirm",components:{ElDialog:I,ElDivider:L,ElCheckbox:U,ElButton:D},props:{visible:{type:Boolean,required:!1,default:!1}},emits:["update:visible","apply"],data(){return{checked:!0}},watch:{},methods:{getBaseUrlPlatform:z,onApply(){if(!this.checked){y.error(this.$t("application.message.notAgreePolicy"));return}this.$emit("apply")}}}),M={class:"content py-[10px] px-[40px]"},T={class:"my-4"},W={class:"policy mb-[10px]"},q={class:"policy-title text-[12px] relative -bottom-[3px]"},H=["href"];function J(t,i,o,s,p,n){const e=a("el-divider"),c=a("el-checkbox"),g=a("el-button"),b=a("el-dialog");return A(),_(b,{"model-value":t.visible,width:"500px",title:t.$t("application.message.welcome"),center:"",onClose:i[1]||(i[1]=r=>t.$emit("update:visible",!1))},{default:$(()=>[m("div",M,[m("p",T,h(t.$t("application.message.notApplied")),1),l(e,{class:"my-2"}),m("div",W,[l(c,{modelValue:t.checked,"onUpdate:modelValue":i[0]||(i[0]=r=>t.checked=r),size:"large",class:"policy-checkbox mr-[10px]"},null,8,["modelValue"]),m("span",q,h(t.$t("application.message.readPolicy")),1),m("a",{class:"policy-title text-[12px] relative -bottom-[3px] text-[var(--el-color-primary)] cursor-pointer no-underline",target:"_blank",href:t.getBaseUrlPlatform()+"/terms"},"  "+h(t.$t("application.message.policy")),9,H)]),l(g,{round:"",type:"primary",onClick:t.onApply},{default:$(()=>[R(h(t.$t("common.button.start")),1)]),_:1},8,["onClick"])])]),_:1},8,["model-value","title"])}const j=v(G,[["render",J]]),K=w({name:"LayoutMain",components:{Navigator:E,ApplicationStatus:N,ApplicationConfirm:j},provide(){return{initialized:B(()=>this.initialized)}},data(){return{initialized:!1,applying:!1,mobile:window.innerWidth<768,initializeRunId:0}},computed:{appName(){return this.$route.meta.appName},application(){return this.$store.state[this.appName]?.application},applications(){const t=this.$store.state[this.appName]?.applications??[];console.debug("individualApplications",t);const i=this.$store.state.applications??[];return console.debug("globalApplications",i),i.concat(t)},loading(){return this.$store.state[this.appName]?.status?.getApplications===C.Request},service(){return this.$store.state[this.appName]?.service},userId(){return this.$store.state.user?.id}},watch:{appName(){this.initialize()},userId(t,i){t&&t!==i&&this.initialize()}},mounted(){this.initialize(),window.addEventListener("resize",this.onResize)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{onResize(){this.mobile=window.innerWidth<768},async initialize(){const t=++this.initializeRunId;if(this.initialized=!1,console.debug("Fetching all individual and global applications for",this.appName),await Promise.allSettled([this.$store.dispatch("getApplications"),this.$store.dispatch(`${this.appName}/getApplications`)]),t!==this.initializeRunId)return;console.debug("Fetched all applications",this.applications),this.$store.state.applications?.length===0&&await this.onAutoApply();const i=this.$store.state[this.appName]?.application;console.debug("current application",i);const o=F(this.applications,i);console.debug("final application",o),o&&(console.debug("set final application",o,o?.type),await this.$store.dispatch(`${this.appName}/setApplication`,o)),console.debug("finished initialization"),this.initialized=!0},onApply(){this.onAutoApply()},async onAutoApply(){try{await k.create({type:u.USAGE,scope:d.GLOBAL,user_id:this.$store.getters.user.id}),this.applying=!1,await this.$store.dispatch("getApplications"),this.showWelcomeToast()}catch(t){t?.response?.data?.code===x?await this.$store.dispatch("getApplications"):y.error(this.$t("application.message.applyFailed"))}},showWelcomeToast(){const t=this.$store.state.applications?.[0],i=Math.floor(t?.remaining_amount??0),o=i>0?this.$t("application.message.welcomeWithCredits",{credits:i}):this.$t("application.message.welcomeNoCredits");y({message:o,type:"success",duration:6e3,showClose:!0})}}}),Q={class:"wrapper"};function X(t,i,o,s,p,n){const e=a("router-view"),c=a("navigator"),g=a("application-status"),b=a("application-confirm");return A(),V("div",Q,[l(e,{class:"main"}),l(c,{class:"navigator",direction:t.mobile?"row":"column"},null,8,["direction"]),t.application?(A(),_(g,{key:0,class:"status-floating fixed right-2 z-[200]",application:t.application,applications:t.applications,"show-price":!1,authenticated:!!t.$store.state.token.access,service:t.service,onSelect:i[0]||(i[0]=r=>t.$store.dispatch(`${t.appName}/setApplication`,r))},null,8,["application","applications","authenticated","service"])):P("",!0),l(b,{modelValue:t.applying,"onUpdate:modelValue":i[1]||(i[1]=r=>t.applying=r),modelModifiers:{visible:!0},onApply:t.onApply},null,8,["modelValue","onApply"])])}const ni=v(K,[["render",X],["__scopeId","data-v-d59ada2a"]]);export{ni as default};
@@ -1 +1 @@
1
- import{L as A}from"./Hailuo-BxxRf4bb.js";import{F as R}from"./index.es-CLQR2iBw.js";import{bp as T,H as k,ay as B,b7 as L}from"./index-CVH6GWSn.js";import{u as D}from"./uploadTrackerMixin--N-yU8Tl.js";import{a as F}from"./vendor-axios-B8_nURbH.js";import{E as S}from"./index-DpLV-Pq9.js";import{E as p}from"./index-CisFWmyE.js";import{d as U,H as l,E as t,C as i,F as s,y as a,I as m,J as f,x as b,Q as z,D as n,q as r,M as O,O as N,N as P}from"./vendor-vue-NSDaktjZ.js";import{E as j}from"./index-BOikF7Vg.js";import{E as q}from"./index-B3XMfsr2.js";import{a as G,E as H}from"./index-DMefWGOk.js";import{E as X}from"./index-EBzcwoVz.js";import{C as Y}from"./CopyToClipboard-Ih2qsYgN.js";import{E as J}from"./index-br52C4yM.js";import{E as Q}from"./index-BizFhdaE.js";import{B as Z}from"./BotPlaceholder-B-UqCz8R.js";import{T as K}from"./TabSwitcher-D84M8GkF.js";import{b as W}from"./errorCode-Cqj9Td_Z.js";import"./index-DJjyFLlw.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./use-form-item-BV_L9kB7.js";import"./index-BuyEbX8F.js";import"./typescript-BXdqla6u.js";import"./index-BsWkCEVF.js";import"./_baseClone-CD4xkhO5.js";import"./_Uint8Array-Cj-LmGzx.js";import"./index-Dw6ZevFg.js";import"./_initCloneObject-CIlwXpy7.js";import"./isEqual-CWBDsFs3.js";import"./validator-C6fRYUzr.js";import"./index-CLOxJQ_9.js";import"./index-BLjywj98.js";import"./index-ByCbBTje.js";import"./debounce-zyhh1kFW.js";import"./index-DAZIhRrh.js";import"./index-rn5VBDzX.js";import"./strings-beZM2Y-f.js";import"./isPlainObject-Bsj5BOyI.js";const I=4,x=90,ee=U({name:"FishRecorder",components:{ElButton:S,FontAwesomeIcon:R},emits:["done","cancel","update:script"],data(){return{state:"idle",scriptIndex:0,seconds:0,timerId:0,maxTimerId:0,mediaRecorder:null,stream:null,chunks:[],recordedBlob:null,recordedUrl:"",uploading:!1}},computed:{formattedTime(){const e=Math.floor(this.seconds/60),o=this.seconds%60;return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`},currentScript(){const e=`fish.script.passage${this.scriptIndex%I+1}`;return this.$t(e)}},beforeUnmount(){this.cleanup()},mounted(){this.$emit("update:script",this.currentScript)},methods:{nextScript(){this.scriptIndex=(this.scriptIndex+1)%I,this.$emit("update:script",this.currentScript)},async startRecord(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){p.error(this.$t("fish.message.recorderUnsupported"));return}try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(o){const v=o?.name==="NotAllowedError"||o?.name==="PermissionDeniedError";p.error(this.$t(v?"fish.message.micDenied":"fish.message.micError"));return}this.chunks=[];const e=this.pickMimeType();try{this.mediaRecorder=e?new MediaRecorder(this.stream,{mimeType:e}):new MediaRecorder(this.stream)}catch{this.mediaRecorder=new MediaRecorder(this.stream)}this.mediaRecorder.ondataavailable=o=>{o.data&&o.data.size>0&&this.chunks.push(o.data)},this.mediaRecorder.onstop=()=>{const o=new Blob(this.chunks,{type:this.mediaRecorder?.mimeType||"audio/webm"});this.recordedBlob=o,this.recordedUrl=URL.createObjectURL(o),this.state="recorded",this.releaseStream()},this.mediaRecorder.start(),this.state="recording",this.seconds=0,this.timerId=window.setInterval(()=>{this.seconds++},1e3),this.maxTimerId=window.setTimeout(()=>{this.state==="recording"&&this.stopRecord()},x*1e3)},stopRecord(){this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),window.clearInterval(this.timerId),window.clearTimeout(this.maxTimerId)},reset(){this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl),this.recordedUrl="",this.recordedBlob=null,this.state="idle",this.seconds=0},onCancel(){this.cleanup(),this.$emit("cancel")},cleanup(){this.stopRecord(),this.releaseStream(),this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl)},releaseStream(){this.stream?.getTracks().forEach(e=>e.stop()),this.stream=null},pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg"];for(const o of e)if(typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?.(o))return o},extensionForMime(e){return e.includes("webm")?"webm":e.includes("mp4")?"m4a":e.includes("ogg")?"ogg":e.includes("wav")?"wav":"mp3"},async useRecording(){if(this.recordedBlob){if(this.seconds<3){p.warning(this.$t("fish.message.recordingTooShort"));return}this.uploading=!0;try{const e=this.$store.state.token?.access,o=this.extensionForMime(this.recordedBlob.type||""),v=new File([this.recordedBlob],`recording-${Date.now()}.${o}`,{type:this.recordedBlob.type||"audio/webm"}),h=new FormData;h.append("file",v);const{data:y}=await F.post(`${T()}/api/v1/files/`,h,{headers:{Authorization:`Bearer ${e}`}}),_=y?.file_url;if(!_){p.error(this.$t("fish.message.uploadError"));return}this.$emit("done",{url:_,text:this.currentScript})}catch(e){p.error(this.$t("fish.message.uploadError")),console.error("recorder upload failed",e)}finally{this.uploading=!1}}}}}),oe={class:"recorder"},te={key:0,class:"script"},se={class:"script-header"},ie={class:"label"},re={class:"script-text"},ae={class:"controls"},ne={class:"status"},le={class:"hint"},de={key:1,class:"preview"},ce=["src"],me={class:"preview-actions"},ue={class:"footer"};function pe(e,o,v,h,y,_){const c=n("font-awesome-icon"),d=n("el-button");return r(),l("div",oe,[e.state!=="recorded"?(r(),l("div",te,[t("div",se,[i(c,{icon:"fa-solid fa-book-open",class:"icon mr-1"}),t("span",ie,s(e.$t("fish.description.readScript")),1),i(d,{link:"",size:"small",class:"ml-auto",disabled:e.state==="recording",onClick:e.nextScript},{default:a(()=>[i(c,{icon:"fa-solid fa-shuffle",class:"mr-1"}),m(" "+s(e.$t("fish.button.nextScript")),1)]),_:1},8,["disabled","onClick"])]),t("p",re,s(e.currentScript),1)])):f("",!0),t("div",ae,[e.state==="idle"?(r(),b(d,{key:0,type:"danger",circle:"",size:"large",title:e.$t("fish.button.startRecord"),onClick:e.startRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-microphone"})]),_:1},8,["title","onClick"])):e.state==="recording"?(r(),b(d,{key:1,type:"warning",circle:"",size:"large",title:e.$t("fish.button.stopRecord"),onClick:e.stopRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-stop"})]),_:1},8,["title","onClick"])):f("",!0),t("div",ne,[t("span",{class:z(["timer",e.state==="recording"?"live":""])},s(e.formattedTime),3),t("span",le,s(e.state==="idle"?e.$t("fish.description.recorderIdle"):e.state==="recording"?e.$t("fish.description.recorderRecording"):e.$t("fish.description.recorderRecorded")),1)])]),e.state==="recorded"&&e.recordedUrl?(r(),l("div",de,[t("audio",{src:e.recordedUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ce),t("div",me,[i(d,{size:"small",disabled:e.uploading,onClick:e.reset},{default:a(()=>[i(c,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.reRecord")),1)]),_:1},8,["disabled","onClick"]),i(d,{size:"small",type:"primary",loading:e.uploading,onClick:e.useRecording},{default:a(()=>[i(c,{icon:"fa-solid fa-check",class:"mr-1"}),m(" "+s(e.$t("fish.button.useRecording")),1)]),_:1},8,["loading","onClick"])])])):f("",!0),t("div",ue,[i(d,{link:"",size:"small",disabled:e.uploading||e.state==="recording",onClick:e.onCancel},{default:a(()=>[m(s(e.$t("fish.button.cancel")),1)]),_:1},8,["disabled","onClick"])])])}const fe=k(ee,[["render",pe],["__scopeId","data-v-1958e4a1"]]),he=50*1024*1024,M=()=>({title:"",description:"",texts:"",voicesUrl:"",visibility:"unlist",trainMode:"fast",enhanceAudio:!0,generateSample:!1}),ve=U({name:"FishModelConfigPanel",components:{ElButton:S,ElInput:X,ElRadioButton:H,ElRadioGroup:G,ElSwitch:q,ElUpload:j,FontAwesomeIcon:R,Recorder:fe},mixins:[D],emits:["create"],data(){return{form:M(),fileList:[],uploading:!1,creating:!1,recording:!1,textsAuto:!0}},computed:{uploadUrl(){return T()+"/api/v1/files/"},uploadHeaders(){return{Authorization:`Bearer ${this.$store.state.token?.access}`}},canCreate(){return!!this.form.title.trim()&&!!this.form.voicesUrl&&!this.uploading&&!this.creating},supportsRecorder(){return!!(typeof navigator<"u"?navigator.mediaDevices:void 0)?.getUserMedia&&typeof MediaRecorder<"u"}},methods:{onBeforeUpload(e){return e.size>he?(p.warning(this.$t("fish.message.audioSizeExceed")),!1):(this.uploading=!0,!0)},onExceed(){p.warning(this.$t("fish.message.audioOnlyOne"))},onUploadError(){this.uploading=!1,p.error(this.$t("fish.message.uploadError"))},onUploadSuccess(e,o,v){this.uploading=!1;const h=e?.file_url;if(!h){p.error(this.$t("fish.message.uploadError")),this.fileList=[];return}this.form.voicesUrl=h,this.fileList=v},onRecorded(e){this.form.voicesUrl=e.url,this.recording=!1,e.text&&this.textsAuto&&(this.form.texts=e.text)},onStartRecord(){this.recording=!0,this.textsAuto=!this.form.texts.trim()},onScriptChange(e){this.textsAuto&&this.recording&&(this.form.texts=e)},onTextsInput(){this.textsAuto=!1},clearAudio(){this.form.voicesUrl="",this.fileList=[]},onCreate(){const e=this.form.title.trim();if(!e){p.warning(this.$t("fish.message.titleRequired"));return}if(!this.form.voicesUrl){p.warning(this.$t("fish.message.audioRequired"));return}const o={title:e,voices:this.form.voicesUrl,visibility:this.form.visibility,train_mode:this.form.trainMode,enhance_audio_quality:this.form.enhanceAudio,generate_sample:this.form.generateSample};this.form.description.trim()&&(o.description=this.form.description.trim()),this.form.texts.trim()&&(o.texts=[this.form.texts.trim()]),this.creating=!0,this.$emit("create",o),setTimeout(()=>{this.creating=!1,this.form=M(),this.fileList=[]},600)}}}),$e={class:"flex flex-col h-full"},ge={class:"flex-1 overflow-y-auto p-5"},_e={class:"field-block mb-4"},be={class:"title font-bold"},ye={class:"field-block mb-4"},we={class:"flex items-baseline justify-between mb-1"},ke={class:"title font-bold"},Ue={key:0,class:"muted"},Re={class:"hint"},Ce={key:0,class:"audio-actions"},Se={key:1,class:"hint warn"},Ve={key:3,class:"mt-2"},Ee=["src"],Ie={class:"ready-actions"},Me={class:"field-block mb-4"},Te={class:"title font-bold"},Ae={class:"hint"},Be={class:"field-block mb-4"},Le={class:"title font-bold"},De={class:"field-block mb-4"},Fe={class:"title font-bold"},ze={class:"field-block mb-4"},Oe={class:"title font-bold"},Ne={class:"field-block mb-3"},Pe={class:"field-row"},je={class:"title font-bold"},qe={class:"hint mt-0 mb-0"},Ge={class:"field-block mb-2"},He={class:"field-row"},Xe={class:"title font-bold"},Ye={class:"hint mt-0 mb-0"},Je={class:"flex flex-col items-center justify-center px-5 pb-5"};function Qe(e,o,v,h,y,_){const c=n("el-input"),d=n("font-awesome-icon"),$=n("el-button"),g=n("el-upload"),C=n("recorder"),w=n("el-radio-button"),V=n("el-radio-group"),E=n("el-switch");return r(),l("div",$e,[t("div",ge,[t("div",_e,[t("h2",be,[m(s(e.$t("fish.name.voiceTitle"))+" ",1),o[9]||(o[9]=t("span",{class:"required"},"*",-1))]),i(c,{modelValue:e.form.title,"onUpdate:modelValue":o[0]||(o[0]=u=>e.form.title=u),placeholder:e.$t("fish.placeholder.voiceTitle"),maxlength:"60"},null,8,["modelValue","placeholder"])]),t("div",ye,[t("div",we,[t("h2",ke,[m(s(e.$t("fish.name.referenceAudio"))+" ",1),o[10]||(o[10]=t("span",{class:"required"},"*",-1))]),!e.form.voicesUrl&&!e.recording?(r(),l("span",Ue,s(e.$t("fish.description.audioRequired")),1)):f("",!0)]),t("p",Re,s(e.$t("fish.description.uploadAudio")),1),!e.form.voicesUrl&&!e.recording?(r(),l("div",Ce,[i(g,{"file-list":e.fileList,"onUpdate:fileList":o[1]||(o[1]=u=>e.fileList=u),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,.ogg,.webm,audio/*","show-file-list":!1,"on-exceed":e.onExceed,"on-error":e.onUploadError,"on-success":e.onUploadSuccess,"before-upload":e.onBeforeUpload,headers:e.uploadHeaders},{default:a(()=>[i($,{type:"primary",plain:"",round:"",loading:e.uploading},{default:a(()=>[i(d,{icon:"fa-solid fa-upload",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.uploadAudio")),1)]),_:1},8,["loading"])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","before-upload","headers"]),i($,{type:"primary",round:"",disabled:!e.supportsRecorder,onClick:e.onStartRecord},{default:a(()=>[i(d,{icon:"fa-solid fa-microphone",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.recordAudio")),1)]),_:1},8,["disabled","onClick"])])):f("",!0),!e.supportsRecorder&&!e.form.voicesUrl&&!e.recording?(r(),l("p",Se,s(e.$t("fish.message.recorderUnsupported")),1)):f("",!0),e.recording?(r(),b(C,{key:2,class:"mt-2",onDone:e.onRecorded,onCancel:o[2]||(o[2]=u=>e.recording=!1),"onUpdate:script":e.onScriptChange},null,8,["onDone","onUpdate:script"])):f("",!0),e.form.voicesUrl&&!e.recording?(r(),l("div",Ve,[t("audio",{src:e.form.voicesUrl,controls:"",preload:"metadata",class:"w-full"},null,8,Ee),t("div",Ie,[i($,{link:"",size:"small",onClick:e.clearAudio},{default:a(()=>[i(d,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.replaceAudio")),1)]),_:1},8,["onClick"])])])):f("",!0)]),t("div",Me,[t("h2",Te,s(e.$t("fish.name.audioTexts")),1),t("p",Ae,s(e.$t("fish.description.audioTexts")),1),i(c,{modelValue:e.form.texts,"onUpdate:modelValue":o[3]||(o[3]=u=>e.form.texts=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.audioTexts"),maxlength:"500",onInput:e.onTextsInput},null,8,["modelValue","placeholder","onInput"])]),t("div",Be,[t("h2",Le,s(e.$t("fish.name.voiceDescription")),1),i(c,{modelValue:e.form.description,"onUpdate:modelValue":o[4]||(o[4]=u=>e.form.description=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.voiceDescription"),maxlength:"500"},null,8,["modelValue","placeholder"])]),t("div",De,[t("h2",Fe,s(e.$t("fish.name.visibility")),1),i(V,{modelValue:e.form.visibility,"onUpdate:modelValue":o[5]||(o[5]=u=>e.form.visibility=u),size:"small"},{default:a(()=>[i(w,{label:"private",value:"private"},{default:a(()=>[m(s(e.$t("fish.value.private")),1)]),_:1}),i(w,{label:"unlist",value:"unlist"},{default:a(()=>[m(s(e.$t("fish.value.unlist")),1)]),_:1}),i(w,{label:"public",value:"public"},{default:a(()=>[m(s(e.$t("fish.value.public")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",ze,[t("h2",Oe,s(e.$t("fish.name.trainMode")),1),i(V,{modelValue:e.form.trainMode,"onUpdate:modelValue":o[6]||(o[6]=u=>e.form.trainMode=u),size:"small"},{default:a(()=>[i(w,{label:"fast",value:"fast"},{default:a(()=>[m(s(e.$t("fish.value.trainModeFast")),1)]),_:1}),i(w,{label:"precise",value:"precise"},{default:a(()=>[m(s(e.$t("fish.value.trainModePrecise")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",Ne,[t("div",Pe,[t("h2",je,s(e.$t("fish.name.enhanceAudio")),1),i(E,{modelValue:e.form.enhanceAudio,"onUpdate:modelValue":o[7]||(o[7]=u=>e.form.enhanceAudio=u)},null,8,["modelValue"])]),t("p",qe,s(e.$t("fish.description.enhanceAudio")),1)]),t("div",Ge,[t("div",He,[t("h2",Xe,s(e.$t("fish.name.generateSample")),1),i(E,{modelValue:e.form.generateSample,"onUpdate:modelValue":o[8]||(o[8]=u=>e.form.generateSample=u)},null,8,["modelValue"])]),t("p",Ye,s(e.$t("fish.description.generateSample")),1)])]),t("div",Je,[i($,{type:"primary",class:"btn w-full",round:"",disabled:!e.canCreate||e.creating,loading:e.creating,onClick:e.onCreate},{default:a(()=>[i(d,{icon:"fa-solid fa-magic",class:"mr-2"}),m(" "+s(e.$t("fish.button.createModel")),1)]),_:1},8,["disabled","loading","onClick"])])])}const Ze=k(ve,[["render",Qe],["__scopeId","data-v-d8fc0e55"]]),Ke=U({name:"FishVoiceCard",components:{ElAlert:Q,ElButton:S,ElImage:J,CopyToClipboard:Y,FontAwesomeIcon:R},props:{modelValue:{type:Object,required:!0}},computed:{sampleAudioUrl(){const e=this.modelValue?.samples;if(e?.length)return e[0]?.audio},voiceId(){const e=this.modelValue;return(e?.id||e?._id||e?.reference_id||"").toString()},coverSrc(){const e=this.modelValue?.cover_image;return e&&typeof e=="string"?e:void 0},createdAtLabel(){const e=this.modelValue?.created_at;if(e==null||e==="")return null;const o=typeof e=="number"?e:parseFloat(String(e));return!Number.isFinite(o)||o<=0?null:this.$dayjs.format(""+new Date(o*1e3))}},methods:{onUseVoice(){const e=this.voiceId;e&&(this.$store.commit("fish/setConfig",{...this.$store.state.fish?.config,reference_id:e}),this.$router.push({name:B}))}}}),We={class:"card"},xe={class:"left"},eo={class:"main"},oo={class:"header"},to={class:"title"},so={key:0,class:"datetime"},io={key:0,class:"description"},ro={key:1,class:"sample mt-2"},ao=["src"],no={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},lo={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},co={class:"operations mt-2"};function mo(e,o,v,h,y,_){const c=n("el-image"),d=n("font-awesome-icon"),$=n("copy-to-clipboard"),g=n("el-alert"),C=n("el-button");return r(),l("div",We,[t("div",xe,[e.coverSrc?(r(),b(c,{key:0,src:e.coverSrc,class:"cover",fit:"cover"},{error:a(()=>[i(c,{src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"})]),placeholder:a(()=>[...o[0]||(o[0]=[t("div",{class:"cover placeholder"},null,-1)])]),_:1},8,["src"])):(r(),b(c,{key:1,src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"}))]),t("div",eo,[t("div",oo,[t("span",to,s(e.modelValue?.title||e.$t("fish.name.untitledVoice")),1),e.createdAtLabel?(r(),l("span",so,s(e.createdAtLabel),1)):f("",!0)]),e.modelValue?.description?(r(),l("p",io,s(e.modelValue?.description),1)):f("",!0),e.sampleAudioUrl?(r(),l("div",ro,[t("audio",{src:e.sampleAudioUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ao)])):f("",!0),i(g,{closable:!1,class:"mt-2 success"},{default:a(()=>[e.voiceId?(r(),l("p",no,[i(d,{icon:"fa-solid fa-microphone",class:"mr-1"}),m(" "+s(e.$t("fish.name.referenceId"))+": "+s(e.voiceId)+" ",1),i($,{content:e.voiceId},null,8,["content"])])):f("",!0),e.modelValue?.visibility?(r(),l("p",lo,[i(d,{icon:"fa-solid fa-eye",class:"mr-1"}),m(" "+s(e.$t("fish.name.visibility"))+": "+s(e.modelValue?.visibility),1)])):f("",!0)]),_:1}),t("div",co,[i(C,{type:"primary",size:"small",plain:"",disabled:!e.voiceId,onClick:O(e.onUseVoice,["stop"])},{default:a(()=>[i(d,{icon:"fa-solid fa-volume-high",class:"mr-1"}),m(" "+s(e.$t("fish.button.useVoice")),1)]),_:1},8,["disabled","onClick"])])])])}const uo=k(Ke,[["render",mo],["__scopeId","data-v-629e2d04"]]),po=U({name:"FishModelListPanel",components:{VoiceCard:uo,BotPlaceholder:Z,FontAwesomeIcon:R},props:{loading:{type:Boolean,default:!1}},computed:{voices(){return this.$store.state.fish?.voices}}}),fo={class:"model-list-panel flex flex-col h-full"},ho={class:"header"},vo={class:"title"},$o={key:0,class:"count"},go={class:"body flex-1 min-h-0"},_o={key:0,class:"h-full"},bo={key:1,class:"w-full h-full flex flex-col items-center justify-center text-center px-6"},yo={class:"empty-title"},wo={class:"empty-hint"},ko={key:2,class:"w-full h-full overflow-y-auto pr-1"};function Uo(e,o,v,h,y,_){const c=n("bot-placeholder"),d=n("font-awesome-icon"),$=n("voice-card");return r(),l("div",fo,[t("header",ho,[t("h2",vo,s(e.$t("fish.title.myVoices")),1),e.voices?.length?(r(),l("span",$o,s(e.voices?.length),1)):f("",!0)]),t("div",go,[e.voices===void 0?(r(),l("div",_o,[i(c)])):e.voices.length===0?(r(),l("div",bo,[i(d,{icon:"fa-solid fa-microphone-lines",class:"empty-icon"}),t("p",yo,s(e.$t("fish.title.noVoicesYet")),1),t("p",wo,s(e.$t("fish.description.noVoicesYet")),1)])):(r(),l("div",ko,[(r(!0),l(N,null,P(e.voices,g=>(r(),b($,{key:g.id,"model-value":g},null,8,["model-value"]))),128))]))])])}const Ro=k(po,[["render",Uo],["__scopeId","data-v-4aab2294"]]),Co=U({name:"FishModelIndex",components:{ModelConfigPanel:Ze,Layout:A,ModelListPanel:Ro,TabSwitcher:K},inject:["initialized"],data(){return{loading:!1}},computed:{credential(){return this.$store.state.fish?.credential}},watch:{initialized:{async handler(e){e&&await this.onGetVoices()},immediate:!0}},async mounted(){await this.onGetService()},methods:{async onGetService(){await this.$store.dispatch("fish/getService")},async onGetVoices(){await this.$store.dispatch("fish/getVoices")},async onCreate(e){const o=this.credential?.token;if(!o){console.error("no token specified");return}this.loading=!0,p.info(this.$t("fish.message.creatingModel"));try{await L.createModel(e,{token:o}),p.success(this.$t("fish.message.createModelSuccess")),await this.onGetVoices()}catch(v){const h=v?.response?.data;h?.error?.code===W?p.error(this.$t("fish.message.usedUp")):p.error(h?.error?.message||this.$t("fish.message.createModelFailed"))}finally{this.loading=!1}}}}),So={class:"flex flex-col h-full"},Vo={class:"flex-1 min-h-0"};function Eo(e,o,v,h,y,_){const c=n("tab-switcher"),d=n("model-config-panel"),$=n("model-list-panel"),g=n("layout");return r(),b(g,null,{config:a(()=>[t("div",So,[i(c),t("div",Vo,[i(d,{onCreate:e.onCreate},null,8,["onCreate"])])])]),result:a(()=>[i($,{loading:e.loading},null,8,["loading"])]),_:1})}const ht=k(Co,[["render",Eo]]);export{ht as default};
1
+ import{L as A}from"./Hailuo-DNPxYcb4.js";import{F as R}from"./index.es-uCMW2I5V.js";import{bp as T,H as k,ay as B,b7 as L}from"./index-C4AD7fSs.js";import{u as D}from"./uploadTrackerMixin--N-yU8Tl.js";import{a as F}from"./vendor-axios-B8_nURbH.js";import{E as S}from"./index-DNkBxdDH.js";import{E as p}from"./index-0twyrQyu.js";import{d as U,H as l,E as t,C as i,F as s,y as a,I as m,J as f,x as b,Q as z,D as n,q as r,M as O,O as N,N as P}from"./vendor-vue-NSDaktjZ.js";import{E as j}from"./index-Cq9Xgk1b.js";import{E as q}from"./index-BM1d7Rsc.js";import{a as G,E as H}from"./index-C_mlP_bt.js";import{E as X}from"./index-Chlz7iYD.js";import{C as Y}from"./CopyToClipboard-Q-XQyK-j.js";import{E as J}from"./index-A3OooEmk.js";import{E as Q}from"./index-CvRjpO-T.js";import{B as Z}from"./BotPlaceholder-CMYMEEaw.js";import{T as K}from"./TabSwitcher-BwuvjkHa.js";import{b as W}from"./errorCode-Cqj9Td_Z.js";import"./index-CsKdYMSj.js";import"./vendor-dayjs-v0j1UNZp.js";import"./vendor-vue-router-Df5ITouH.js";import"./use-form-item-CpjZhom3.js";import"./index-BuyEbX8F.js";import"./typescript-DdRrnJs7.js";import"./index-Dd3H2oaD.js";import"./_baseClone-CXvBLrp-.js";import"./_Uint8Array-CoBPw-4B.js";import"./index-idQT3YsL.js";import"./_initCloneObject-jUCkAHqV.js";import"./isEqual-C5Nb4Pdq.js";import"./validator-BPNvyIRK.js";import"./index-Dqi3fani.js";import"./index-BLjywj98.js";import"./index-DNsnzdeL.js";import"./debounce-CpFyKjsm.js";import"./index-Cx8Ul4AK.js";import"./index-DG52arNb.js";import"./strings-beZM2Y-f.js";import"./isPlainObject-BSq8Hp0j.js";const I=4,x=90,ee=U({name:"FishRecorder",components:{ElButton:S,FontAwesomeIcon:R},emits:["done","cancel","update:script"],data(){return{state:"idle",scriptIndex:0,seconds:0,timerId:0,maxTimerId:0,mediaRecorder:null,stream:null,chunks:[],recordedBlob:null,recordedUrl:"",uploading:!1}},computed:{formattedTime(){const e=Math.floor(this.seconds/60),o=this.seconds%60;return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`},currentScript(){const e=`fish.script.passage${this.scriptIndex%I+1}`;return this.$t(e)}},beforeUnmount(){this.cleanup()},mounted(){this.$emit("update:script",this.currentScript)},methods:{nextScript(){this.scriptIndex=(this.scriptIndex+1)%I,this.$emit("update:script",this.currentScript)},async startRecord(){if(!navigator.mediaDevices?.getUserMedia||typeof MediaRecorder>"u"){p.error(this.$t("fish.message.recorderUnsupported"));return}try{this.stream=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(o){const v=o?.name==="NotAllowedError"||o?.name==="PermissionDeniedError";p.error(this.$t(v?"fish.message.micDenied":"fish.message.micError"));return}this.chunks=[];const e=this.pickMimeType();try{this.mediaRecorder=e?new MediaRecorder(this.stream,{mimeType:e}):new MediaRecorder(this.stream)}catch{this.mediaRecorder=new MediaRecorder(this.stream)}this.mediaRecorder.ondataavailable=o=>{o.data&&o.data.size>0&&this.chunks.push(o.data)},this.mediaRecorder.onstop=()=>{const o=new Blob(this.chunks,{type:this.mediaRecorder?.mimeType||"audio/webm"});this.recordedBlob=o,this.recordedUrl=URL.createObjectURL(o),this.state="recorded",this.releaseStream()},this.mediaRecorder.start(),this.state="recording",this.seconds=0,this.timerId=window.setInterval(()=>{this.seconds++},1e3),this.maxTimerId=window.setTimeout(()=>{this.state==="recording"&&this.stopRecord()},x*1e3)},stopRecord(){this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),window.clearInterval(this.timerId),window.clearTimeout(this.maxTimerId)},reset(){this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl),this.recordedUrl="",this.recordedBlob=null,this.state="idle",this.seconds=0},onCancel(){this.cleanup(),this.$emit("cancel")},cleanup(){this.stopRecord(),this.releaseStream(),this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl)},releaseStream(){this.stream?.getTracks().forEach(e=>e.stop()),this.stream=null},pickMimeType(){const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg"];for(const o of e)if(typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported?.(o))return o},extensionForMime(e){return e.includes("webm")?"webm":e.includes("mp4")?"m4a":e.includes("ogg")?"ogg":e.includes("wav")?"wav":"mp3"},async useRecording(){if(this.recordedBlob){if(this.seconds<3){p.warning(this.$t("fish.message.recordingTooShort"));return}this.uploading=!0;try{const e=this.$store.state.token?.access,o=this.extensionForMime(this.recordedBlob.type||""),v=new File([this.recordedBlob],`recording-${Date.now()}.${o}`,{type:this.recordedBlob.type||"audio/webm"}),h=new FormData;h.append("file",v);const{data:y}=await F.post(`${T()}/api/v1/files/`,h,{headers:{Authorization:`Bearer ${e}`}}),_=y?.file_url;if(!_){p.error(this.$t("fish.message.uploadError"));return}this.$emit("done",{url:_,text:this.currentScript})}catch(e){p.error(this.$t("fish.message.uploadError")),console.error("recorder upload failed",e)}finally{this.uploading=!1}}}}}),oe={class:"recorder"},te={key:0,class:"script"},se={class:"script-header"},ie={class:"label"},re={class:"script-text"},ae={class:"controls"},ne={class:"status"},le={class:"hint"},de={key:1,class:"preview"},ce=["src"],me={class:"preview-actions"},ue={class:"footer"};function pe(e,o,v,h,y,_){const c=n("font-awesome-icon"),d=n("el-button");return r(),l("div",oe,[e.state!=="recorded"?(r(),l("div",te,[t("div",se,[i(c,{icon:"fa-solid fa-book-open",class:"icon mr-1"}),t("span",ie,s(e.$t("fish.description.readScript")),1),i(d,{link:"",size:"small",class:"ml-auto",disabled:e.state==="recording",onClick:e.nextScript},{default:a(()=>[i(c,{icon:"fa-solid fa-shuffle",class:"mr-1"}),m(" "+s(e.$t("fish.button.nextScript")),1)]),_:1},8,["disabled","onClick"])]),t("p",re,s(e.currentScript),1)])):f("",!0),t("div",ae,[e.state==="idle"?(r(),b(d,{key:0,type:"danger",circle:"",size:"large",title:e.$t("fish.button.startRecord"),onClick:e.startRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-microphone"})]),_:1},8,["title","onClick"])):e.state==="recording"?(r(),b(d,{key:1,type:"warning",circle:"",size:"large",title:e.$t("fish.button.stopRecord"),onClick:e.stopRecord},{default:a(()=>[i(c,{icon:"fa-solid fa-stop"})]),_:1},8,["title","onClick"])):f("",!0),t("div",ne,[t("span",{class:z(["timer",e.state==="recording"?"live":""])},s(e.formattedTime),3),t("span",le,s(e.state==="idle"?e.$t("fish.description.recorderIdle"):e.state==="recording"?e.$t("fish.description.recorderRecording"):e.$t("fish.description.recorderRecorded")),1)])]),e.state==="recorded"&&e.recordedUrl?(r(),l("div",de,[t("audio",{src:e.recordedUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ce),t("div",me,[i(d,{size:"small",disabled:e.uploading,onClick:e.reset},{default:a(()=>[i(c,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.reRecord")),1)]),_:1},8,["disabled","onClick"]),i(d,{size:"small",type:"primary",loading:e.uploading,onClick:e.useRecording},{default:a(()=>[i(c,{icon:"fa-solid fa-check",class:"mr-1"}),m(" "+s(e.$t("fish.button.useRecording")),1)]),_:1},8,["loading","onClick"])])])):f("",!0),t("div",ue,[i(d,{link:"",size:"small",disabled:e.uploading||e.state==="recording",onClick:e.onCancel},{default:a(()=>[m(s(e.$t("fish.button.cancel")),1)]),_:1},8,["disabled","onClick"])])])}const fe=k(ee,[["render",pe],["__scopeId","data-v-1958e4a1"]]),he=50*1024*1024,M=()=>({title:"",description:"",texts:"",voicesUrl:"",visibility:"unlist",trainMode:"fast",enhanceAudio:!0,generateSample:!1}),ve=U({name:"FishModelConfigPanel",components:{ElButton:S,ElInput:X,ElRadioButton:H,ElRadioGroup:G,ElSwitch:q,ElUpload:j,FontAwesomeIcon:R,Recorder:fe},mixins:[D],emits:["create"],data(){return{form:M(),fileList:[],uploading:!1,creating:!1,recording:!1,textsAuto:!0}},computed:{uploadUrl(){return T()+"/api/v1/files/"},uploadHeaders(){return{Authorization:`Bearer ${this.$store.state.token?.access}`}},canCreate(){return!!this.form.title.trim()&&!!this.form.voicesUrl&&!this.uploading&&!this.creating},supportsRecorder(){return!!(typeof navigator<"u"?navigator.mediaDevices:void 0)?.getUserMedia&&typeof MediaRecorder<"u"}},methods:{onBeforeUpload(e){return e.size>he?(p.warning(this.$t("fish.message.audioSizeExceed")),!1):(this.uploading=!0,!0)},onExceed(){p.warning(this.$t("fish.message.audioOnlyOne"))},onUploadError(){this.uploading=!1,p.error(this.$t("fish.message.uploadError"))},onUploadSuccess(e,o,v){this.uploading=!1;const h=e?.file_url;if(!h){p.error(this.$t("fish.message.uploadError")),this.fileList=[];return}this.form.voicesUrl=h,this.fileList=v},onRecorded(e){this.form.voicesUrl=e.url,this.recording=!1,e.text&&this.textsAuto&&(this.form.texts=e.text)},onStartRecord(){this.recording=!0,this.textsAuto=!this.form.texts.trim()},onScriptChange(e){this.textsAuto&&this.recording&&(this.form.texts=e)},onTextsInput(){this.textsAuto=!1},clearAudio(){this.form.voicesUrl="",this.fileList=[]},onCreate(){const e=this.form.title.trim();if(!e){p.warning(this.$t("fish.message.titleRequired"));return}if(!this.form.voicesUrl){p.warning(this.$t("fish.message.audioRequired"));return}const o={title:e,voices:this.form.voicesUrl,visibility:this.form.visibility,train_mode:this.form.trainMode,enhance_audio_quality:this.form.enhanceAudio,generate_sample:this.form.generateSample};this.form.description.trim()&&(o.description=this.form.description.trim()),this.form.texts.trim()&&(o.texts=[this.form.texts.trim()]),this.creating=!0,this.$emit("create",o),setTimeout(()=>{this.creating=!1,this.form=M(),this.fileList=[]},600)}}}),$e={class:"flex flex-col h-full"},ge={class:"flex-1 overflow-y-auto p-5"},_e={class:"field-block mb-4"},be={class:"title font-bold"},ye={class:"field-block mb-4"},we={class:"flex items-baseline justify-between mb-1"},ke={class:"title font-bold"},Ue={key:0,class:"muted"},Re={class:"hint"},Ce={key:0,class:"audio-actions"},Se={key:1,class:"hint warn"},Ve={key:3,class:"mt-2"},Ee=["src"],Ie={class:"ready-actions"},Me={class:"field-block mb-4"},Te={class:"title font-bold"},Ae={class:"hint"},Be={class:"field-block mb-4"},Le={class:"title font-bold"},De={class:"field-block mb-4"},Fe={class:"title font-bold"},ze={class:"field-block mb-4"},Oe={class:"title font-bold"},Ne={class:"field-block mb-3"},Pe={class:"field-row"},je={class:"title font-bold"},qe={class:"hint mt-0 mb-0"},Ge={class:"field-block mb-2"},He={class:"field-row"},Xe={class:"title font-bold"},Ye={class:"hint mt-0 mb-0"},Je={class:"flex flex-col items-center justify-center px-5 pb-5"};function Qe(e,o,v,h,y,_){const c=n("el-input"),d=n("font-awesome-icon"),$=n("el-button"),g=n("el-upload"),C=n("recorder"),w=n("el-radio-button"),V=n("el-radio-group"),E=n("el-switch");return r(),l("div",$e,[t("div",ge,[t("div",_e,[t("h2",be,[m(s(e.$t("fish.name.voiceTitle"))+" ",1),o[9]||(o[9]=t("span",{class:"required"},"*",-1))]),i(c,{modelValue:e.form.title,"onUpdate:modelValue":o[0]||(o[0]=u=>e.form.title=u),placeholder:e.$t("fish.placeholder.voiceTitle"),maxlength:"60"},null,8,["modelValue","placeholder"])]),t("div",ye,[t("div",we,[t("h2",ke,[m(s(e.$t("fish.name.referenceAudio"))+" ",1),o[10]||(o[10]=t("span",{class:"required"},"*",-1))]),!e.form.voicesUrl&&!e.recording?(r(),l("span",Ue,s(e.$t("fish.description.audioRequired")),1)):f("",!0)]),t("p",Re,s(e.$t("fish.description.uploadAudio")),1),!e.form.voicesUrl&&!e.recording?(r(),l("div",Ce,[i(g,{"file-list":e.fileList,"onUpdate:fileList":o[1]||(o[1]=u=>e.fileList=u),name:"file",limit:1,class:"upload-wrapper",action:e.uploadUrl,accept:".mp3,.wav,.m4a,.ogg,.webm,audio/*","show-file-list":!1,"on-exceed":e.onExceed,"on-error":e.onUploadError,"on-success":e.onUploadSuccess,"before-upload":e.onBeforeUpload,headers:e.uploadHeaders},{default:a(()=>[i($,{type:"primary",plain:"",round:"",loading:e.uploading},{default:a(()=>[i(d,{icon:"fa-solid fa-upload",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.uploadAudio")),1)]),_:1},8,["loading"])]),_:1},8,["file-list","action","on-exceed","on-error","on-success","before-upload","headers"]),i($,{type:"primary",round:"",disabled:!e.supportsRecorder,onClick:e.onStartRecord},{default:a(()=>[i(d,{icon:"fa-solid fa-microphone",class:"icon mr-1"}),m(" "+s(e.$t("fish.button.recordAudio")),1)]),_:1},8,["disabled","onClick"])])):f("",!0),!e.supportsRecorder&&!e.form.voicesUrl&&!e.recording?(r(),l("p",Se,s(e.$t("fish.message.recorderUnsupported")),1)):f("",!0),e.recording?(r(),b(C,{key:2,class:"mt-2",onDone:e.onRecorded,onCancel:o[2]||(o[2]=u=>e.recording=!1),"onUpdate:script":e.onScriptChange},null,8,["onDone","onUpdate:script"])):f("",!0),e.form.voicesUrl&&!e.recording?(r(),l("div",Ve,[t("audio",{src:e.form.voicesUrl,controls:"",preload:"metadata",class:"w-full"},null,8,Ee),t("div",Ie,[i($,{link:"",size:"small",onClick:e.clearAudio},{default:a(()=>[i(d,{icon:"fa-solid fa-rotate-left",class:"mr-1"}),m(" "+s(e.$t("fish.button.replaceAudio")),1)]),_:1},8,["onClick"])])])):f("",!0)]),t("div",Me,[t("h2",Te,s(e.$t("fish.name.audioTexts")),1),t("p",Ae,s(e.$t("fish.description.audioTexts")),1),i(c,{modelValue:e.form.texts,"onUpdate:modelValue":o[3]||(o[3]=u=>e.form.texts=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.audioTexts"),maxlength:"500",onInput:e.onTextsInput},null,8,["modelValue","placeholder","onInput"])]),t("div",Be,[t("h2",Le,s(e.$t("fish.name.voiceDescription")),1),i(c,{modelValue:e.form.description,"onUpdate:modelValue":o[4]||(o[4]=u=>e.form.description=u),type:"textarea",rows:2,placeholder:e.$t("fish.placeholder.voiceDescription"),maxlength:"500"},null,8,["modelValue","placeholder"])]),t("div",De,[t("h2",Fe,s(e.$t("fish.name.visibility")),1),i(V,{modelValue:e.form.visibility,"onUpdate:modelValue":o[5]||(o[5]=u=>e.form.visibility=u),size:"small"},{default:a(()=>[i(w,{label:"private",value:"private"},{default:a(()=>[m(s(e.$t("fish.value.private")),1)]),_:1}),i(w,{label:"unlist",value:"unlist"},{default:a(()=>[m(s(e.$t("fish.value.unlist")),1)]),_:1}),i(w,{label:"public",value:"public"},{default:a(()=>[m(s(e.$t("fish.value.public")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",ze,[t("h2",Oe,s(e.$t("fish.name.trainMode")),1),i(V,{modelValue:e.form.trainMode,"onUpdate:modelValue":o[6]||(o[6]=u=>e.form.trainMode=u),size:"small"},{default:a(()=>[i(w,{label:"fast",value:"fast"},{default:a(()=>[m(s(e.$t("fish.value.trainModeFast")),1)]),_:1}),i(w,{label:"precise",value:"precise"},{default:a(()=>[m(s(e.$t("fish.value.trainModePrecise")),1)]),_:1})]),_:1},8,["modelValue"])]),t("div",Ne,[t("div",Pe,[t("h2",je,s(e.$t("fish.name.enhanceAudio")),1),i(E,{modelValue:e.form.enhanceAudio,"onUpdate:modelValue":o[7]||(o[7]=u=>e.form.enhanceAudio=u)},null,8,["modelValue"])]),t("p",qe,s(e.$t("fish.description.enhanceAudio")),1)]),t("div",Ge,[t("div",He,[t("h2",Xe,s(e.$t("fish.name.generateSample")),1),i(E,{modelValue:e.form.generateSample,"onUpdate:modelValue":o[8]||(o[8]=u=>e.form.generateSample=u)},null,8,["modelValue"])]),t("p",Ye,s(e.$t("fish.description.generateSample")),1)])]),t("div",Je,[i($,{type:"primary",class:"btn w-full",round:"",disabled:!e.canCreate||e.creating,loading:e.creating,onClick:e.onCreate},{default:a(()=>[i(d,{icon:"fa-solid fa-magic",class:"mr-2"}),m(" "+s(e.$t("fish.button.createModel")),1)]),_:1},8,["disabled","loading","onClick"])])])}const Ze=k(ve,[["render",Qe],["__scopeId","data-v-d8fc0e55"]]),Ke=U({name:"FishVoiceCard",components:{ElAlert:Q,ElButton:S,ElImage:J,CopyToClipboard:Y,FontAwesomeIcon:R},props:{modelValue:{type:Object,required:!0}},computed:{sampleAudioUrl(){const e=this.modelValue?.samples;if(e?.length)return e[0]?.audio},voiceId(){const e=this.modelValue;return(e?.id||e?._id||e?.reference_id||"").toString()},coverSrc(){const e=this.modelValue?.cover_image;return e&&typeof e=="string"?e:void 0},createdAtLabel(){const e=this.modelValue?.created_at;if(e==null||e==="")return null;const o=typeof e=="number"?e:parseFloat(String(e));return!Number.isFinite(o)||o<=0?null:this.$dayjs.format(""+new Date(o*1e3))}},methods:{onUseVoice(){const e=this.voiceId;e&&(this.$store.commit("fish/setConfig",{...this.$store.state.fish?.config,reference_id:e}),this.$router.push({name:B}))}}}),We={class:"card"},xe={class:"left"},eo={class:"main"},oo={class:"header"},to={class:"title"},so={key:0,class:"datetime"},io={key:0,class:"description"},ro={key:1,class:"sample mt-2"},ao=["src"],no={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},lo={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},co={class:"operations mt-2"};function mo(e,o,v,h,y,_){const c=n("el-image"),d=n("font-awesome-icon"),$=n("copy-to-clipboard"),g=n("el-alert"),C=n("el-button");return r(),l("div",We,[t("div",xe,[e.coverSrc?(r(),b(c,{key:0,src:e.coverSrc,class:"cover",fit:"cover"},{error:a(()=>[i(c,{src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"})]),placeholder:a(()=>[...o[0]||(o[0]=[t("div",{class:"cover placeholder"},null,-1)])]),_:1},8,["src"])):(r(),b(c,{key:1,src:"https://cdn.acedata.cloud/e40fccc727.png",class:"cover fallback",fit:"cover"}))]),t("div",eo,[t("div",oo,[t("span",to,s(e.modelValue?.title||e.$t("fish.name.untitledVoice")),1),e.createdAtLabel?(r(),l("span",so,s(e.createdAtLabel),1)):f("",!0)]),e.modelValue?.description?(r(),l("p",io,s(e.modelValue?.description),1)):f("",!0),e.sampleAudioUrl?(r(),l("div",ro,[t("audio",{src:e.sampleAudioUrl,controls:"",preload:"metadata",class:"w-full"},null,8,ao)])):f("",!0),i(g,{closable:!1,class:"mt-2 success"},{default:a(()=>[e.voiceId?(r(),l("p",no,[i(d,{icon:"fa-solid fa-microphone",class:"mr-1"}),m(" "+s(e.$t("fish.name.referenceId"))+": "+s(e.voiceId)+" ",1),i($,{content:e.voiceId},null,8,["content"])])):f("",!0),e.modelValue?.visibility?(r(),l("p",lo,[i(d,{icon:"fa-solid fa-eye",class:"mr-1"}),m(" "+s(e.$t("fish.name.visibility"))+": "+s(e.modelValue?.visibility),1)])):f("",!0)]),_:1}),t("div",co,[i(C,{type:"primary",size:"small",plain:"",disabled:!e.voiceId,onClick:O(e.onUseVoice,["stop"])},{default:a(()=>[i(d,{icon:"fa-solid fa-volume-high",class:"mr-1"}),m(" "+s(e.$t("fish.button.useVoice")),1)]),_:1},8,["disabled","onClick"])])])])}const uo=k(Ke,[["render",mo],["__scopeId","data-v-629e2d04"]]),po=U({name:"FishModelListPanel",components:{VoiceCard:uo,BotPlaceholder:Z,FontAwesomeIcon:R},props:{loading:{type:Boolean,default:!1}},computed:{voices(){return this.$store.state.fish?.voices}}}),fo={class:"model-list-panel flex flex-col h-full"},ho={class:"header"},vo={class:"title"},$o={key:0,class:"count"},go={class:"body flex-1 min-h-0"},_o={key:0,class:"h-full"},bo={key:1,class:"w-full h-full flex flex-col items-center justify-center text-center px-6"},yo={class:"empty-title"},wo={class:"empty-hint"},ko={key:2,class:"w-full h-full overflow-y-auto pr-1"};function Uo(e,o,v,h,y,_){const c=n("bot-placeholder"),d=n("font-awesome-icon"),$=n("voice-card");return r(),l("div",fo,[t("header",ho,[t("h2",vo,s(e.$t("fish.title.myVoices")),1),e.voices?.length?(r(),l("span",$o,s(e.voices?.length),1)):f("",!0)]),t("div",go,[e.voices===void 0?(r(),l("div",_o,[i(c)])):e.voices.length===0?(r(),l("div",bo,[i(d,{icon:"fa-solid fa-microphone-lines",class:"empty-icon"}),t("p",yo,s(e.$t("fish.title.noVoicesYet")),1),t("p",wo,s(e.$t("fish.description.noVoicesYet")),1)])):(r(),l("div",ko,[(r(!0),l(N,null,P(e.voices,g=>(r(),b($,{key:g.id,"model-value":g},null,8,["model-value"]))),128))]))])])}const Ro=k(po,[["render",Uo],["__scopeId","data-v-4aab2294"]]),Co=U({name:"FishModelIndex",components:{ModelConfigPanel:Ze,Layout:A,ModelListPanel:Ro,TabSwitcher:K},inject:["initialized"],data(){return{loading:!1}},computed:{credential(){return this.$store.state.fish?.credential}},watch:{initialized:{async handler(e){e&&await this.onGetVoices()},immediate:!0}},async mounted(){await this.onGetService()},methods:{async onGetService(){await this.$store.dispatch("fish/getService")},async onGetVoices(){await this.$store.dispatch("fish/getVoices")},async onCreate(e){const o=this.credential?.token;if(!o){console.error("no token specified");return}this.loading=!0,p.info(this.$t("fish.message.creatingModel"));try{await L.createModel(e,{token:o}),p.success(this.$t("fish.message.createModelSuccess")),await this.onGetVoices()}catch(v){const h=v?.response?.data;h?.error?.code===W?p.error(this.$t("fish.message.usedUp")):p.error(h?.error?.message||this.$t("fish.message.createModelFailed"))}finally{this.loading=!1}}}}),So={class:"flex flex-col h-full"},Vo={class:"flex-1 min-h-0"};function Eo(e,o,v,h,y,_){const c=n("tab-switcher"),d=n("model-config-panel"),$=n("model-list-panel"),g=n("layout");return r(),b(g,null,{config:a(()=>[t("div",So,[i(c),t("div",Vo,[i(d,{onCreate:e.onCreate},null,8,["onCreate"])])])]),result:a(()=>[i($,{loading:e.loading},null,8,["loading"])]),_:1})}const ht=k(Co,[["render",Eo]]);export{ht as default};