@acedatacloud/nexior 3.121.0 → 3.122.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 (275) hide show
  1. package/dist/assets/{Auth-CElZWvP6.js → Auth-BHnrv9lh.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-TpKY21KU.js → BotPlaceholder-BYbtHOY5.js} +1 -1
  3. package/dist/assets/{Callback-C-r4yxKO.js → Callback-CtOPZN6N.js} +1 -1
  4. package/dist/assets/{Console-Bbok-IxY.js → Console-rxq3wMKr.js} +1 -1
  5. package/dist/assets/{Consumption-Bgr4zBx6.js → Consumption-DPIDTLHM.js} +1 -1
  6. package/dist/assets/{Conversation-DdNv9hi1.js → Conversation-Cqp0DvM5.js} +1 -1
  7. package/dist/assets/{CopyToClipboard-me8LNzZz.js → CopyToClipboard-BS-OLHAb.js} +1 -1
  8. package/dist/assets/{Detail-CuW59v29.js → Detail-iGNV9xyd.js} +2 -2
  9. package/dist/assets/{EditArray-BW8IAoqp.js → EditArray-DQD1Ez_V.js} +1 -1
  10. package/dist/assets/{Extra-BgyJNecs.js → Extra-7hyk8hCr.js} +1 -1
  11. package/dist/assets/{FilePreview-DMAEYsoo.js → FilePreview-CDhab4N8.js} +1 -1
  12. package/dist/assets/{History-CcAQeAdS.js → History-B9is_Rne.js} +1 -1
  13. package/dist/assets/{IconPark.vue_vue_type_script_setup_true_lang-Dv42NzuF.js → IconPark.vue_vue_type_script_setup_true_lang-Bj1rEQTU.js} +1 -1
  14. package/dist/assets/{ImagePreview-ChsBY_yV.js → ImagePreview-vJJQ_TVt.js} +1 -1
  15. package/dist/assets/{ImageWrapper-Bmg_vx2-.js → ImageWrapper-B-QUDGOG.js} +1 -1
  16. package/dist/assets/{Index-BokmvEVU.js → Index-5nD9vvfZ.js} +1 -1
  17. package/dist/assets/{Index-Dj-FkKhM.js → Index-BBCwiS2y.js} +1 -1
  18. package/dist/assets/{Index-059OGLxJ.js → Index-BKI_laZF.js} +1 -1
  19. package/dist/assets/{Index-Bwd24CJW.js → Index-BL-7ivRb.js} +1 -1
  20. package/dist/assets/{Index-fuOZURRA.js → Index-BUQb2ZLO.js} +1 -1
  21. package/dist/assets/{Index-Cp7CT2Gd.js → Index-Bseq2RQw.js} +1 -1
  22. package/dist/assets/{Index-UmYew8fk.js → Index-BuV0frn5.js} +1 -1
  23. package/dist/assets/{Index--6BAA06R.js → Index-CPzAV4Un.js} +1 -1
  24. package/dist/assets/{Index-DfUxGSNr.js → Index-CouN7o8E.js} +1 -1
  25. package/dist/assets/{Index-D2QGMV30.js → Index-CrFZCupj.js} +1 -1
  26. package/dist/assets/{Index-DFB5GOaG.js → Index-CxNrtJXj.js} +1 -1
  27. package/dist/assets/{Index-Dl5Ue0cB.js → Index-Cz9ZmdRn.js} +1 -1
  28. package/dist/assets/{Index-s2db4trm.js → Index-CzjVGslj.js} +1 -1
  29. package/dist/assets/{Index-Dw-lR2Ci.js → Index-DRGs27uO.js} +1 -1
  30. package/dist/assets/{Index-CxqiCZcs.js → Index-Ddq-hTV2.js} +1 -1
  31. package/dist/assets/{Index-B-MikpQO.js → Index-DlsEur5V.js} +1 -1
  32. package/dist/assets/{Index-D1Hu1aAq.js → Index-Lf2RTSu9.js} +1 -1
  33. package/dist/assets/{Index-ByLIfLId.js → Index-LuCrqzoS.js} +1 -1
  34. package/dist/assets/{Index-BKtiSjzc.js → Index-T2bcnnFe.js} +1 -1
  35. package/dist/assets/{Index-BnfYD6w3.js → Index-ZLGRtFn3.js} +1 -1
  36. package/dist/assets/{Index-CW1qzdQ2.js → Index-_QIbCWLa.js} +1 -1
  37. package/dist/assets/{Index-rImXzB22.js → Index-jBJuXLqS.js} +1 -1
  38. package/dist/assets/{Index-B0lb5qd9.js → Index-mpxQMGDo.js} +1 -1
  39. package/dist/assets/{Index-C-ToLdQs.js → Index-rGCPSWnA.js} +1 -1
  40. package/dist/assets/{Invitees-BdPFfAzj.js → Invitees-DYwhY_w_.js} +1 -1
  41. package/dist/assets/{List-BWNjerdS.js → List-B-yHScau.js} +1 -1
  42. package/dist/assets/{List-Chv16z-D.js → List-BSMOEVks.js} +1 -1
  43. package/dist/assets/{List-BbPkxEKZ.js → List-CMGDI7tS.js} +1 -1
  44. package/dist/assets/{Main-BBEjShBL.js → Main-BRzC1K4d.js} +1 -1
  45. package/dist/assets/{Navigator-BJVFOH2e.js → Navigator-CmHhMHlC.js} +1 -1
  46. package/dist/assets/{NoTasks-C2JnFhyL.js → NoTasks-DxG4kNl_.js} +1 -1
  47. package/dist/assets/{NotFound-BY2STyFG.js → NotFound-BhkH0uk6.js} +1 -1
  48. package/dist/assets/{OAuthCallback-7RJgUGWG.js → OAuthCallback-lqPplDPL.js} +1 -1
  49. package/dist/assets/{Pagination-CCZtuLL7.js → Pagination-ZFKSV01q.js} +1 -1
  50. package/dist/assets/{ScrollList--Rdy30ny.js → ScrollList-iCSJIMrr.js} +1 -1
  51. package/dist/assets/{Status-BGDtIBUI.js → Status-BmFAo_3y.js} +1 -1
  52. package/dist/assets/{Subscribe-CgH_d0-C.js → Subscribe-ByvboNZ0.js} +1 -1
  53. package/dist/assets/{TransportWebHID-DYjbY7sI.js → TransportWebHID-DSSaG5Qu.js} +1 -1
  54. package/dist/assets/{VideoPlayer-UHFMqgfu.js → VideoPlayer-BPXqA96V.js} +1 -1
  55. package/dist/assets/{_Uint8Array-BsuIvcoq.js → _Uint8Array-DsubnpWQ.js} +1 -1
  56. package/dist/assets/{_baseClone-d2_dNmf5.js → _baseClone-BGHYzsmx.js} +1 -1
  57. package/dist/assets/{_baseIteratee-DOL5_qvi.js → _baseIteratee-B2f0l2j7.js} +1 -1
  58. package/dist/assets/{_initCloneObject-DFQF2czX.js → _initCloneObject-eE5oZBfW.js} +1 -1
  59. package/dist/assets/{add-DUvTFhY9.js → add-Cu0MSgPG.js} +1 -1
  60. package/dist/assets/{all-wallets-DK8_Cl6e.js → all-wallets-CShCgmz7.js} +1 -1
  61. package/dist/assets/{app-store-ByfuoG7V.js → app-store-6kdQY1F9.js} +1 -1
  62. package/dist/assets/{apple-X0ojudGl.js → apple-DDKS4fDf.js} +1 -1
  63. package/dist/assets/{arrow-bottom-CaviGfgz.js → arrow-bottom-DTPfkDIo.js} +1 -1
  64. package/dist/assets/{arrow-bottom-circle-B52vuoaz.js → arrow-bottom-circle-CRxlSvPo.js} +1 -1
  65. package/dist/assets/{arrow-left-CMiOv5A2.js → arrow-left-Ba3_0Nsg.js} +1 -1
  66. package/dist/assets/{arrow-right-DyC3dNIS.js → arrow-right-aq3NYada.js} +1 -1
  67. package/dist/assets/{arrow-top-D_h71Hkl.js → arrow-top-BkDMXNux.js} +1 -1
  68. package/dist/assets/{avatar-DUSPOiR9.js → avatar-CxYgoTCZ.js} +1 -1
  69. package/dist/assets/{bank-CuBpzuO5.js → bank-D9z91KD9.js} +1 -1
  70. package/dist/assets/{basic-DbjmXkHX.js → basic-CbQqSKxc.js} +1 -1
  71. package/dist/assets/{browser-DWkNm5uv.js → browser-B3xwdiNo.js} +1 -1
  72. package/dist/assets/{byokCredential-BtxZsq7V.js → byokCredential-FI1ZBVYn.js} +1 -1
  73. package/dist/assets/{card-BOXDNIKg.js → card-Chzkt7k6.js} +1 -1
  74. package/dist/assets/{castArray-CzNVm6L8.js → castArray-D9h25tG8.js} +1 -1
  75. package/dist/assets/{chat-CcOh6YKj.js → chat-DnLGJycl.js} +1 -1
  76. package/dist/assets/{checkmark-U7dTZ0-2.js → checkmark-C7OxfNh3.js} +1 -1
  77. package/dist/assets/{checkmark-bold-D0gsxWuf.js → checkmark-bold-BHmSAVp6.js} +1 -1
  78. package/dist/assets/{chevron-bottom-DRXa0R7S.js → chevron-bottom-w1G97WFf.js} +1 -1
  79. package/dist/assets/{chevron-left-CUNz1LGc.js → chevron-left-BrQQoP-m.js} +1 -1
  80. package/dist/assets/{chevron-right-DAynDPTD.js → chevron-right-BAeoanEX.js} +1 -1
  81. package/dist/assets/{chevron-top-hKFUC3RI.js → chevron-top-Q356yQqN.js} +1 -1
  82. package/dist/assets/{chrome-store-DDeATmaY.js → chrome-store-qvVacz_N.js} +1 -1
  83. package/dist/assets/{clock-xEwZi0IB.js → clock-D_NTIGMb.js} +1 -1
  84. package/dist/assets/{close-DGbWT-27.js → close-CPU9EsxF.js} +1 -1
  85. package/dist/assets/{coinPlaceholder-BVgeUKGH.js → coinPlaceholder-DptdKDd4.js} +1 -1
  86. package/dist/assets/{compass-gJ2Vwv70.js → compass-Brqmt8LI.js} +1 -1
  87. package/dist/assets/{copy-CjUrPbix.js → copy-D92nWyMa.js} +1 -1
  88. package/dist/assets/{cursor-D4-iDJ1L.js → cursor-MJzHSDKO.js} +1 -1
  89. package/dist/assets/{cursor-transparent-BMB0lcTe.js → cursor-transparent-BLa3NO0R.js} +1 -1
  90. package/dist/assets/{debounce-CVIFJBK5.js → debounce-DGphlxJW.js} +1 -1
  91. package/dist/assets/{desktop-BRh2ZMcR.js → desktop-ChJH92X7.js} +1 -1
  92. package/dist/assets/{disconnect-BajaQiws.js → disconnect-Cnrekbhh.js} +1 -1
  93. package/dist/assets/{discord-wepvY9Ak.js → discord-DXSWMzYu.js} +1 -1
  94. package/dist/assets/{distribution-B3-GLtBP.js → distribution-DjpbNgGb.js} +1 -1
  95. package/dist/assets/{dropdown-BbX9hnQO.js → dropdown-BcaiGOmr.js} +1 -1
  96. package/dist/assets/{etherscan-B4OeDAkG.js → etherscan-Bbv_1vNU.js} +1 -1
  97. package/dist/assets/{exclamation-triangle-CBno1umt.js → exclamation-triangle-KkXuC1Cx.js} +1 -1
  98. package/dist/assets/{extension-CRCYf1qo.js → extension-DcL02Ykp.js} +1 -1
  99. package/dist/assets/{external-link-dJH--fEj.js → external-link-DiRJrSP_.js} +1 -1
  100. package/dist/assets/{facebook-kGxCrGTO.js → facebook-CBz-YADy.js} +1 -1
  101. package/dist/assets/{farcaster-DmOZu7jw.js → farcaster-C6l5WQ3N.js} +1 -1
  102. package/dist/assets/{filters-DLsCq92h.js → filters-DrlZVlOb.js} +1 -1
  103. package/dist/assets/{flux-BSFqmUDj.js → flux-CMOSmwCL.js} +1 -1
  104. package/dist/assets/{github-DZgL1fjp.js → github-CNafXN-s.js} +1 -1
  105. package/dist/assets/{google-Lk2HdPP2.js → google-DvybOo0U.js} +1 -1
  106. package/dist/assets/{hailuo-BYd0bkf-.js → hailuo-mK6jSAnv.js} +1 -1
  107. package/dist/assets/{headshots-Bqnjwmfc.js → headshots-BKlx2KDQ.js} +1 -1
  108. package/dist/assets/{help-circle-C_wrV9tG.js → help-circle-C40AxU8S.js} +1 -1
  109. package/dist/assets/{id-AvmY89p2.js → id-BAYc3ecJ.js} +1 -1
  110. package/dist/assets/{image-B1VgGm3g.js → image-Dsy7Rh5v.js} +1 -1
  111. package/dist/assets/{index-CM0amj_5.js → index-4sNdJ5M3.js} +1 -1
  112. package/dist/assets/{index-mQrTJe59.js → index-7Clblu4i.js} +1 -1
  113. package/dist/assets/{index-DX09ak7W.js → index-9TD67Fmb.js} +1 -1
  114. package/dist/assets/{index-BsdZCf9S.js → index-B1xeZ4ni.js} +1 -1
  115. package/dist/assets/{index-aCN54qBZ.js → index-B52K8lcI.js} +6 -6
  116. package/dist/assets/{index-Bhjk_y-F.js → index-B6FBPmA9.js} +1 -1
  117. package/dist/assets/{index-BDoEbSzt.js → index-B8rR3nX9.js} +1 -1
  118. package/dist/assets/{index-CgvrKpmg.js → index-BDb4RNBo.js} +1 -1
  119. package/dist/assets/{index-CIpTpIie.js → index-BKQVmec6.js} +1 -1
  120. package/dist/assets/{index-I1Z2ARWK.js → index-BM5Jp3b7.js} +1 -1
  121. package/dist/assets/{index-giqZTS2k.js → index-BaSd-vPv.js} +1 -1
  122. package/dist/assets/{index-CuA_mfzw.js → index-Batw_m9D.js} +1 -1
  123. package/dist/assets/{index-gx5FhX4M.js → index-Bnh5rcIi.js} +1 -1
  124. package/dist/assets/{index-nQ_GVGJG.js → index-Bt_6WJwM.js} +1 -1
  125. package/dist/assets/{index-CzONa6Ly.js → index-BumSt55a.js} +1 -1
  126. package/dist/assets/{index-hTMEW3di.js → index-Bx2Na5Rz.js} +4 -4
  127. package/dist/assets/{index-ZULa5rJ5.js → index-BykkUhOF.js} +1 -1
  128. package/dist/assets/{index-zfWdB6N3.js → index-ByrM-KHB.js} +1 -1
  129. package/dist/assets/{index-F7Hu8Bm1.js → index-BzCQ9QlI.js} +1 -1
  130. package/dist/assets/{index-CgqpRgBX.js → index-C-Kp5ZdH.js} +1 -1
  131. package/dist/assets/{index-G-ZPeM0Z.js → index-C-RZMPms.js} +1 -1
  132. package/dist/assets/{index-BfKqDu_e.js → index-C3NfeUjK.js} +1 -1
  133. package/dist/assets/{index-D6nd5y39.js → index-C5zmlao4.js} +1 -1
  134. package/dist/assets/{index-C1ZJSurC.js → index-C6Norf3g.js} +1 -1
  135. package/dist/assets/{index-efKug9ge.js → index-C8Et3Fqp.js} +1 -1
  136. package/dist/assets/{index-Bf_Ja_UW.js → index-C8cMfHmm.js} +1 -1
  137. package/dist/assets/{index-DcqPzdPG.js → index-CE3CU8QQ.js} +1 -1
  138. package/dist/assets/{index-mQGnyxbq.js → index-CHeQ_CVY.js} +3 -3
  139. package/dist/assets/{index-CHwNaM4R.js → index-CLcGD0sK.js} +1 -1
  140. package/dist/assets/{index-CF86-1qt.js → index-CPTJfZ1R.js} +1 -1
  141. package/dist/assets/{index-CxOOrmyw.js → index-CV3EA-5Y.js} +1 -1
  142. package/dist/assets/{index-CPp1pb0A.js → index-CY__M1QA.js} +1 -1
  143. package/dist/assets/{index-BMb2yz7J.js → index-CiTi8svs.js} +1 -1
  144. package/dist/assets/{index-CJI1tAn5.js → index-Cj58Jns7.js} +1 -1
  145. package/dist/assets/{index-DHKx47t5.js → index-CkC89c_n.js} +1 -1
  146. package/dist/assets/{index-BwSZF6kA.js → index-CsPCRrNs.js} +1 -1
  147. package/dist/assets/{index-Dbjovb_-.js → index-CtVst1uX.js} +1 -1
  148. package/dist/assets/{index-V3U8Zot2.js → index-Cy6E0t1V.js} +1 -1
  149. package/dist/assets/{index-NfaSNtIV.js → index-D5TEdbOI.js} +1 -1
  150. package/dist/assets/{index-DTFY3QNR.js → index-DDdJdoMN.js} +1 -1
  151. package/dist/assets/{index-XF4G2BXJ.js → index-DGLnwfjn.js} +1 -1
  152. package/dist/assets/{index-Cv6PNItH.js → index-DKCtgtu9.js} +1 -1
  153. package/dist/assets/{index-Z5h_ctud.js → index-DSkf_X3S.js} +1 -1
  154. package/dist/assets/{index-C1k6vlvL.js → index-DXKP-ii8.js} +1 -1
  155. package/dist/assets/{index-C4dw4PBP.js → index-D_isGy3S.js} +1 -1
  156. package/dist/assets/{index-LQ2wigdZ.js → index-DeE9dWII.js} +1 -1
  157. package/dist/assets/{index-C_C1Ixwr.js → index-DeZiU5Xr.js} +1 -1
  158. package/dist/assets/{index-CDBWQw1U.js → index-DpD9eakC.js} +1 -1
  159. package/dist/assets/{index-hTDB6FhP.js → index-DsAX5Xg5.js} +1 -1
  160. package/dist/assets/{index-B0TvD8QB.js → index-DvlRmNoz.js} +1 -1
  161. package/dist/assets/{index-CssvHGAN.js → index-Dxxmpm9n.js} +1 -1
  162. package/dist/assets/{index-DW6GnDHe.js → index-Fct8RIxf.js} +1 -1
  163. package/dist/assets/{index-BoeBTIxV.js → index-LzRRSVhs.js} +1 -1
  164. package/dist/assets/{index-BuQ08eMU.js → index-MUIPGpmq.js} +1 -1
  165. package/dist/assets/{index-BGLvFr5U.js → index-SAKCrmkl.js} +1 -1
  166. package/dist/assets/{index-_ZSERpOX.js → index-T_4EI1kQ.js} +1 -1
  167. package/dist/assets/{index-ze1yP2hP.js → index-aNUH2ecd.js} +1 -1
  168. package/dist/assets/{index-p-Fx8nJo.js → index-m_03_xe6.js} +1 -1
  169. package/dist/assets/{index-w91tXZxz.js → index-sG2-qJ3Z.js} +1 -1
  170. package/dist/assets/{index-zywqYbq-.js → index-uTfVtHfI.js} +1 -1
  171. package/dist/assets/{index-CTnF0u-u.js → index-ujnpAEZJ.js} +1 -1
  172. package/dist/assets/{index.browser.esm-yMBp2bJo.js → index.browser.esm-CyIWX8Bt.js} +1 -1
  173. package/dist/assets/{index.es-Ch1GF9O_.js → index.es-CQ4a71ST.js} +1 -1
  174. package/dist/assets/{info-CJwcdlPq.js → info-BxQqlV-_.js} +1 -1
  175. package/dist/assets/{info-circle-CVXNgELQ.js → info-circle-Cclz_4Y-.js} +1 -1
  176. package/dist/assets/{isEqual-7A3s6xld.js → isEqual-BSWYzBQK.js} +1 -1
  177. package/dist/assets/{isPlainObject-CarriSqY.js → isPlainObject-C4PSdRDF.js} +1 -1
  178. package/dist/assets/{kling-BPYCPbv8.js → kling-eU8m393Z.js} +1 -1
  179. package/dist/assets/{lightbulb-CRjUoCKV.js → lightbulb-7j_oY_x8.js} +1 -1
  180. package/dist/assets/{luma-DnztqUAb.js → luma-CSuUgC0E.js} +1 -1
  181. package/dist/assets/{mail-DtQzote8.js → mail-CIpqhsmf.js} +1 -1
  182. package/dist/assets/{midjourney-DVMCW7B0.js → midjourney-0LcS7lQT.js} +1 -1
  183. package/dist/assets/{mobile-BYZCmmrT.js → mobile-BXP5x33i.js} +1 -1
  184. package/dist/assets/{more-DYL-gago.js → more-DtmxNOJG.js} +1 -1
  185. package/dist/assets/{nanobanana-DopP8688.js → nanobanana-FwOBJ2RF.js} +1 -1
  186. package/dist/assets/{network-placeholder-a8BWu_V9.js → network-placeholder-B1sufCuQ.js} +1 -1
  187. package/dist/assets/{nftPlaceholder-DcfU_cmY.js → nftPlaceholder-Bw7Yojk8.js} +1 -1
  188. package/dist/assets/{off-DbJGOotF.js → off-BCruneog.js} +1 -1
  189. package/dist/assets/{openaiimage-DNAJJC0D.js → openaiimage-Ccsv1W-U.js} +1 -1
  190. package/dist/assets/{order-BQbnjt_1.js → order-CD5XLeqW.js} +1 -1
  191. package/dist/assets/{pika-CyIcYYST.js → pika-ChKx0Xxe.js} +1 -1
  192. package/dist/assets/{pixverse-SNG1kiR8.js → pixverse-B2pUIBKE.js} +1 -1
  193. package/dist/assets/{play-store-DB0u0OCt.js → play-store-CA0-0Tlm.js} +1 -1
  194. package/dist/assets/{plus-BIXCMv_j.js → plus-BE97GFMK.js} +1 -1
  195. package/dist/assets/{price-DrUKr34v.js → price-Dsi963Xl.js} +1 -1
  196. package/dist/assets/{producer-BMwKMreP.js → producer-Dfwnq6zM.js} +1 -1
  197. package/dist/assets/{qr-code-Y_-slZOL.js → qr-code-Cgnp2Lgz.js} +1 -1
  198. package/dist/assets/{qrart-B46lYbBY.js → qrart-BF10dW19.js} +1 -1
  199. package/dist/assets/{recycle-horizontal-BHl1Qcca.js → recycle-horizontal-LYcE-Xea.js} +1 -1
  200. package/dist/assets/{refresh-Blb4Y-Jo.js → refresh-B0EVbOl5.js} +1 -1
  201. package/dist/assets/{reown-logo-BkYnWrAF.js → reown-logo-1ba0VE8s.js} +1 -1
  202. package/dist/assets/{search-CtCjrJcB.js → search-DrlR3m_b.js} +1 -1
  203. package/dist/assets/{secp256k1-0rH5ffPN.js → secp256k1-BW60rAVu.js} +1 -1
  204. package/dist/assets/{secp256k1-YNK2UYbw.js → secp256k1-D0nAsWKv.js} +1 -1
  205. package/dist/assets/{seedance-CCkJVj4V.js → seedance-Ceb75aat.js} +1 -1
  206. package/dist/assets/{seedream-Dt6073IJ.js → seedream-Drb48nLu.js} +1 -1
  207. package/dist/assets/{send-DtsUM-JQ.js → send-BvLAzL4i.js} +1 -1
  208. package/dist/assets/{service-Cyf9rt-7.js → service-BjFsGQQS.js} +1 -1
  209. package/dist/assets/{solana-wallets-BigD9kgf.js → solana-wallets-BqADjURH.js} +2 -2
  210. package/dist/assets/{solana-wallets-vue-CxHUcUcl.js → solana-wallets-vue-BfYk2Md2.js} +1 -1
  211. package/dist/assets/{solanaEmbed.esm-CQwgb_eq.js → solanaEmbed.esm-jg4Vgjkt.js} +1 -1
  212. package/dist/assets/{sora-Ccz9TVDb.js → sora-BkXi8fQT.js} +1 -1
  213. package/dist/assets/{string_decoder-jlrYvtWR.js → string_decoder-B_O9UNAr.js} +1 -1
  214. package/dist/assets/subsite-9U_y4AmL.js +1 -0
  215. package/dist/assets/subsite-B-iJ3iS_.js +1 -0
  216. package/dist/assets/subsite-B4zj5zPR.js +1 -0
  217. package/dist/assets/subsite-B5q36S7k.js +1 -0
  218. package/dist/assets/subsite-C-BZE9Yx.js +1 -0
  219. package/dist/assets/subsite-C6MFZkAl.js +1 -0
  220. package/dist/assets/subsite-CF7_XpFL.js +1 -0
  221. package/dist/assets/subsite-CYwQne5H.js +1 -0
  222. package/dist/assets/subsite-C_JKZMft.js +1 -0
  223. package/dist/assets/subsite-ChvtCmnI.js +1 -0
  224. package/dist/assets/subsite-CkT7TBHc.js +1 -0
  225. package/dist/assets/subsite-DIxduXml.js +1 -0
  226. package/dist/assets/subsite-Dd8YohLv.js +1 -0
  227. package/dist/assets/subsite-DzbRY7xB.js +1 -0
  228. package/dist/assets/subsite-PbWSTGkX.js +1 -0
  229. package/dist/assets/subsite-ddG8KGKu.js +1 -0
  230. package/dist/assets/subsite-rWQbBgnu.js +1 -0
  231. package/dist/assets/{suno-CmTK4HC6.js → suno-Dyj4UuUB.js} +1 -1
  232. package/dist/assets/{swapHorizontal-DmmcvnV7.js → swapHorizontal-Bdk0Yxvu.js} +1 -1
  233. package/dist/assets/{swapHorizontalBold-Bhj80lFp.js → swapHorizontalBold-D6WHzyHh.js} +1 -1
  234. package/dist/assets/{swapHorizontalMedium-CqpuB0Xm.js → swapHorizontalMedium-3kXBFu_v.js} +1 -1
  235. package/dist/assets/{swapHorizontalRoundedBold-C5_60Vsq.js → swapHorizontalRoundedBold-CIPol6Nz.js} +1 -1
  236. package/dist/assets/{swapVertical-D8tEMLKI.js → swapVertical-C07MpdTO.js} +1 -1
  237. package/dist/assets/{telegram-CysJaTLJ.js → telegram-xyfcklnv.js} +1 -1
  238. package/dist/assets/{three-dots-CdFO8stb.js → three-dots-D2cG3_Q-.js} +1 -1
  239. package/dist/assets/{twitch-BCnvWX7J.js → twitch-CWBmpeSg.js} +1 -1
  240. package/dist/assets/{twitterIcon-TZwWlmki.js → twitterIcon-ypl4FV6D.js} +1 -1
  241. package/dist/assets/{typescript-DYToGBau.js → typescript-Czd6EZBe.js} +1 -1
  242. package/dist/assets/{use-form-item-CduoD2dJ.js → use-form-item-L1r3H2hN.js} +1 -1
  243. package/dist/assets/validator-DJEv2qcg.js +1 -0
  244. package/dist/assets/{veo-D9PxKt12.js → veo-BXkKW2Rl.js} +1 -1
  245. package/dist/assets/{verify--bOe0h7C.js → verify-CwPPysc8.js} +1 -1
  246. package/dist/assets/{verify-filled-DLY7HgGb.js → verify-filled-HHIxA3j3.js} +1 -1
  247. package/dist/assets/{w3m-modal-_1cirTgY.js → w3m-modal-D4qaRCmz.js} +1 -1
  248. package/dist/assets/{wallet-placeholder-6XopqySF.js → wallet-placeholder-BY7gKIh3.js} +1 -1
  249. package/dist/assets/{wallet-DyGjnIZp.js → wallet-woHxfqMT.js} +1 -1
  250. package/dist/assets/{walletconnect-VrVn2JB8.js → walletconnect-Dl1tTbFS.js} +1 -1
  251. package/dist/assets/{wan-CCyfq5ZI.js → wan-B4f3O5JN.js} +1 -1
  252. package/dist/assets/{warning-circle-DwSK9FZP.js → warning-circle-DzsAHjaN.js} +1 -1
  253. package/dist/assets/{web-RmdTvPPZ.js → web-Byj8XY7W.js} +1 -1
  254. package/dist/assets/{web-a2hyB212.js → web-DWejG-bX.js} +1 -1
  255. package/dist/assets/{x-DUwBvcpx.js → x-qswjqnfc.js} +1 -1
  256. package/dist/index.html +1 -1
  257. package/package.json +1 -1
  258. package/dist/assets/subsite-7iAZtcuP.js +0 -1
  259. package/dist/assets/subsite-B0aXA4yJ.js +0 -1
  260. package/dist/assets/subsite-BR5UdzXM.js +0 -1
  261. package/dist/assets/subsite-BSw3am1S.js +0 -1
  262. package/dist/assets/subsite-CG0RFxMp.js +0 -1
  263. package/dist/assets/subsite-CqmVo7Kv.js +0 -1
  264. package/dist/assets/subsite-Cz6QyDco.js +0 -1
  265. package/dist/assets/subsite-CzkZaWnC.js +0 -1
  266. package/dist/assets/subsite-DGPJ_Kdf.js +0 -1
  267. package/dist/assets/subsite-DMvI1S9s.js +0 -1
  268. package/dist/assets/subsite-DU5krCO9.js +0 -1
  269. package/dist/assets/subsite-D_ZT5FwK.js +0 -1
  270. package/dist/assets/subsite-Dwxtl3OT.js +0 -1
  271. package/dist/assets/subsite-h6VAokmR.js +0 -1
  272. package/dist/assets/subsite-l0aBxAb7.js +0 -1
  273. package/dist/assets/subsite-sjY7de2z.js +0 -1
  274. package/dist/assets/subsite-uZ5VN0oy.js +0 -1
  275. package/dist/assets/validator-CqyFUR3o.js +0 -1
