@acedatacloud/nexior 3.131.0 → 3.132.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 (244) hide show
  1. package/dist/assets/{Auth-CPun-ner.js → Auth-DoW89eXl.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-ELkmSsnl.js → BotPlaceholder-Dz346KfR.js} +1 -1
  3. package/dist/assets/{Callback-4CuFDDCn.js → Callback-BxcuXL8L.js} +1 -1
  4. package/dist/assets/{Console-CBUUE6hu.js → Console-sR1WFFyc.js} +1 -1
  5. package/dist/assets/{Consumption-BTER3uKB.js → Consumption-CVJ9gJl6.js} +1 -1
  6. package/dist/assets/{Conversation-D_l8--yU.js → Conversation-C078YItX.js} +1 -1
  7. package/dist/assets/{CopyToClipboard-C7KqrpSG.js → CopyToClipboard-Brt_FQKy.js} +1 -1
  8. package/dist/assets/{Detail-Duw-nCY-.js → Detail-QeWGK77n.js} +2 -2
  9. package/dist/assets/{EditArray-Vrcz4zIo.js → EditArray-DxHqztk_.js} +1 -1
  10. package/dist/assets/{Extra-CM83q08B.js → Extra-CyBWGXRy.js} +1 -1
  11. package/dist/assets/{FilePreview-C38qtwml.js → FilePreview-DCSZEpOp.js} +1 -1
  12. package/dist/assets/{History-Cdos199I.js → History-DFQdaWAE.js} +1 -1
  13. package/dist/assets/{IconPark.vue_vue_type_script_setup_true_lang-BaHTOpv8.js → IconPark.vue_vue_type_script_setup_true_lang-ByiMMhAO.js} +1 -1
  14. package/dist/assets/{ImagePreview-D1-wHUZ1.js → ImagePreview-BSdALQOQ.js} +1 -1
  15. package/dist/assets/{ImageWrapper-C3Zg_Tmp.js → ImageWrapper-BuOXUTxF.js} +1 -1
  16. package/dist/assets/{Index-BUXYm_Su.js → Index-13wBO1zS.js} +1 -1
  17. package/dist/assets/{Index-CEqsCcK2.js → Index-2TJZ0VA9.js} +1 -1
  18. package/dist/assets/{Index-gcG4M-N0.js → Index-5KQ0EinY.js} +1 -1
  19. package/dist/assets/{Index-Clb7R5zx.js → Index-BBGLf5sr.js} +1 -1
  20. package/dist/assets/{Index-Dvqp-tEV.js → Index-BHaXbT6p.js} +1 -1
  21. package/dist/assets/{Index-CdfJtbIW.js → Index-BgxzfMk0.js} +1 -1
  22. package/dist/assets/{Index-Dwu06Yn-.js → Index-BlTHaCzl.js} +1 -1
  23. package/dist/assets/{Index-DmOuiti2.js → Index-BzIWBx-o.js} +1 -1
  24. package/dist/assets/{Index-CwlyOPQR.js → Index-Bzmgo7D2.js} +1 -1
  25. package/dist/assets/{Index-Dzrn8zLS.js → Index-CH7sEvqW.js} +1 -1
  26. package/dist/assets/{Index-B-r6YJyv.js → Index-CIi07lI-.js} +1 -1
  27. package/dist/assets/{Index-Dj7O1bn6.js → Index-CU_HrhgE.js} +1 -1
  28. package/dist/assets/{Index-BZIyMFNJ.js → Index-CUnEcaKW.js} +1 -1
  29. package/dist/assets/{Index-CsYi1UUb.js → Index-C_lpTAXf.js} +1 -1
  30. package/dist/assets/{Index-BkppdjzW.js → Index-Cew5-GQf.js} +1 -1
  31. package/dist/assets/{Index-BflzaZt1.js → Index-CnhEtV9Y.js} +1 -1
  32. package/dist/assets/{Index-CER__2t3.js → Index-D2UXg3KD.js} +1 -1
  33. package/dist/assets/{Index-BT4C-Men.js → Index-DFxHrYfs.js} +1 -1
  34. package/dist/assets/{Index-El7s1dN-.js → Index-Di9Tv8vJ.js} +1 -1
  35. package/dist/assets/{Index-4wsXk6Uf.js → Index-DsxJ1iJm.js} +1 -1
  36. package/dist/assets/{Index-DNH6riVb.js → Index-DyeDfNsl.js} +1 -1
  37. package/dist/assets/{Index-CSOhlOff.js → Index-_hP5CZRB.js} +1 -1
  38. package/dist/assets/{Index-DW-TMho9.js → Index-qgo5lshk.js} +1 -1
  39. package/dist/assets/{Index-Djl-yxtb.js → Index-sAg_I0Pw.js} +1 -1
  40. package/dist/assets/{Invitees-DLE9q0ty.js → Invitees-DJ1HrxSz.js} +1 -1
  41. package/dist/assets/{List-BPKRi9u7.js → List-CXTGkxVX.js} +1 -1
  42. package/dist/assets/{List-CyniqIXh.js → List-Dh1TZ69R.js} +1 -1
  43. package/dist/assets/{List-Nw0AhMAs.js → List-bn4H6YW3.js} +1 -1
  44. package/dist/assets/{Main-Bgx8A0lS.js → Main-CIcEZkIw.js} +1 -1
  45. package/dist/assets/{Navigator-CaphA3zH.js → Navigator-CjlYxKaa.js} +1 -1
  46. package/dist/assets/{NoTasks-qWjyY3dd.js → NoTasks-Bqg46qQs.js} +1 -1
  47. package/dist/assets/{NotFound-bQHa1SMz.js → NotFound-B5ugjwQ9.js} +1 -1
  48. package/dist/assets/{OAuthCallback-CCsG1knc.js → OAuthCallback-DG77Kg1S.js} +1 -1
  49. package/dist/assets/{Pagination-DRntHdTl.js → Pagination-k_z7hpEw.js} +1 -1
  50. package/dist/assets/{ScrollList-DwtS5Kms.js → ScrollList-DD6uKMMq.js} +1 -1
  51. package/dist/assets/Status-CWdfv16U.js +1 -0
  52. package/dist/assets/{Status-nxFeE51N.css → Status-DoTyIyvB.css} +1 -1
  53. package/dist/assets/{Subscribe-BBVPomBj.js → Subscribe-CzTPSBFt.js} +1 -1
  54. package/dist/assets/{TransportWebHID-CtpearfN.js → TransportWebHID-Csw0lWwc.js} +1 -1
  55. package/dist/assets/{VideoPlayer-DkDgsLaU.js → VideoPlayer-C5jaE6t0.js} +1 -1
  56. package/dist/assets/{_Uint8Array-r2AiArwq.js → _Uint8Array-B1AOd8Kx.js} +1 -1
  57. package/dist/assets/{_baseClone-BxigKdDr.js → _baseClone-OjbZjxu5.js} +1 -1
  58. package/dist/assets/{_baseIteratee-D3txZhwq.js → _baseIteratee-Bl9YtNHI.js} +1 -1
  59. package/dist/assets/{_initCloneObject-DgmkiSjt.js → _initCloneObject-CN8tL3Ts.js} +1 -1
  60. package/dist/assets/{add-B6KetULi.js → add-TAejcyIx.js} +1 -1
  61. package/dist/assets/{all-wallets-BN91KmZN.js → all-wallets-D7-JTW0L.js} +1 -1
  62. package/dist/assets/{app-store-Cdq1Haaz.js → app-store-CflIcc8J.js} +1 -1
  63. package/dist/assets/{apple-CMW3rWdi.js → apple-DGCTnJcG.js} +1 -1
  64. package/dist/assets/{arrow-bottom-Ckc4u8b-.js → arrow-bottom-C4DJHzUz.js} +1 -1
  65. package/dist/assets/{arrow-bottom-circle-CUIpTR60.js → arrow-bottom-circle-BmyeY8Nr.js} +1 -1
  66. package/dist/assets/{arrow-left-CYKwcLq7.js → arrow-left-C0SZnLuj.js} +1 -1
  67. package/dist/assets/{arrow-right-D460fxTp.js → arrow-right-BcB0db_h.js} +1 -1
  68. package/dist/assets/{arrow-top-Dz-Qwhtt.js → arrow-top-B2bGQfin.js} +1 -1
  69. package/dist/assets/{avatar-tjGW8tMY.js → avatar-BqgqLdOq.js} +1 -1
  70. package/dist/assets/{bank-BAHhvjT3.js → bank-D2FAiOcu.js} +1 -1
  71. package/dist/assets/{basic-CrU6pSQx.js → basic-B4YgO9R3.js} +1 -1
  72. package/dist/assets/{browser-C6PwqoIN.js → browser-DaxkN7qv.js} +1 -1
  73. package/dist/assets/{byokCredential-BdXWk1L0.js → byokCredential-CTINyYbe.js} +1 -1
  74. package/dist/assets/{card-B-8sZW6U.js → card-OhXBRcgX.js} +1 -1
  75. package/dist/assets/{castArray-B2vxXNhD.js → castArray-D-wY-om0.js} +1 -1
  76. package/dist/assets/{chat-uSnIQ5XO.js → chat-YltqHDYH.js} +1 -1
  77. package/dist/assets/{checkmark-7uT55G9N.js → checkmark-ClE4evXe.js} +1 -1
  78. package/dist/assets/{checkmark-bold-fWaaJG7W.js → checkmark-bold-VwqyJ6Iu.js} +1 -1
  79. package/dist/assets/{chevron-bottom-kL9AYe-e.js → chevron-bottom-CYxJz3uj.js} +1 -1
  80. package/dist/assets/{chevron-left-CTgkIzoj.js → chevron-left-BL3mN8n-.js} +1 -1
  81. package/dist/assets/{chevron-right-B0XHcuUn.js → chevron-right-D56NHMkM.js} +1 -1
  82. package/dist/assets/{chevron-top-DoI4t_f-.js → chevron-top-COhIFxWO.js} +1 -1
  83. package/dist/assets/{chrome-store-BrI7wuL8.js → chrome-store-C3t71g8y.js} +1 -1
  84. package/dist/assets/{clock-Cwj3KIRa.js → clock-Ue7bsYUf.js} +1 -1
  85. package/dist/assets/{close-D400peN4.js → close-D85nasJR.js} +1 -1
  86. package/dist/assets/{coinPlaceholder-DTG8P9l3.js → coinPlaceholder-CSBLszmF.js} +1 -1
  87. package/dist/assets/{compass-DtCRatsI.js → compass-V5NNGpwn.js} +1 -1
  88. package/dist/assets/{copy-Dsdggpg8.js → copy-DsKV4dzk.js} +1 -1
  89. package/dist/assets/{cursor-BS0c5g5f.js → cursor-C7TD9Svu.js} +1 -1
  90. package/dist/assets/{cursor-transparent-9Kdkp_yM.js → cursor-transparent-xFuO34iV.js} +1 -1
  91. package/dist/assets/{debounce-_3S7zlL2.js → debounce-BSCdgF_G.js} +1 -1
  92. package/dist/assets/{desktop-Kllc1aBt.js → desktop-vnt9AJ9u.js} +1 -1
  93. package/dist/assets/{disconnect-Mx6pQ0B3.js → disconnect-DRKFjG0h.js} +1 -1
  94. package/dist/assets/{discord-myHVYqKR.js → discord-uB645RpW.js} +1 -1
  95. package/dist/assets/{distribution-WeRSvqxq.js → distribution-HdoxXu-N.js} +1 -1
  96. package/dist/assets/{dropdown-BFtPaRjY.js → dropdown-D1N5AZeB.js} +1 -1
  97. package/dist/assets/{etherscan-M4JtbwLK.js → etherscan-cRw30CZ1.js} +1 -1
  98. package/dist/assets/{exclamation-triangle-kVwKJKv7.js → exclamation-triangle-5s7QALiY.js} +1 -1
  99. package/dist/assets/{extension-BiARG9LC.js → extension-DlpIk5pn.js} +1 -1
  100. package/dist/assets/{external-link-Dy-EzyVs.js → external-link-DuFZK4lv.js} +1 -1
  101. package/dist/assets/{facebook-DerLI8-k.js → facebook-Bn4iOQYP.js} +1 -1
  102. package/dist/assets/{farcaster-DGOKM0CL.js → farcaster-Cogi_kEx.js} +1 -1
  103. package/dist/assets/{filters-B0P8MCkP.js → filters-ixFaXKtx.js} +1 -1
  104. package/dist/assets/{flux-C2cTCetu.js → flux-CyQ1383q.js} +1 -1
  105. package/dist/assets/{github-DuONAZxk.js → github-BjquYjgW.js} +1 -1
  106. package/dist/assets/{google-DHIC66VL.js → google-BagRnP0u.js} +1 -1
  107. package/dist/assets/{hailuo-Ch2VbIzn.js → hailuo-CNUhVens.js} +1 -1
  108. package/dist/assets/{headshots-DsEEv1Ur.js → headshots-Ca8TEFLJ.js} +1 -1
  109. package/dist/assets/{help-circle-DNXSJnRW.js → help-circle-Dh4JHpmr.js} +1 -1
  110. package/dist/assets/{id-CyrUum8M.js → id-DN23MXlQ.js} +1 -1
  111. package/dist/assets/{image-B3kxKV7f.js → image-DXmjv1nd.js} +1 -1
  112. package/dist/assets/{index-D1zNbFDu.js → index-4kaBm-Bd.js} +1 -1
  113. package/dist/assets/{index-C9Y7_boo.js → index-B6_VdYmd.js} +1 -1
  114. package/dist/assets/{index-DMTgZhwb.js → index-B9Mt7d0l.js} +1 -1
  115. package/dist/assets/{index-CrzPRMoa.js → index-BKmr_dIT.js} +1 -1
  116. package/dist/assets/{index-DHeOtfLf.js → index-BLRDWOXq.js} +1 -1
  117. package/dist/assets/{index-BswSqHMJ.js → index-BOJhg2ep.js} +1 -1
  118. package/dist/assets/{index-D7CgbKtA.js → index-BRGFd-vE.js} +1 -1
  119. package/dist/assets/{index-Dwcgrhqp.js → index-BUjLaVKq.js} +1 -1
  120. package/dist/assets/{index-CvXUxhYv.js → index-BV7c0enK.js} +1 -1
  121. package/dist/assets/{index-Bu5z2zqH.js → index-BYac-eiG.js} +1 -1
  122. package/dist/assets/{index-BS7RBRf7.js → index-BafPulHI.js} +1 -1
  123. package/dist/assets/{index-DZJZt16Z.js → index-BbTjanYN.js} +1 -1
  124. package/dist/assets/{index-tKiSg2XK.js → index-BfGbYGx9.js} +1 -1
  125. package/dist/assets/{index-BswHz97K.js → index-BhslKI9Q.js} +1 -1
  126. package/dist/assets/{index-thCCTumg.js → index-C-bHYZGD.js} +1 -1
  127. package/dist/assets/{index-BbKv819g.js → index-C1mvCeKF.js} +1 -1
  128. package/dist/assets/{index-Jnrcb_5s.js → index-C2Zr7Abo.js} +1 -1
  129. package/dist/assets/{index-bkFTkL1Z.js → index-C4SeR2IO.js} +1 -1
  130. package/dist/assets/{index-ClCG2tzm.js → index-C81pqXWn.js} +1 -1
  131. package/dist/assets/{index-C71gNsYG.js → index-CCSNqdLT.js} +1 -1
  132. package/dist/assets/{index-aw-oanlj.js → index-CEZH08Jo.js} +1 -1
  133. package/dist/assets/{index-B9arrHIM.js → index-CF0P0Rds.js} +1 -1
  134. package/dist/assets/{index-BP3406Mg.js → index-CPX7lB5d.js} +1 -1
  135. package/dist/assets/{index-CxcuDOs0.js → index-CSc-SDUZ.js} +1 -1
  136. package/dist/assets/{index-DIsO_TM1.js → index-CStSjLBE.js} +1 -1
  137. package/dist/assets/{index-WM9qmr1H.js → index-CX_axE-a.js} +1 -1
  138. package/dist/assets/{index-BbLwXRUs.js → index-CbWOFNCf.js} +1 -1
  139. package/dist/assets/{index-Cgx9mQ7g.js → index-CgqY0eZ8.js} +1 -1
  140. package/dist/assets/{index-DswwtSQ2.js → index-CmiV9SYW.js} +1 -1
  141. package/dist/assets/{index-B1WDSdZi.js → index-CojxheJg.js} +1 -1
  142. package/dist/assets/{index-CyDEYil7.js → index-Cs41qTGc.js} +1 -1
  143. package/dist/assets/{index-BcF6c2fj.js → index-Csu4i-nF.js} +1 -1
  144. package/dist/assets/{index-D5VLtUiZ.js → index-CswIYkPH.js} +1 -1
  145. package/dist/assets/{index-BaQKeD8n.js → index-CvSMDEhf.js} +1 -1
  146. package/dist/assets/{index-oC0P_XSo.js → index-Cwv0olWZ.js} +1 -1
  147. package/dist/assets/{index-Bw3CEnBC.js → index-CxsnnV3u.js} +1 -1
  148. package/dist/assets/{index-BLyzyfCi.js → index-CyJukRY7.js} +1 -1
  149. package/dist/assets/{index-CGhualWs.js → index-D1IAbAQN.js} +1 -1
  150. package/dist/assets/{index-VsL7uT2w.js → index-D7VOoX9M.js} +1 -1
  151. package/dist/assets/{index-AcwFgQIP.js → index-DCq85fm0.js} +1 -1
  152. package/dist/assets/{index-Bn2IlY-x.js → index-DD1BnwAo.js} +1 -1
  153. package/dist/assets/{index-DnPUVkoi.js → index-DElXSJmA.js} +1 -1
  154. package/dist/assets/{index-DdVQI-NW.js → index-DSBu13f_.js} +3 -3
  155. package/dist/assets/{index-CkcwmFw8.js → index-DVTRI2Ni.js} +1 -1
  156. package/dist/assets/{index-D-dFHIoB.js → index-DXWj0pSe.js} +1 -1
  157. package/dist/assets/{index-ENoTMmXE.js → index-DeXv0PU8.js} +3 -3
  158. package/dist/assets/{index-BNBvAVqk.js → index-DjgFNFf9.js} +1 -1
  159. package/dist/assets/{index-Da9nVqf6.js → index-Dn5kDZee.js} +1 -1
  160. package/dist/assets/{index-BusIrOhV.js → index-DqKhHozE.js} +6 -6
  161. package/dist/assets/{index-B7F2z5E0.js → index-Drp3wXir.js} +1 -1
  162. package/dist/assets/{index-B_tgouxo.js → index-Dy41xl1D.js} +1 -1
  163. package/dist/assets/{index-BzwM1E8W.js → index-JJGAKWxy.js} +1 -1
  164. package/dist/assets/{index-DVtkga7n.js → index-Ou8LmD22.js} +1 -1
  165. package/dist/assets/{index-BOifbS0e.js → index-UIJZjY9x.js} +1 -1
  166. package/dist/assets/{index-BJOZdRiR.js → index-agKVwkmW.js} +1 -1
  167. package/dist/assets/{index-UxOF2h8N.js → index-b8tymHU8.js} +1 -1
  168. package/dist/assets/{index-BORj7BGu.js → index-dawo-6z3.js} +1 -1
  169. package/dist/assets/{index-C5Y8uhbB.js → index-fG7JEm-L.js} +1 -1
  170. package/dist/assets/{index-CKEO4YEr.js → index-nuHVqiZs.js} +1 -1
  171. package/dist/assets/{index-Cx55_vpl.js → index-pHO-lClJ.js} +1 -1
  172. package/dist/assets/{index-D57UyGSQ.js → index-pWJdMqv0.js} +1 -1
  173. package/dist/assets/{index-CkSlSgEh.js → index-r2FvmVO0.js} +1 -1
  174. package/dist/assets/{index.browser.esm-CeNOqTen.js → index.browser.esm-B7fOy0Zy.js} +1 -1
  175. package/dist/assets/{index.es-DubEPH_n.js → index.es-KQojKMrW.js} +1 -1
  176. package/dist/assets/{info-DvoghkAM.js → info-DXwQQenE.js} +1 -1
  177. package/dist/assets/{info-circle-yJ38X5kc.js → info-circle-DSfkZjPd.js} +1 -1
  178. package/dist/assets/{isEqual-DZkx_aG1.js → isEqual-Bdit4QeQ.js} +1 -1
  179. package/dist/assets/{isPlainObject-DqrEVRCb.js → isPlainObject-BoF7kik0.js} +1 -1
  180. package/dist/assets/{kling-Bn7s58rw.js → kling-BQwEqOJP.js} +1 -1
  181. package/dist/assets/{lightbulb-BSbmlRDv.js → lightbulb-0csKlQ2n.js} +1 -1
  182. package/dist/assets/{luma-CwPFkvci.js → luma-CFJiWy55.js} +1 -1
  183. package/dist/assets/{mail-C53UaC-Q.js → mail-BOZQOh9O.js} +1 -1
  184. package/dist/assets/{midjourney-DQ_KaRws.js → midjourney-CMVSRleq.js} +1 -1
  185. package/dist/assets/{mobile-B2NMqYex.js → mobile-C8liaP-c.js} +1 -1
  186. package/dist/assets/{more-CXag8PT9.js → more-BSbEq6NP.js} +1 -1
  187. package/dist/assets/{nanobanana-B33aoEkq.js → nanobanana-DyROJ7iw.js} +1 -1
  188. package/dist/assets/{network-placeholder-z3Dx0PoY.js → network-placeholder-DBEIHIv7.js} +1 -1
  189. package/dist/assets/{nftPlaceholder-Cg8vQ94F.js → nftPlaceholder-B2mFnNZD.js} +1 -1
  190. package/dist/assets/{off-DRe4zVUJ.js → off-cZ4xHfr7.js} +1 -1
  191. package/dist/assets/{openaiimage-Dk7_ftyU.js → openaiimage-Z0oNu86e.js} +1 -1
  192. package/dist/assets/{order-Vc1kv_wq.js → order-CFMocKKO.js} +1 -1
  193. package/dist/assets/{pika-ClfsZ7jH.js → pika-ME7G3_OJ.js} +1 -1
  194. package/dist/assets/{pixverse-CzYfGXqE.js → pixverse-DYARFTgC.js} +1 -1
  195. package/dist/assets/{play-store-CVPQ3Chk.js → play-store-BRcU4tgc.js} +1 -1
  196. package/dist/assets/{plus-CwTJwbyz.js → plus-DL1gFIs1.js} +1 -1
  197. package/dist/assets/{price-DFH_6K1X.js → price-hqHwbNCZ.js} +1 -1
  198. package/dist/assets/{producer-BL71UObd.js → producer-XljSmc7D.js} +1 -1
  199. package/dist/assets/{qr-code-CLYRjc25.js → qr-code-CxQZr1bq.js} +1 -1
  200. package/dist/assets/{qrart-iPV1SSPb.js → qrart-Ckier6Bu.js} +1 -1
  201. package/dist/assets/{recycle-horizontal-C1RCZY5r.js → recycle-horizontal-Be-RfiSb.js} +1 -1
  202. package/dist/assets/{refresh-CCokFzdq.js → refresh-CJYyv8T3.js} +1 -1
  203. package/dist/assets/{reown-logo-CER-kxwz.js → reown-logo-CRgv79CQ.js} +1 -1
  204. package/dist/assets/{search-BFHynMse.js → search-dW2-oO2m.js} +1 -1
  205. package/dist/assets/{secp256k1-CawIunWV.js → secp256k1-BrryZ4hA.js} +1 -1
  206. package/dist/assets/{secp256k1-BeoCPJW_.js → secp256k1-UWC-cxZq.js} +1 -1
  207. package/dist/assets/{seedance-CfGlmkGb.js → seedance-B_bxmg0c.js} +1 -1
  208. package/dist/assets/{seedream-D08UBTf5.js → seedream-Blb1zZuW.js} +1 -1
  209. package/dist/assets/{send-Dpw9htWZ.js → send-BT5pFOU7.js} +1 -1
  210. package/dist/assets/{service-DkaYV6nA.js → service-D0iEWt02.js} +1 -1
  211. package/dist/assets/{solana-wallets-DT3WAfwA.js → solana-wallets-C9rBsAMj.js} +2 -2
  212. package/dist/assets/{solana-wallets-vue-DCOmPSas.js → solana-wallets-vue-C7zRGXCO.js} +1 -1
  213. package/dist/assets/{solanaEmbed.esm-BVtR9JV0.js → solanaEmbed.esm-Xls_9lWe.js} +1 -1
  214. package/dist/assets/{sora-hojbqARJ.js → sora-B-sAEH3j.js} +1 -1
  215. package/dist/assets/{string_decoder-BFKRIBKI.js → string_decoder-Bs592kXC.js} +1 -1
  216. package/dist/assets/{suno-D885IK17.js → suno-CCgjlUWu.js} +1 -1
  217. package/dist/assets/{swapHorizontal-DBtdxqwA.js → swapHorizontal-DDFsYtif.js} +1 -1
  218. package/dist/assets/{swapHorizontalBold-Dkqza1tZ.js → swapHorizontalBold-BQcMV516.js} +1 -1
  219. package/dist/assets/{swapHorizontalMedium-DESzlSI_.js → swapHorizontalMedium-CC-qgcA4.js} +1 -1
  220. package/dist/assets/{swapHorizontalRoundedBold-rbdX6kA5.js → swapHorizontalRoundedBold-CIXNT9w5.js} +1 -1
  221. package/dist/assets/{swapVertical-C8S-4Far.js → swapVertical-_FGTv-02.js} +1 -1
  222. package/dist/assets/{telegram-BWe4Z6Wy.js → telegram-CaVQOnOB.js} +1 -1
  223. package/dist/assets/{three-dots-CQY3FH4I.js → three-dots-CixqPn4S.js} +1 -1
  224. package/dist/assets/{twitch-B2Ap6n8c.js → twitch-DwdY7VmN.js} +1 -1
  225. package/dist/assets/{twitterIcon-_Mq8quei.js → twitterIcon-BhjAencN.js} +1 -1
  226. package/dist/assets/{typescript-CRhtnxhr.js → typescript-DCz1wy-K.js} +1 -1
  227. package/dist/assets/{use-form-item-Cfa6DxBA.js → use-form-item-BCLCPX5r.js} +1 -1
  228. package/dist/assets/validator-CTIug2KD.js +1 -0
  229. package/dist/assets/{veo-uLY-Cb0j.js → veo-izGRRB6U.js} +1 -1
  230. package/dist/assets/{verify-BHqAL7cU.js → verify-DNzgPbKw.js} +1 -1
  231. package/dist/assets/{verify-filled-D2YrIDod.js → verify-filled-KSOfMqZN.js} +1 -1
  232. package/dist/assets/{w3m-modal-C5QEYIJ4.js → w3m-modal-CASx3p_M.js} +1 -1
  233. package/dist/assets/{wallet-3BFYhCyf.js → wallet-DAIVUZqT.js} +1 -1
  234. package/dist/assets/{wallet-placeholder-DwX4Z7NO.js → wallet-placeholder-s7hGZJn0.js} +1 -1
  235. package/dist/assets/{walletconnect-D6GF7Qzj.js → walletconnect-AucCvRo-.js} +1 -1
  236. package/dist/assets/{wan-TvS4Ox6Z.js → wan-D6GSzbGp.js} +1 -1
  237. package/dist/assets/{warning-circle-LmoCfeL1.js → warning-circle-CzUzIEuA.js} +1 -1
  238. package/dist/assets/{web-CaxVcUIy.js → web-BOv3GIp4.js} +1 -1
  239. package/dist/assets/{web-DK8EbJ8i.js → web-DP96Ksvk.js} +1 -1
  240. package/dist/assets/{x-DTSeMEJE.js → x-D08bxbHQ.js} +1 -1
  241. package/dist/index.html +1 -1
  242. package/package.json +1 -1
  243. package/dist/assets/Status-CMWrsp8I.js +0 -1
  244. package/dist/assets/validator-WY8t3OY1.js +0 -1
@@ -1 +1 @@
1
- import{F as E}from"./index.es-DubEPH_n.js";import{E as L}from"./index-Bw3CEnBC.js";import{E as me}from"./index-CyDEYil7.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 ye,I as w,M as we}from"./vendor-vue-NSDaktjZ.js";import{E as y,b8 as A,a0 as Ce,F as Ve,cd as te,aw as oe}from"./index-ENoTMmXE.js";import{b as Se,c as ne,d as F,e as N,f as Te,g as Ie,h as Ee}from"./kling-CtoPhhA9.js";import{E as P,a as D}from"./index-DZJZt16Z.js";import{E as q}from"./index-DIsO_TM1.js";import{E as C}from"./index-DVtkga7n.js";import{I as S,S as Le}from"./ScrollList-DwtS5Kms.js";import{E as H}from"./index-BbLwXRUs.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as G}from"./ImagePreview-D1-wHUZ1.js";import{E as J}from"./index-BORj7BGu.js";import{E as K}from"./index-CkcwmFw8.js";import{C as pe}from"./Consumption-BTER3uKB.js";import{E as ue}from"./index-WM9qmr1H.js";import{E as ge}from"./index-BS7RBRf7.js";import{E as Q}from"./index-Da9nVqf6.js";import{a as fe}from"./price-DFH_6K1X.js";import{F as Me}from"./FilePreview-C38qtwml.js";import{E as Ue,a as Re}from"./index-BaQKeD8n.js";import{E as Ae,a as Pe}from"./index-Dwcgrhqp.js";import{b as se}from"./errorCode-Cqj9Td_Z.js";import{k as ie}from"./kling-Bn7s58rw.js";import{C as De}from"./CopyToClipboard-C7KqrpSG.js";import{V as Ge}from"./VideoPlayer-DkDgsLaU.js";import{E as Ke}from"./index-bkFTkL1Z.js";import{E as Oe}from"./index-BJOZdRiR.js";import{B as je}from"./BotPlaceholder-ELkmSsnl.js";import{N as Ne}from"./NoTasks-qWjyY3dd.js";import{l as Be}from"./pagination-Cnc6Oeyx.js";import"./use-form-item-Cfa6DxBA.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Kg6s1a65.js";import"./index-CrzPRMoa.js";import"./typescript-CRhtnxhr.js";import"./index-C71gNsYG.js";import"./strings-beZM2Y-f.js";import"./isEqual-DZkx_aG1.js";import"./_Uint8Array-r2AiArwq.js";import"./castArray-B2vxXNhD.js";import"./debounce-_3S7zlL2.js";import"./_baseIteratee-D3txZhwq.js";import"./index-B1WDSdZi.js";import"./validator-WY8t3OY1.js";import"./index-BOifbS0e.js";import"./_baseClone-BxigKdDr.js";import"./_initCloneObject-DgmkiSjt.js";import"./index-Cu41y2Fl.js";import"./index-BP3406Mg.js";import"./isPlainObject-DqrEVRCb.js";import"./vue-plyr-BO2nlN4c.js";import"./index-BLyzyfCi.js";const ze=b({name:"LayoutKling",components:{ElDrawer:me,ElButton:L,FontAwesomeIcon:E},data(){return{drawer:!1}}}),Fe={class:"main flex flex-row flex-1 min-h-0"},qe={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},He={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function We(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),m("div",Fe,[i("div",qe,[j(e.$slots,"config",{},void 0,!0)]),i("div",He,[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 Je=y(ze,[["render",We],["__scopeId","data-v-8fa7523c"]]),Qe={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function he(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 Qe}}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 $=he(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 Ye=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(Se)},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})}}}),Xe={class:"field"},Ze={class:"title font-bold"};function xe(e,t,s,a,u,$){const c=o("el-option"),p=o("el-select");return l(),m("div",Xe,[i("h2",Ze,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 et=y(Ye,[["render",xe],["__scopeId","data-v-04059875"]]),tt=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(ne)}},mounted(){this.value||this.applyMode(ne)},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})}}}),ot={class:"field"},nt={class:"header"},st={class:"title font-bold"},it={key:0,class:"opt-tip"};function lt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",ot,[i("div",nt,[i("h2",st,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",it,r(d.disabledReason),1)):k("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const at=y(tt,[["render",lt],["__scopeId","data-v-9a8fa3c5"]]),le=[3,5,8,10,12,15],ae=[5,10],rt=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?le:ae,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?le:ae).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})}}}),ct={class:"field"},dt={class:"header"},mt={class:"title font-bold"},pt={class:"value-display"};function ut(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-slider");return l(),m("div",ct,[i("div",dt,[i("h2",mt,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",pt,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 gt=y(rt,[["render",ut],["__scopeId","data-v-aa1a22a1"]]),ft=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=Te)}}),ht={class:"text-sm font-bold mb-2 block"},_t={class:"items"},$t=["onClick"],vt={class:"name"};function kt(e,t,s,a,u,$){return l(),m("div",null,[i("span",ht,r(e.$t("kling.name.ratio")),1),i("div",_t,[(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:ye({width:c.width+"px",height:c.height+"px"})},null,4)],2),i("p",vt,r(c.label),1)],10,$t))),128))])])}const bt=y(ft,[["render",kt],["__scopeId","data-v-cdb14b2f"]]),yt=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()}}}),wt={class:"relative"},Ct={class:"flex justify-between"},Vt={class:"flex justify-start items-center"},St={class:"text-sm font-bold"};function Tt(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",wt,[i("div",Ct,[i("div",Vt,[i("span",St,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 It=y(yt,[["render",Tt],["__scopeId","data-v-40832274"]]),Et=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 he(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()}}}),Lt={class:"relative"},Mt={class:"flex justify-between"},Ut={class:"flex justify-start items-center"},Rt={class:"text-sm font-bold"};function At(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",Lt,[i("div",Mt,[i("div",Ut,[i("span",Rt,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 Pt=y(Et,[["render",At],["__scopeId","data-v-6959ad44"]]),Dt=b({name:"CfgScaleSelector",components:{ElSlider:H,InfoIcon:S,ElInputNumber:ue},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=Ie)}}),Gt={class:"flex justify-between"},Kt={class:"flex justify-start items-center"},Ot={class:"text-sm font-bold"},jt={class:"flex justify-end items-center"},Nt={class:"w-full"};function Bt(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",Gt,[i("div",Kt,[i("span",Ot,r(e.$t("kling.name.cfgScale")),1),n(c,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",jt,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),"controls-position":"right"},null,8,["modelValue"])])]),i("div",Nt,[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 zt=y(Dt,[["render",Bt]]),Ft=b({name:"GenerateAudioSelector",components:{ElSwitch:ge,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??Ee:!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})}}}),qt={class:"relative"},Ht={class:"flex justify-between items-center"},Wt={class:"flex justify-start items-center"},Jt={class:"text-sm font-bold"};function Qt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",qt,[i("div",Ht,[i("div",Wt,[i("span",Jt,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 Yt=y(Ft,[["render",Qt]]),Xt=["horizontal","vertical","pan","tilt","roll","zoom"],Zt=b({name:"CameraControlSelector",components:{ElSelect:D,ElOption:P,ElSlider:H,ElInputNumber:ue,InfoIcon:S},data(){return{configKeys:Xt}},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)}}}),xt={class:"field"},eo={class:"header"},to={class:"text-sm font-bold"},oo={key:0,class:"config-grid"},no={class:"cfg-row-head"},so={class:"cfg-name"};function io(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",xt,[i("div",eo,[i("span",to,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",oo,[(l(!0),m(T,null,I(e.configKeys,g=>(l(),m("div",{key:g,class:"cfg-row"},[i("div",no,[i("span",so,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 lo=y(Zt,[["render",io],["__scopeId","data-v-fb7b34d0"]]),_e=[{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 ao(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 ro=b({name:"InspirationPills",components:{FontAwesomeIcon:E},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return _e.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})}}}),co={key:0,class:"pills",role:"list"},mo={class:"pill-text"},po=["aria-label","onClick"];function uo(e,t,s,a,u,$){const c=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",co,[(l(!0),m(T,null,I(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",mo,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:we(f=>e.onRemove(p),["stop"])},[n(c,{icon:"fa-solid fa-xmark"})],8,po)]))),128))])):k("",!0)}const go=y(ro,[["render",uo],["__scopeId","data-v-5fc4fa65"]]),fo="",ho=b({name:"PromptInput",components:{ElInput:Q,ElButton:L,FontAwesomeIcon:E,InfoIcon:S,InspirationPills:go},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=fo)}}),_o={class:"field"},$o={class:"box"},vo={class:"title font-bold"},ko={class:"actions"};function bo(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",_o,[i("div",$o,[i("h2",vo,r(e.$t("kling.name.prompt")),1),i("div",ko,[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 yo=y(ho,[["render",bo],["__scopeId","data-v-0a5c57b8"]]),wo="",Co=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=wo)}}),Vo={class:"field"},So={class:"box"},To={class:"title font-bold"};function Io(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",Vo,[i("div",So,[i("h2",To,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 Eo=y(Co,[["render",Io],["__scopeId","data-v-de98cf01"]]),Lo=b({name:"InspirationDrawer",components:{ElDrawer:me,ElButton:L,FontAwesomeIcon:E},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:_e,Close:Ce}},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(ao(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)}}}),Mo={class:"drawer-content"},Uo={class:"drawer-header"},Ro={class:"title-row"},Ao={class:"title"},Po={class:"hint"},Do={key:0,class:"selected-bar"},Go={class:"selected-text"},Ko={class:"groups"},Oo={class:"group-title"},jo={class:"chip-grid"},No=["onClick"];function Bo(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",Mo,[i("div",Uo,[i("div",Ro,[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Ao,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",Po,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Do,[i("span",Go,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",Ko,[(l(!0),m(T,null,I(e.groups,d=>(l(),m("div",{key:d.groupKey,class:"group"},[i("div",Oo,r(e.$t(`kling.inspiration.group.${d.groupKey}`)),1),i("div",jo,[(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,No))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const zo=y(Lo,[["render",Bo],["__scopeId","data-v-7d457a69"]]),Fo={"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"},qo={std:"720p",pro:"1080p","4k":"4K"},Ho=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 Fo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return qo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Wo={class:"summary-chip"},Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"],Zo=["title"];function xo(e,t,s,a,u,$){const c=o("font-awesome-icon");return l(),m("div",Wo,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Jo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Qo),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,Yo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Xo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(c,{icon:"fa-solid fa-headphones"})],8,Zo)):k("",!0)])}const en=y(Ho,[["render",xo],["__scopeId","data-v-418a6733"]]),tn=b({name:"ConfigPanel",components:{ElButton:L,Consumption:pe,FontAwesomeIcon:E,PromptInput:yo,NegativePromptInput:Eo,ModelSelector:et,ModeSelector:at,DurationSelector:gt,RatioSelector:bt,StartImage:It,CfgScaleSelector:zt,GenerateAudioSelector:Yt,CameraControlSelector:lo,InspirationDrawer:zo,SummaryChip:en,EndImage:Pt},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return fe(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),on={class:"flex flex-col h-full"},nn={class:"flex-1 overflow-y-auto p-5"},sn={class:"flex flex-col items-center justify-center px-5 pb-5"};function ln(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"),ve=o("summary-chip"),ke=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),be=o("inspiration-drawer");return l(),m("div",on,[i("div",nn,[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",sn,[n(ve),n(ke,{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(be,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const an=y(tn,[["render",ln]]),rn=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()}}}),cn={class:"relative"},dn={class:"flex justify-between"},mn={class:"flex justify-start items-center"},pn={class:"text-sm font-bold"};function un(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",cn,[i("div",dn,[i("div",mn,[i("span",pn,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 gn=y(rn,[["render",un],["__scopeId","data-v-37d42da7"]]),fn=b({name:"MotionVideo",components:{ElUpload:K,ElButton:L,InfoIcon:S,FilePreview:Me,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()}}}),hn={class:"relative"},_n={class:"flex justify-between"},$n={class:"flex justify-start items-center"},vn={class:"text-sm font-bold"};function kn(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",hn,[i("div",_n,[i("div",$n,[i("span",vn,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 bn=y(fn,[["render",kn],["__scopeId","data-v-5cf93212"]]),yn=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})}}}}),wn={class:"field"},Cn={class:"box"},Vn={class:"title font-bold"};function Sn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",wn,[i("div",Cn,[i("h2",Vn,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 Tn=y(yn,[["render",Sn],["__scopeId","data-v-ca9fdbe5"]]),re="video",In=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:Re,ElRadioButton:Ue,InfoIcon:S},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||re},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=re)}}),En={class:"field"},Ln={class:"header"},Mn={class:"text-sm font-bold"};function Un(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-radio-button"),f=o("el-radio-group");return l(),m("div",En,[i("div",Ln,[i("span",Mn,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 Rn=y(In,[["render",Un],["__scopeId","data-v-7a91195b"]]),ce="std",An=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||ce},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=ce)}}),Pn={class:"field"},Dn={class:"header"},Gn={class:"title font-bold"};function Kn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",Pn,[i("div",Dn,[i("h2",Gn,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 On=y(An,[["render",Kn],["__scopeId","data-v-1295688c"]]),jn=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:ge,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"})}}}}),Nn={class:"relative"},Bn={class:"flex justify-between items-center"},zn={class:"flex justify-start items-center"},Fn={class:"text-sm font-bold"};function qn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",Nn,[i("div",Bn,[i("div",zn,[i("span",Fn,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 Hn=y(jn,[["render",qn]]),Wn=b({name:"MotionPanel",components:{ElButton:L,FontAwesomeIcon:E,Consumption:pe,MotionImage:gn,MotionVideo:bn,MotionPromptInput:Tn,CharacterOrientationSelector:Rn,MotionModeSelector:On,KeepOriginalSoundSelector:Hn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return fe(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")}}}),Jn={class:"flex flex-col h-full"},Qn={class:"flex-1 overflow-y-auto p-5"},Yn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Xn(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",Jn,[i("div",Qn,[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",Yn,[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 Zn=y(Wn,[["render",Xn]]),xn=b({name:"KlingTabSwitcher",components:{ElTabs:Pe,ElTabPane:Ae,ElTag:Ve},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)}}}),es=["title"],ts={class:"text"};function os(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",ts,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,es)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const ns=y(xn,[["render",os],["__scopeId","data-v-bf00c27e"]]),ss=b({name:"TaskPreview",components:{ElImage:Oe,CopyToClipboard:De,FontAwesomeIcon:E,ElAlert:Ke,VideoPlayer:Ge,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")}}}),is={class:"preview"},ls={class:"left"},as={class:"main"},rs={class:"bot"},cs={class:"datetime"},ds={class:"info"},ms={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ps={key:1,class:"prompt mt-2"},us={key:0},gs={key:1},fs={key:0,class:R({content:!0,failed:!0})},hs={key:0,class:"mb-4"},_s={key:1,class:R({operations:!0,"mt-2":!0})},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},vs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ks={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},bs={key:1,class:R({content:!0})},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Vs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Ss={key:2,class:R({content:!0})},Ts={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Is={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Es(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",is,[i("div",ls,[n(c,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",as,[i("div",rs,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",cs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",ds,[e.referenceImages.length>0?(l(),m("div",ms,[(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",ps,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?k("",!0):(l(),m("span",us," - ("+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",gs," - ("+r(e.$t("kling.status.processing"))+") ",1)):k("",!0)])):k("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",fs,[e.modelValue?.response.video_url?(l(),m("div",hs,[n(f,{src:e.modelValue?.response.video_url},null,8,["src"])])):k("",!0),e.modelValue?.response.success?(l(),m("div",_s,[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",vs,[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",ks,[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",bs,[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",ys,[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",ws,[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",Cs,[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",Vs,[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",Ss,[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",Ts,[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",Is,[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 Ls=y(ss,[["render",Es],["__scopeId","data-v-e8e87659"]]),Ms=b({name:"RecentPanel",components:{TaskPreview:Ls,NoTasks:Ne,BotPlaceholder:je,ScrollList:Le},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?.()}}}),Us={key:0},Rs={key:2,class:"w-full h-full flex items-center justify-center"};function As(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",Us,[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",Rs,[n(d)])):k("",!0)],64)}const Ps=y(Ms,[["render",As]]),de="https://webhook.acedata.cloud/kling",Ds=b({name:"KlingIndex",components:{ConfigPanel:an,MotionPanel:Zn,TabSwitcher:ns,Layout:Je,RecentPanel:Ps},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===oe.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===oe.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 Be({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:de};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")),te("kling",ie.generate(s,{token:a})).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===se?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:de},s=this.credential?.token;if(!s){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),te("kling",ie.motion(t,{token:s})).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===se?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)})}}}),Gs={class:"flex flex-col h-full"},Ks={class:"flex-1 min-h-0"};function Os(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",Gs,[n(c,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Ks,[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 Bi=y(Ds,[["render",Os]]);export{Bi as default};
1
+ import{F as E}from"./index.es-KQojKMrW.js";import{E as L}from"./index-CxsnnV3u.js";import{E as me}from"./index-Cs41qTGc.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 ye,I as w,M as we}from"./vendor-vue-NSDaktjZ.js";import{E as y,b7 as A,a0 as Ce,F as Ve,cd as te,aw as oe}from"./index-DeXv0PU8.js";import{b as Se,c as ne,d as F,e as N,f as Te,g as Ie,h as Ee}from"./kling-CtoPhhA9.js";import{E as P,a as D}from"./index-BbTjanYN.js";import{E as q}from"./index-CStSjLBE.js";import{E as C}from"./index-Ou8LmD22.js";import{I as S,S as Le}from"./ScrollList-DD6uKMMq.js";import{E as H}from"./index-CbWOFNCf.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as G}from"./ImagePreview-BSdALQOQ.js";import{E as J}from"./index-dawo-6z3.js";import{E as K}from"./index-DVTRI2Ni.js";import{C as pe}from"./Consumption-CVJ9gJl6.js";import{E as ue}from"./index-CX_axE-a.js";import{E as ge}from"./index-BafPulHI.js";import{E as Q}from"./index-Dn5kDZee.js";import{a as fe}from"./price-hqHwbNCZ.js";import{F as Me}from"./FilePreview-DCSZEpOp.js";import{E as Ue,a as Re}from"./index-CvSMDEhf.js";import{E as Ae,a as Pe}from"./index-BUjLaVKq.js";import{b as se}from"./errorCode-Cqj9Td_Z.js";import{k as ie}from"./kling-BQwEqOJP.js";import{C as De}from"./CopyToClipboard-Brt_FQKy.js";import{V as Ge}from"./VideoPlayer-C5jaE6t0.js";import{E as Ke}from"./index-C4SeR2IO.js";import{E as Oe}from"./index-agKVwkmW.js";import{B as je}from"./BotPlaceholder-Dz346KfR.js";import{N as Ne}from"./NoTasks-Bqg46qQs.js";import{l as Be}from"./pagination-Cnc6Oeyx.js";import"./use-form-item-BCLCPX5r.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-Kg6s1a65.js";import"./index-BKmr_dIT.js";import"./typescript-DCz1wy-K.js";import"./index-CCSNqdLT.js";import"./strings-beZM2Y-f.js";import"./isEqual-Bdit4QeQ.js";import"./_Uint8Array-B1AOd8Kx.js";import"./castArray-D-wY-om0.js";import"./debounce-BSCdgF_G.js";import"./_baseIteratee-Bl9YtNHI.js";import"./index-CojxheJg.js";import"./validator-CTIug2KD.js";import"./index-UIJZjY9x.js";import"./_baseClone-OjbZjxu5.js";import"./_initCloneObject-CN8tL3Ts.js";import"./index-Cu41y2Fl.js";import"./index-CPX7lB5d.js";import"./isPlainObject-BoF7kik0.js";import"./vue-plyr-BO2nlN4c.js";import"./index-CyJukRY7.js";const ze=b({name:"LayoutKling",components:{ElDrawer:me,ElButton:L,FontAwesomeIcon:E},data(){return{drawer:!1}}}),Fe={class:"main flex flex-row flex-1 min-h-0"},qe={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},He={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function We(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),m("div",Fe,[i("div",qe,[j(e.$slots,"config",{},void 0,!0)]),i("div",He,[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 Je=y(ze,[["render",We],["__scopeId","data-v-8fa7523c"]]),Qe={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function he(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 Qe}}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 $=he(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 Ye=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(Se)},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})}}}),Xe={class:"field"},Ze={class:"title font-bold"};function xe(e,t,s,a,u,$){const c=o("el-option"),p=o("el-select");return l(),m("div",Xe,[i("h2",Ze,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 et=y(Ye,[["render",xe],["__scopeId","data-v-04059875"]]),tt=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(ne)}},mounted(){this.value||this.applyMode(ne)},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})}}}),ot={class:"field"},nt={class:"header"},st={class:"title font-bold"},it={key:0,class:"opt-tip"};function lt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",ot,[i("div",nt,[i("h2",st,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",it,r(d.disabledReason),1)):k("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const at=y(tt,[["render",lt],["__scopeId","data-v-9a8fa3c5"]]),le=[3,5,8,10,12,15],ae=[5,10],rt=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?le:ae,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?le:ae).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})}}}),ct={class:"field"},dt={class:"header"},mt={class:"title font-bold"},pt={class:"value-display"};function ut(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-slider");return l(),m("div",ct,[i("div",dt,[i("h2",mt,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",pt,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 gt=y(rt,[["render",ut],["__scopeId","data-v-aa1a22a1"]]),ft=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=Te)}}),ht={class:"text-sm font-bold mb-2 block"},_t={class:"items"},$t=["onClick"],vt={class:"name"};function kt(e,t,s,a,u,$){return l(),m("div",null,[i("span",ht,r(e.$t("kling.name.ratio")),1),i("div",_t,[(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:ye({width:c.width+"px",height:c.height+"px"})},null,4)],2),i("p",vt,r(c.label),1)],10,$t))),128))])])}const bt=y(ft,[["render",kt],["__scopeId","data-v-cdb14b2f"]]),yt=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()}}}),wt={class:"relative"},Ct={class:"flex justify-between"},Vt={class:"flex justify-start items-center"},St={class:"text-sm font-bold"};function Tt(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",wt,[i("div",Ct,[i("div",Vt,[i("span",St,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 It=y(yt,[["render",Tt],["__scopeId","data-v-40832274"]]),Et=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 he(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()}}}),Lt={class:"relative"},Mt={class:"flex justify-between"},Ut={class:"flex justify-start items-center"},Rt={class:"text-sm font-bold"};function At(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",Lt,[i("div",Mt,[i("div",Ut,[i("span",Rt,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 Pt=y(Et,[["render",At],["__scopeId","data-v-6959ad44"]]),Dt=b({name:"CfgScaleSelector",components:{ElSlider:H,InfoIcon:S,ElInputNumber:ue},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=Ie)}}),Gt={class:"flex justify-between"},Kt={class:"flex justify-start items-center"},Ot={class:"text-sm font-bold"},jt={class:"flex justify-end items-center"},Nt={class:"w-full"};function Bt(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",Gt,[i("div",Kt,[i("span",Ot,r(e.$t("kling.name.cfgScale")),1),n(c,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",jt,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),"controls-position":"right"},null,8,["modelValue"])])]),i("div",Nt,[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 zt=y(Dt,[["render",Bt]]),Ft=b({name:"GenerateAudioSelector",components:{ElSwitch:ge,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??Ee:!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})}}}),qt={class:"relative"},Ht={class:"flex justify-between items-center"},Wt={class:"flex justify-start items-center"},Jt={class:"text-sm font-bold"};function Qt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",qt,[i("div",Ht,[i("div",Wt,[i("span",Jt,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 Yt=y(Ft,[["render",Qt]]),Xt=["horizontal","vertical","pan","tilt","roll","zoom"],Zt=b({name:"CameraControlSelector",components:{ElSelect:D,ElOption:P,ElSlider:H,ElInputNumber:ue,InfoIcon:S},data(){return{configKeys:Xt}},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)}}}),xt={class:"field"},eo={class:"header"},to={class:"text-sm font-bold"},oo={key:0,class:"config-grid"},no={class:"cfg-row-head"},so={class:"cfg-name"};function io(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",xt,[i("div",eo,[i("span",to,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",oo,[(l(!0),m(T,null,I(e.configKeys,g=>(l(),m("div",{key:g,class:"cfg-row"},[i("div",no,[i("span",so,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 lo=y(Zt,[["render",io],["__scopeId","data-v-fb7b34d0"]]),_e=[{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 ao(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 ro=b({name:"InspirationPills",components:{FontAwesomeIcon:E},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return _e.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})}}}),co={key:0,class:"pills",role:"list"},mo={class:"pill-text"},po=["aria-label","onClick"];function uo(e,t,s,a,u,$){const c=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",co,[(l(!0),m(T,null,I(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",mo,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:we(f=>e.onRemove(p),["stop"])},[n(c,{icon:"fa-solid fa-xmark"})],8,po)]))),128))])):k("",!0)}const go=y(ro,[["render",uo],["__scopeId","data-v-5fc4fa65"]]),fo="",ho=b({name:"PromptInput",components:{ElInput:Q,ElButton:L,FontAwesomeIcon:E,InfoIcon:S,InspirationPills:go},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=fo)}}),_o={class:"field"},$o={class:"box"},vo={class:"title font-bold"},ko={class:"actions"};function bo(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",_o,[i("div",$o,[i("h2",vo,r(e.$t("kling.name.prompt")),1),i("div",ko,[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 yo=y(ho,[["render",bo],["__scopeId","data-v-0a5c57b8"]]),wo="",Co=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=wo)}}),Vo={class:"field"},So={class:"box"},To={class:"title font-bold"};function Io(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",Vo,[i("div",So,[i("h2",To,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 Eo=y(Co,[["render",Io],["__scopeId","data-v-de98cf01"]]),Lo=b({name:"InspirationDrawer",components:{ElDrawer:me,ElButton:L,FontAwesomeIcon:E},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:_e,Close:Ce}},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(ao(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)}}}),Mo={class:"drawer-content"},Uo={class:"drawer-header"},Ro={class:"title-row"},Ao={class:"title"},Po={class:"hint"},Do={key:0,class:"selected-bar"},Go={class:"selected-text"},Ko={class:"groups"},Oo={class:"group-title"},jo={class:"chip-grid"},No=["onClick"];function Bo(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",Mo,[i("div",Uo,[i("div",Ro,[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Ao,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",Po,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Do,[i("span",Go,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",Ko,[(l(!0),m(T,null,I(e.groups,d=>(l(),m("div",{key:d.groupKey,class:"group"},[i("div",Oo,r(e.$t(`kling.inspiration.group.${d.groupKey}`)),1),i("div",jo,[(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,No))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const zo=y(Lo,[["render",Bo],["__scopeId","data-v-7d457a69"]]),Fo={"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"},qo={std:"720p",pro:"1080p","4k":"4K"},Ho=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 Fo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return qo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Wo={class:"summary-chip"},Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"],Zo=["title"];function xo(e,t,s,a,u,$){const c=o("font-awesome-icon");return l(),m("div",Wo,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Jo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Qo),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,Yo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Xo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(c,{icon:"fa-solid fa-headphones"})],8,Zo)):k("",!0)])}const en=y(Ho,[["render",xo],["__scopeId","data-v-418a6733"]]),tn=b({name:"ConfigPanel",components:{ElButton:L,Consumption:pe,FontAwesomeIcon:E,PromptInput:yo,NegativePromptInput:Eo,ModelSelector:et,ModeSelector:at,DurationSelector:gt,RatioSelector:bt,StartImage:It,CfgScaleSelector:zt,GenerateAudioSelector:Yt,CameraControlSelector:lo,InspirationDrawer:zo,SummaryChip:en,EndImage:Pt},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return fe(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),on={class:"flex flex-col h-full"},nn={class:"flex-1 overflow-y-auto p-5"},sn={class:"flex flex-col items-center justify-center px-5 pb-5"};function ln(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"),ve=o("summary-chip"),ke=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),be=o("inspiration-drawer");return l(),m("div",on,[i("div",nn,[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",sn,[n(ve),n(ke,{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(be,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const an=y(tn,[["render",ln]]),rn=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()}}}),cn={class:"relative"},dn={class:"flex justify-between"},mn={class:"flex justify-start items-center"},pn={class:"text-sm font-bold"};function un(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",cn,[i("div",dn,[i("div",mn,[i("span",pn,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 gn=y(rn,[["render",un],["__scopeId","data-v-37d42da7"]]),fn=b({name:"MotionVideo",components:{ElUpload:K,ElButton:L,InfoIcon:S,FilePreview:Me,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()}}}),hn={class:"relative"},_n={class:"flex justify-between"},$n={class:"flex justify-start items-center"},vn={class:"text-sm font-bold"};function kn(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",hn,[i("div",_n,[i("div",$n,[i("span",vn,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 bn=y(fn,[["render",kn],["__scopeId","data-v-5cf93212"]]),yn=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})}}}}),wn={class:"field"},Cn={class:"box"},Vn={class:"title font-bold"};function Sn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",wn,[i("div",Cn,[i("h2",Vn,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 Tn=y(yn,[["render",Sn],["__scopeId","data-v-ca9fdbe5"]]),re="video",In=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:Re,ElRadioButton:Ue,InfoIcon:S},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||re},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=re)}}),En={class:"field"},Ln={class:"header"},Mn={class:"text-sm font-bold"};function Un(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-radio-button"),f=o("el-radio-group");return l(),m("div",En,[i("div",Ln,[i("span",Mn,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 Rn=y(In,[["render",Un],["__scopeId","data-v-7a91195b"]]),ce="std",An=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||ce},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=ce)}}),Pn={class:"field"},Dn={class:"header"},Gn={class:"title font-bold"};function Kn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",Pn,[i("div",Dn,[i("h2",Gn,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 On=y(An,[["render",Kn],["__scopeId","data-v-1295688c"]]),jn=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:ge,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"})}}}}),Nn={class:"relative"},Bn={class:"flex justify-between items-center"},zn={class:"flex justify-start items-center"},Fn={class:"text-sm font-bold"};function qn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",Nn,[i("div",Bn,[i("div",zn,[i("span",Fn,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 Hn=y(jn,[["render",qn]]),Wn=b({name:"MotionPanel",components:{ElButton:L,FontAwesomeIcon:E,Consumption:pe,MotionImage:gn,MotionVideo:bn,MotionPromptInput:Tn,CharacterOrientationSelector:Rn,MotionModeSelector:On,KeepOriginalSoundSelector:Hn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return fe(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")}}}),Jn={class:"flex flex-col h-full"},Qn={class:"flex-1 overflow-y-auto p-5"},Yn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Xn(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",Jn,[i("div",Qn,[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",Yn,[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 Zn=y(Wn,[["render",Xn]]),xn=b({name:"KlingTabSwitcher",components:{ElTabs:Pe,ElTabPane:Ae,ElTag:Ve},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)}}}),es=["title"],ts={class:"text"};function os(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",ts,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,es)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const ns=y(xn,[["render",os],["__scopeId","data-v-bf00c27e"]]),ss=b({name:"TaskPreview",components:{ElImage:Oe,CopyToClipboard:De,FontAwesomeIcon:E,ElAlert:Ke,VideoPlayer:Ge,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")}}}),is={class:"preview"},ls={class:"left"},as={class:"main"},rs={class:"bot"},cs={class:"datetime"},ds={class:"info"},ms={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ps={key:1,class:"prompt mt-2"},us={key:0},gs={key:1},fs={key:0,class:R({content:!0,failed:!0})},hs={key:0,class:"mb-4"},_s={key:1,class:R({operations:!0,"mt-2":!0})},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},vs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ks={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},bs={key:1,class:R({content:!0})},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Vs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Ss={key:2,class:R({content:!0})},Ts={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Is={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Es(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",is,[i("div",ls,[n(c,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",as,[i("div",rs,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",cs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",ds,[e.referenceImages.length>0?(l(),m("div",ms,[(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",ps,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?k("",!0):(l(),m("span",us," - ("+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",gs," - ("+r(e.$t("kling.status.processing"))+") ",1)):k("",!0)])):k("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",fs,[e.modelValue?.response.video_url?(l(),m("div",hs,[n(f,{src:e.modelValue?.response.video_url},null,8,["src"])])):k("",!0),e.modelValue?.response.success?(l(),m("div",_s,[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",vs,[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",ks,[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",bs,[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",ys,[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",ws,[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",Cs,[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",Vs,[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",Ss,[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",Ts,[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",Is,[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 Ls=y(ss,[["render",Es],["__scopeId","data-v-e8e87659"]]),Ms=b({name:"RecentPanel",components:{TaskPreview:Ls,NoTasks:Ne,BotPlaceholder:je,ScrollList:Le},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?.()}}}),Us={key:0},Rs={key:2,class:"w-full h-full flex items-center justify-center"};function As(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",Us,[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",Rs,[n(d)])):k("",!0)],64)}const Ps=y(Ms,[["render",As]]),de="https://webhook.acedata.cloud/kling",Ds=b({name:"KlingIndex",components:{ConfigPanel:an,MotionPanel:Zn,TabSwitcher:ns,Layout:Je,RecentPanel:Ps},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===oe.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===oe.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 Be({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:de};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")),te("kling",ie.generate(s,{token:a})).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===se?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:de},s=this.credential?.token;if(!s){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),te("kling",ie.motion(t,{token:s})).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===se?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)})}}}),Gs={class:"flex flex-col h-full"},Ks={class:"flex-1 min-h-0"};function Os(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",Gs,[n(c,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Ks,[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 Bi=y(Ds,[["render",Os]]);export{Bi as default};