@@ -1 +1 @@
1
- import{F as E}from"./index.es-Ch1GF9O_.js";import{E as L}from"./index-F7Hu8Bm1.js";import{E as de}from"./index-DW6GnDHe.js";import{d as b,H as m,E as i,z as j,C as n,y as h,D as o,q as l,F as r,x as V,O as T,N as I,Q as R,J as k,R as be,I as w,M as ye}from"./vendor-vue-DU0w5ewx.js";import{E as y,b1 as A,a0 as we,F as Ce,ap as te}from"./index-hTMEW3di.js";import{b as Ve,c as oe,d as F,e as N,f as Se,g as Te,h as Ie}from"./kling-CtoPhhA9.js";import{E as P,a as D}from"./index-BMb2yz7J.js";import{E as q}from"./index-gx5FhX4M.js";import{E as C}from"./index-mQrTJe59.js";import{I as S,S as Ee}from"./ScrollList--Rdy30ny.js";import{a as H,E as me}from"./index-_ZSERpOX.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as G}from"./ImagePreview-ChsBY_yV.js";import{E as J}from"./index-ZULa5rJ5.js";import{E as K}from"./index-B0TvD8QB.js";import{C as pe}from"./Consumption-Bgr4zBx6.js";import{E as ue}from"./index-C1ZJSurC.js";import{E as Q}from"./index-hTDB6FhP.js";import{a as ge}from"./price-DrUKr34v.js";import{F as Le}from"./FilePreview-DMAEYsoo.js";import{E as Me,a as Ue}from"./index-BwSZF6kA.js";import{E as Re,a as Ae}from"./index-G-ZPeM0Z.js";import{b as ne}from"./errorCode-Cqj9Td_Z.js";import{k as se}from"./kling-BPYCPbv8.js";import{C as Pe}from"./CopyToClipboard-me8LNzZz.js";import{V as De}from"./VideoPlayer-UHFMqgfu.js";import{E as Ge}from"./index-p-Fx8nJo.js";import{E as Ke}from"./index-CxOOrmyw.js";import{B as Oe}from"./BotPlaceholder-TpKY21KU.js";import{N as je}from"./NoTasks-C2JnFhyL.js";import{l as Ne}from"./pagination-CcnL0MdN.js";import"./use-form-item-CduoD2dJ.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./index-DcqPzdPG.js";import"./typescript-DYToGBau.js";import"./index-C1k6vlvL.js";import"./strings-DigWlKo9.js";import"./isEqual-7A3s6xld.js";import"./_Uint8Array-BsuIvcoq.js";import"./castArray-CzNVm6L8.js";import"./debounce-CVIFJBK5.js";import"./_baseIteratee-DOL5_qvi.js";import"./index-CPp1pb0A.js";import"./validator-CqyFUR3o.js";import"./index-Bz0iDXPF.js";import"./index-CgvrKpmg.js";import"./_baseClone-d2_dNmf5.js";import"./_initCloneObject-DFQF2czX.js";import"./index-efKug9ge.js";import"./isPlainObject-CarriSqY.js";import"./vue-plyr-BO2nlN4c.js";import"./index-CIpTpIie.js";const Be=b({name:"LayoutKling",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},data(){return{drawer:!1}}}),ze={class:"main flex flex-row flex-1 min-h-0"},Fe={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},qe={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function He(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),m("div",ze,[i("div",Fe,[j(e.$slots,"config",{},void 0,!0)]),i("div",qe,[j(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=d=>e.drawer=!0)},{default:h(()=>[n(c,{icon:"fa-solid fa-magic"})]),_:1}),n(f,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=d=>e.drawer=d),direction:"ltr","with-header":!1,size:"350px"},{default:h(()=>[j(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const We=y(Be,[["render",He],["__scopeId","data-v-8fa7523c"]]),Je={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function fe(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Je}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=fe(s,a,u),c=[];return e.end_image_url&&!$.endImage&&c.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&c.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&!$.motionControl&&c.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),c}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Qe=b({name:"ModelSelector",components:{ElSelect:D,ElOption:P},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0,options:[{value:"kling-v3",label:"v3"},{value:"kling-v3-omni",label:"v3-Omni"},{value:"kling-v2-6",label:"v2.6"},{value:"kling-v2-5-turbo",label:"v2.5-Turbo"},{value:"kling-v2-1-master",label:"v2.1-Master"},{value:"kling-v2-master",label:"v2-Master"},{value:"kling-v1-6",label:"v1.6"},{value:"kling-v1",label:"v1"},{value:"kling-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Ve)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ye={class:"field"},Xe={class:"title font-bold"};function Ze(e,t,s,a,u,$){const c=o("el-option"),p=o("el-select");return l(),m("div",Ye,[i("h2",Xe,r(e.$t("pika.name.model")),1),(l(),V(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,f=>(l(),V(c,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const xe=y(Qe,[["render",Ze],["__scopeId","data-v-04059875"]]),et=b({name:"ModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},cameraControlSet(){return!!this.$store.state.kling?.config?.camera_control?.type},fourKReason(){return F.includes(this.selectedModel)?this.cameraControlSet?this.$t("kling.description.mode4kIncompatibleCamera"):"":this.$t("kling.description.mode4kRequiresV3")},options(){return[{value:"std",label:this.$t("kling.name.modeStd"),disabled:!1,disabledReason:""},{value:"pro",label:this.$t("kling.name.modePro"),disabled:!1,disabledReason:""},{value:"4k",label:this.$t("kling.name.mode4k"),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value==="4k"&&this.applyMode(oe)}},mounted(){this.value||this.applyMode(oe)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),tt={class:"field"},ot={class:"header"},nt={class:"title font-bold"},st={key:0,class:"opt-tip"};function it(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",tt,[i("div",ot,[i("h2",nt,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),V(f,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value,disabled:d.disabled},{default:h(()=>[i("span",{class:R({"opt-disabled":d.disabled})},r(d.label),3),d.disabled&&d.disabledReason?(l(),m("span",st,r(d.disabledReason),1)):k("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const lt=y(et,[["render",it],["__scopeId","data-v-9a8fa3c5"]]),ie=[3,5,8,10,12,15],le=[5,10],at=b({name:"DurationSelector",components:{ElSlider:H,InfoIcon:S},props:{modelValue:{type:Number,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return F.includes(this.selectedModel)},sliderMin(){return this.isV3Model?3:5},sliderMax(){return this.isV3Model?15:10},sliderStep(){return this.isV3Model?1:5},marks(){const e=this.isV3Model?ie:le,t={};for(const s of e)t[s]=`${s}s`;return t},value(){return this.$store.state.kling?.config?.duration??N},sliderValue(){const e=this.value;return e<this.sliderMin?this.sliderMin:e>this.sliderMax?this.sliderMax:e}},watch:{isV3Model(e){(this.isV3Model?ie:le).includes(this.value)||this.applyDuration(N)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(N)},methods:{async onChange(e){const t=Array.isArray(e)?e[0]:e,s=this.$store.state.kling?.config||{},a=Y(s,{duration:t});if(a.length===0){this.applyDuration(t);return}const u=a.map($=>this.$t($.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:u}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const $=X({...s,duration:t},a);this.$store.commit("kling/setConfig",$),C.success(this.$t("kling.message.featureRemovedNotice",{fields:u}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),rt={class:"field"},ct={class:"header"},dt={class:"title font-bold"},mt={class:"value-display"};function pt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-slider");return l(),m("div",rt,[i("div",ct,[i("h2",dt,r(e.$t("kling.name.duration")),1),n(c,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"]),i("span",mt,r(e.value)+"s",1)]),(l(),V(p,{key:e.revertKey,"model-value":e.sliderValue,class:"slider",min:e.sliderMin,max:e.sliderMax,step:e.sliderStep,marks:e.marks,"show-tooltip":!1,onChange:e.onChange},null,8,["model-value","min","max","step","marks","onChange"]))])}const ut=y(at,[["render",pt],["__scopeId","data-v-aa1a22a1"]]),gt=b({name:"RatioSelector",data(){return{options:[{value:"1:1",label:"1:1",width:20,height:20},{value:"16:9",label:"16:9",width:25,height:13},{value:"9:16",label:"9:16",width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state?.kling?.config?.aspect_ratio},set(e){console.debug("set ratio",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||(this.value=Se)}}),ft={class:"text-sm font-bold mb-2 block"},ht={class:"items"},_t=["onClick"],$t={class:"name"};function vt(e,t,s,a,u,$){return l(),m("div",null,[i("span",ft,r(e.$t("kling.name.ratio")),1),i("div",ht,[(l(!0),m(T,null,I(e.options,(c,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:f=>e.value=c.value},[i("div",{class:R(["preview",c.label])},[i("div",{class:"rect",style:be({width:c.width+"px",height:c.height+"px"})},null,4)],2),i("p",$t,r(c.label),1)],10,_t))),128))])])}const kt=y(gt,[["render",vt],["__scopeId","data-v-cdb14b2f"]]),bt=b({name:"StartImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},value:{get(){return this.$store.state?.kling?.config?.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),yt={class:"relative"},wt={class:"flex justify-between"},Ct={class:"flex justify-start items-center"},Vt={class:"text-sm font-bold"};function St(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",yt,[i("div",wt,[i("div",Ct,[i("span",Vt,r(e.$t("kling.name.startImage")),1),n(c,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Tt=y(bt,[["render",St],["__scopeId","data-v-40832274"]]),It=b({name:"EndImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,ImagePreview:G,InfoIcon:S,FontAwesomeIcon:E},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},klingConfig(){return this.$store.state?.kling?.config||{}},endImageSupported(){return fe(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},uploadDisabled(){return this.reachedLimit||!this.endImageSupported},uploadTooltip(){return this.endImageSupported?this.reachedLimit?this.$t("kling.message.uploadReferencesExceed"):"":this.$t("kling.message.endImageNotSupported")},storeValue(){return this.klingConfig.end_image_url},value:{get(){return this.storeValue},set(){}}},watch:{storeValue(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?!0:(C.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Et={class:"relative"},Lt={class:"flex justify-between"},Mt={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"};function Rt(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",Et,[i("div",Lt,[i("div",Mt,[i("span",Ut,r(e.$t("kling.name.endImage")),1),n(c,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","before-upload","on-exceed","on-error","on-success","headers"])])}const At=y(It,[["render",Rt],["__scopeId","data-v-6959ad44"]]),Pt=b({name:"CfgScaleSelector",components:{ElSlider:H,InfoIcon:S,ElInputNumber:me},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug("set cfg_scale",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||(this.value=Te)}}),Dt={class:"flex justify-between"},Gt={class:"flex justify-start items-center"},Kt={class:"text-sm font-bold"},Ot={class:"flex justify-end items-center"},jt={class:"w-full"};function Nt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input-number"),f=o("el-slider");return l(),m("div",null,[i("div",Dt,[i("div",Gt,[i("span",Kt,r(e.$t("kling.name.cfgScale")),1),n(c,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",Ot,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),"controls-position":"right"},null,8,["modelValue"])])]),i("div",jt,[n(f,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=d=>e.value=d),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Bt=y(Pt,[["render",Nt]]),zt=b({name:"GenerateAudioSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(F.includes(this.selectedModel)||this.selectedModel==="kling-v2-6"&&this.selectedMode==="pro")},tooltipContent(){return this.supported?this.$t("kling.description.generateAudio"):this.$t("kling.description.generateAudioUnsupported")},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??Ie:!1},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:!1})}}}),Ft={class:"relative"},qt={class:"flex justify-between items-center"},Ht={class:"flex justify-start items-center"},Wt={class:"text-sm font-bold"};function Jt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",Ft,[i("div",qt,[i("div",Ht,[i("span",Wt,r(e.$t("kling.name.generateAudio")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const Qt=y(zt,[["render",Jt]]),Yt=["horizontal","vertical","pan","tilt","roll","zoom"],Xt=b({name:"CameraControlSelector",components:{ElSelect:D,ElOption:P,ElSlider:H,ElInputNumber:me,InfoIcon:S},data(){return{configKeys:Yt}},computed:{typeOptions(){return[{value:"",label:this.$t("kling.name.cameraTypeNone")},{value:"simple",label:this.$t("kling.name.cameraTypeSimple")},{value:"down_back",label:this.$t("kling.name.cameraTypeDownBack")},{value:"forward_up",label:this.$t("kling.name.cameraTypeForwardUp")},{value:"left_turn_forward",label:this.$t("kling.name.cameraTypeLeftTurnForward")},{value:"right_turn_forward",label:this.$t("kling.name.cameraTypeRightTurnForward")}]},selectedMode(){return this.$store.state.kling?.config?.mode||""},disabled(){return this.selectedMode==="4k"},tooltipContent(){return this.disabled?this.$t("kling.description.cameraControlDisabled4k"):this.$t("kling.description.cameraControl")},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??""},set(e){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="simple"?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw="")}},methods:{writeConfig(e,t){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),Zt={class:"field"},xt={class:"header"},eo={class:"text-sm font-bold"},to={key:0,class:"config-grid"},oo={class:"cfg-row-head"},no={class:"cfg-name"};function so(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select"),d=o("el-input-number"),v=o("el-slider");return l(),m("div",Zt,[i("div",xt,[i("span",eo,r(e.$t("kling.name.cameraControl")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(f,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=g=>e.selectedTypeRaw=g),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:h(()=>[(l(!0),m(T,null,I(e.typeOptions,g=>(l(),V(p,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",to,[(l(!0),m(T,null,I(e.configKeys,g=>(l(),m("div",{key:g,class:"cfg-row"},[i("div",oo,[i("span",no,r(e.$t(`kling.name.cc_${g}`)),1),n(d,{modelValue:e.configValues[g],"onUpdate:modelValue":_=>e.configValues[g]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(g,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(v,{"model-value":e.configValues[g]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(g,_)},null,8,["model-value","onInput"])]))),128))])):k("",!0)])}const io=y(Xt,[["render",so],["__scopeId","data-v-fb7b34d0"]]),he=[{groupKey:"cameraMovements",chipKeys:["rotateAround","stationary","handheld","zoomOut","zoomIn","follow","panRight","tiltUp","tiltDown","orbit"]},{groupKey:"cameraSpeed",chipKeys:["speedSlow","speedMedium","speedFast"]},{groupKey:"shotType",chipKeys:["shotClose","shotMedium","shotLong","shotLowAngle","shotHighAngle","shotShallowDof","shotFront","shotProfile","shotCloseUp","shotDrone"]},{groupKey:"light",chipKeys:["lightSunlight","lightSoft","lightNeon","lightWarm","lightNature","lightCandle","lightCityNight"]},{groupKey:"frame",chipKeys:["frameRichDetails","frameSimpleBg"]},{groupKey:"atmosphere",chipKeys:["atmosphereMysterious","atmospherePeaceful","atmosphereHeartwarming","atmosphereVivid","atmosphereColorful"]}],B=", ";function lo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${B}${t}`:t}function z(e,t){if(!e||!t)return e||"";const s=[`${t}${B}`,`${B}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const ao=b({name:"InspirationPills",components:{FontAwesomeIcon:E},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=z(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),ro={key:0,class:"pills",role:"list"},co={class:"pill-text"},mo=["aria-label","onClick"];function po(e,t,s,a,u,$){const c=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",ro,[(l(!0),m(T,null,I(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",co,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:ye(f=>e.onRemove(p),["stop"])},[n(c,{icon:"fa-solid fa-xmark"})],8,mo)]))),128))])):k("",!0)}const uo=y(ao,[["render",po],["__scopeId","data-v-5fc4fa65"]]),go="",fo=b({name:"PromptInput",components:{ElInput:Q,ElButton:L,FontAwesomeIcon:E,InfoIcon:S,InspirationPills:uo},emits:["open-inspiration"],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=go)}}),ho={class:"field"},_o={class:"box"},$o={class:"title font-bold"},vo={class:"actions"};function ko(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("info-icon"),d=o("inspiration-pills"),v=o("el-input");return l(),m("div",ho,[i("div",_o,[i("h2",$o,r(e.$t("kling.name.prompt")),1),i("div",vo,[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=g=>e.$emit("open-inspiration"))},{default:h(()=>[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1}),n(f,{content:e.$t("kling.description.prompt"),class:"info"},null,8,["content"])])]),n(d),n(v,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.prompt")},null,8,["modelValue","placeholder"])])}const bo=y(fo,[["render",ko],["__scopeId","data-v-0a5c57b8"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.config?.negative_prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,negative_prompt:e})}}},mounted(){this.prompt||(this.prompt=yo)}}),Co={class:"field"},Vo={class:"box"},So={class:"title font-bold"};function To(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",Vo,[i("h2",So,r(e.$t("kling.name.negativePrompt")),1),n(c,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const Io=y(wo,[["render",To],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:we}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},drawerSize(){return window.innerWidth<768?"100%":"380px"},prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(z(this.prompt,e)):this.setPrompt(lo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=z(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Uo={class:"title-row"},Ro={class:"title"},Ao={class:"hint"},Po={key:0,class:"selected-bar"},Do={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function No(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),V(f,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=d=>e.visible=d),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:h(()=>[i("div",Lo,[i("div",Mo,[i("div",Uo,[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Ro,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=d=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Po,[i("span",Do,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:h(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):k("",!0),i("div",Go,[(l(!0),m(T,null,I(e.groups,d=>(l(),m("div",{key:d.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${d.groupKey}`)),1),i("div",Oo,[(l(!0),m(T,null,I(d.chipKeys,v=>(l(),m("button",{key:v,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(v))}),onClick:g=>e.onToggle(e.chipText(v))},r(e.chipText(v)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const Bo=y(Eo,[["render",No],["__scopeId","data-v-7d457a69"]]),zo={"kling-v3":"v3","kling-v3-omni":"v3-Omni","kling-v2-6":"v2.6","kling-v2-5-turbo":"v2.5-Turbo","kling-v2-1-master":"v2.1-Master","kling-v2-master":"v2-Master","kling-v1-6":"v1.6","kling-v1":"v1","kling-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:E},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const c=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(c,{icon:"fa-solid fa-headphones"})],8,Xo)):k("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:L,Consumption:pe,FontAwesomeIcon:E,PromptInput:bo,NegativePromptInput:Io,ModelSelector:xe,ModeSelector:lt,DurationSelector:ut,RatioSelector:kt,StartImage:Tt,CfgScaleSelector:Bt,GenerateAudioSelector:Qt,CameraControlSelector:io,InspirationDrawer:Bo,SummaryChip:xo,EndImage:At},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return ge(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const c=o("prompt-input"),p=o("model-selector"),f=o("ratio-selector"),d=o("start-image"),v=o("end-image"),g=o("duration-selector"),_=o("mode-selector"),M=o("generate-audio-selector"),U=o("camera-control-selector"),O=o("cfg-scale-selector"),_e=o("negative-prompt-input"),$e=o("summary-chip"),ve=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(c,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(f,{class:"mb-4"}),n(d,{class:"mb-2"}),n(v,{class:"mb-2"}),n(g,{class:"mb-4"}),n(_,{class:"mb-4"}),n(M,{class:"mb-4"}),n(U,{class:"mb-4"}),n(O,{class:"mb-4"}),n(_e,{class:"mb-4"})]),i("div",nn,[n($e),n(ve,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),V(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),V(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:K,ElButton:L,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function pn(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(c,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(v,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.url&&g.percentage!==void 0?(l(),V(p,{key:0,url:g.url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const un=y(an,[["render",pn],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:K,ElButton:L,InfoIcon:S,FilePreview:Le,FontAwesomeIcon:E},data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetVideoUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){C.error(this.$t("kling.message.uploadVideoError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(C.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(C.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("file-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(c,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(v,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.percentage!==void 0?(l(),V(p,{key:0,url:g.url||g.response?.file_url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const kn=y(gn,[["render",vn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(c,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Sn=y(bn,[["render",Vn],["__scopeId","data-v-ca9fdbe5"]]),ae="video",Tn=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:Ue,ElRadioButton:Me,InfoIcon:S},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,character_orientation:e})}}},mounted(){this.$store.state.kling?.motionConfig?.character_orientation||(this.value=ae)}}),In={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-radio-button"),f=o("el-radio-group");return l(),m("div",In,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(c,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),size:"small",class:"value"},{default:h(()=>[n(p,{label:"image"},{default:h(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:h(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Un=y(Tn,[["render",Mn],["__scopeId","data-v-7a91195b"]]),re="std",Rn=b({name:"MotionModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},computed:{options(){return[{value:"std",label:this.$t("kling.name.modeStd")},{value:"pro",label:this.$t("kling.name.modePro")}]},value:{get(){return this.$store.state.kling?.motionConfig?.mode||re},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=re)}}),An={class:"field"},Pn={class:"header"},Dn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",An,[i("div",Pn,[i("h2",Dn,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Rn,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{value:{get(){return(this.$store.state.kling?.motionConfig?.keep_original_sound??"yes")==="yes"},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,keep_original_sound:e?"yes":"no"})}}}}),jn={class:"relative"},Nn={class:"flex justify-between items-center"},Bn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Nn,[i("div",Bn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(c,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:L,FontAwesomeIcon:E,Consumption:pe,MotionImage:un,MotionVideo:kn,MotionPromptInput:Sn,CharacterOrientationSelector:Un,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return ge(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const c=o("motion-image"),p=o("motion-video"),f=o("motion-prompt-input"),d=o("character-orientation-selector"),v=o("motion-mode-selector"),g=o("keep-original-sound-selector"),_=o("consumption"),M=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(c,{class:"mb-3"}),n(p,{class:"mb-3"}),n(f,{class:"mb-4"}),n(d,{class:"mb-4"}),n(v,{class:"mb-4"}),n(g,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:h(()=>[n(M,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ae,ElTabPane:Re,ElTag:Ce},props:{modelValue:{type:String,default:"videos"}},emits:["update:modelValue"],computed:{tabs(){return[{value:"videos",label:this.$t("kling.tab.videoGeneration")},{value:"motion",label:this.$t("kling.tab.motionControl")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const c=o("el-tag"),p=o("el-tab-pane"),f=o("el-tabs");return l(),V(f,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:h(()=>[(l(!0),m(T,null,I(e.tabs,d=>(l(),V(p,{key:d.value,name:d.value,disabled:d.disabled},{label:h(()=>[i("span",{class:"tab-label",title:d.disabled?d.disabledReason:void 0},[i("span",es,r(d.label),1),d.badge?(l(),V(c,{key:0,size:"small",type:"warning",class:"badge"},{default:h(()=>[w(r(d.badge),1)]),_:2},1024)):k("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ke,CopyToClipboard:Pe,FontAwesomeIcon:E,ElAlert:Ge,VideoPlayer:De,ElTooltip:J,ElButton:L,ImagePreview:G},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},ps={key:0},us={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},vs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},ks={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Vs={key:2,class:R({content:!0})},Ss={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ts={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Is(e,t,s,a,u,$){const c=o("el-image"),p=o("image-preview"),f=o("video-player"),d=o("el-button"),v=o("el-tooltip"),g=o("font-awesome-icon"),_=o("copy-to-clipboard"),M=o("el-alert");return l(),m("div",ss,[i("div",is,[n(c,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(T,null,I(e.referenceImages,(U,O)=>(l(),V(p,{key:O,url:U.url,name:U.name,closable:!1},null,8,["url","name"]))),128))])):k("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?k("",!0):(l(),m("span",ps," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",us," - ("+r(e.$t("kling.status.processing"))+") ",1)):k("",!0)])):k("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(f,{src:e.modelValue?.response.video_url},null,8,["src"])])):k("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(v,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:h(()=>[e.modelValue?.response.video_url?(l(),V(d,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=U=>e.onDownload(U,e.modelValue?.response.video_url))},{default:h(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):k("",!0)]),_:1},8,["content"])])):k("",!0),n(M,{closable:!1,class:"mt-2 success"},{default:h(()=>[i("p",_s,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",vs,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===!1?(l(),m("div",ks,[n(M,{closable:!1,class:"failure"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",bs,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(g,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(_,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Vs,[n(M,{closable:!1,class:"info"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",Ss,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Ts,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0)])])}const Es=y(ns,[["render",Is],["__scopeId","data-v-e8e87659"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:je,BotPlaceholder:Oe,ScrollList:Ee},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.kling?.tasks,items:this.$store.state.kling?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ms={key:0},Us={key:2,class:"w-full h-full flex items-center justify-center"};function Rs(e,t,s,a,u,$){const c=o("bot-placeholder"),p=o("task-preview"),f=o("scroll-list"),d=o("no-tasks");return l(),m(T,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(c)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),V(f,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=v=>e.$emit("reach-top"))},{default:h(()=>[(l(!0),m(T,null,I(e.tasks?.items,v=>(l(),V(p,{key:v.id,"model-value":v},null,8,["model-value"]))),128))]),_:1},8,["loading"])):k("",!0),e.tasks?.items?.length===0?(l(),m("div",Us,[n(d)])):k("",!0)],64)}const As=y(Ls,[["render",Rs]]),ce="https://webhook.acedata.cloud/kling",Ps=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:We,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===te.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===te.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Ne({tasks: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("kling/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("kling/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},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:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:ce};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){C.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.generate(s,{token:a}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(await this.$store.dispatch("kling/setTaskType",e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){C.warning(this.$t("kling.message.motionMissingInputs"));return}const t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||"video",mode:e.mode||"std",keep_original_sound:e.keep_original_sound??"yes",...e.prompt?{prompt:e.prompt}:{},callback_url:ce},s=this.credential?.token;if(!s){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.motion(t,{token:s}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ds={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const c=o("tab-switcher"),p=o("config-panel"),f=o("motion-panel"),d=o("recent-panel"),v=o("layout");return l(),V(v,null,{config:h(()=>[i("div",Ds,[n(c,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),V(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),V(f,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):k("",!0)])])]),result:h(()=>[n(d,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const ji=y(Ps,[["render",Ks]]);export{ji as default};
1
+ import{F as E}from"./index.es-CQ4a71ST.js";import{E as L}from"./index-BzCQ9QlI.js";import{E as de}from"./index-Fct8RIxf.js";import{d as b,H as m,E as i,z as j,C as n,y as h,D as o,q as l,F as r,x as V,O as T,N as I,Q as R,J as k,R as be,I as w,M as ye}from"./vendor-vue-DU0w5ewx.js";import{E as y,b1 as A,a0 as we,F as Ce,ap as te}from"./index-Bx2Na5Rz.js";import{b as Ve,c as oe,d as F,e as N,f as Se,g as Te,h as Ie}from"./kling-CtoPhhA9.js";import{E as P,a as D}from"./index-CiTi8svs.js";import{E as q}from"./index-Bnh5rcIi.js";import{E as C}from"./index-7Clblu4i.js";import{I as S,S as Ee}from"./ScrollList-iCSJIMrr.js";import{a as H,E as me}from"./index-T_4EI1kQ.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as G}from"./ImagePreview-vJJQ_TVt.js";import{E as J}from"./index-BykkUhOF.js";import{E as K}from"./index-DvlRmNoz.js";import{C as pe}from"./Consumption-DPIDTLHM.js";import{E as ue}from"./index-C6Norf3g.js";import{E as Q}from"./index-DsAX5Xg5.js";import{a as ge}from"./price-Dsi963Xl.js";import{F as Le}from"./FilePreview-CDhab4N8.js";import{E as Me,a as Ue}from"./index-CsPCRrNs.js";import{E as Re,a as Ae}from"./index-C-RZMPms.js";import{b as ne}from"./errorCode-Cqj9Td_Z.js";import{k as se}from"./kling-eU8m393Z.js";import{C as Pe}from"./CopyToClipboard-BS-OLHAb.js";import{V as De}from"./VideoPlayer-BPXqA96V.js";import{E as Ge}from"./index-m_03_xe6.js";import{E as Ke}from"./index-CV3EA-5Y.js";import{B as Oe}from"./BotPlaceholder-BYbtHOY5.js";import{N as je}from"./NoTasks-DxG4kNl_.js";import{l as Ne}from"./pagination-CcnL0MdN.js";import"./use-form-item-L1r3H2hN.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./index-CE3CU8QQ.js";import"./typescript-Czd6EZBe.js";import"./index-DXKP-ii8.js";import"./strings-DigWlKo9.js";import"./isEqual-BSWYzBQK.js";import"./_Uint8Array-DsubnpWQ.js";import"./castArray-D9h25tG8.js";import"./debounce-DGphlxJW.js";import"./_baseIteratee-B2f0l2j7.js";import"./index-CY__M1QA.js";import"./validator-DJEv2qcg.js";import"./index-Bz0iDXPF.js";import"./index-BDb4RNBo.js";import"./_baseClone-BGHYzsmx.js";import"./_initCloneObject-eE5oZBfW.js";import"./index-C8Et3Fqp.js";import"./isPlainObject-C4PSdRDF.js";import"./vue-plyr-BO2nlN4c.js";import"./index-BKQVmec6.js";const Be=b({name:"LayoutKling",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},data(){return{drawer:!1}}}),ze={class:"main flex flex-row flex-1 min-h-0"},Fe={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},qe={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function He(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),m("div",ze,[i("div",Fe,[j(e.$slots,"config",{},void 0,!0)]),i("div",qe,[j(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=d=>e.drawer=!0)},{default:h(()=>[n(c,{icon:"fa-solid fa-magic"})]),_:1}),n(f,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=d=>e.drawer=d),direction:"ltr","with-header":!1,size:"350px"},{default:h(()=>[j(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const We=y(Be,[["render",He],["__scopeId","data-v-8fa7523c"]]),Je={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function fe(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Je}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=fe(s,a,u),c=[];return e.end_image_url&&!$.endImage&&c.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&c.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&!$.motionControl&&c.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),c}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Qe=b({name:"ModelSelector",components:{ElSelect:D,ElOption:P},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0,options:[{value:"kling-v3",label:"v3"},{value:"kling-v3-omni",label:"v3-Omni"},{value:"kling-v2-6",label:"v2.6"},{value:"kling-v2-5-turbo",label:"v2.5-Turbo"},{value:"kling-v2-1-master",label:"v2.1-Master"},{value:"kling-v2-master",label:"v2-Master"},{value:"kling-v1-6",label:"v1.6"},{value:"kling-v1",label:"v1"},{value:"kling-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Ve)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ye={class:"field"},Xe={class:"title font-bold"};function Ze(e,t,s,a,u,$){const c=o("el-option"),p=o("el-select");return l(),m("div",Ye,[i("h2",Xe,r(e.$t("pika.name.model")),1),(l(),V(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,f=>(l(),V(c,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const xe=y(Qe,[["render",Ze],["__scopeId","data-v-04059875"]]),et=b({name:"ModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},cameraControlSet(){return!!this.$store.state.kling?.config?.camera_control?.type},fourKReason(){return F.includes(this.selectedModel)?this.cameraControlSet?this.$t("kling.description.mode4kIncompatibleCamera"):"":this.$t("kling.description.mode4kRequiresV3")},options(){return[{value:"std",label:this.$t("kling.name.modeStd"),disabled:!1,disabledReason:""},{value:"pro",label:this.$t("kling.name.modePro"),disabled:!1,disabledReason:""},{value:"4k",label:this.$t("kling.name.mode4k"),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value==="4k"&&this.applyMode(oe)}},mounted(){this.value||this.applyMode(oe)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),tt={class:"field"},ot={class:"header"},nt={class:"title font-bold"},st={key:0,class:"opt-tip"};function it(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",tt,[i("div",ot,[i("h2",nt,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),V(f,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value,disabled:d.disabled},{default:h(()=>[i("span",{class:R({"opt-disabled":d.disabled})},r(d.label),3),d.disabled&&d.disabledReason?(l(),m("span",st,r(d.disabledReason),1)):k("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const lt=y(et,[["render",it],["__scopeId","data-v-9a8fa3c5"]]),ie=[3,5,8,10,12,15],le=[5,10],at=b({name:"DurationSelector",components:{ElSlider:H,InfoIcon:S},props:{modelValue:{type:Number,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return F.includes(this.selectedModel)},sliderMin(){return this.isV3Model?3:5},sliderMax(){return this.isV3Model?15:10},sliderStep(){return this.isV3Model?1:5},marks(){const e=this.isV3Model?ie:le,t={};for(const s of e)t[s]=`${s}s`;return t},value(){return this.$store.state.kling?.config?.duration??N},sliderValue(){const e=this.value;return e<this.sliderMin?this.sliderMin:e>this.sliderMax?this.sliderMax:e}},watch:{isV3Model(e){(this.isV3Model?ie:le).includes(this.value)||this.applyDuration(N)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(N)},methods:{async onChange(e){const t=Array.isArray(e)?e[0]:e,s=this.$store.state.kling?.config||{},a=Y(s,{duration:t});if(a.length===0){this.applyDuration(t);return}const u=a.map($=>this.$t($.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:u}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const $=X({...s,duration:t},a);this.$store.commit("kling/setConfig",$),C.success(this.$t("kling.message.featureRemovedNotice",{fields:u}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),rt={class:"field"},ct={class:"header"},dt={class:"title font-bold"},mt={class:"value-display"};function pt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-slider");return l(),m("div",rt,[i("div",ct,[i("h2",dt,r(e.$t("kling.name.duration")),1),n(c,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"]),i("span",mt,r(e.value)+"s",1)]),(l(),V(p,{key:e.revertKey,"model-value":e.sliderValue,class:"slider",min:e.sliderMin,max:e.sliderMax,step:e.sliderStep,marks:e.marks,"show-tooltip":!1,onChange:e.onChange},null,8,["model-value","min","max","step","marks","onChange"]))])}const ut=y(at,[["render",pt],["__scopeId","data-v-aa1a22a1"]]),gt=b({name:"RatioSelector",data(){return{options:[{value:"1:1",label:"1:1",width:20,height:20},{value:"16:9",label:"16:9",width:25,height:13},{value:"9:16",label:"9:16",width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state?.kling?.config?.aspect_ratio},set(e){console.debug("set ratio",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||(this.value=Se)}}),ft={class:"text-sm font-bold mb-2 block"},ht={class:"items"},_t=["onClick"],$t={class:"name"};function vt(e,t,s,a,u,$){return l(),m("div",null,[i("span",ft,r(e.$t("kling.name.ratio")),1),i("div",ht,[(l(!0),m(T,null,I(e.options,(c,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:f=>e.value=c.value},[i("div",{class:R(["preview",c.label])},[i("div",{class:"rect",style:be({width:c.width+"px",height:c.height+"px"})},null,4)],2),i("p",$t,r(c.label),1)],10,_t))),128))])])}const kt=y(gt,[["render",vt],["__scopeId","data-v-cdb14b2f"]]),bt=b({name:"StartImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},value:{get(){return this.$store.state?.kling?.config?.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),yt={class:"relative"},wt={class:"flex justify-between"},Ct={class:"flex justify-start items-center"},Vt={class:"text-sm font-bold"};function St(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",yt,[i("div",wt,[i("div",Ct,[i("span",Vt,r(e.$t("kling.name.startImage")),1),n(c,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Tt=y(bt,[["render",St],["__scopeId","data-v-40832274"]]),It=b({name:"EndImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,ImagePreview:G,InfoIcon:S,FontAwesomeIcon:E},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},klingConfig(){return this.$store.state?.kling?.config||{}},endImageSupported(){return fe(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},uploadDisabled(){return this.reachedLimit||!this.endImageSupported},uploadTooltip(){return this.endImageSupported?this.reachedLimit?this.$t("kling.message.uploadReferencesExceed"):"":this.$t("kling.message.endImageNotSupported")},storeValue(){return this.klingConfig.end_image_url},value:{get(){return this.storeValue},set(){}}},watch:{storeValue(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?!0:(C.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Et={class:"relative"},Lt={class:"flex justify-between"},Mt={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"};function Rt(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",Et,[i("div",Lt,[i("div",Mt,[i("span",Ut,r(e.$t("kling.name.endImage")),1),n(c,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","before-upload","on-exceed","on-error","on-success","headers"])])}const At=y(It,[["render",Rt],["__scopeId","data-v-6959ad44"]]),Pt=b({name:"CfgScaleSelector",components:{ElSlider:H,InfoIcon:S,ElInputNumber:me},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug("set cfg_scale",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||(this.value=Te)}}),Dt={class:"flex justify-between"},Gt={class:"flex justify-start items-center"},Kt={class:"text-sm font-bold"},Ot={class:"flex justify-end items-center"},jt={class:"w-full"};function Nt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input-number"),f=o("el-slider");return l(),m("div",null,[i("div",Dt,[i("div",Gt,[i("span",Kt,r(e.$t("kling.name.cfgScale")),1),n(c,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",Ot,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),"controls-position":"right"},null,8,["modelValue"])])]),i("div",jt,[n(f,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=d=>e.value=d),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Bt=y(Pt,[["render",Nt]]),zt=b({name:"GenerateAudioSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(F.includes(this.selectedModel)||this.selectedModel==="kling-v2-6"&&this.selectedMode==="pro")},tooltipContent(){return this.supported?this.$t("kling.description.generateAudio"):this.$t("kling.description.generateAudioUnsupported")},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??Ie:!1},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:!1})}}}),Ft={class:"relative"},qt={class:"flex justify-between items-center"},Ht={class:"flex justify-start items-center"},Wt={class:"text-sm font-bold"};function Jt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",Ft,[i("div",qt,[i("div",Ht,[i("span",Wt,r(e.$t("kling.name.generateAudio")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const Qt=y(zt,[["render",Jt]]),Yt=["horizontal","vertical","pan","tilt","roll","zoom"],Xt=b({name:"CameraControlSelector",components:{ElSelect:D,ElOption:P,ElSlider:H,ElInputNumber:me,InfoIcon:S},data(){return{configKeys:Yt}},computed:{typeOptions(){return[{value:"",label:this.$t("kling.name.cameraTypeNone")},{value:"simple",label:this.$t("kling.name.cameraTypeSimple")},{value:"down_back",label:this.$t("kling.name.cameraTypeDownBack")},{value:"forward_up",label:this.$t("kling.name.cameraTypeForwardUp")},{value:"left_turn_forward",label:this.$t("kling.name.cameraTypeLeftTurnForward")},{value:"right_turn_forward",label:this.$t("kling.name.cameraTypeRightTurnForward")}]},selectedMode(){return this.$store.state.kling?.config?.mode||""},disabled(){return this.selectedMode==="4k"},tooltipContent(){return this.disabled?this.$t("kling.description.cameraControlDisabled4k"):this.$t("kling.description.cameraControl")},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??""},set(e){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="simple"?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw="")}},methods:{writeConfig(e,t){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),Zt={class:"field"},xt={class:"header"},eo={class:"text-sm font-bold"},to={key:0,class:"config-grid"},oo={class:"cfg-row-head"},no={class:"cfg-name"};function so(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select"),d=o("el-input-number"),v=o("el-slider");return l(),m("div",Zt,[i("div",xt,[i("span",eo,r(e.$t("kling.name.cameraControl")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(f,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=g=>e.selectedTypeRaw=g),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:h(()=>[(l(!0),m(T,null,I(e.typeOptions,g=>(l(),V(p,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",to,[(l(!0),m(T,null,I(e.configKeys,g=>(l(),m("div",{key:g,class:"cfg-row"},[i("div",oo,[i("span",no,r(e.$t(`kling.name.cc_${g}`)),1),n(d,{modelValue:e.configValues[g],"onUpdate:modelValue":_=>e.configValues[g]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(g,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(v,{"model-value":e.configValues[g]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(g,_)},null,8,["model-value","onInput"])]))),128))])):k("",!0)])}const io=y(Xt,[["render",so],["__scopeId","data-v-fb7b34d0"]]),he=[{groupKey:"cameraMovements",chipKeys:["rotateAround","stationary","handheld","zoomOut","zoomIn","follow","panRight","tiltUp","tiltDown","orbit"]},{groupKey:"cameraSpeed",chipKeys:["speedSlow","speedMedium","speedFast"]},{groupKey:"shotType",chipKeys:["shotClose","shotMedium","shotLong","shotLowAngle","shotHighAngle","shotShallowDof","shotFront","shotProfile","shotCloseUp","shotDrone"]},{groupKey:"light",chipKeys:["lightSunlight","lightSoft","lightNeon","lightWarm","lightNature","lightCandle","lightCityNight"]},{groupKey:"frame",chipKeys:["frameRichDetails","frameSimpleBg"]},{groupKey:"atmosphere",chipKeys:["atmosphereMysterious","atmospherePeaceful","atmosphereHeartwarming","atmosphereVivid","atmosphereColorful"]}],B=", ";function lo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${B}${t}`:t}function z(e,t){if(!e||!t)return e||"";const s=[`${t}${B}`,`${B}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const ao=b({name:"InspirationPills",components:{FontAwesomeIcon:E},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=z(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),ro={key:0,class:"pills",role:"list"},co={class:"pill-text"},mo=["aria-label","onClick"];function po(e,t,s,a,u,$){const c=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",ro,[(l(!0),m(T,null,I(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",co,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:ye(f=>e.onRemove(p),["stop"])},[n(c,{icon:"fa-solid fa-xmark"})],8,mo)]))),128))])):k("",!0)}const uo=y(ao,[["render",po],["__scopeId","data-v-5fc4fa65"]]),go="",fo=b({name:"PromptInput",components:{ElInput:Q,ElButton:L,FontAwesomeIcon:E,InfoIcon:S,InspirationPills:uo},emits:["open-inspiration"],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=go)}}),ho={class:"field"},_o={class:"box"},$o={class:"title font-bold"},vo={class:"actions"};function ko(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("info-icon"),d=o("inspiration-pills"),v=o("el-input");return l(),m("div",ho,[i("div",_o,[i("h2",$o,r(e.$t("kling.name.prompt")),1),i("div",vo,[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=g=>e.$emit("open-inspiration"))},{default:h(()=>[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1}),n(f,{content:e.$t("kling.description.prompt"),class:"info"},null,8,["content"])])]),n(d),n(v,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.prompt")},null,8,["modelValue","placeholder"])])}const bo=y(fo,[["render",ko],["__scopeId","data-v-0a5c57b8"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.config?.negative_prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,negative_prompt:e})}}},mounted(){this.prompt||(this.prompt=yo)}}),Co={class:"field"},Vo={class:"box"},So={class:"title font-bold"};function To(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",Vo,[i("h2",So,r(e.$t("kling.name.negativePrompt")),1),n(c,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const Io=y(wo,[["render",To],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:we}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},drawerSize(){return window.innerWidth<768?"100%":"380px"},prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(z(this.prompt,e)):this.setPrompt(lo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=z(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Uo={class:"title-row"},Ro={class:"title"},Ao={class:"hint"},Po={key:0,class:"selected-bar"},Do={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function No(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),V(f,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=d=>e.visible=d),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:h(()=>[i("div",Lo,[i("div",Mo,[i("div",Uo,[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Ro,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=d=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Po,[i("span",Do,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:h(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):k("",!0),i("div",Go,[(l(!0),m(T,null,I(e.groups,d=>(l(),m("div",{key:d.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${d.groupKey}`)),1),i("div",Oo,[(l(!0),m(T,null,I(d.chipKeys,v=>(l(),m("button",{key:v,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(v))}),onClick:g=>e.onToggle(e.chipText(v))},r(e.chipText(v)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const Bo=y(Eo,[["render",No],["__scopeId","data-v-7d457a69"]]),zo={"kling-v3":"v3","kling-v3-omni":"v3-Omni","kling-v2-6":"v2.6","kling-v2-5-turbo":"v2.5-Turbo","kling-v2-1-master":"v2.1-Master","kling-v2-master":"v2-Master","kling-v1-6":"v1.6","kling-v1":"v1","kling-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:E},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const c=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(c,{icon:"fa-solid fa-headphones"})],8,Xo)):k("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:L,Consumption:pe,FontAwesomeIcon:E,PromptInput:bo,NegativePromptInput:Io,ModelSelector:xe,ModeSelector:lt,DurationSelector:ut,RatioSelector:kt,StartImage:Tt,CfgScaleSelector:Bt,GenerateAudioSelector:Qt,CameraControlSelector:io,InspirationDrawer:Bo,SummaryChip:xo,EndImage:At},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return ge(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const c=o("prompt-input"),p=o("model-selector"),f=o("ratio-selector"),d=o("start-image"),v=o("end-image"),g=o("duration-selector"),_=o("mode-selector"),M=o("generate-audio-selector"),U=o("camera-control-selector"),O=o("cfg-scale-selector"),_e=o("negative-prompt-input"),$e=o("summary-chip"),ve=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(c,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(f,{class:"mb-4"}),n(d,{class:"mb-2"}),n(v,{class:"mb-2"}),n(g,{class:"mb-4"}),n(_,{class:"mb-4"}),n(M,{class:"mb-4"}),n(U,{class:"mb-4"}),n(O,{class:"mb-4"}),n(_e,{class:"mb-4"})]),i("div",nn,[n($e),n(ve,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),V(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),V(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:K,ElButton:L,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function pn(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(c,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(v,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.url&&g.percentage!==void 0?(l(),V(p,{key:0,url:g.url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const un=y(an,[["render",pn],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:K,ElButton:L,InfoIcon:S,FilePreview:Le,FontAwesomeIcon:E},data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetVideoUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){C.error(this.$t("kling.message.uploadVideoError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(C.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(C.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("file-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(c,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(v,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.percentage!==void 0?(l(),V(p,{key:0,url:g.url||g.response?.file_url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const kn=y(gn,[["render",vn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(c,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Sn=y(bn,[["render",Vn],["__scopeId","data-v-ca9fdbe5"]]),ae="video",Tn=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:Ue,ElRadioButton:Me,InfoIcon:S},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,character_orientation:e})}}},mounted(){this.$store.state.kling?.motionConfig?.character_orientation||(this.value=ae)}}),In={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-radio-button"),f=o("el-radio-group");return l(),m("div",In,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(c,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),size:"small",class:"value"},{default:h(()=>[n(p,{label:"image"},{default:h(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:h(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Un=y(Tn,[["render",Mn],["__scopeId","data-v-7a91195b"]]),re="std",Rn=b({name:"MotionModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},computed:{options(){return[{value:"std",label:this.$t("kling.name.modeStd")},{value:"pro",label:this.$t("kling.name.modePro")}]},value:{get(){return this.$store.state.kling?.motionConfig?.mode||re},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=re)}}),An={class:"field"},Pn={class:"header"},Dn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",An,[i("div",Pn,[i("h2",Dn,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Rn,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{value:{get(){return(this.$store.state.kling?.motionConfig?.keep_original_sound??"yes")==="yes"},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,keep_original_sound:e?"yes":"no"})}}}}),jn={class:"relative"},Nn={class:"flex justify-between items-center"},Bn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Nn,[i("div",Bn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(c,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:L,FontAwesomeIcon:E,Consumption:pe,MotionImage:un,MotionVideo:kn,MotionPromptInput:Sn,CharacterOrientationSelector:Un,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return ge(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const c=o("motion-image"),p=o("motion-video"),f=o("motion-prompt-input"),d=o("character-orientation-selector"),v=o("motion-mode-selector"),g=o("keep-original-sound-selector"),_=o("consumption"),M=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(c,{class:"mb-3"}),n(p,{class:"mb-3"}),n(f,{class:"mb-4"}),n(d,{class:"mb-4"}),n(v,{class:"mb-4"}),n(g,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:h(()=>[n(M,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ae,ElTabPane:Re,ElTag:Ce},props:{modelValue:{type:String,default:"videos"}},emits:["update:modelValue"],computed:{tabs(){return[{value:"videos",label:this.$t("kling.tab.videoGeneration")},{value:"motion",label:this.$t("kling.tab.motionControl")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const c=o("el-tag"),p=o("el-tab-pane"),f=o("el-tabs");return l(),V(f,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:h(()=>[(l(!0),m(T,null,I(e.tabs,d=>(l(),V(p,{key:d.value,name:d.value,disabled:d.disabled},{label:h(()=>[i("span",{class:"tab-label",title:d.disabled?d.disabledReason:void 0},[i("span",es,r(d.label),1),d.badge?(l(),V(c,{key:0,size:"small",type:"warning",class:"badge"},{default:h(()=>[w(r(d.badge),1)]),_:2},1024)):k("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ke,CopyToClipboard:Pe,FontAwesomeIcon:E,ElAlert:Ge,VideoPlayer:De,ElTooltip:J,ElButton:L,ImagePreview:G},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},ps={key:0},us={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},vs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},ks={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Vs={key:2,class:R({content:!0})},Ss={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ts={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Is(e,t,s,a,u,$){const c=o("el-image"),p=o("image-preview"),f=o("video-player"),d=o("el-button"),v=o("el-tooltip"),g=o("font-awesome-icon"),_=o("copy-to-clipboard"),M=o("el-alert");return l(),m("div",ss,[i("div",is,[n(c,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(T,null,I(e.referenceImages,(U,O)=>(l(),V(p,{key:O,url:U.url,name:U.name,closable:!1},null,8,["url","name"]))),128))])):k("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?k("",!0):(l(),m("span",ps," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",us," - ("+r(e.$t("kling.status.processing"))+") ",1)):k("",!0)])):k("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(f,{src:e.modelValue?.response.video_url},null,8,["src"])])):k("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(v,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:h(()=>[e.modelValue?.response.video_url?(l(),V(d,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=U=>e.onDownload(U,e.modelValue?.response.video_url))},{default:h(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):k("",!0)]),_:1},8,["content"])])):k("",!0),n(M,{closable:!1,class:"mt-2 success"},{default:h(()=>[i("p",_s,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",vs,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===!1?(l(),m("div",ks,[n(M,{closable:!1,class:"failure"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",bs,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(g,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(_,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Vs,[n(M,{closable:!1,class:"info"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",Ss,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Ts,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0)])])}const Es=y(ns,[["render",Is],["__scopeId","data-v-e8e87659"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:je,BotPlaceholder:Oe,ScrollList:Ee},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.kling?.tasks,items:this.$store.state.kling?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ms={key:0},Us={key:2,class:"w-full h-full flex items-center justify-center"};function Rs(e,t,s,a,u,$){const c=o("bot-placeholder"),p=o("task-preview"),f=o("scroll-list"),d=o("no-tasks");return l(),m(T,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(c)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),V(f,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=v=>e.$emit("reach-top"))},{default:h(()=>[(l(!0),m(T,null,I(e.tasks?.items,v=>(l(),V(p,{key:v.id,"model-value":v},null,8,["model-value"]))),128))]),_:1},8,["loading"])):k("",!0),e.tasks?.items?.length===0?(l(),m("div",Us,[n(d)])):k("",!0)],64)}const As=y(Ls,[["render",Rs]]),ce="https://webhook.acedata.cloud/kling",Ps=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:We,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===te.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===te.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Ne({tasks: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("kling/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("kling/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},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:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:ce};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){C.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.generate(s,{token:a}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(await this.$store.dispatch("kling/setTaskType",e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){C.warning(this.$t("kling.message.motionMissingInputs"));return}const t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||"video",mode:e.mode||"std",keep_original_sound:e.keep_original_sound??"yes",...e.prompt?{prompt:e.prompt}:{},callback_url:ce},s=this.credential?.token;if(!s){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.motion(t,{token:s}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ds={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const c=o("tab-switcher"),p=o("config-panel"),f=o("motion-panel"),d=o("recent-panel"),v=o("layout");return l(),V(v,null,{config:h(()=>[i("div",Ds,[n(c,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),V(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),V(f,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):k("",!0)])])]),result:h(()=>[n(d,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const ji=y(Ps,[["render",Ks]]);export{ji as default};