@acedatacloud/nexior 3.356.4 → 3.356.6

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 (268) hide show
  1. package/dist/assets/{ApiCodeButton-Xu21Doha.js → ApiCodeButton-6BQ24hBr.js} +1 -1
  2. package/dist/assets/{Artifacts-CzqRzxMh.js → Artifacts-DfOUIZNw.js} +1 -1
  3. package/dist/assets/{AskUserQuestionCard-CG1lAYBK.js → AskUserQuestionCard-CoKe4UW4.js} +1 -1
  4. package/dist/assets/{Auth-BaMkoXW2.js → Auth-BWqcW37N.js} +1 -1
  5. package/dist/assets/{Bare-sasJr4V1.js → Bare-C7UkiDM1.js} +1 -1
  6. package/dist/assets/{BotPlaceholder-Cphp5w1L.js → BotPlaceholder-Cv0cpmLN.js} +1 -1
  7. package/dist/assets/{BottomFooter-C0MAFR5r.js → BottomFooter-DexpBZjG.js} +1 -1
  8. package/dist/assets/{BrowserPairingDialog-CVpfj6bQ.js → BrowserPairingDialog-1grl2MG4.js} +1 -1
  9. package/dist/assets/{Callback-2I7cmtKG.js → Callback-DA6RIWas.js} +1 -1
  10. package/dist/assets/{CodeSnippet-CEruFBMa.js → CodeSnippet-Dx1rpfeG.js} +1 -1
  11. package/dist/assets/{Console-D8dRIUKU.js → Console-Dv7aTYxJ.js} +1 -1
  12. package/dist/assets/{Consumption-DrrnDc02.js → Consumption-CUCdAwJr.js} +1 -1
  13. package/dist/assets/{Conversation-hTMTTIiZ.js → Conversation-BZzZN23A.js} +1 -1
  14. package/dist/assets/{Conversation-DoO9iOxX.js → Conversation-Bhj7r6Tu.js} +1 -1
  15. package/dist/assets/{CopyToClipboard-P1yaIIEd.js → CopyToClipboard-Bt9-bdiq.js} +1 -1
  16. package/dist/assets/Detail-Bd9gzPbS.js +2 -0
  17. package/dist/assets/{Extra-wHHGetuF.js → Extra-DxdUhw4H.js} +1 -1
  18. package/dist/assets/{FilePreview-CK2HoS-Z.js → FilePreview-XUDkFjsP.js} +1 -1
  19. package/dist/assets/{Hailuo-0JIK6DOO.js → Hailuo-bw-0fTpS.js} +1 -1
  20. package/dist/assets/{History-C5CIJiX_.js → History-DHRsIkJf.js} +1 -1
  21. package/dist/assets/{ImagePreview-D7SZPPgL.js → ImagePreview-BEpyCuCR.js} +1 -1
  22. package/dist/assets/{ImageWrapper-CDudZK75.js → ImageWrapper-CfHW59VC.js} +1 -1
  23. package/dist/assets/{Index-DXoHy4Pn2.js → Index-B7Lswffy2.js} +1 -1
  24. package/dist/assets/{Index-BrVtB6cq.js → Index-BFUydcn3.js} +1 -1
  25. package/dist/assets/{Index-C_mhnnc7.js → Index-BL7YnhK1.js} +1 -1
  26. package/dist/assets/{Index-CQtnR9qq2.js → Index-BPKLzF292.js} +1 -1
  27. package/dist/assets/{Index-DkftTpIk.js → Index-BVzDeTwv.js} +1 -1
  28. package/dist/assets/{Index-BnlWqa7D.js → Index-BgFglTJI.js} +1 -1
  29. package/dist/assets/{Index-COGFsKb4.js → Index-Bk3W87n9.js} +1 -1
  30. package/dist/assets/Index-BkghY_pl2.js +1 -0
  31. package/dist/assets/{Index-T8IawVK4.js → Index-BljR55k-.js} +1 -1
  32. package/dist/assets/Index-Bn-G1Tul.js +1 -0
  33. package/dist/assets/{Index-B3gh7LdS.js → Index-BvPoCBYp.js} +1 -1
  34. package/dist/assets/Index-BvpwD5cJ.js +1 -0
  35. package/dist/assets/{Index-CK7wSROQ.js → Index-BwihEh4H.js} +1 -1
  36. package/dist/assets/{Index-C871pUj5.js → Index-C56WfVcK.js} +1 -1
  37. package/dist/assets/{Index-CXJ-2bd02.js → Index-CADF_O042.js} +1 -1
  38. package/dist/assets/{Index-pRCbDBz0.js → Index-CO088SPK.js} +1 -1
  39. package/dist/assets/{Index-CEi5GONZ.js → Index-CRDrcKeh.js} +1 -1
  40. package/dist/assets/{Index-Di56DtVD.js → Index-CfRAA9k3.js} +1 -1
  41. package/dist/assets/{Index-CE07sWJf.js → Index-D-7iOsPq.js} +1 -1
  42. package/dist/assets/{Index-DOyTW-5d.js → Index-D6IKewMA.js} +1 -1
  43. package/dist/assets/Index-DSrDQUom.css +1 -0
  44. package/dist/assets/Index-DYVPugeH.js +1 -0
  45. package/dist/assets/{Index-DFtHPWzK.js → Index-D_YjSXs1.js} +1 -1
  46. package/dist/assets/{Index-DTgYQM7a2.js → Index-Ds2kQVkw2.js} +1 -1
  47. package/dist/assets/{Index-0dcue--r.js → Index-Dw4dnBJ8.js} +1 -1
  48. package/dist/assets/Index-INpUeK0i.js +1 -0
  49. package/dist/assets/{Index-BjdjjH1A.js → Index-JRTJ-kMr.js} +1 -1
  50. package/dist/assets/{Index-DXVG1gvI.js → Index-NR9ijzqR.js} +1 -1
  51. package/dist/assets/{Index-BkfrlCAV.js → Index-Nl07ZHcQ.js} +1 -1
  52. package/dist/assets/Index-RWTFptKN.css +1 -0
  53. package/dist/assets/{Index-DsQtXNE7.js → Index-_XySBZcX.js} +1 -1
  54. package/dist/assets/{Index-EC5xwHfg.js → Index-c1wJ62cO.js} +1 -1
  55. package/dist/assets/{Index-4HzOjpgv.js → Index-h5RiL56D.js} +1 -1
  56. package/dist/assets/Index-hHV3vXY_.js +1 -0
  57. package/dist/assets/{Index-Bgeave8Z.js → Index-wbWEMTAA.js} +1 -1
  58. package/dist/assets/Index-wuIjdogy2.js +1 -0
  59. package/dist/assets/{Invitees-B7BDOC-v.js → Invitees-CRoRR9_L.js} +1 -1
  60. package/dist/assets/List-PSPPIGZu.js +1 -0
  61. package/dist/assets/List-YVmTkV7l.js +1 -0
  62. package/dist/assets/List-y5KotW1i.js +1 -0
  63. package/dist/assets/LocalTools-B-fJmxPf.js +5 -0
  64. package/dist/assets/{LocalTools-Bb1sQZSp.js → LocalTools-DE8DPg0B.js} +1 -1
  65. package/dist/assets/{Logo-CNK8s7a-.css → Logo-WBk_MhiY.css} +1 -1
  66. package/dist/assets/Logo-sFONdVoq.js +1 -0
  67. package/dist/assets/{Main-Db1vpRc6.js → Main-Co8CSF5F.js} +1 -1
  68. package/dist/assets/{Message-DeioDyCA.js → Message-D42j9r4n.js} +2 -2
  69. package/dist/assets/Model-CZEgpEeE.js +1 -0
  70. package/dist/assets/{Navigator-CrHtL_hB.js → Navigator-B0QtF_7Y.js} +4 -4
  71. package/dist/assets/{NotFound-B9fpH9S6.js → NotFound-DsG897QA.js} +1 -1
  72. package/dist/assets/{PageHeader-Tdao2cJq.js → PageHeader-CbkTb8VC.js} +1 -1
  73. package/dist/assets/{Pay-Cr5CXyPy.js → Pay-PtdW3YJH.js} +1 -1
  74. package/dist/assets/{Player-DBuN2RDs.js → Player-CFksbe9W.js} +1 -1
  75. package/dist/assets/{Poivelle-DcZBUn63.js → Poivelle-C6izEUQu.js} +1 -1
  76. package/dist/assets/{RealtimeCall-CReealiS.js → RealtimeCall-EjkRbLIM.js} +1 -1
  77. package/dist/assets/{ReportButton-DGmAAhbu.js → ReportButton-D01Y2fPF.js} +1 -1
  78. package/dist/assets/{ReportDialog-BoIqksHF.js → ReportDialog-C-LvxTDU.js} +1 -1
  79. package/dist/assets/ScheduledTasks-CSEUvl8u.js +2 -0
  80. package/dist/assets/{Status-DnGPb6gL.js → Status-BFjIX1Il.js} +1 -1
  81. package/dist/assets/{Subscribe-B2BmLjtq.js → Subscribe-CmTnt-8g.js} +1 -1
  82. package/dist/assets/{TabSwitcher-uHvguPMy.js → TabSwitcher-BTkLfapK.js} +1 -1
  83. package/dist/assets/{Tts-BN-qgcKs.js → Tts-BHZR2CK-.js} +1 -1
  84. package/dist/assets/{VideoPlayer-CekxyRb2.js → VideoPlayer-BZ-N1fim.js} +1 -1
  85. package/dist/assets/{VideoPreview-C40uaHUN.js → VideoPreview-B0iB1u-B.js} +1 -1
  86. package/dist/assets/arrow-down-DobiO3I2.js +1 -0
  87. package/dist/assets/{arrow-down-wide-narrow-CvQuXkVq.js → arrow-down-wide-narrow-B5kwbnvK.js} +1 -1
  88. package/dist/assets/arrow-left-C7YbzFz4.js +1 -0
  89. package/dist/assets/arrow-right-BqDy8oUP.js +1 -0
  90. package/dist/assets/arrow-up-D3J0RjzQ.js +1 -0
  91. package/dist/assets/authorizeFlow-C5pGDUo0.js +1 -0
  92. package/dist/assets/{avatar-DCNitqNA.js → avatar-CGmdnfgF.js} +1 -1
  93. package/dist/assets/{basic-DctCkyuK.js → basic-3cxK5-jB.js} +1 -1
  94. package/dist/assets/{book-open-D3en4xKo.js → book-open-C1SE6Fda.js} +1 -1
  95. package/dist/assets/{box-4-9crZjA.js → box-wbHSraQR.js} +1 -1
  96. package/dist/assets/{boxes-DEj-Jpkg.js → boxes-MVwGL0nl.js} +1 -1
  97. package/dist/assets/{brain-BDfvXAYj.js → brain-JmXy3a5o.js} +1 -1
  98. package/dist/assets/{chart-no-axes-combined-KsQOcXjm.js → chart-no-axes-combined-DUnEKBgM.js} +1 -1
  99. package/dist/assets/{chat-Bi9dt0o4.js → chat-W5EIWgBd.js} +1 -1
  100. package/dist/assets/check-DlRpPo6I.js +1 -0
  101. package/dist/assets/chevron-down-Dh-ucpyc.js +1 -0
  102. package/dist/assets/chevron-right-CVZ8AZ8w.js +1 -0
  103. package/dist/assets/circle-check-CavhTDIT.js +1 -0
  104. package/dist/assets/{circle-question-mark-C2d1olJN.js → circle-question-mark-DprNRYIi.js} +1 -1
  105. package/dist/assets/{clipboard-list-DMS6zJDR.js → clipboard-list-CfUN0mkD.js} +1 -1
  106. package/dist/assets/clock-DEvy_URV.js +1 -0
  107. package/dist/assets/code-C8NvMB5v.js +1 -0
  108. package/dist/assets/{codingBridge-ujDCPmv8.js → codingBridge-Bq1VJQjC.js} +2 -2
  109. package/dist/assets/{codingBridgeNotify-u9COFxYv.js → codingBridgeNotify-DPKDONe5.js} +2 -2
  110. package/dist/assets/{coins-OxjGENzt.js → coins-b7MZemrt.js} +1 -1
  111. package/dist/assets/{copy-BizdVpDe.js → copy-B2YuRywn.js} +1 -1
  112. package/dist/assets/{createTaskActions-LcZV_lE9.js → createTaskActions-1EHlmRvE.js} +1 -1
  113. package/dist/assets/{digitalhuman-BeP6EN5W.js → digitalhuman-Bk2vgt7Z.js} +1 -1
  114. package/dist/assets/{dollar-sign-9AyRDRoz.js → dollar-sign-J1NpQDbK.js} +1 -1
  115. package/dist/assets/{download-CeAWar5e.js → download-BrP-rjrE.js} +1 -1
  116. package/dist/assets/{drawer-CzQ0A6Bq.js → drawer-C9nReT9E.js} +1 -1
  117. package/dist/assets/{dropdown-pOD9WyGl.js → dropdown-DxoW0THn.js} +1 -1
  118. package/dist/assets/{dropdown-BtGMhNsE.js → dropdown-JbGeLDGF.js} +1 -1
  119. package/dist/assets/{ellipsis-Do5PRc0G.js → ellipsis-BxO5GayN.js} +1 -1
  120. package/dist/assets/esm-C1gTpyxK.js +1 -0
  121. package/dist/assets/{esm-BiXF-y2J.js → esm-CYRbQnfT.js} +3 -3
  122. package/dist/assets/{esm-Di9LUYrZ.js → esm-D3CZGCn5.js} +2 -2
  123. package/dist/assets/{esm-DGZpmDh_.js → esm-DBN2jeoB.js} +1 -1
  124. package/dist/assets/{esm-jckNbdc9.js → esm-FDk24ya1.js} +1 -1
  125. package/dist/assets/{esm-Ds0Rkk-R.js → esm-wpoa5VdG.js} +1 -1
  126. package/dist/assets/{esm-DPQorKmp.js → esm-z2lPt5Wp.js} +2 -2
  127. package/dist/assets/{external-link-C6gy8Xm_.js → external-link-Kw6ZqZY1.js} +1 -1
  128. package/dist/assets/{eye-CDshsHwE.js → eye-C9rS7I-Z.js} +1 -1
  129. package/dist/assets/{file-BvSa9ufI.js → file-DR2IZ2Wm.js} +1 -1
  130. package/dist/assets/{file-output-BrqeGkvR.js → file-output-VjU75OeS.js} +1 -1
  131. package/dist/assets/{file-text-DcYOkJ2p.js → file-text-MaMLzbn-.js} +1 -1
  132. package/dist/assets/{fish-Ddg4h_i_.js → fish-C9B0rie0.js} +1 -1
  133. package/dist/assets/{flux-6N2l5dHX.js → flux-PBnLpvhr.js} +1 -1
  134. package/dist/assets/{folder-DQoN-X34.js → folder-DCeDCS_I.js} +1 -1
  135. package/dist/assets/gauge-CDZOaO3o.js +1 -0
  136. package/dist/assets/{globe-CvhdBdM-.js → globe-Bob7DrFY.js} +1 -1
  137. package/dist/assets/{omni-CELS0ayz.js → grokvideo-BGd3X5Bt.js} +1 -1
  138. package/dist/assets/{hailuo-DDblv_Ey.js → hailuo-UHTwVLn2.js} +1 -1
  139. package/dist/assets/{headphones-COcXPoxg.js → headphones-CNumdgIN.js} +1 -1
  140. package/dist/assets/{history-D6oyQm5_.js → history-DxYlDSMb.js} +1 -1
  141. package/dist/assets/{house-hN88KR-U.js → house-CarM1_hC.js} +1 -1
  142. package/dist/assets/{image-DIFbuUSR.js → image-C3x2yaF9.js} +1 -1
  143. package/dist/assets/{index-BdWkx9SU.js → index-BMhc9ht-.js} +3 -3
  144. package/dist/assets/{index.browser.esm-DO1Vhkjk.js → index.browser.esm-BHYfuyGM.js} +1 -1
  145. package/dist/assets/{index.es-CD6boxX9.js → index.es-CXSlnQTL.js} +1 -1
  146. package/dist/assets/{info-BFhGiEMG.js → info-VadVQTaW.js} +1 -1
  147. package/dist/assets/{input-number-DLmTTyLi.js → input-number-sRRzJirK.js} +1 -1
  148. package/dist/assets/{key-round-bM8mpdKv.js → key-round-Dv4f_RVa.js} +1 -1
  149. package/dist/assets/{kling-CJj-wsQq.js → kling-B5fnqyL0.js} +1 -1
  150. package/dist/assets/{languages-8x3U12tx.js → languages-PvIvqbtl.js} +1 -1
  151. package/dist/assets/{laptop-C2EKyjYc.js → laptop-CIXgF4F6.js} +1 -1
  152. package/dist/assets/{lightbulb-CYRKtwwN.js → lightbulb-9OJOLCrN.js} +1 -1
  153. package/dist/assets/{link-DFHCMKZn.js → link-C4THpRA9.js} +1 -1
  154. package/dist/assets/loader-circle-BG-suH_u.js +1 -0
  155. package/dist/assets/{lock-Dwbu9lHM.js → lock-DHKA2YxE.js} +1 -1
  156. package/dist/assets/{luma-BgdqDQQs.js → luma-BsF4II8I.js} +1 -1
  157. package/dist/assets/{maestro-B8jD31lS.js → maestro-D7fU16Z_.js} +1 -1
  158. package/dist/assets/{mail-B8qt2YUY.js → mail-C0hda9yQ.js} +1 -1
  159. package/dist/assets/{message-circle-DaFwZN2R.js → message-circle-Djz2RzFP.js} +1 -1
  160. package/dist/assets/{mic-CqqkTs2j.js → mic-BeIuK2ip.js} +1 -1
  161. package/dist/assets/{midjourney-DYvR-Luc.js → midjourney-BjmF46AI.js} +1 -1
  162. package/dist/assets/{mobileLocalExec-BzR4hrc-.js → mobileLocalExec-BIgxBl4Y.js} +2 -2
  163. package/dist/assets/{monitor-DJuEd-yy.js → monitor-B6S-odAh.js} +1 -1
  164. package/dist/assets/{mouse-pointer-2-CBvkEf9f.js → mouse-pointer-2-cGRAOWQp.js} +1 -1
  165. package/dist/assets/music-2-CdvZyn9G.js +1 -0
  166. package/dist/assets/{nanobanana-FKFjiBOk.js → nanobanana-DUp6OfMA.js} +1 -1
  167. package/dist/assets/{grokvideo-CbgfCLGc.js → omni-DeQjdCgR.js} +1 -1
  168. package/dist/assets/{openaiimage-Crk7kDwW.js → openaiimage-Mme4iLDJ.js} +1 -1
  169. package/dist/assets/{pagination-DyrAs5EO.js → pagination-B7Iq1pRa.js} +1 -1
  170. package/dist/assets/{pagination-B5GCs88M.js → pagination-BJRxAoxX.js} +1 -1
  171. package/dist/assets/{pagination-NhZwBj0v.js → pagination-Z4NRITpd.js} +2 -2
  172. package/dist/assets/{palette-DnXBCMVe.js → palette-D4JJcvQv.js} +1 -1
  173. package/dist/assets/{paperclip-CPj0sU8B.js → paperclip-BfPTf2hh.js} +1 -1
  174. package/dist/assets/{pause-BNJbbjLO.js → pause-VZaap5SC.js} +1 -1
  175. package/dist/assets/{pencil-Dazn-vwZ.js → pencil-DyF3kqks.js} +1 -1
  176. package/dist/assets/{sora-SgY0X2te.js → pika-CmikXQaV.js} +1 -1
  177. package/dist/assets/{pixverse-B-nTamu5.js → pixverse-DuvkxhSa.js} +1 -1
  178. package/dist/assets/play-DkffiuVx.js +1 -0
  179. package/dist/assets/{plug-jAnpXwOU.js → plug-BomKSL9n.js} +1 -1
  180. package/dist/assets/plus-RBQ1J_ID.js +1 -0
  181. package/dist/assets/{poivelle-K38KYjzY.js → poivelle-CFwnHV3l.js} +1 -1
  182. package/dist/assets/{popover-C7-EcUPb.js → popover-Cxqmc4sh.js} +1 -1
  183. package/dist/assets/{producer-Cm4DDCeW.js → producer-CZVQDkbb.js} +1 -1
  184. package/dist/assets/{qrart-CPetWMTG.js → qrart-CbtN-s3r.js} +1 -1
  185. package/dist/assets/{realtime-tc0zeANG.js → realtime-DRhCe8B9.js} +1 -1
  186. package/dist/assets/{refresh-cw-D_BnZCE0.js → refresh-cw-D_W--kgj.js} +1 -1
  187. package/dist/assets/rotate-ccw-0WNQDkPL.js +1 -0
  188. package/dist/assets/rotate-cw-D8pd8wOm.js +1 -0
  189. package/dist/assets/search-CGnw5hkl.js +1 -0
  190. package/dist/assets/{seedance-DpTjAJGg.js → seedance-Ohaeyejp.js} +1 -1
  191. package/dist/assets/{seedream-B5ifNSfw.js → seedream-xMZNe6qi.js} +1 -1
  192. package/dist/assets/{select-DxlkO65R.js → select-BzDGa5m7.js} +1 -1
  193. package/dist/assets/{serp-ByU1O3u6.js → serp-lXkWvScf.js} +1 -1
  194. package/dist/assets/{shield-BCzF_179.js → shield-CTZgSVw8.js} +1 -1
  195. package/dist/assets/{shuffle-D2L8tnjA.js → shuffle-Dv9vMhpo.js} +1 -1
  196. package/dist/assets/{slider-BsLm6S1h.js → slider-B1ilR4PR.js} +1 -1
  197. package/dist/assets/{solana-wallets-BaSZWJON.js → solana-wallets-o4brcKaM.js} +2 -2
  198. package/dist/assets/{solana-wallets-vue-zFiuLTr3.js → solana-wallets-vue-w3TZF7vc.js} +1 -1
  199. package/dist/assets/{wan-uXSWUeus.js → sora-Cejv1_nB.js} +1 -1
  200. package/dist/assets/{sparkles-CYJWqD4D.js → sparkles-DVeLj533.js} +1 -1
  201. package/dist/assets/square-DBjAU4ZY.js +1 -0
  202. package/dist/assets/{store-DxnQ92l1.js → store-B-T1wTXt.js} +1 -1
  203. package/dist/assets/{suno-G_gFhqnt.js → suno-BXKweMT5.js} +1 -1
  204. package/dist/assets/{switch-J51NyhGI.js → switch-MNH0pcC0.js} +1 -1
  205. package/dist/assets/{table-BGCs9aQL.js → table-CaZfW01f.js} +1 -1
  206. package/dist/assets/{tag-Dzg8ORBT.js → tag-BM3rCL07.js} +1 -1
  207. package/dist/assets/terminal-BrLABIZl.js +1 -0
  208. package/dist/assets/{time-picker-CqoCSffr.js → time-picker-CcCY5PXl.js} +1 -1
  209. package/dist/assets/{tooltip-C_Jr9jzb.js → tooltip-qTn7nJhY.js} +1 -1
  210. package/dist/assets/{trash-2-BQLGMG1w.js → trash-2-C7OqHxci.js} +1 -1
  211. package/dist/assets/{triangle-alert-ShrL63ju.js → triangle-alert-D_Ku-290.js} +1 -1
  212. package/dist/assets/{upload-CNBzy6GU.js → upload-CbQoV27b.js} +1 -1
  213. package/dist/assets/user-pEJcKZxI.js +1 -0
  214. package/dist/assets/{veo-BGQfNjVF.js → veo-CZhHDGHW.js} +1 -1
  215. package/dist/assets/{video-C99OMS5v.js → video-CV2KbVky.js} +1 -1
  216. package/dist/assets/{volume-2-C3UYEUV3.js → volume-2-CQYW9Gap.js} +1 -1
  217. package/dist/assets/{wallet-BvlkH9z-.js → wallet-n7Ka0qLA.js} +1 -1
  218. package/dist/assets/{pika-BMwvjgXG.js → wan-DAJyljkz.js} +1 -1
  219. package/dist/assets/{wand-sparkles-DEWXPZMX.js → wand-sparkles-DT_fyyk1.js} +1 -1
  220. package/dist/assets/{web-CNOvgQuJ.js → web-CJZEIbMU.js} +1 -1
  221. package/dist/assets/{web-DINxD1A7.js → web-CRMSarK3.js} +1 -1
  222. package/dist/assets/{web-vrVWjNtV.js → web-CXOZU1L6.js} +1 -1
  223. package/dist/assets/{web-CZ3_dHr7.js → web-DHtajFUB.js} +1 -1
  224. package/dist/assets/{web-CWsXaaIe.js → web-pdOo0dg0.js} +1 -1
  225. package/dist/assets/{webextrator-GDcDe6T9.js → webextrator-CJ-Y5MLa.js} +1 -1
  226. package/dist/assets/{zap-Y_oaUEuS.js → zap-CS_Gx6oy.js} +1 -1
  227. package/dist/index.html +1 -1
  228. package/package.json +1 -1
  229. package/dist/assets/Detail-C_tWDuBd.js +0 -2
  230. package/dist/assets/Index-B9pfa1cu.js +0 -1
  231. package/dist/assets/Index-BHrj-7dw.css +0 -1
  232. package/dist/assets/Index-BU-Jt2iC.css +0 -1
  233. package/dist/assets/Index-C-H_DJZ32.js +0 -1
  234. package/dist/assets/Index-ChRBKHU0.js +0 -1
  235. package/dist/assets/Index-DpyMjOJE.js +0 -1
  236. package/dist/assets/Index-DvV7n1zt.js +0 -1
  237. package/dist/assets/Index-oN7N6QmQ2.js +0 -1
  238. package/dist/assets/Index-qmpu8rV0.js +0 -1
  239. package/dist/assets/List-DWfGi6sY.js +0 -1
  240. package/dist/assets/List-DzuEPa3P.js +0 -1
  241. package/dist/assets/List-XiNR1aE8.js +0 -1
  242. package/dist/assets/LocalTools-DuS_LZoO.js +0 -5
  243. package/dist/assets/Logo-DaSShHcw.js +0 -1
  244. package/dist/assets/Model-C0EQ6qps.js +0 -1
  245. package/dist/assets/ScheduledTasks-m1iIrHVR.js +0 -2
  246. package/dist/assets/arrow-down-7-7JJ_4t.js +0 -1
  247. package/dist/assets/arrow-left-D9V5JLVJ.js +0 -1
  248. package/dist/assets/arrow-right-CQNhBomo.js +0 -1
  249. package/dist/assets/arrow-up-CJQ-wTEP.js +0 -1
  250. package/dist/assets/authorizeFlow-Bjp_nYzF.js +0 -1
  251. package/dist/assets/check-DlBiKMMT.js +0 -1
  252. package/dist/assets/chevron-down-DNF9n4uv.js +0 -1
  253. package/dist/assets/chevron-right-N8JOyfvh.js +0 -1
  254. package/dist/assets/circle-check-C7X984wD.js +0 -1
  255. package/dist/assets/clock-BBp05BQI.js +0 -1
  256. package/dist/assets/code-CE6oVN-l.js +0 -1
  257. package/dist/assets/esm-DAIL3wUn.js +0 -1
  258. package/dist/assets/gauge-DA8mgYMh.js +0 -1
  259. package/dist/assets/loader-circle-BXpeRDvC.js +0 -1
  260. package/dist/assets/music-2-BPlaXdqG.js +0 -1
  261. package/dist/assets/play-DDKHmJys.js +0 -1
  262. package/dist/assets/plus-DsxiwVWq.js +0 -1
  263. package/dist/assets/rotate-ccw-BtuuahqB.js +0 -1
  264. package/dist/assets/rotate-cw-Ds2Pz-cM.js +0 -1
  265. package/dist/assets/search-CgsDIdQb.js +0 -1
  266. package/dist/assets/square-DUlbGZuD.js +0 -1
  267. package/dist/assets/terminal-FdeXyUYD.js +0 -1
  268. package/dist/assets/user-BIWRv3hf.js +0 -1
@@ -1 +1 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{r as y,t as b}from"./select-DxlkO65R.js";import{n as x,t as S}from"./tabs-BQRg1x8-.js";import{t as C}from"./upload-CaDoepuW.js";import{t as w}from"./tooltip-C_Jr9jzb.js";import{t as T}from"./alert-BprQRUmf.js";import{h as E,v as D}from"./models-BezwK8kr.js";import{n as O,r as k}from"./radio-BNhFzeBO.js";import{t as A}from"./drawer-CzQ0A6Bq.js";import{t as j}from"./input-number-DLmTTyLi.js";import{t as M}from"./slider-BsLm6S1h.js";import{t as N}from"./switch-J51NyhGI.js";import{t as ee}from"./clock-BBp05BQI.js";import{a as te,c as ne,n as re,o as P,r as ie,t as ae}from"./pagination-NhZwBj0v.js";import{t as oe}from"./headphones-COcXPoxg.js";import{t as se}from"./info-BFhGiEMG.js";import{t as ce}from"./lightbulb-CYRKtwwN.js";import{t as le}from"./trash-2-BQLGMG1w.js";import{t as ue}from"./triangle-alert-ShrL63ju.js";import{t as F}from"./upload-CNBzy6GU.js";import{t as I}from"./wand-sparkles-DEWXPZMX.js";import{fi as de,li as fe,mi as L,pi as pe}from"./constants-CLU-fDDu.js";import{$t as R,Fi as z,Jt as me,Mr as B,Ni as he,O as V,Qt as H,Ui as ge,Xt as _e,Yt as ve,Zt as ye,en as be,in as xe,ir as U,nn as W,pn as G,si as K,tn as q,xi as J,yi as Se}from"./index-BdWkx9SU.js";import{t as Ce}from"./CopyToClipboard-P1yaIIEd.js";import{t as we}from"./ReportButton-DGmAAhbu.js";import{t as Te}from"./FilePreview-CK2HoS-Z.js";import{t as Y}from"./ImagePreview-D7SZPPgL.js";import{n as Ee}from"./taskDrawerMixin-DyAUhFEq.js";import{t as X}from"./Consumption-DrrnDc02.js";import{n as De,t as Oe}from"./VideoPreview-C40uaHUN.js";import{t as ke}from"./VideoPlayer-CekxyRb2.js";import{t as Ae}from"./ApiCodeButton-Xu21Doha.js";import{t as je}from"./BotPlaceholder-Cphp5w1L.js";var Me=v({name:`LayoutKling`,components:{MagicIcon:I,ElDrawer:A,ElButton:z},mixins:[Ee]}),Ne={class:`main flex flex-row flex-1 min-h-0`},Pe={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Fe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ie(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,Ne,[e(`div`,Pe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Fe,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Le=V(Me,[[`render`,Ie],[`__scopeId`,`data-v-2d826924`]]),Re={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};function Z(e,t,n){let r=t||`std`,i=n??5;switch(e){case`kling-v1`:return{text2video:!0,image2video:!0,endImage:i===5,audio:!1,motionControl:i===5,referenceVideo:!1,referenceImages:!1};case`kling-v1-6`:case`kling-v2-5-turbo`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-6`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:r===`pro`,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-master`:case`kling-v2-1-master`:return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v3`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:r!==`4k`,referenceVideo:!1,referenceImages:!1};case`kling-v3-omni`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1,referenceVideo:!0,referenceImages:!0};case`kling-o1`:return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1,referenceVideo:!0,referenceImages:!0};default:return Re}}var Q=`<<<video_1>>>`,ze=/<<<image_\d+>>>/g;function Be(e){return e?e.split(Q).join(` `).replace(/\s{2,}/g,` `).trim():``}function Ve(e){return e?e.replace(ze,` `).replace(/\s{2,}/g,` `).trim():``}function He(e,t){if(!e)return[];let n=t.model??e.model,r=t.mode??e.mode,i=t.duration??e.duration;if(!n)return[];let a=Z(n,r,i),o=[];e.end_image_url&&!a.endImage&&o.push({field:`end_image_url`,i18nLabel:`kling.name.endImage`}),e.generate_audio&&!a.audio&&o.push({field:`generate_audio`,i18nLabel:`kling.name.generateAudio`}),e.camera_control?.type&&(!a.motionControl||e.start_image_url)&&o.push({field:`camera_control`,i18nLabel:`kling.name.cameraControl`}),e.video_list?.length&&!a.referenceVideo&&o.push({field:`video_list`,i18nLabel:`kling.name.referenceVideo`}),e.image_list?.length&&!a.referenceImages&&o.push({field:`image_list`,i18nLabel:`kling.name.referenceImages`});let s=n===`kling-o1`||!!(e.image_list?.length||e.video_list?.length);return s&&e.cfg_scale!==void 0&&o.push({field:`cfg_scale`,i18nLabel:`kling.name.cfgScale`}),s&&e.negative_prompt&&o.push({field:`negative_prompt`,i18nLabel:`kling.name.negativePrompt`}),o}function $(e,t){let n={...e};for(let e of t)e.field===`end_image_url`&&(n.end_image_url=void 0),e.field===`generate_audio`&&(n.generate_audio=!1),e.field===`camera_control`&&(n.camera_control=void 0),e.field===`cfg_scale`&&(n.cfg_scale=void 0),e.field===`negative_prompt`&&(n.negative_prompt=void 0),e.field===`video_list`&&(n.video_list=void 0,n.prompt=Be(n.prompt)),e.field===`image_list`&&(n.image_list=void 0,n.prompt=Ve(n.prompt));return n}var Ue=v({name:`ModelSelector`,components:{ElSelect:y,ElOption:b},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-o1`,label:`Kling O1`}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(fe)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=He(t,{model:e});if(n.length===0){this.applyModel(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await J.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=$({...t,model:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,model:e})}}}),We={class:`field`},Ge={class:`title font-bold`};function Ke(t,n,r,a,o,u){let d=l(`el-option`),m=l(`el-select`);return g(),s(`div`,We,[e(`h2`,Ge,i(t.$t(`pika.name.model`)),1),(g(),f(m,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`pika.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(d,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var qe=V(Ue,[[`render`,Ke],[`__scopeId`,`data-v-a74e7f31`]]),Je=v({name:`ModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},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 L.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(`std`)}},mounted(){this.value||this.applyMode(`std`)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=He(t,{mode:e});if(n.length===0){this.applyMode(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await J.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=$({...t,mode:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,mode:e})}}}),Ye={class:`field`},Xe={class:`header`},Ze={class:`title font-bold`},Qe={key:0,class:`opt-tip`};function $e(t,r,u,d,m,_){let v=l(`info-icon`),y=l(`el-option`),b=l(`el-select`);return g(),s(`div`,Ye,[e(`div`,Xe,[e(`h2`,Ze,i(t.$t(`kling.name.mode`)),1),a(v,{content:t.$t(`kling.description.mode`),class:`info-icon`},null,8,[`content`])]),(g(),f(b,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`kling.placeholder.select`),clearable:!0,onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,t=>(g(),f(y,{key:t.value,label:t.label,value:t.value,disabled:t.disabled},{default:p(()=>[e(`span`,{class:n({"opt-disabled":t.disabled})},i(t.label),3),t.disabled&&t.disabledReason?(g(),s(`span`,Qe,i(t.disabledReason),1)):o(``,!0)]),_:2},1032,[`label`,`value`,`disabled`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var et=V(Je,[[`render`,$e],[`__scopeId`,`data-v-9a8fa3c5`]]),tt=[3,5,8,10,12,15],nt=[5,10],rt=[5],it=v({name:`DurationSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},isV3Model(){return L.includes(this.selectedModel)},allowedDurations(){return this.selectedModel===`kling-o1`?rt:this.isV3Model?tt:nt},value(){return this.$store.state.kling?.config?.duration??5},selectValue(){let e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(5)?5:e[0]}},watch:{selectedModel(){this.allowedDurations.includes(this.value)||this.applyDuration(5)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(5)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=He(t,{duration:e});if(n.length===0){this.applyDuration(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await J.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=$({...t,duration:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,duration:e})}}}),at={class:`field`},ot={class:`control`},st={class:`label`},ct={class:`title font-bold`};function lt(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,at,[e(`div`,ot,[e(`div`,st,[e(`h2`,ct,i(t.$t(`kling.name.duration`)),1),a(m,{content:t.$t(`kling.description.duration`),class:`info-icon ml-1`},null,8,[`content`])]),(g(),f(v,{key:t.revertKey,"model-value":t.selectValue,class:`value`,placeholder:t.$t(`kling.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.allowedDurations,e=>(g(),f(_,{key:e,label:`${e}s`,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])])}var ut=V(it,[[`render`,lt],[`__scopeId`,`data-v-496bf31c`]]),dt=v({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||=`1:1`}}),ft={class:`text-sm font-bold mb-2 block`},pt={class:`items`},mt=[`onClick`],ht={class:`name`};function gt(t,r,a,o,l,u){return g(),s(`div`,null,[e(`span`,ft,i(t.$t(`kling.name.ratio`)),1),e(`div`,pt,[(g(!0),s(c,null,h(t.options,(r,a)=>(g(),s(`div`,{key:a,class:n({active:t.active===a,item:!0}),onClick:e=>t.value=r.value},[e(`div`,{class:n([`preview`,r.label])},[e(`div`,{class:`rect`,style:m({width:r.width+`px`,height:r.height+`px`})},null,4)],2),e(`p`,ht,i(r.label),1)],10,mt))),128))])])}var _t=V(dt,[[`render`,gt],[`__scopeId`,`data-v-cdb14b2f`]]),vt=v({name:`StartImage`,components:{UploadIcon:F,ElUpload:C,ElButton:z,ElTooltip:w,InfoIcon:P,ImagePreview:Y},mixins:[W,q,R],emits:[`change`],data(){return{fileList:[],uploadUrl:K()+`/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(){}}},watch:{value(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onBeforeUpload(){let e=this.$store.state.kling?.config||{};if(e.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let t=e.video_list?.length?4:7;return(e.image_list?.length||0)+Number(!!e.end_image_url)+1>t?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:t})),!1):!0},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetStartImageUrl()}}}),yt={class:`relative`},bt={class:`flex min-h-8 items-center pr-20`},xt={class:`flex justify-start items-center`},St={class:`text-sm font-bold`};function Ct(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-tooltip`),x=l(`el-upload`);return g(),s(`div`,yt,[e(`div`,bt,[e(`div`,xt,[e(`span`,St,i(t.$t(`kling.name.startImage`)),1),a(h,{content:t.$t(`kling.description.uploadStartImage`)},null,8,[`content`])])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,disabled:t.reachedLimit,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.$t(`kling.message.uploadReferencesExceed`),disabled:!t.reachedLimit,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.reachedLimit},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$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`])])}var wt=V(vt,[[`render`,Ct],[`__scopeId`,`data-v-60844ac3`]]),Tt=v({name:`EndImage`,components:{UploadIcon:F,ElUpload:C,ElButton:z,ElTooltip:w,ImagePreview:Y,InfoIcon:P},mixins:[W,q,R],data(){return{fileList:[],uploadUrl:K()+`/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 Z(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},hasStartImage(){return!!this.klingConfig.start_image_url},uploadDisabled(){return this.reachedLimit||!this.endImageSupported||!this.hasStartImage},uploadTooltip(){return this.endImageSupported?this.hasStartImage?this.reachedLimit?this.$t(`kling.message.uploadReferencesExceed`):``:this.$t(`kling.message.endImageRequiresStart`):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=[])},hasStartImage(e){!e&&this.storeValue&&(this.fileList=[],this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:void 0}))}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onBeforeUpload(){if(!this.endImageSupported)return D.warning(this.$t(`kling.message.endImageNotSupported`)),!1;if(!this.hasStartImage)return D.warning(this.$t(`kling.message.endImageRequiresStart`)),!1;if(this.klingConfig.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let e=this.klingConfig.video_list?.length?4:7;return(this.klingConfig.image_list?.length||0)+2>e?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:e})),!1):!0},onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetEndImageUrl()}}}),Et={class:`relative`},Dt={class:`flex min-h-8 items-center pr-20`},Ot={class:`flex justify-start items-center`},kt={class:`text-sm font-bold`};function At(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-tooltip`),x=l(`el-upload`);return g(),s(`div`,Et,[e(`div`,Dt,[e(`div`,Ot,[e(`span`,kt,i(t.$t(`kling.name.endImage`)),1),a(h,{content:t.$t(`kling.description.uploadEndImage`)},null,8,[`content`])])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,disabled:t.uploadDisabled,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.uploadTooltip,disabled:!t.uploadDisabled,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.uploadDisabled},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$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`])])}var jt=V(Tt,[[`render`,At],[`__scopeId`,`data-v-b286c4d0`]]),Mt=v({name:`ReferenceVideo`,components:{ElUpload:C,ElButton:z,ElRadioButton:O,ElRadioGroup:k,ElSwitch:N,InfoIcon:P,FilePreview:Te,UploadIcon:F},mixins:[q,R],data(){return{fileList:[],uploadUrl:K()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},config(){return this.$store.state.kling?.config||{}},hasVideo(){return!!this.urls?.[0]},referenceType:{get(){return this.config.video_list?.[0]?.refer_type||`feature`},set(e){this.updateVideoOptions(e,this.keepOriginalSound)}},keepOriginalSound:{get(){return this.config.video_list?.[0]?.keep_original_sound===`yes`},set(e){this.updateVideoOptions(this.referenceType,e)}}},methods:{onExceed(){D.warning(this.$t(`kling.message.referenceVideoExceed`))},onError(){D.error(this.$t(`kling.message.referenceVideoError`))},beforeUpload(e){if((this.config.image_list?.length||0)+Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)>4)return D.error(this.$t(`kling.message.referenceVideoImageLimit`)),!1;let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=ye(e.size);return t?n?!0:(D.error(this.$t(`kling.message.referenceVideoSizeExceed`,{max:_e(ve)})),!1):(D.error(this.$t(`kling.message.referenceVideoTypeFailed`)),!1)},ensurePromptToken(e){let t=this.$store.state.kling?.config,n=t?.prompt||``,r=n.includes(Q),i;if(e&&!r)i=n?`${n} ${Q}`:Q;else if(!e&&r)i=Be(n);else return;this.$store.commit(`kling/setConfig`,{...t,prompt:i})},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,video_list:void 0}),this.ensurePromptToken(!1)},onSetVideoList(){let e=this.urls?.[0],t=e?[{video_url:e,refer_type:this.referenceType,keep_original_sound:this.keepOriginalSound?`yes`:`no`}]:void 0;this.$store.commit(`kling/setConfig`,{...this.config,video_list:t,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}),this.ensurePromptToken(!!e)},updateVideoOptions(e,t){let n=this.urls?.[0];n&&this.$store.commit(`kling/setConfig`,{...this.config,video_list:[{video_url:n,refer_type:e,keep_original_sound:t?`yes`:`no`}],...e===`base`?{start_image_url:void 0,end_image_url:void 0}:{},generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0})},async onSuccess(){this.onSetVideoList()}}}),Nt={class:`relative`},Pt={class:`flex min-h-8 items-center pr-20`},Ft={class:`flex justify-start items-center`},It={class:`text-sm font-bold`},Lt={key:0,class:`reference-options mt-3 flex flex-col gap-3`},Rt={class:`flex flex-col items-stretch gap-2 sm:flex-row sm:items-center sm:justify-between`},zt={class:`text-sm`},Bt={class:`flex items-center justify-between gap-3`},Vt={class:`text-sm`};function Ht(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`),x=l(`el-radio-button`),S=l(`el-radio-group`),C=l(`el-switch`);return g(),s(`div`,Nt,[e(`div`,Pt,[e(`div`,Ft,[e(`span`,It,i(t.$t(`kling.name.referenceVideo`)),1),a(h,{content:t.$t(`kling.description.omniReferenceVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`]),t.hasVideo?(g(),s(`div`,Lt,[e(`div`,Rt,[e(`span`,zt,i(t.$t(`kling.name.referenceVideoType`)),1),a(S,{modelValue:t.referenceType,"onUpdate:modelValue":n[1]||=e=>t.referenceType=e,size:`small`},{default:p(()=>[a(x,{value:`feature`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoFeature`)),1)]),_:1}),a(x,{value:`base`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoBase`)),1)]),_:1})]),_:1},8,[`modelValue`])]),e(`div`,Bt,[e(`span`,Vt,i(t.$t(`kling.name.keepOriginalSound`)),1),a(C,{modelValue:t.keepOriginalSound,"onUpdate:modelValue":n[2]||=e=>t.keepOriginalSound=e},null,8,[`modelValue`])])])):o(``,!0)])}var Ut=V(Mt,[[`render`,Ht],[`__scopeId`,`data-v-e3a9dfab`]]),Wt=v({name:`KlingReferenceImages`,components:{ElButton:z,ElUpload:C,UploadIcon:F,ImagePreview:Y,InfoIcon:P},mixins:[W,q,R],data(){return{fileList:[],uploadUrl:K()+`/api/v1/files/`}},computed:{config(){return this.$store.state.kling?.config||{}},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},frameCount(){return Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)},maxImages(){return this.config.video_list?.length?4:7},referenceLimit(){return Math.max(0,this.maxImages-this.frameCount)},remainingSlots(){return Math.max(0,this.referenceLimit-this.urls.length)},urls(){return this.fileList.map(e=>e.response?.file_url||e.url).filter(Boolean)},storeImages(){return this.config.image_list}},watch:{frameCount(){this.syncPromptTokens()},storeImages(e){!e?.length&&this.fileList.length>0&&(this.fileList=[])}},methods:{beforeUpload(){return this.remainingSlots===0?(this.onExceed(),!1):!0},onExceed(){D.warning(this.$t(`kling.message.referenceImagesExceed`,{count:this.remainingSlots}))},onError(){D.error(this.$t(`kling.message.referenceImagesError`))},clearOmniConflicts(e){return{...e,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}},syncPromptTokens(e){let t=e||this.config,n=[Ve(t.prompt),...this.urls.map((e,t)=>`<<<image_${this.frameCount+t+1}>>>`)].filter(Boolean).join(` `);n!==t.prompt&&this.$store.commit(`kling/setConfig`,{...t,prompt:n})},syncConfig(){let e=this.urls.length?this.urls.map(e=>({image_url:e})):void 0,t=this.clearOmniConflicts({...this.config,image_list:e});this.$store.commit(`kling/setConfig`,t),this.syncPromptTokens(t)},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.syncConfig()},onRemove(e,t){this.fileList.splice(e,1),t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),this.syncConfig()}}}),Gt={class:`relative`},Kt={class:`flex justify-between items-center`},qt={class:`flex justify-start items-center`},Jt={class:`text-sm font-bold`},Yt={key:0,class:`file-list flex flex-wrap gap-2 mt-2`};function Xt(t,n,u,d,m,_){let v=l(`info-icon`),y=l(`UploadIcon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`);return g(),s(`div`,Gt,[e(`div`,Kt,[e(`div`,qt,[e(`span`,Jt,i(t.$t(`kling.name.referenceImages`)),1),a(v,{content:t.$t(`kling.description.referenceImages`)},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg`,name:`file`,limit:t.referenceLimit,multiple:!0,"show-file-list":!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(b,{round:``,type:`primary`,size:`small`,disabled:t.remainingSlots===0},{default:p(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceImages`)),1)]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`limit`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.fileList.length?(g(),s(`div`,Yt,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(S,{key:e.uid||e.url||n,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemove(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])):o(``,!0)])}var Zt=V(Wt,[[`render`,Xt]]),Qt=v({name:`CfgScaleSelector`,components:{ElSlider:M,InfoIcon:P,ElInputNumber:j},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||=0}}),$t={class:`flex justify-between`},en={class:`flex justify-start items-center`},tn={class:`text-sm font-bold`},nn={class:`flex justify-end items-center`},rn={class:`w-full`};function an(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return g(),s(`div`,null,[e(`div`,$t,[e(`div`,en,[e(`span`,tn,i(t.$t(`kling.name.cfgScale`)),1),a(d,{content:t.$t(`kling.description.cfgScale`)},null,8,[`content`])]),e(`div`,nn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,rn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:1,step:.1},null,8,[`modelValue`])])])}var on=V(Qt,[[`render`,an]]),sn=v({name:`GenerateAudioSelector`,components:{ElSwitch:N,InfoIcon:P},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},selectedMode(){return this.$store.state.kling?.config?.mode||``},supported(){return!!(L.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??!1:!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})}}}),cn={class:`relative`},ln={class:`flex justify-between items-center`},un={class:`flex justify-start items-center`},dn={class:`text-sm font-bold`};function fn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,cn,[e(`div`,ln,[e(`div`,un,[e(`span`,dn,i(t.$t(`kling.name.generateAudio`)),1),a(d,{content:t.tooltipContent},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,disabled:!t.supported},null,8,[`modelValue`,`disabled`])])])}var pn=V(sn,[[`render`,fn]]),mn=[`horizontal`,`vertical`,`pan`,`tilt`,`roll`,`zoom`],hn=v({name:`CameraControlSelector`,components:{ElSelect:y,ElOption:b,ElSlider:M,ElInputNumber:j,InfoIcon:P},data(){return{configKeys:mn}},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||``},selectedModel(){return this.$store.state.kling?.config?.model||``},selectedDuration(){return this.$store.state.kling?.config?.duration},motionControlSupported(){return Z(this.selectedModel,this.selectedMode,this.selectedDuration).motionControl},hasStartImage(){return!!this.$store.state.kling?.config?.start_image_url},disabled(){return!this.motionControlSupported||this.hasStartImage},tooltipContent(){return this.motionControlSupported?this.hasStartImage?this.$t(`kling.description.cameraControlDisabledImage2Video`):this.$t(`kling.description.cameraControl`):this.$t(`kling.description.cameraControlNotSupported`)},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??``},set(e){let t=this.$store.state.kling?.config||{};if(!e){let e={...t};delete e.camera_control,this.$store.commit(`kling/setConfig`,e);return}let n=e;this.$store.commit(`kling/setConfig`,{...t,camera_control:{type:n,config:n===`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){let n=this.$store.state.kling?.config||{},r=n.camera_control||{type:`simple`},i={...r.config||{}};t==null?delete i[e]:i[e]=t,this.$store.commit(`kling/setConfig`,{...n,camera_control:{...r,type:`simple`,config:i}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),gn={class:`field`},_n={class:`header`},vn={class:`text-sm font-bold`},yn={key:0,class:`config-grid`},bn={class:`cfg-row-head`},xn={class:`cfg-name`};function Sn(t,n,r,u,d,m){let _=l(`info-icon`),v=l(`el-option`),y=l(`el-select`),b=l(`el-input-number`),x=l(`el-slider`);return g(),s(`div`,gn,[e(`div`,_n,[e(`span`,vn,i(t.$t(`kling.name.cameraControl`)),1),a(_,{content:t.tooltipContent},null,8,[`content`])]),a(y,{modelValue:t.selectedTypeRaw,"onUpdate:modelValue":n[0]||=e=>t.selectedTypeRaw=e,class:`value`,placeholder:t.$t(`kling.placeholder.cameraType`),clearable:!0,disabled:t.disabled},{default:p(()=>[(g(!0),s(c,null,h(t.typeOptions,e=>(g(),f(v,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`disabled`]),t.selectedType===`simple`&&!t.disabled?(g(),s(`div`,yn,[(g(!0),s(c,null,h(t.configKeys,n=>(g(),s(`div`,{key:n,class:`cfg-row`},[e(`div`,bn,[e(`span`,xn,i(t.$t(`kling.name.cc_${n}`)),1),a(b,{modelValue:t.configValues[n],"onUpdate:modelValue":e=>t.configValues[n]=e,min:-1,max:1,step:.1,precision:1,"controls-position":`right`,size:`small`,class:`cfg-num`,onChange:e=>t.onNumberChange(n,e)},null,8,[`modelValue`,`onUpdate:modelValue`,`onChange`])]),a(x,{"model-value":t.configValues[n]??0,min:-1,max:1,step:.1,onInput:e=>t.onSliderChange(n,e)},null,8,[`model-value`,`onInput`])]))),128))])):o(``,!0)])}var Cn=V(hn,[[`render`,Sn],[`__scopeId`,`data-v-cd896060`]]),wn=[{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`]}],Tn=`, `;function En(e,t){let n=(e||``).trim();return n?n.includes(t)?n:`${n}${Tn}${t}`:t}function Dn(e,t){if(!e||!t)return e||``;let n=[`${t}${Tn}`,`${Tn}${t}`,t],r=e;for(let e of n)if(r.includes(e)){r=r.replace(e,``);break}return r.replace(/(?:,\s*)+$/,``).replace(/^(?:,\s*)+/,``)}var On=v({name:`InspirationPills`,components:{CloseIcon:Se},computed:{prompt(){return this.$store.state.kling?.config?.prompt||``},allChipTexts(){return wn.flatMap(e=>e.chipKeys.map(e=>this.$t(`kling.inspiration.chip.${e}`)))},selected(){let e=this.prompt;if(!e)return[];let t=[];for(let n of this.allChipTexts){let r=e.indexOf(n);r!==-1&&t.push({text:n,idx:r})}return t.sort((e,t)=>e.idx-t.idx).map(e=>e.text)}},methods:{onRemove(e){let t=Dn(this.prompt,e);this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:t})}}}),kn={key:0,class:`pills`,role:`list`},An={class:`pill-text`},jn=[`aria-label`,`title`,`onClick`];function Mn(n,r,u,d,f,p){let m=l(`close-icon`);return n.selected.length>0?(g(),s(`div`,kn,[(g(!0),s(c,null,h(n.selected,r=>(g(),s(`div`,{key:r,class:`pill`,role:`listitem`},[e(`span`,An,i(r),1),e(`button`,{type:`button`,class:`pill-remove`,"aria-label":n.$t(`kling.inspiration.removeChip`),title:n.$t(`kling.inspiration.removeChip`),onClick:t(e=>n.onRemove(r),[`stop`])},[a(m,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,jn)]))),128))])):o(``,!0)}var Nn=v({name:`PromptInput`,components:{IdeaIcon:ce,ElButton:z,PromptTextarea:te,InspirationPills:V(On,[[`render`,Mn],[`__scopeId`,`data-v-6be01bcf`]])},emits:[`open-inspiration`],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Pn(e,t,n,o,s,c){let u=l(`idea-icon`),d=l(`el-button`),m=l(`inspiration-pills`),h=l(`prompt-textarea`);return g(),f(h,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||=t=>e.prompt=t,title:e.$t(`kling.name.prompt`),info:e.$t(`kling.description.prompt`),placeholder:e.$t(`kling.placeholder.prompt`)},{actions:p(()=>[a(d,{text:``,size:`small`,class:`inspiration-btn`,onClick:t[0]||=t=>e.$emit(`open-inspiration`)},{default:p(()=>[a(u,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(e.$t(`kling.inspiration.openButton`)),1)]),_:1})]),before:p(()=>[a(m)]),_:1},8,[`modelValue`,`title`,`info`,`placeholder`])}var Fn=V(Nn,[[`render`,Pn],[`__scopeId`,`data-v-5754ae54`]]),In=v({name:`NegativePromptInput`,components:{ElInput:ge,InfoIcon:P},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||=``}}),Ln={class:`field`},Rn={class:`box`},zn={class:`title font-bold`};function Bn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Ln,[e(`div`,Rn,[e(`h2`,zn,i(t.$t(`kling.name.negativePrompt`)),1),a(d,{content:t.$t(`kling.description.negativePrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.negativePrompt`)},null,8,[`modelValue`,`placeholder`])])}var Vn=V(In,[[`render`,Bn],[`__scopeId`,`data-v-de98cf01`]]),Hn=v({name:`InspirationDrawer`,components:{Close:Se,IdeaIcon:ce,ElDrawer:A,ElButton:z},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`],data(){return{groups:wn}},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(e=>this.$t(`kling.inspiration.chip.${e}`)))},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(Dn(this.prompt,e)):this.setPrompt(En(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(let t of this.allChipTexts)for(;e.includes(t);)e=Dn(e,t);this.setPrompt(e)}}}),Un={class:`drawer-content`},Wn={class:`drawer-header`},Gn={class:`title-row`},Kn={class:`title`},qn={class:`hint`},Jn={key:0,class:`selected-bar`},Yn={class:`selected-text`},Xn={class:`groups`},Zn={class:`group-title`},Qn={class:`chip-grid`},$n=[`onClick`];function er(t,u,d,m,_,v){let y=l(`idea-icon`),b=l(`close`),x=l(`el-button`),S=l(`el-drawer`);return g(),f(S,{modelValue:t.visible,"onUpdate:modelValue":u[1]||=e=>t.visible=e,direction:`rtl`,"with-header":!1,size:t.drawerSize,"custom-class":`kling-inspiration-drawer`,"destroy-on-close":!1},{default:p(()=>[e(`div`,Un,[e(`div`,Wn,[e(`div`,Gn,[a(y,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Kn,i(t.$t(`kling.inspiration.title`)),1)]),a(x,{text:``,class:`close-btn`,"aria-label":t.$t(`common.button.close`),title:t.$t(`common.button.close`),onClick:u[0]||=e=>t.visible=!1},{default:p(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])]),e(`div`,qn,i(t.$t(`kling.inspiration.hint`)),1),t.selectedCount>0?(g(),s(`div`,Jn,[e(`span`,Yn,i(t.$t(`kling.inspiration.selectedSummary`,{count:t.selectedCount})),1),a(x,{text:``,size:`small`,class:`clear-btn`,onClick:t.onClearSelected},{default:p(()=>[r(i(t.$t(`kling.inspiration.clearSelected`)),1)]),_:1},8,[`onClick`])])):o(``,!0),e(`div`,Xn,[(g(!0),s(c,null,h(t.groups,r=>(g(),s(`div`,{key:r.groupKey,class:`group`},[e(`div`,Zn,i(t.$t(`kling.inspiration.group.${r.groupKey}`)),1),e(`div`,Qn,[(g(!0),s(c,null,h(r.chipKeys,e=>(g(),s(`button`,{key:e,type:`button`,class:n({chip:!0,active:t.isSelected(t.chipText(e))}),onClick:n=>t.onToggle(t.chipText(e))},i(t.chipText(e)),11,$n))),128))])]))),128))])])]),_:1},8,[`modelValue`,`size`])}var tr=V(Hn,[[`render`,er],[`__scopeId`,`data-v-8b2e6a5d`]]),nr={"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-o1":`Kling O1`},rr={std:`720p`,pro:`1080p`,"4k":`4K`},ir=v({name:`SummaryChip`,components:{AudioIcon:oe},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){let e=this.config?.model||`kling-v2-5-turbo`;return nr[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||``},modeLabel(){let e=this.config?.mode||`std`;return rr[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),ar={class:`summary-chip`},or=[`title`],sr=[`title`],cr=[`title`],lr=[`title`],ur=[`title`];function dr(t,n,r,c,u,d){let f=l(`audio-icon`);return g(),s(`div`,ar,[e(`span`,{class:`part`,title:t.$t(`kling.name.model`)},i(t.modelLabel),9,or),n[0]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.duration`)},i(t.durationLabel),9,sr),n[1]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.ratio`)},i(t.aspectRatio||`16:9`),9,cr),n[2]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.mode`)},i(t.modeLabel),9,lr),t.generateAudio?(g(),s(`span`,{key:0,class:`audio`,title:t.$t(`kling.name.generateAudio`)},[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ur)):o(``,!0)])}var fr=v({name:`ConfigPanel`,components:{MagicIcon:I,ElButton:z,Consumption:X,PromptInput:Fn,NegativePromptInput:Vn,ModelSelector:qe,ModeSelector:et,DurationSelector:ut,RatioSelector:_t,StartImage:wt,CfgScaleSelector:on,GenerateAudioSelector:pn,CameraControlSelector:Cn,InspirationDrawer:tr,SummaryChip:V(ir,[[`render`,dr],[`__scopeId`,`data-v-c800852a`]]),EndImage:jt,ReferenceImages:Zt,ReferenceVideo:Ut},emits:[`generate`],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},capabilities(){return Z(this.config?.model,this.config?.mode,this.config?.duration)},omniActive(){return this.config?.model===`kling-o1`||!!(this.config?.image_list?.length||this.config?.video_list?.length)},consumption(){return xe(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),pr={class:`flex flex-col h-full`},mr={class:`flex-1 overflow-y-auto p-5`},hr={class:`flex flex-col items-center justify-center px-5 pb-5`};function gr(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`model-selector`),v=l(`ratio-selector`),y=l(`reference-images`),b=l(`reference-video`),x=l(`start-image`),S=l(`end-image`),C=l(`duration-selector`),w=l(`mode-selector`),T=l(`generate-audio-selector`),E=l(`camera-control-selector`),D=l(`cfg-scale-selector`),O=l(`negative-prompt-input`),k=l(`summary-chip`),A=l(`consumption`),j=l(`magic-icon`),M=l(`el-button`),N=l(`inspiration-drawer`);return g(),s(`div`,pr,[e(`div`,mr,[a(h,{class:`mb-4`,onOpenInspiration:n[0]||=e=>t.inspirationOpen=!0}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),t.capabilities.referenceImages?(g(),f(y,{key:0,class:`mb-3`})):o(``,!0),t.capabilities.referenceVideo?(g(),f(b,{key:1,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`}),a(w,{class:`mb-4`}),a(T,{class:`mb-4`}),t.omniActive?o(``,!0):(g(),f(E,{key:2,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(D,{key:3,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(O,{key:4,class:`mb-4`}))]),e(`div`,hr,[a(k),a(A,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),t.config?.video_url!==void 0||t.config?.custom?(g(),f(M,{key:0,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(j,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.extend`)),1)]),_:1},8,[`onClick`])):(g(),f(M,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(j,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generate`)),1)]),_:1},8,[`onClick`]))]),a(N,{modelValue:t.inspirationOpen,"onUpdate:modelValue":n[1]||=e=>t.inspirationOpen=e},null,8,[`modelValue`])])}var _r=V(fr,[[`render`,gr]]),vr=v({name:`MotionImage`,components:{UploadIcon:F,ElUpload:C,ElButton:z,InfoIcon:P,ImagePreview:Y},mixins:[W,q,R,me],data(){return{fileList:[],uploadUrl:K()+`/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(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.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(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),yr={class:`relative`},br={class:`flex justify-between`},xr={class:`flex justify-start items-center`},Sr={class:`text-sm font-bold`};function Cr(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,yr,[e(`div`,br,[e(`div`,xr,[e(`span`,Sr,i(t.$t(`kling.name.motionImage`)),1),a(h,{content:t.$t(`kling.description.motionImage`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var wr=V(vr,[[`render`,Cr],[`__scopeId`,`data-v-4a95ef2c`]]),Tr=v({name:`MotionVideo`,components:{UploadIcon:F,ElUpload:C,ElButton:z,InfoIcon:P,FilePreview:Te},mixins:[q,R],data(){return{fileList:[],uploadUrl:K()+`/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(){D.warning(this.$t(`kling.message.uploadVideoExceed`))},onError(){D.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){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=e.size/1024/1024<100;return t?n?!0:(D.error(this.$t(`kling.message.uploadVideoSizeExceed`)),!1):(D.error(this.$t(`kling.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),Er={class:`relative`},Dr={class:`flex justify-between`},Or={class:`flex justify-start items-center`},kr={class:`text-sm font-bold`};function Ar(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,Er,[e(`div`,Dr,[e(`div`,Or,[e(`span`,kr,i(t.$t(`kling.name.motionVideo`)),1),a(h,{content:t.$t(`kling.description.motionVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var jr=V(Tr,[[`render`,Ar],[`__scopeId`,`data-v-630c4521`]]),Mr=v({name:`MotionPromptInput`,components:{ElInput:ge,InfoIcon:P},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||``},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),Nr={class:`field`},Pr={class:`box`},Fr={class:`title font-bold`};function Ir(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Nr,[e(`div`,Pr,[e(`h2`,Fr,i(t.$t(`kling.name.motionPrompt`)),1),a(d,{content:t.$t(`kling.description.motionPrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.motionPrompt`)},null,8,[`modelValue`,`placeholder`])])}var Lr=V(Mr,[[`render`,Ir],[`__scopeId`,`data-v-ca9fdbe5`]]),Rr=`video`,zr=v({name:`CharacterOrientationSelector`,components:{ElRadioGroup:k,ElRadioButton:O,InfoIcon:P},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||Rr},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=Rr)}}),Br={class:`field`},Vr={class:`header`},Hr={class:`text-sm font-bold`};function Ur(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`el-radio-button`),h=l(`el-radio-group`);return g(),s(`div`,Br,[e(`div`,Vr,[e(`span`,Hr,i(t.$t(`kling.name.characterOrientation`)),1),a(f,{content:t.$t(`kling.description.characterOrientation`)},null,8,[`content`])]),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,size:`small`,class:`value`},{default:p(()=>[a(m,{label:`image`},{default:p(()=>[r(i(t.$t(`kling.name.orientationImage`)),1)]),_:1}),a(m,{label:`video`},{default:p(()=>[r(i(t.$t(`kling.name.orientationVideo`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var Wr=V(zr,[[`render`,Ur],[`__scopeId`,`data-v-7a91195b`]]),Gr=`kling-v2-6`,Kr=v({name:`MotionModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},computed:{options(){return[{value:`kling-v2-6`,label:`Kling 2.6`},{value:`kling-v3`,label:`Kling 3.0`}]},value:{get(){return this.$store.state.kling?.motionConfig?.model_name||Gr},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,model_name:e})}}},mounted(){this.$store.state.kling?.motionConfig?.model_name||(this.value=Gr)}}),qr={class:`field`},Jr={class:`header`},Yr={class:`title font-bold`};function Xr(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,qr,[e(`div`,Jr,[e(`h2`,Yr,i(t.$t(`kling.name.motionModel`)),1),a(m,{content:t.$t(`kling.description.motionModel`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Zr=V(Kr,[[`render`,Xr],[`__scopeId`,`data-v-480e8da2`]]),Qr=`std`,$r=v({name:`MotionModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},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||Qr},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=Qr)}}),ei={class:`field`},ti={class:`header`},ni={class:`title font-bold`};function ri(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,ei,[e(`div`,ti,[e(`h2`,ni,i(t.$t(`kling.name.mode`)),1),a(m,{content:t.$t(`kling.description.motionMode`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ii=V($r,[[`render`,ri],[`__scopeId`,`data-v-1295688c`]]),ai=v({name:`KeepOriginalSoundSelector`,components:{ElSwitch:N,InfoIcon:P},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`})}}}}),oi={class:`relative`},si={class:`flex justify-between items-center`},ci={class:`flex justify-start items-center`},li={class:`text-sm font-bold`};function ui(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,oi,[e(`div`,si,[e(`div`,ci,[e(`span`,li,i(t.$t(`kling.name.keepOriginalSound`)),1),a(d,{content:t.$t(`kling.description.keepOriginalSound`)},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e},null,8,[`modelValue`])])])}var di=v({name:`MotionPanel`,components:{MagicIcon:I,ElButton:z,Consumption:X,MotionImage:wr,MotionVideo:jr,MotionPromptInput:Lr,CharacterOrientationSelector:Wr,MotionModelSelector:Zr,MotionModeSelector:ii,KeepOriginalSoundSelector:V(ai,[[`render`,ui]])},emits:[`generate`],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return xe({...this.motionConfig,duration:1},this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){let e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit(`generate`)}}}),fi={class:`flex flex-col h-full`},pi={class:`flex-1 overflow-y-auto p-5`},mi={class:`flex flex-col items-center justify-center px-5 pb-5`};function hi(t,n,o,c,u,d){let f=l(`motion-image`),m=l(`motion-video`),h=l(`motion-prompt-input`),_=l(`character-orientation-selector`),v=l(`motion-model-selector`),y=l(`motion-mode-selector`),b=l(`keep-original-sound-selector`),x=l(`consumption`),S=l(`magic-icon`),C=l(`el-button`);return g(),s(`div`,fi,[e(`div`,pi,[a(f,{class:`mb-3`}),a(m,{class:`mb-3`}),a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,mi,[a(x,{value:t.consumption,service:t.service,"rate-unit":t.$t(`kling.name.perSecond`),note:t.$t(`kling.message.motionPricingNote`)},null,8,[`value`,`service`,`rate-unit`,`note`]),a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateMotion`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var gi=V(di,[[`render`,hi]]),_i=v({name:`KlingTabSwitcher`,components:{ElTabs:x,ElTabPane:S,ElTag:he},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`)},{value:`talking-photo`,label:this.$t(`kling.tab.talkingPhoto`)}]}},methods:{onUpdate(e){this.$emit(`update:modelValue`,e)}}}),vi=[`title`],yi={class:`text`};function bi(t,n,a,u,d,m){let _=l(`el-tag`),v=l(`el-tab-pane`),y=l(`el-tabs`);return g(),f(y,{"model-value":t.modelValue,class:`kling-tabs scenario-tabs scenario-tabs--divided`,"onUpdate:modelValue":t.onUpdate},{default:p(()=>[(g(!0),s(c,null,h(t.tabs,t=>(g(),f(v,{key:t.value,name:t.value,disabled:t.disabled},{label:p(()=>[e(`span`,{class:`tab-label`,title:t.disabled?t.disabledReason:void 0},[e(`span`,yi,i(t.label),1),t.badge?(g(),f(_,{key:0,size:`small`,type:`warning`,class:`badge`},{default:p(()=>[r(i(t.badge),1)]),_:2},1024)):o(``,!0)],8,vi)]),_:2},1032,[`name`,`disabled`]))),128))]),_:1},8,[`model-value`,`onUpdate:modelValue`])}var xi=V(_i,[[`render`,bi],[`__scopeId`,`data-v-e6a2bb26`]]),Si={"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`},Ci=v({name:`TalkingPhotoModelSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:pe.map(e=>({value:e,label:Si[e]||e}))}},computed:{value:{get(){return this.$store.state.kling?.talkingPhotoConfig?.model||`kling-v2-1-master`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,model:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.model||(this.value=de)}}),wi={class:`field`},Ti={class:`title font-bold`};function Ei(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,wi,[e(`h2`,Ti,i(t.$t(`kling.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Di=V(Ci,[[`render`,Ei],[`__scopeId`,`data-v-cbc83d11`]]),Oi=v({name:`TalkingPhotoModeSelector`,components:{ElSelect:y,ElOption:b},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?.talkingPhotoConfig?.mode||`pro`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,mode:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.mode||(this.value=`pro`)}}),ki={class:`field`},Ai={class:`title font-bold`};function ji(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,ki,[e(`h2`,Ai,i(t.$t(`kling.name.mode`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Mi=v({name:`TalkingPhotoPanel`,components:{MagicIcon:I,UploadIcon:F,ElUpload:C,ElButton:z,ElInput:ge,Consumption:X,InfoIcon:P,ImagePreview:Y,ModelSelector:Di,ModeSelector:V(Oi,[[`render`,ji],[`__scopeId`,`data-v-92525a1d`]])},mixins:[R,me],emits:[`generate`],data(){return{imageFiles:[],audioFiles:[],uploadUrl:K()+`/api/v1/files/`}},computed:{config(){return this.$store.state.kling?.talkingPhotoConfig||{}},audioUrl(){return this.config.audio_url},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},service(){return this.$store.state.kling?.service},consumption(){return xe({...this.config,action:`talking-photo`},this.service?.cost)},canGenerate(){return!!(this.config.image_url&&this.config.audio_url)}},methods:{commit(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.config,...e})},onPromptChange(e){this.commit({prompt:e})},onImageExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onImageError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onImageSuccess(e){this.commit({image_url:e?.file_url})},onImageRemove(e){this.imageFiles.splice(this.imageFiles.indexOf(e),1),this.commit({image_url:void 0})},onAudioExceed(){D.warning(this.$t(`kling.message.uploadAudioExceed`))},onAudioError(){D.error(this.$t(`kling.message.uploadAudioError`))},onAudioSuccess(e){this.commit({audio_url:e?.file_url})},onAudioRemove(){this.commit({audio_url:void 0})},onGenerate(){this.$emit(`generate`)}}}),Ni={class:`flex flex-col h-full`},Pi={class:`flex-1 overflow-y-auto p-5`},Fi={class:`relative mb-4`},Ii={class:`flex justify-start items-center`},Li={class:`text-sm font-bold`},Ri={class:`relative mb-4`},zi={class:`flex justify-start items-center`},Bi={class:`text-sm font-bold`},Vi=[`src`],Hi={class:`mb-4`},Ui={class:`flex justify-start items-center`},Wi={class:`text-sm font-bold`},Gi={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ki(t,n,c,u,d,m){let h=l(`model-selector`),_=l(`mode-selector`),v=l(`info-icon`),y=l(`image-preview`),b=l(`upload-icon`),x=l(`el-button`),S=l(`el-upload`),C=l(`el-input`),w=l(`consumption`),T=l(`magic-icon`);return g(),s(`div`,Ni,[e(`div`,Pi,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),e(`div`,Fi,[e(`div`,Ii,[e(`span`,Li,i(t.$t(`kling.name.talkingPhotoImage`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoImage`)},null,8,[`content`])]),a(S,{ref:`imageUploader`,"file-list":t.imageFiles,"onUpdate:fileList":n[0]||=e=>t.imageFiles=e,name:`file`,accept:`.png,.jpg,.jpeg,.webp,.bmp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,headers:t.headers,"on-exceed":t.onImageExceed,"on-error":t.onImageError,"on-success":t.onImageSuccess},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(y,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onImageRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`])]),e(`div`,Ri,[e(`div`,zi,[e(`span`,Bi,i(t.$t(`kling.name.talkingPhotoAudio`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoAudio`)},null,8,[`content`])]),a(S,{ref:`audioUploader`,"file-list":t.audioFiles,"onUpdate:fileList":n[1]||=e=>t.audioFiles=e,name:`file`,accept:`.mp3,.wav,.m4a,.aac`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,headers:t.headers,"on-exceed":t.onAudioExceed,"on-error":t.onAudioError,"on-success":t.onAudioSuccess,"on-remove":t.onAudioRemove},{default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadAudio`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`,`on-remove`]),t.audioUrl?(g(),s(`audio`,{key:0,src:t.audioUrl,controls:``,class:`w-full mt-2`},null,8,Vi)):o(``,!0)]),e(`div`,Hi,[e(`div`,Ui,[e(`span`,Wi,i(t.$t(`kling.name.talkingPhotoPrompt`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoPrompt`)},null,8,[`content`])]),a(C,{"model-value":t.config.prompt,type:`textarea`,rows:2,placeholder:t.$t(`kling.placeholder.talkingPhotoPrompt`),class:`mt-1`,"onUpdate:modelValue":t.onPromptChange},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])])]),e(`div`,Gi,[a(w,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(x,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateTalkingPhoto`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var qi=V(Mi,[[`render`,Ki],[`__scopeId`,`data-v-b47b80bd`]]),Ji=v({name:`TaskPreview`,components:{DeleteIcon:le,ChannelIcon:ne,InfoIcon:se,MagicIcon:I,TimeIcon:ee,WarningIcon:ue,CopyToClipboard:Ce,ElAlert:T,VideoPlayer:ke,ElTooltip:w,ElButton:z,ImagePreview:Y,VideoPreview:Oe,AudioPreview:De,ApiCodeButton:Ae,ReportButton:we},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{isFailure(){let e=this.modelValue?.response;return e?.success===!1||!!e?.error||e?.state===`failed`||e?.state===`cancelled`},isWaiting(){let e=this.modelValue?.response;return!e||!this.isFailure&&e.success!==!0&&!e.video_url},application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},displayText(){return this.modelValue?.request?.prompt?.trim()||this.modelValue?.request?.text?.trim()||``},referenceImages(){let e=[],t=this.modelValue?.request?.start_image_url,n=this.modelValue?.request?.end_image_url,r=this.modelValue?.request?.image_url;return t&&e.push({url:t,name:`start-image`}),n&&e.push({url:n,name:`end-image`}),r&&e.push({url:r,name:`reference-image`}),e},referenceVideos(){let e=[],t=this.modelValue?.request?.video_url;t&&e.push({url:t,name:`reference-video`});let n=this.modelValue?.request?.video_list;return(Array.isArray(n)?n:[]).forEach((t,n)=>{t?.video_url&&e.push({url:t.video_url,name:`reference-video-${n+1}`})}),e},referenceAudios(){let e=this.modelValue?.request?.audio_url;return e?[{url:e,name:`reference-audio`}]:[]}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await J.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`kling/deleteTask`,{id:e}),D.success(this.$t(`common.message.deleteTaskSuccess`))}catch{D.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),Yi={class:`preview`},Xi={class:`left`},Zi={class:`main`},Qi={class:`bot`},$i={class:`datetime`},ea=[`aria-label`],ta={key:0,class:`info`},na={key:0,class:`request-media flex justify-start items-center gap-2 w-full overflow-x-auto`},ra={key:1,class:`prompt`},ia={key:0},aa={key:1},oa={key:1,class:n({content:!0,failed:!0})},sa={key:0,class:`mb-4`},ca={key:1,class:n({operations:!0,"mt-2":!0})},la={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ua={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},da={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},fa={key:2,class:n({content:!0})},pa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ma={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ha={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ga={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},_a={key:3,class:n({content:!0})},va={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ya={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function ba(n,u,d,m,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-preview`),C=l(`video-preview`),w=l(`audio-preview`),T=l(`video-player`),E=l(`el-button`),D=l(`api-code-button`),O=l(`report-button`),k=l(`channel-icon`),A=l(`magic-icon`),j=l(`copy-to-clipboard`),M=l(`time-icon`),N=l(`el-alert`),ee=l(`warning-icon`),te=l(`info-icon`);return g(),s(`div`,Yi,[e(`div`,Xi,[a(y,{capability:`kling`,part:`avatar`,class:`avatar`})]),e(`div`,Zi,[e(`div`,Qi,[a(y,{capability:`kling`,part:`name`}),e(`span`,$i,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ea)):o(``,!0)]),_:1},8,[`content`])]),n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0||n.displayText?(g(),s(`div`,ta,[n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0?(g(),s(`div`,na,[(g(!0),s(c,null,h(n.referenceImages,(e,t)=>(g(),f(S,{key:`image-${t}`,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceVideos,(e,t)=>(g(),f(C,{key:`video-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceAudios,(e,t)=>(g(),f(w,{key:`audio-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128))])):o(``,!0),n.displayText?(g(),s(`p`,ra,[r(i(n.displayText)+` `,1),n.modelValue?.response?n.isWaiting?(g(),s(`span`,aa,` - (`+i(n.$t(`kling.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,ia,` - (`+i(n.$t(`kling.status.pending`))+`) `,1))])):o(``,!0)])):o(``,!0),n.modelValue?.response?.success===!0&&!n.isFailure?(g(),s(`div`,oa,[n.modelValue?.response.video_url?(g(),s(`div`,sa,[a(T,{src:n.modelValue?.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response.success?(g(),s(`div`,ca,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`kling.message.downloadVideo`),placement:`top-start`},{default:p(()=>[n.modelValue?.response.video_url?(g(),f(E,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:u[1]||=e=>n.onDownload(e,n.modelValue?.response.video_url)},{default:p(()=>[r(i(n.$t(`kling.button.download`)),1)]),_:1})):o(``,!0)]),_:1},8,[`content`]),a(D,{path:`/kling/videos`,body:n.modelValue?.request},null,8,[`body`]),a(O,{service:`kling`,"target-id":n.modelValue?.id,snapshot:{prompt:n.displayText}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(N,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,la,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,ua,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,da,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.isFailure?(g(),s(`div`,fa,[a(N,{closable:!1,class:`failure`},{template:p(()=>[a(ee,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failure`)),1)]),default:p(()=>[e(`p`,pa,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,ma,[a(te,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(j,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,ha,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,ga,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0),n.isWaiting?(g(),s(`div`,_a,[a(N,{closable:!1,class:`info`},{template:p(()=>[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`kling.status.processing`:`kling.status.pending`)),1)]),default:p(()=>[e(`p`,va,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.response?.trace_id?(g(),s(`p`,ya,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0)])])}var xa=v({name:`RecentPanel`,components:{TaskPreview:V(Ji,[[`render`,ba],[`__scopeId`,`data-v-73637147`]]),NoTasks:ie,BotPlaceholder:je,ScrollList:re},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?.()}}}),Sa={key:0},Ca={key:2,class:`w-full h-full flex items-center justify-center`};function wa(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,Sa,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`h-full w-full overflow-y-auto tasks`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,e=>(g(),f(m,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,Ca,[a(v)])):o(``,!0)],64)}var Ta=v({name:`KlingIndex`,components:{ConfigPanel:_r,MotionPanel:gi,TalkingPhotoPanel:qi,TabSwitcher:xi,Layout:Le,RecentPanel:V(xa,[[`render`,wa]])},mixins:[be],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===E.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===E.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},talkingPhotoConfig(){return this.$store.state.kling.talkingPhotoConfig},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 ae({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();let 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);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`kling/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!H(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let{camera_control:e,...t}=this.config||{},n={...t,async:!0},r=Number(!!n.start_image_url)+Number(!!n.end_image_url),i=n.image_list?.length||0,a=n.video_list?.length?4:7;if(r+i>a){D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:a}));return}if(n.video_list?.[0]?.refer_type===`base`&&(n.start_image_url||n.end_image_url||n.image_list?.some(({type:e})=>e))){D.warning(this.$t(`kling.message.baseVideoFrameConflict`));return}if(!n.video_id&&!t.video_url&&!n.start_image_url&&n.end_image_url){D.warning(this.$t(`kling.message.endImageRequiresStart`));return}if(n.action||(n.video_id||t.video_url?n.action=`extend`:n.start_image_url?n.action=`image2video`:n.action=`text2video`),n.action===`text2video`&&n.end_image_url&&delete n.end_image_url,e?.type&&(n.camera_control={type:e.type,...e.type===`simple`&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,e])=>e!=null))}:{}}),!G())return;let o=this.credential?.token;if(!o){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),B(`kling`,U.generate(n,{token:o})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.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(){if(!H(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.motionConfig||{};if(!e.image_url||!e.video_url){D.warning(this.$t(`kling.message.motionMissingInputs`));return}let 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.model_name?{model_name:e.model_name}:{},...e.prompt?{prompt:e.prompt}:{},async:!0};if(!G())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),B(`kling`,U.motion(t,{token:n})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.error(this.$t(`kling.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onGenerateTalkingPhoto(){if(!H(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.talkingPhotoConfig||{};if(!e.image_url||!e.audio_url){D.warning(this.$t(`kling.message.talkingPhotoMissingInputs`));return}let t={image_url:e.image_url,audio_url:e.audio_url,model:e.model||`kling-v2-1-master`,mode:e.mode||`pro`,...e.prompt?{prompt:e.prompt}:{},...e.duration?{duration:e.duration}:{},async:!0};if(!G())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),B(`kling`,U.talkingPhoto(t,{token:n})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.error(this.$t(`kling.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ea={class:`flex flex-col h-full`},Da={class:`flex-1 min-h-0`};function Oa(t,n,r,i,s,c){let u=l(`tab-switcher`),d=l(`config-panel`),m=l(`motion-panel`),h=l(`talking-photo-panel`),_=l(`recent-panel`),v=l(`layout`);return g(),f(v,null,{config:p(()=>[e(`div`,Ea,[a(u,{"model-value":t.taskType,"onUpdate:modelValue":t.onTabChange},null,8,[`model-value`,`onUpdate:modelValue`]),e(`div`,Da,[t.taskType===`videos`?(g(),f(d,{key:0,onGenerate:t.onGenerate},null,8,[`onGenerate`])):t.taskType===`motion`?(g(),f(m,{key:1,onGenerate:t.onGenerateMotion},null,8,[`onGenerate`])):t.taskType===`talking-photo`?(g(),f(h,{key:2,onGenerate:t.onGenerateTalkingPhoto},null,8,[`onGenerate`])):o(``,!0)])])]),result:p(()=>[a(_,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var ka=V(Ta,[[`render`,Oa]]);export{ka as default};
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,ht as u,it as d,j as f,mt as p,qt as m,rt as h,tt as g,x as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{r as y,t as b}from"./select-BzDGa5m7.js";import{n as x,t as S}from"./tabs-BQRg1x8-.js";import{t as C}from"./upload-CaDoepuW.js";import{t as w}from"./tooltip-qTn7nJhY.js";import{t as T}from"./alert-BprQRUmf.js";import{h as E,v as D}from"./models-BezwK8kr.js";import{n as O,r as k}from"./radio-BNhFzeBO.js";import{t as A}from"./drawer-C9nReT9E.js";import{t as j}from"./input-number-sRRzJirK.js";import{t as M}from"./slider-B1ilR4PR.js";import{t as N}from"./switch-MNH0pcC0.js";import{t as ee}from"./clock-DEvy_URV.js";import{a as te,c as ne,n as re,o as P,r as ie,t as ae}from"./pagination-Z4NRITpd.js";import{t as oe}from"./headphones-CNumdgIN.js";import{t as se}from"./info-VadVQTaW.js";import{t as ce}from"./lightbulb-9OJOLCrN.js";import{t as le}from"./trash-2-C7OqHxci.js";import{t as ue}from"./triangle-alert-D_Ku-290.js";import{t as F}from"./upload-CbQoV27b.js";import{t as I}from"./wand-sparkles-DT_fyyk1.js";import{fi as de,li as fe,mi as L,pi as pe}from"./constants-CLU-fDDu.js";import{$t as R,Ii as z,Nr as B,O as V,Pi as me,Qt as he,Si as H,Wi as ge,Xt as _e,Yt as ve,Zt as ye,an as be,ar as U,bi as xe,ci as W,en as G,mn as K,nn as q,rn as J,tn as Se}from"./index-BMhc9ht-.js";import{t as Ce}from"./CopyToClipboard-Bt9-bdiq.js";import{t as we}from"./ReportButton-D01Y2fPF.js";import{t as Te}from"./FilePreview-XUDkFjsP.js";import{t as Y}from"./ImagePreview-BEpyCuCR.js";import{n as Ee}from"./taskDrawerMixin-DyAUhFEq.js";import{t as X}from"./Consumption-CUCdAwJr.js";import{n as De,t as Oe}from"./VideoPreview-B0iB1u-B.js";import{t as ke}from"./VideoPlayer-BZ-N1fim.js";import{t as Ae}from"./ApiCodeButton-6BQ24hBr.js";import{t as je}from"./BotPlaceholder-Cv0cpmLN.js";var Me=v({name:`LayoutKling`,components:{MagicIcon:I,ElDrawer:A,ElButton:z},mixins:[Ee]}),Ne={class:`main flex flex-row flex-1 min-h-0`},Pe={class:`config w-[320px] flex-none h-full min-h-0 overflow-hidden flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Fe={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ie(t,n,r,i,o,c){let f=l(`magic-icon`),m=l(`el-button`),h=l(`el-drawer`);return g(),s(`div`,Ne,[e(`div`,Pe,[d(t.$slots,`config`,{},void 0,!0)]),e(`div`,Fe,[d(t.$slots,`result`,{},void 0,!0)]),u(a(m,{circle:``,class:`menu`,"aria-label":t.$t(`common.button.openMenu`),title:t.$t(`common.button.openMenu`),onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`]),[[_,!t.tasksEmpty]]),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`generator-drawer`},{default:p(()=>[d(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var Le=V(Me,[[`render`,Ie],[`__scopeId`,`data-v-2d826924`]]),Re={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};function Z(e,t,n){let r=t||`std`,i=n??5;switch(e){case`kling-v1`:return{text2video:!0,image2video:!0,endImage:i===5,audio:!1,motionControl:i===5,referenceVideo:!1,referenceImages:!1};case`kling-v1-6`:case`kling-v2-5-turbo`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-6`:return{text2video:!0,image2video:!0,endImage:r===`pro`,audio:r===`pro`,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v2-master`:case`kling-v2-1-master`:return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1,referenceVideo:!1,referenceImages:!1};case`kling-v3`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:r!==`4k`,referenceVideo:!1,referenceImages:!1};case`kling-v3-omni`:return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1,referenceVideo:!0,referenceImages:!0};case`kling-o1`:return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1,referenceVideo:!0,referenceImages:!0};default:return Re}}var Q=`<<<video_1>>>`,ze=/<<<image_\d+>>>/g;function Be(e){return e?e.split(Q).join(` `).replace(/\s{2,}/g,` `).trim():``}function Ve(e){return e?e.replace(ze,` `).replace(/\s{2,}/g,` `).trim():``}function He(e,t){if(!e)return[];let n=t.model??e.model,r=t.mode??e.mode,i=t.duration??e.duration;if(!n)return[];let a=Z(n,r,i),o=[];e.end_image_url&&!a.endImage&&o.push({field:`end_image_url`,i18nLabel:`kling.name.endImage`}),e.generate_audio&&!a.audio&&o.push({field:`generate_audio`,i18nLabel:`kling.name.generateAudio`}),e.camera_control?.type&&(!a.motionControl||e.start_image_url)&&o.push({field:`camera_control`,i18nLabel:`kling.name.cameraControl`}),e.video_list?.length&&!a.referenceVideo&&o.push({field:`video_list`,i18nLabel:`kling.name.referenceVideo`}),e.image_list?.length&&!a.referenceImages&&o.push({field:`image_list`,i18nLabel:`kling.name.referenceImages`});let s=n===`kling-o1`||!!(e.image_list?.length||e.video_list?.length);return s&&e.cfg_scale!==void 0&&o.push({field:`cfg_scale`,i18nLabel:`kling.name.cfgScale`}),s&&e.negative_prompt&&o.push({field:`negative_prompt`,i18nLabel:`kling.name.negativePrompt`}),o}function $(e,t){let n={...e};for(let e of t)e.field===`end_image_url`&&(n.end_image_url=void 0),e.field===`generate_audio`&&(n.generate_audio=!1),e.field===`camera_control`&&(n.camera_control=void 0),e.field===`cfg_scale`&&(n.cfg_scale=void 0),e.field===`negative_prompt`&&(n.negative_prompt=void 0),e.field===`video_list`&&(n.video_list=void 0,n.prompt=Be(n.prompt)),e.field===`image_list`&&(n.image_list=void 0,n.prompt=Ve(n.prompt));return n}var Ue=v({name:`ModelSelector`,components:{ElSelect:y,ElOption:b},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-o1`,label:`Kling O1`}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(fe)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=He(t,{model:e});if(n.length===0){this.applyModel(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await H.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=$({...t,model:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,model:e})}}}),We={class:`field`},Ge={class:`title font-bold`};function Ke(t,n,r,a,o,u){let d=l(`el-option`),m=l(`el-select`);return g(),s(`div`,We,[e(`h2`,Ge,i(t.$t(`pika.name.model`)),1),(g(),f(m,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`pika.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(d,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var qe=V(Ue,[[`render`,Ke],[`__scopeId`,`data-v-a74e7f31`]]),Je=v({name:`ModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},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 L.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(`std`)}},mounted(){this.value||this.applyMode(`std`)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=He(t,{mode:e});if(n.length===0){this.applyMode(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await H.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=$({...t,mode:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,mode:e})}}}),Ye={class:`field`},Xe={class:`header`},Ze={class:`title font-bold`},Qe={key:0,class:`opt-tip`};function $e(t,r,u,d,m,_){let v=l(`info-icon`),y=l(`el-option`),b=l(`el-select`);return g(),s(`div`,Ye,[e(`div`,Xe,[e(`h2`,Ze,i(t.$t(`kling.name.mode`)),1),a(v,{content:t.$t(`kling.description.mode`),class:`info-icon`},null,8,[`content`])]),(g(),f(b,{key:t.revertKey,"model-value":t.value,class:`value`,placeholder:t.$t(`kling.placeholder.select`),clearable:!0,onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.options,t=>(g(),f(y,{key:t.value,label:t.label,value:t.value,disabled:t.disabled},{default:p(()=>[e(`span`,{class:n({"opt-disabled":t.disabled})},i(t.label),3),t.disabled&&t.disabledReason?(g(),s(`span`,Qe,i(t.disabledReason),1)):o(``,!0)]),_:2},1032,[`label`,`value`,`disabled`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var et=V(Je,[[`render`,$e],[`__scopeId`,`data-v-9a8fa3c5`]]),tt=[3,5,8,10,12,15],nt=[5,10],rt=[5],it=v({name:`DurationSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},isV3Model(){return L.includes(this.selectedModel)},allowedDurations(){return this.selectedModel===`kling-o1`?rt:this.isV3Model?tt:nt},value(){return this.$store.state.kling?.config?.duration??5},selectValue(){let e=this.allowedDurations;return e.includes(this.value)?this.value:e.includes(5)?5:e[0]}},watch:{selectedModel(){this.allowedDurations.includes(this.value)||this.applyDuration(5)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(5)},methods:{async onChange(e){let t=this.$store.state.kling?.config||{},n=He(t,{duration:e});if(n.length===0){this.applyDuration(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await H.confirm(this.$t(`kling.message.featureNotSupportedBody`,{fields:r}),this.$t(`kling.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`kling.button.confirmContinue`),cancelButtonText:this.$t(`kling.button.cancelSwitch`),type:`warning`});let i=$({...t,duration:e},n);this.$store.commit(`kling/setConfig`,i),D.success(this.$t(`kling.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling.config,duration:e})}}}),at={class:`field`},ot={class:`control`},st={class:`label`},ct={class:`title font-bold`};function lt(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,at,[e(`div`,ot,[e(`div`,st,[e(`h2`,ct,i(t.$t(`kling.name.duration`)),1),a(m,{content:t.$t(`kling.description.duration`),class:`info-icon ml-1`},null,8,[`content`])]),(g(),f(v,{key:t.revertKey,"model-value":t.selectValue,class:`value`,placeholder:t.$t(`kling.placeholder.select`),onChange:t.onChange},{default:p(()=>[(g(!0),s(c,null,h(t.allowedDurations,e=>(g(),f(_,{key:e,label:`${e}s`,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])])}var ut=V(it,[[`render`,lt],[`__scopeId`,`data-v-496bf31c`]]),dt=v({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||=`1:1`}}),ft={class:`text-sm font-bold mb-2 block`},pt={class:`items`},mt=[`onClick`],ht={class:`name`};function gt(t,r,a,o,l,u){return g(),s(`div`,null,[e(`span`,ft,i(t.$t(`kling.name.ratio`)),1),e(`div`,pt,[(g(!0),s(c,null,h(t.options,(r,a)=>(g(),s(`div`,{key:a,class:n({active:t.active===a,item:!0}),onClick:e=>t.value=r.value},[e(`div`,{class:n([`preview`,r.label])},[e(`div`,{class:`rect`,style:m({width:r.width+`px`,height:r.height+`px`})},null,4)],2),e(`p`,ht,i(r.label),1)],10,mt))),128))])])}var _t=V(dt,[[`render`,gt],[`__scopeId`,`data-v-cdb14b2f`]]),vt=v({name:`StartImage`,components:{UploadIcon:F,ElUpload:C,ElButton:z,ElTooltip:w,InfoIcon:P,ImagePreview:Y},mixins:[J,q,G],emits:[`change`],data(){return{fileList:[],uploadUrl:W()+`/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(){}}},watch:{value(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||=void 0,this.onSetStartImageUrl()},methods:{onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onBeforeUpload(){let e=this.$store.state.kling?.config||{};if(e.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let t=e.video_list?.length?4:7;return(e.image_list?.length||0)+Number(!!e.end_image_url)+1>t?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:t})),!1):!0},onSetStartImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetStartImageUrl()}}}),yt={class:`relative`},bt={class:`flex min-h-8 items-center pr-20`},xt={class:`flex justify-start items-center`},St={class:`text-sm font-bold`};function Ct(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-tooltip`),x=l(`el-upload`);return g(),s(`div`,yt,[e(`div`,bt,[e(`div`,xt,[e(`span`,St,i(t.$t(`kling.name.startImage`)),1),a(h,{content:t.$t(`kling.description.uploadStartImage`)},null,8,[`content`])])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,disabled:t.reachedLimit,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.$t(`kling.message.uploadReferencesExceed`),disabled:!t.reachedLimit,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.reachedLimit},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$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`])])}var wt=V(vt,[[`render`,Ct],[`__scopeId`,`data-v-60844ac3`]]),Tt=v({name:`EndImage`,components:{UploadIcon:F,ElUpload:C,ElButton:z,ElTooltip:w,ImagePreview:Y,InfoIcon:P},mixins:[J,q,G],data(){return{fileList:[],uploadUrl:W()+`/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 Z(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},hasStartImage(){return!!this.klingConfig.start_image_url},uploadDisabled(){return this.reachedLimit||!this.endImageSupported||!this.hasStartImage},uploadTooltip(){return this.endImageSupported?this.hasStartImage?this.reachedLimit?this.$t(`kling.message.uploadReferencesExceed`):``:this.$t(`kling.message.endImageRequiresStart`):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=[])},hasStartImage(e){!e&&this.storeValue&&(this.fileList=[],this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:void 0}))}},mounted(){this.value||=void 0,this.onSetEndImageUrl()},methods:{onBeforeUpload(){if(!this.endImageSupported)return D.warning(this.$t(`kling.message.endImageNotSupported`)),!1;if(!this.hasStartImage)return D.warning(this.$t(`kling.message.endImageRequiresStart`)),!1;if(this.klingConfig.video_list?.[0]?.refer_type===`base`)return D.warning(this.$t(`kling.message.baseVideoFrameConflict`)),!1;let e=this.klingConfig.video_list?.length?4:7;return(this.klingConfig.image_list?.length||0)+2>e?(D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:e})),!1):!0},onExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onSetEndImageUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.onSetEndImageUrl()}}}),Et={class:`relative`},Dt={class:`flex min-h-8 items-center pr-20`},Ot={class:`flex justify-start items-center`},kt={class:`text-sm font-bold`};function At(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-tooltip`),x=l(`el-upload`);return g(),s(`div`,Et,[e(`div`,Dt,[e(`div`,Ot,[e(`span`,kt,i(t.$t(`kling.name.endImage`)),1),a(h,{content:t.$t(`kling.description.uploadEndImage`)},null,8,[`content`])])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,disabled:t.uploadDisabled,class:`upload-wrapper`,multiple:!1,action:t.uploadUrl,"list-type":`picture`,"before-upload":t.onBeforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(b,{content:t.uploadTooltip,disabled:!t.uploadDisabled,placement:`top`},{default:p(()=>[e(`span`,null,[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`,disabled:t.uploadDisabled},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$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`])])}var jt=V(Tt,[[`render`,At],[`__scopeId`,`data-v-b286c4d0`]]),Mt=v({name:`ReferenceVideo`,components:{ElUpload:C,ElButton:z,ElRadioButton:O,ElRadioGroup:k,ElSwitch:N,InfoIcon:P,FilePreview:Te,UploadIcon:F},mixins:[q,G],data(){return{fileList:[],uploadUrl:W()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},config(){return this.$store.state.kling?.config||{}},hasVideo(){return!!this.urls?.[0]},referenceType:{get(){return this.config.video_list?.[0]?.refer_type||`feature`},set(e){this.updateVideoOptions(e,this.keepOriginalSound)}},keepOriginalSound:{get(){return this.config.video_list?.[0]?.keep_original_sound===`yes`},set(e){this.updateVideoOptions(this.referenceType,e)}}},methods:{onExceed(){D.warning(this.$t(`kling.message.referenceVideoExceed`))},onError(){D.error(this.$t(`kling.message.referenceVideoError`))},beforeUpload(e){if((this.config.image_list?.length||0)+Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)>4)return D.error(this.$t(`kling.message.referenceVideoImageLimit`)),!1;let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=he(e.size);return t?n?!0:(D.error(this.$t(`kling.message.referenceVideoSizeExceed`,{max:ye(_e)})),!1):(D.error(this.$t(`kling.message.referenceVideoTypeFailed`)),!1)},ensurePromptToken(e){let t=this.$store.state.kling?.config,n=t?.prompt||``,r=n.includes(Q),i;if(e&&!r)i=n?`${n} ${Q}`:Q;else if(!e&&r)i=Be(n);else return;this.$store.commit(`kling/setConfig`,{...t,prompt:i})},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,video_list:void 0}),this.ensurePromptToken(!1)},onSetVideoList(){let e=this.urls?.[0],t=e?[{video_url:e,refer_type:this.referenceType,keep_original_sound:this.keepOriginalSound?`yes`:`no`}]:void 0;this.$store.commit(`kling/setConfig`,{...this.config,video_list:t,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}),this.ensurePromptToken(!!e)},updateVideoOptions(e,t){let n=this.urls?.[0];n&&this.$store.commit(`kling/setConfig`,{...this.config,video_list:[{video_url:n,refer_type:e,keep_original_sound:t?`yes`:`no`}],...e===`base`?{start_image_url:void 0,end_image_url:void 0}:{},generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0})},async onSuccess(){this.onSetVideoList()}}}),Nt={class:`relative`},Pt={class:`flex min-h-8 items-center pr-20`},Ft={class:`flex justify-start items-center`},It={class:`text-sm font-bold`},Lt={key:0,class:`reference-options mt-3 flex flex-col gap-3`},Rt={class:`flex flex-col items-stretch gap-2 sm:flex-row sm:items-center sm:justify-between`},zt={class:`text-sm`},Bt={class:`flex items-center justify-between gap-3`},Vt={class:`text-sm`};function Ht(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`),x=l(`el-radio-button`),S=l(`el-radio-group`),C=l(`el-switch`);return g(),s(`div`,Nt,[e(`div`,Pt,[e(`div`,Ft,[e(`span`,It,i(t.$t(`kling.name.referenceVideo`)),1),a(h,{content:t.$t(`kling.description.omniReferenceVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceVideo`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`]),t.hasVideo?(g(),s(`div`,Lt,[e(`div`,Rt,[e(`span`,zt,i(t.$t(`kling.name.referenceVideoType`)),1),a(S,{modelValue:t.referenceType,"onUpdate:modelValue":n[1]||=e=>t.referenceType=e,size:`small`},{default:p(()=>[a(x,{value:`feature`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoFeature`)),1)]),_:1}),a(x,{value:`base`},{default:p(()=>[r(i(t.$t(`kling.name.referenceVideoBase`)),1)]),_:1})]),_:1},8,[`modelValue`])]),e(`div`,Bt,[e(`span`,Vt,i(t.$t(`kling.name.keepOriginalSound`)),1),a(C,{modelValue:t.keepOriginalSound,"onUpdate:modelValue":n[2]||=e=>t.keepOriginalSound=e},null,8,[`modelValue`])])])):o(``,!0)])}var Ut=V(Mt,[[`render`,Ht],[`__scopeId`,`data-v-e3a9dfab`]]),Wt=v({name:`KlingReferenceImages`,components:{ElButton:z,ElUpload:C,UploadIcon:F,ImagePreview:Y,InfoIcon:P},mixins:[J,q,G],data(){return{fileList:[],uploadUrl:W()+`/api/v1/files/`}},computed:{config(){return this.$store.state.kling?.config||{}},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},frameCount(){return Number(!!this.config.start_image_url)+Number(!!this.config.end_image_url)},maxImages(){return this.config.video_list?.length?4:7},referenceLimit(){return Math.max(0,this.maxImages-this.frameCount)},remainingSlots(){return Math.max(0,this.referenceLimit-this.urls.length)},urls(){return this.fileList.map(e=>e.response?.file_url||e.url).filter(Boolean)},storeImages(){return this.config.image_list}},watch:{frameCount(){this.syncPromptTokens()},storeImages(e){!e?.length&&this.fileList.length>0&&(this.fileList=[])}},methods:{beforeUpload(){return this.remainingSlots===0?(this.onExceed(),!1):!0},onExceed(){D.warning(this.$t(`kling.message.referenceImagesExceed`,{count:this.remainingSlots}))},onError(){D.error(this.$t(`kling.message.referenceImagesError`))},clearOmniConflicts(e){return{...e,generate_audio:!1,camera_control:void 0,cfg_scale:void 0,negative_prompt:void 0}},syncPromptTokens(e){let t=e||this.config,n=[Ve(t.prompt),...this.urls.map((e,t)=>`<<<image_${this.frameCount+t+1}>>>`)].filter(Boolean).join(` `);n!==t.prompt&&this.$store.commit(`kling/setConfig`,{...t,prompt:n})},syncConfig(){let e=this.urls.length?this.urls.map(e=>({image_url:e})):void 0,t=this.clearOmniConflicts({...this.config,image_list:e});this.$store.commit(`kling/setConfig`,t),this.syncPromptTokens(t)},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.syncConfig()},onRemove(e,t){this.fileList.splice(e,1),t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),this.syncConfig()}}}),Gt={class:`relative`},Kt={class:`flex justify-between items-center`},qt={class:`flex justify-start items-center`},Jt={class:`text-sm font-bold`},Yt={key:0,class:`file-list flex flex-wrap gap-2 mt-2`};function Xt(t,n,u,d,m,_){let v=l(`info-icon`),y=l(`UploadIcon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`);return g(),s(`div`,Gt,[e(`div`,Kt,[e(`div`,qt,[e(`span`,Jt,i(t.$t(`kling.name.referenceImages`)),1),a(v,{content:t.$t(`kling.description.referenceImages`)},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.png,.jpg,.jpeg`,name:`file`,limit:t.referenceLimit,multiple:!0,"show-file-list":!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{default:p(()=>[a(b,{round:``,type:`primary`,size:`small`,disabled:t.remainingSlots===0},{default:p(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferenceImages`)),1)]),_:1},8,[`disabled`])]),_:1},8,[`file-list`,`limit`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])]),t.fileList.length?(g(),s(`div`,Yt,[(g(!0),s(c,null,h(t.fileList,(e,n)=>(g(),f(S,{key:e.uid||e.url||n,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:r=>t.onRemove(n,e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])):o(``,!0)])}var Zt=V(Wt,[[`render`,Xt]]),Qt=v({name:`CfgScaleSelector`,components:{ElSlider:M,InfoIcon:P,ElInputNumber:j},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||=0}}),$t={class:`flex justify-between`},en={class:`flex justify-start items-center`},tn={class:`text-sm font-bold`},nn={class:`flex justify-end items-center`},rn={class:`w-full`};function an(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input-number`),p=l(`el-slider`);return g(),s(`div`,null,[e(`div`,$t,[e(`div`,en,[e(`span`,tn,i(t.$t(`kling.name.cfgScale`)),1),a(d,{content:t.$t(`kling.description.cfgScale`)},null,8,[`content`])]),e(`div`,nn,[a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,"controls-position":`right`},null,8,[`modelValue`])])]),e(`div`,rn,[a(p,{modelValue:t.value,"onUpdate:modelValue":n[1]||=e=>t.value=e,min:0,max:1,step:.1},null,8,[`modelValue`])])])}var on=V(Qt,[[`render`,an]]),sn=v({name:`GenerateAudioSelector`,components:{ElSwitch:N,InfoIcon:P},computed:{selectedModel(){return this.$store.state.kling?.config?.model||``},selectedMode(){return this.$store.state.kling?.config?.mode||``},supported(){return!!(L.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??!1:!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})}}}),cn={class:`relative`},ln={class:`flex justify-between items-center`},un={class:`flex justify-start items-center`},dn={class:`text-sm font-bold`};function fn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,cn,[e(`div`,ln,[e(`div`,un,[e(`span`,dn,i(t.$t(`kling.name.generateAudio`)),1),a(d,{content:t.tooltipContent},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,disabled:!t.supported},null,8,[`modelValue`,`disabled`])])])}var pn=V(sn,[[`render`,fn]]),mn=[`horizontal`,`vertical`,`pan`,`tilt`,`roll`,`zoom`],hn=v({name:`CameraControlSelector`,components:{ElSelect:y,ElOption:b,ElSlider:M,ElInputNumber:j,InfoIcon:P},data(){return{configKeys:mn}},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||``},selectedModel(){return this.$store.state.kling?.config?.model||``},selectedDuration(){return this.$store.state.kling?.config?.duration},motionControlSupported(){return Z(this.selectedModel,this.selectedMode,this.selectedDuration).motionControl},hasStartImage(){return!!this.$store.state.kling?.config?.start_image_url},disabled(){return!this.motionControlSupported||this.hasStartImage},tooltipContent(){return this.motionControlSupported?this.hasStartImage?this.$t(`kling.description.cameraControlDisabledImage2Video`):this.$t(`kling.description.cameraControl`):this.$t(`kling.description.cameraControlNotSupported`)},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??``},set(e){let t=this.$store.state.kling?.config||{};if(!e){let e={...t};delete e.camera_control,this.$store.commit(`kling/setConfig`,e);return}let n=e;this.$store.commit(`kling/setConfig`,{...t,camera_control:{type:n,config:n===`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){let n=this.$store.state.kling?.config||{},r=n.camera_control||{type:`simple`},i={...r.config||{}};t==null?delete i[e]:i[e]=t,this.$store.commit(`kling/setConfig`,{...n,camera_control:{...r,type:`simple`,config:i}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),gn={class:`field`},_n={class:`header`},vn={class:`text-sm font-bold`},yn={key:0,class:`config-grid`},bn={class:`cfg-row-head`},xn={class:`cfg-name`};function Sn(t,n,r,u,d,m){let _=l(`info-icon`),v=l(`el-option`),y=l(`el-select`),b=l(`el-input-number`),x=l(`el-slider`);return g(),s(`div`,gn,[e(`div`,_n,[e(`span`,vn,i(t.$t(`kling.name.cameraControl`)),1),a(_,{content:t.tooltipContent},null,8,[`content`])]),a(y,{modelValue:t.selectedTypeRaw,"onUpdate:modelValue":n[0]||=e=>t.selectedTypeRaw=e,class:`value`,placeholder:t.$t(`kling.placeholder.cameraType`),clearable:!0,disabled:t.disabled},{default:p(()=>[(g(!0),s(c,null,h(t.typeOptions,e=>(g(),f(v,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`disabled`]),t.selectedType===`simple`&&!t.disabled?(g(),s(`div`,yn,[(g(!0),s(c,null,h(t.configKeys,n=>(g(),s(`div`,{key:n,class:`cfg-row`},[e(`div`,bn,[e(`span`,xn,i(t.$t(`kling.name.cc_${n}`)),1),a(b,{modelValue:t.configValues[n],"onUpdate:modelValue":e=>t.configValues[n]=e,min:-1,max:1,step:.1,precision:1,"controls-position":`right`,size:`small`,class:`cfg-num`,onChange:e=>t.onNumberChange(n,e)},null,8,[`modelValue`,`onUpdate:modelValue`,`onChange`])]),a(x,{"model-value":t.configValues[n]??0,min:-1,max:1,step:.1,onInput:e=>t.onSliderChange(n,e)},null,8,[`model-value`,`onInput`])]))),128))])):o(``,!0)])}var Cn=V(hn,[[`render`,Sn],[`__scopeId`,`data-v-cd896060`]]),wn=[{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`]}],Tn=`, `;function En(e,t){let n=(e||``).trim();return n?n.includes(t)?n:`${n}${Tn}${t}`:t}function Dn(e,t){if(!e||!t)return e||``;let n=[`${t}${Tn}`,`${Tn}${t}`,t],r=e;for(let e of n)if(r.includes(e)){r=r.replace(e,``);break}return r.replace(/(?:,\s*)+$/,``).replace(/^(?:,\s*)+/,``)}var On=v({name:`InspirationPills`,components:{CloseIcon:xe},computed:{prompt(){return this.$store.state.kling?.config?.prompt||``},allChipTexts(){return wn.flatMap(e=>e.chipKeys.map(e=>this.$t(`kling.inspiration.chip.${e}`)))},selected(){let e=this.prompt;if(!e)return[];let t=[];for(let n of this.allChipTexts){let r=e.indexOf(n);r!==-1&&t.push({text:n,idx:r})}return t.sort((e,t)=>e.idx-t.idx).map(e=>e.text)}},methods:{onRemove(e){let t=Dn(this.prompt,e);this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:t})}}}),kn={key:0,class:`pills`,role:`list`},An={class:`pill-text`},jn=[`aria-label`,`title`,`onClick`];function Mn(n,r,u,d,f,p){let m=l(`close-icon`);return n.selected.length>0?(g(),s(`div`,kn,[(g(!0),s(c,null,h(n.selected,r=>(g(),s(`div`,{key:r,class:`pill`,role:`listitem`},[e(`span`,An,i(r),1),e(`button`,{type:`button`,class:`pill-remove`,"aria-label":n.$t(`kling.inspiration.removeChip`),title:n.$t(`kling.inspiration.removeChip`),onClick:t(e=>n.onRemove(r),[`stop`])},[a(m,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,jn)]))),128))])):o(``,!0)}var Nn=v({name:`PromptInput`,components:{IdeaIcon:ce,ElButton:z,PromptTextarea:te,InspirationPills:V(On,[[`render`,Mn],[`__scopeId`,`data-v-6be01bcf`]])},emits:[`open-inspiration`],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){this.$store.commit(`kling/setConfig`,{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Pn(e,t,n,o,s,c){let u=l(`idea-icon`),d=l(`el-button`),m=l(`inspiration-pills`),h=l(`prompt-textarea`);return g(),f(h,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||=t=>e.prompt=t,title:e.$t(`kling.name.prompt`),info:e.$t(`kling.description.prompt`),placeholder:e.$t(`kling.placeholder.prompt`)},{actions:p(()=>[a(d,{text:``,size:`small`,class:`inspiration-btn`,onClick:t[0]||=t=>e.$emit(`open-inspiration`)},{default:p(()=>[a(u,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(e.$t(`kling.inspiration.openButton`)),1)]),_:1})]),before:p(()=>[a(m)]),_:1},8,[`modelValue`,`title`,`info`,`placeholder`])}var Fn=V(Nn,[[`render`,Pn],[`__scopeId`,`data-v-5754ae54`]]),In=v({name:`NegativePromptInput`,components:{ElInput:ge,InfoIcon:P},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||=``}}),Ln={class:`field`},Rn={class:`box`},zn={class:`title font-bold`};function Bn(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Ln,[e(`div`,Rn,[e(`h2`,zn,i(t.$t(`kling.name.negativePrompt`)),1),a(d,{content:t.$t(`kling.description.negativePrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.negativePrompt`)},null,8,[`modelValue`,`placeholder`])])}var Vn=V(In,[[`render`,Bn],[`__scopeId`,`data-v-de98cf01`]]),Hn=v({name:`InspirationDrawer`,components:{Close:xe,IdeaIcon:ce,ElDrawer:A,ElButton:z},props:{modelValue:{type:Boolean,default:!1}},emits:[`update:modelValue`],data(){return{groups:wn}},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(e=>this.$t(`kling.inspiration.chip.${e}`)))},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(Dn(this.prompt,e)):this.setPrompt(En(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(let t of this.allChipTexts)for(;e.includes(t);)e=Dn(e,t);this.setPrompt(e)}}}),Un={class:`drawer-content`},Wn={class:`drawer-header`},Gn={class:`title-row`},Kn={class:`title`},qn={class:`hint`},Jn={key:0,class:`selected-bar`},Yn={class:`selected-text`},Xn={class:`groups`},Zn={class:`group-title`},Qn={class:`chip-grid`},$n=[`onClick`];function er(t,u,d,m,_,v){let y=l(`idea-icon`),b=l(`close`),x=l(`el-button`),S=l(`el-drawer`);return g(),f(S,{modelValue:t.visible,"onUpdate:modelValue":u[1]||=e=>t.visible=e,direction:`rtl`,"with-header":!1,size:t.drawerSize,"custom-class":`kling-inspiration-drawer`,"destroy-on-close":!1},{default:p(()=>[e(`div`,Un,[e(`div`,Wn,[e(`div`,Gn,[a(y,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Kn,i(t.$t(`kling.inspiration.title`)),1)]),a(x,{text:``,class:`close-btn`,"aria-label":t.$t(`common.button.close`),title:t.$t(`common.button.close`),onClick:u[0]||=e=>t.visible=!1},{default:p(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])]),e(`div`,qn,i(t.$t(`kling.inspiration.hint`)),1),t.selectedCount>0?(g(),s(`div`,Jn,[e(`span`,Yn,i(t.$t(`kling.inspiration.selectedSummary`,{count:t.selectedCount})),1),a(x,{text:``,size:`small`,class:`clear-btn`,onClick:t.onClearSelected},{default:p(()=>[r(i(t.$t(`kling.inspiration.clearSelected`)),1)]),_:1},8,[`onClick`])])):o(``,!0),e(`div`,Xn,[(g(!0),s(c,null,h(t.groups,r=>(g(),s(`div`,{key:r.groupKey,class:`group`},[e(`div`,Zn,i(t.$t(`kling.inspiration.group.${r.groupKey}`)),1),e(`div`,Qn,[(g(!0),s(c,null,h(r.chipKeys,e=>(g(),s(`button`,{key:e,type:`button`,class:n({chip:!0,active:t.isSelected(t.chipText(e))}),onClick:n=>t.onToggle(t.chipText(e))},i(t.chipText(e)),11,$n))),128))])]))),128))])])]),_:1},8,[`modelValue`,`size`])}var tr=V(Hn,[[`render`,er],[`__scopeId`,`data-v-8b2e6a5d`]]),nr={"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-o1":`Kling O1`},rr={std:`720p`,pro:`1080p`,"4k":`4K`},ir=v({name:`SummaryChip`,components:{AudioIcon:oe},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){let e=this.config?.model||`kling-v2-5-turbo`;return nr[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||``},modeLabel(){let e=this.config?.mode||`std`;return rr[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),ar={class:`summary-chip`},or=[`title`],sr=[`title`],cr=[`title`],lr=[`title`],ur=[`title`];function dr(t,n,r,c,u,d){let f=l(`audio-icon`);return g(),s(`div`,ar,[e(`span`,{class:`part`,title:t.$t(`kling.name.model`)},i(t.modelLabel),9,or),n[0]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.duration`)},i(t.durationLabel),9,sr),n[1]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.ratio`)},i(t.aspectRatio||`16:9`),9,cr),n[2]||=e(`span`,{class:`dot`},`·`,-1),e(`span`,{class:`part`,title:t.$t(`kling.name.mode`)},i(t.modeLabel),9,lr),t.generateAudio?(g(),s(`span`,{key:0,class:`audio`,title:t.$t(`kling.name.generateAudio`)},[a(f,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ur)):o(``,!0)])}var fr=v({name:`ConfigPanel`,components:{MagicIcon:I,ElButton:z,Consumption:X,PromptInput:Fn,NegativePromptInput:Vn,ModelSelector:qe,ModeSelector:et,DurationSelector:ut,RatioSelector:_t,StartImage:wt,CfgScaleSelector:on,GenerateAudioSelector:pn,CameraControlSelector:Cn,InspirationDrawer:tr,SummaryChip:V(ir,[[`render`,dr],[`__scopeId`,`data-v-c800852a`]]),EndImage:jt,ReferenceImages:Zt,ReferenceVideo:Ut},emits:[`generate`],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},capabilities(){return Z(this.config?.model,this.config?.mode,this.config?.duration)},omniActive(){return this.config?.model===`kling-o1`||!!(this.config?.image_list?.length||this.config?.video_list?.length)},consumption(){return be(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),pr={class:`flex flex-col h-full`},mr={class:`flex-1 overflow-y-auto p-5`},hr={class:`flex flex-col items-center justify-center px-5 pb-5`};function gr(t,n,c,u,d,m){let h=l(`prompt-input`),_=l(`model-selector`),v=l(`ratio-selector`),y=l(`reference-images`),b=l(`reference-video`),x=l(`start-image`),S=l(`end-image`),C=l(`duration-selector`),w=l(`mode-selector`),T=l(`generate-audio-selector`),E=l(`camera-control-selector`),D=l(`cfg-scale-selector`),O=l(`negative-prompt-input`),k=l(`summary-chip`),A=l(`consumption`),j=l(`magic-icon`),M=l(`el-button`),N=l(`inspiration-drawer`);return g(),s(`div`,pr,[e(`div`,mr,[a(h,{class:`mb-4`,onOpenInspiration:n[0]||=e=>t.inspirationOpen=!0}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),t.capabilities.referenceImages?(g(),f(y,{key:0,class:`mb-3`})):o(``,!0),t.capabilities.referenceVideo?(g(),f(b,{key:1,class:`mb-4`})):o(``,!0),a(x,{class:`mb-4`}),a(S,{class:`mb-4`}),a(C,{class:`mb-4`}),a(w,{class:`mb-4`}),a(T,{class:`mb-4`}),t.omniActive?o(``,!0):(g(),f(E,{key:2,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(D,{key:3,class:`mb-4`})),t.omniActive?o(``,!0):(g(),f(O,{key:4,class:`mb-4`}))]),e(`div`,hr,[a(k),a(A,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),t.config?.video_url!==void 0||t.config?.custom?(g(),f(M,{key:0,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(j,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.extend`)),1)]),_:1},8,[`onClick`])):(g(),f(M,{key:1,type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:p(()=>[a(j,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generate`)),1)]),_:1},8,[`onClick`]))]),a(N,{modelValue:t.inspirationOpen,"onUpdate:modelValue":n[1]||=e=>t.inspirationOpen=e},null,8,[`modelValue`])])}var _r=V(fr,[[`render`,gr]]),vr=v({name:`MotionImage`,components:{UploadIcon:F,ElUpload:C,ElButton:z,InfoIcon:P,ImagePreview:Y},mixins:[J,q,G,ve],data(){return{fileList:[],uploadUrl:W()+`/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(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onError(){D.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(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),yr={class:`relative`},br={class:`flex justify-between`},xr={class:`flex justify-start items-center`},Sr={class:`text-sm font-bold`};function Cr(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`image-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,yr,[e(`div`,br,[e(`div`,xr,[e(`span`,Sr,i(t.$t(`kling.name.motionImage`)),1),a(h,{content:t.$t(`kling.description.motionImage`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(_,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var wr=V(vr,[[`render`,Cr],[`__scopeId`,`data-v-4a95ef2c`]]),Tr=v({name:`MotionVideo`,components:{UploadIcon:F,ElUpload:C,ElButton:z,InfoIcon:P,FilePreview:Te},mixins:[q,G],data(){return{fileList:[],uploadUrl:W()+`/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(){D.warning(this.$t(`kling.message.uploadVideoExceed`))},onError(){D.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){let t=e.type===`video/mp4`||e.type===`video/quicktime`,n=e.size/1024/1024<100;return t?n?!0:(D.error(this.$t(`kling.message.uploadVideoSizeExceed`)),!1):(D.error(this.$t(`kling.message.uploadVideoTypeFailed`)),!1)},onSetVideoUrl(){let e=this.urls?.[0];this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),Er={class:`relative`},Dr={class:`flex justify-between`},Or={class:`flex justify-start items-center`},kr={class:`text-sm font-bold`};function Ar(t,n,c,u,d,m){let h=l(`info-icon`),_=l(`file-preview`),v=l(`upload-icon`),y=l(`el-button`),b=l(`el-upload`);return g(),s(`div`,Er,[e(`div`,Dr,[e(`div`,Or,[e(`span`,kr,i(t.$t(`kling.name.motionVideo`)),1),a(h,{content:t.$t(`kling.description.motionVideo`)},null,8,[`content`])])]),a(b,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,accept:`.mp4,.mov`,name:`file`,class:`value`,"show-file-list":!0,limit:1,multiple:!1,action:t.uploadUrl,"before-upload":t.beforeUpload,"on-exceed":t.onExceed,"on-error":t.onError,"on-success":t.onSuccess,headers:t.headers},{file:p(({file:e})=>[e.percentage===void 0?o(``,!0):(g(),f(_,{key:0,url:e.url||e.response?.file_url,name:e.name,percentage:e.percentage,onRemove:n=>t.onRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`]))]),default:p(()=>[a(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(v,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadVideoUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`before-upload`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var jr=V(Tr,[[`render`,Ar],[`__scopeId`,`data-v-630c4521`]]),Mr=v({name:`MotionPromptInput`,components:{ElInput:ge,InfoIcon:P},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||``},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),Nr={class:`field`},Pr={class:`box`},Fr={class:`title font-bold`};function Ir(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-input`);return g(),s(`div`,Nr,[e(`div`,Pr,[e(`h2`,Fr,i(t.$t(`kling.name.motionPrompt`)),1),a(d,{content:t.$t(`kling.description.motionPrompt`),class:`info`},null,8,[`content`])]),a(f,{modelValue:t.prompt,"onUpdate:modelValue":n[0]||=e=>t.prompt=e,rows:3,type:`textarea`,class:`prompt`,placeholder:t.$t(`kling.placeholder.motionPrompt`)},null,8,[`modelValue`,`placeholder`])])}var Lr=V(Mr,[[`render`,Ir],[`__scopeId`,`data-v-ca9fdbe5`]]),Rr=`video`,zr=v({name:`CharacterOrientationSelector`,components:{ElRadioGroup:k,ElRadioButton:O,InfoIcon:P},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||Rr},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=Rr)}}),Br={class:`field`},Vr={class:`header`},Hr={class:`text-sm font-bold`};function Ur(t,n,o,c,u,d){let f=l(`info-icon`),m=l(`el-radio-button`),h=l(`el-radio-group`);return g(),s(`div`,Br,[e(`div`,Vr,[e(`span`,Hr,i(t.$t(`kling.name.characterOrientation`)),1),a(f,{content:t.$t(`kling.description.characterOrientation`)},null,8,[`content`])]),a(h,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,size:`small`,class:`value`},{default:p(()=>[a(m,{label:`image`},{default:p(()=>[r(i(t.$t(`kling.name.orientationImage`)),1)]),_:1}),a(m,{label:`video`},{default:p(()=>[r(i(t.$t(`kling.name.orientationVideo`)),1)]),_:1})]),_:1},8,[`modelValue`])])}var Wr=V(zr,[[`render`,Ur],[`__scopeId`,`data-v-7a91195b`]]),Gr=`kling-v2-6`,Kr=v({name:`MotionModelSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},computed:{options(){return[{value:`kling-v2-6`,label:`Kling 2.6`},{value:`kling-v3`,label:`Kling 3.0`}]},value:{get(){return this.$store.state.kling?.motionConfig?.model_name||Gr},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,model_name:e})}}},mounted(){this.$store.state.kling?.motionConfig?.model_name||(this.value=Gr)}}),qr={class:`field`},Jr={class:`header`},Yr={class:`title font-bold`};function Xr(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,qr,[e(`div`,Jr,[e(`h2`,Yr,i(t.$t(`kling.name.motionModel`)),1),a(m,{content:t.$t(`kling.description.motionModel`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Zr=V(Kr,[[`render`,Xr],[`__scopeId`,`data-v-480e8da2`]]),Qr=`std`,$r=v({name:`MotionModeSelector`,components:{ElSelect:y,ElOption:b,InfoIcon:P},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||Qr},set(e){this.$store.commit(`kling/setMotionConfig`,{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=Qr)}}),ei={class:`field`},ti={class:`header`},ni={class:`title font-bold`};function ri(t,n,r,o,u,d){let m=l(`info-icon`),_=l(`el-option`),v=l(`el-select`);return g(),s(`div`,ei,[e(`div`,ti,[e(`h2`,ni,i(t.$t(`kling.name.mode`)),1),a(m,{content:t.$t(`kling.description.motionMode`)},null,8,[`content`])]),a(v,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ii=V($r,[[`render`,ri],[`__scopeId`,`data-v-1295688c`]]),ai=v({name:`KeepOriginalSoundSelector`,components:{ElSwitch:N,InfoIcon:P},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`})}}}}),oi={class:`relative`},si={class:`flex justify-between items-center`},ci={class:`flex justify-start items-center`},li={class:`text-sm font-bold`};function ui(t,n,r,o,c,u){let d=l(`info-icon`),f=l(`el-switch`);return g(),s(`div`,oi,[e(`div`,si,[e(`div`,ci,[e(`span`,li,i(t.$t(`kling.name.keepOriginalSound`)),1),a(d,{content:t.$t(`kling.description.keepOriginalSound`)},null,8,[`content`])]),a(f,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e},null,8,[`modelValue`])])])}var di=v({name:`MotionPanel`,components:{MagicIcon:I,ElButton:z,Consumption:X,MotionImage:wr,MotionVideo:jr,MotionPromptInput:Lr,CharacterOrientationSelector:Wr,MotionModelSelector:Zr,MotionModeSelector:ii,KeepOriginalSoundSelector:V(ai,[[`render`,ui]])},emits:[`generate`],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return be({...this.motionConfig,duration:1},this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){let e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit(`generate`)}}}),fi={class:`flex flex-col h-full`},pi={class:`flex-1 overflow-y-auto p-5`},mi={class:`flex flex-col items-center justify-center px-5 pb-5`};function hi(t,n,o,c,u,d){let f=l(`motion-image`),m=l(`motion-video`),h=l(`motion-prompt-input`),_=l(`character-orientation-selector`),v=l(`motion-model-selector`),y=l(`motion-mode-selector`),b=l(`keep-original-sound-selector`),x=l(`consumption`),S=l(`magic-icon`),C=l(`el-button`);return g(),s(`div`,fi,[e(`div`,pi,[a(f,{class:`mb-3`}),a(m,{class:`mb-3`}),a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),e(`div`,mi,[a(x,{value:t.consumption,service:t.service,"rate-unit":t.$t(`kling.name.perSecond`),note:t.$t(`kling.message.motionPricingNote`)},null,8,[`value`,`service`,`rate-unit`,`note`]),a(C,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(S,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateMotion`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var gi=V(di,[[`render`,hi]]),_i=v({name:`KlingTabSwitcher`,components:{ElTabs:x,ElTabPane:S,ElTag:me},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`)},{value:`talking-photo`,label:this.$t(`kling.tab.talkingPhoto`)}]}},methods:{onUpdate(e){this.$emit(`update:modelValue`,e)}}}),vi=[`title`],yi={class:`text`};function bi(t,n,a,u,d,m){let _=l(`el-tag`),v=l(`el-tab-pane`),y=l(`el-tabs`);return g(),f(y,{"model-value":t.modelValue,class:`kling-tabs scenario-tabs scenario-tabs--divided`,"onUpdate:modelValue":t.onUpdate},{default:p(()=>[(g(!0),s(c,null,h(t.tabs,t=>(g(),f(v,{key:t.value,name:t.value,disabled:t.disabled},{label:p(()=>[e(`span`,{class:`tab-label`,title:t.disabled?t.disabledReason:void 0},[e(`span`,yi,i(t.label),1),t.badge?(g(),f(_,{key:0,size:`small`,type:`warning`,class:`badge`},{default:p(()=>[r(i(t.badge),1)]),_:2},1024)):o(``,!0)],8,vi)]),_:2},1032,[`name`,`disabled`]))),128))]),_:1},8,[`model-value`,`onUpdate:modelValue`])}var xi=V(_i,[[`render`,bi],[`__scopeId`,`data-v-e6a2bb26`]]),Si={"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`},Ci=v({name:`TalkingPhotoModelSelector`,components:{ElSelect:y,ElOption:b},data(){return{options:pe.map(e=>({value:e,label:Si[e]||e}))}},computed:{value:{get(){return this.$store.state.kling?.talkingPhotoConfig?.model||`kling-v2-1-master`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,model:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.model||(this.value=de)}}),wi={class:`field`},Ti={class:`title font-bold`};function Ei(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,wi,[e(`h2`,Ti,i(t.$t(`kling.name.model`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Di=V(Ci,[[`render`,Ei],[`__scopeId`,`data-v-cbc83d11`]]),Oi=v({name:`TalkingPhotoModeSelector`,components:{ElSelect:y,ElOption:b},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?.talkingPhotoConfig?.mode||`pro`},set(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.$store.state.kling?.talkingPhotoConfig,mode:e})}}},mounted(){this.$store.state.kling?.talkingPhotoConfig?.mode||(this.value=`pro`)}}),ki={class:`field`},Ai={class:`title font-bold`};function ji(t,n,r,o,u,d){let m=l(`el-option`),_=l(`el-select`);return g(),s(`div`,ki,[e(`h2`,Ai,i(t.$t(`kling.name.mode`)),1),a(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`kling.placeholder.select`)},{default:p(()=>[(g(!0),s(c,null,h(t.options,e=>(g(),f(m,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Mi=v({name:`TalkingPhotoPanel`,components:{MagicIcon:I,UploadIcon:F,ElUpload:C,ElButton:z,ElInput:ge,Consumption:X,InfoIcon:P,ImagePreview:Y,ModelSelector:Di,ModeSelector:V(Oi,[[`render`,ji],[`__scopeId`,`data-v-92525a1d`]])},mixins:[G,ve],emits:[`generate`],data(){return{imageFiles:[],audioFiles:[],uploadUrl:W()+`/api/v1/files/`}},computed:{config(){return this.$store.state.kling?.talkingPhotoConfig||{}},audioUrl(){return this.config.audio_url},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},service(){return this.$store.state.kling?.service},consumption(){return be({...this.config,action:`talking-photo`},this.service?.cost)},canGenerate(){return!!(this.config.image_url&&this.config.audio_url)}},methods:{commit(e){this.$store.commit(`kling/setTalkingPhotoConfig`,{...this.config,...e})},onPromptChange(e){this.commit({prompt:e})},onImageExceed(){D.warning(this.$t(`kling.message.uploadReferencesExceed`))},onImageError(){D.error(this.$t(`kling.message.uploadReferencesError`))},onImageSuccess(e){this.commit({image_url:e?.file_url})},onImageRemove(e){this.imageFiles.splice(this.imageFiles.indexOf(e),1),this.commit({image_url:void 0})},onAudioExceed(){D.warning(this.$t(`kling.message.uploadAudioExceed`))},onAudioError(){D.error(this.$t(`kling.message.uploadAudioError`))},onAudioSuccess(e){this.commit({audio_url:e?.file_url})},onAudioRemove(){this.commit({audio_url:void 0})},onGenerate(){this.$emit(`generate`)}}}),Ni={class:`flex flex-col h-full`},Pi={class:`flex-1 overflow-y-auto p-5`},Fi={class:`relative mb-4`},Ii={class:`flex justify-start items-center`},Li={class:`text-sm font-bold`},Ri={class:`relative mb-4`},zi={class:`flex justify-start items-center`},Bi={class:`text-sm font-bold`},Vi=[`src`],Hi={class:`mb-4`},Ui={class:`flex justify-start items-center`},Wi={class:`text-sm font-bold`},Gi={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ki(t,n,c,u,d,m){let h=l(`model-selector`),_=l(`mode-selector`),v=l(`info-icon`),y=l(`image-preview`),b=l(`upload-icon`),x=l(`el-button`),S=l(`el-upload`),C=l(`el-input`),w=l(`consumption`),T=l(`magic-icon`);return g(),s(`div`,Ni,[e(`div`,Pi,[a(h,{class:`mb-4`}),a(_,{class:`mb-4`}),e(`div`,Fi,[e(`div`,Ii,[e(`span`,Li,i(t.$t(`kling.name.talkingPhotoImage`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoImage`)},null,8,[`content`])]),a(S,{ref:`imageUploader`,"file-list":t.imageFiles,"onUpdate:fileList":n[0]||=e=>t.imageFiles=e,name:`file`,accept:`.png,.jpg,.jpeg,.webp,.bmp`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,"list-type":`picture`,headers:t.headers,"on-exceed":t.onImageExceed,"on-error":t.onImageError,"on-success":t.onImageSuccess},{file:p(({file:e})=>[e.url&&e.percentage!==void 0?(g(),f(y,{key:0,url:e.url,name:e.name,percentage:e.percentage,onRemove:n=>t.onImageRemove(e)},null,8,[`url`,`name`,`percentage`,`onRemove`])):o(``,!0)]),default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`])]),e(`div`,Ri,[e(`div`,zi,[e(`span`,Bi,i(t.$t(`kling.name.talkingPhotoAudio`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoAudio`)},null,8,[`content`])]),a(S,{ref:`audioUploader`,"file-list":t.audioFiles,"onUpdate:fileList":n[1]||=e=>t.audioFiles=e,name:`file`,accept:`.mp3,.wav,.m4a,.aac`,limit:1,class:`upload-wrapper`,multiple:!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,headers:t.headers,"on-exceed":t.onAudioExceed,"on-error":t.onAudioError,"on-success":t.onAudioSuccess,"on-remove":t.onAudioRemove},{default:p(()=>[a(x,{round:``,type:`primary`,size:`small`,class:`btn`},{default:p(()=>[a(b,{class:`icon mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.uploadAudio`)),1)]),_:1})]),_:1},8,[`file-list`,`before-upload`,`action`,`headers`,`on-exceed`,`on-error`,`on-success`,`on-remove`]),t.audioUrl?(g(),s(`audio`,{key:0,src:t.audioUrl,controls:``,class:`w-full mt-2`},null,8,Vi)):o(``,!0)]),e(`div`,Hi,[e(`div`,Ui,[e(`span`,Wi,i(t.$t(`kling.name.talkingPhotoPrompt`)),1),a(v,{content:t.$t(`kling.description.talkingPhotoPrompt`)},null,8,[`content`])]),a(C,{"model-value":t.config.prompt,type:`textarea`,rows:2,placeholder:t.$t(`kling.placeholder.talkingPhotoPrompt`),class:`mt-1`,"onUpdate:modelValue":t.onPromptChange},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])])]),e(`div`,Gi,[a(w,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),a(x,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:p(()=>[a(T,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`kling.button.generateTalkingPhoto`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var qi=V(Mi,[[`render`,Ki],[`__scopeId`,`data-v-b47b80bd`]]),Ji=v({name:`TaskPreview`,components:{DeleteIcon:le,ChannelIcon:ne,InfoIcon:se,MagicIcon:I,TimeIcon:ee,WarningIcon:ue,CopyToClipboard:Ce,ElAlert:T,VideoPlayer:ke,ElTooltip:w,ElButton:z,ImagePreview:Y,VideoPreview:Oe,AudioPreview:De,ApiCodeButton:Ae,ReportButton:we},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{isFailure(){let e=this.modelValue?.response;return e?.success===!1||!!e?.error||e?.state===`failed`||e?.state===`cancelled`},isWaiting(){let e=this.modelValue?.response;return!e||!this.isFailure&&e.success!==!0&&!e.video_url},application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},displayText(){return this.modelValue?.request?.prompt?.trim()||this.modelValue?.request?.text?.trim()||``},referenceImages(){let e=[],t=this.modelValue?.request?.start_image_url,n=this.modelValue?.request?.end_image_url,r=this.modelValue?.request?.image_url;return t&&e.push({url:t,name:`start-image`}),n&&e.push({url:n,name:`end-image`}),r&&e.push({url:r,name:`reference-image`}),e},referenceVideos(){let e=[],t=this.modelValue?.request?.video_url;t&&e.push({url:t,name:`reference-video`});let n=this.modelValue?.request?.video_list;return(Array.isArray(n)?n:[]).forEach((t,n)=>{t?.video_url&&e.push({url:t.video_url,name:`reference-video-${n+1}`})}),e},referenceAudios(){let e=this.modelValue?.request?.audio_url;return e?[{url:e,name:`reference-audio`}]:[]}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await H.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`kling/deleteTask`,{id:e}),D.success(this.$t(`common.message.deleteTaskSuccess`))}catch{D.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e,t){e?.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),Yi={class:`preview`},Xi={class:`left`},Zi={class:`main`},Qi={class:`bot`},$i={class:`datetime`},ea=[`aria-label`],ta={key:0,class:`info`},na={key:0,class:`request-media flex justify-start items-center gap-2 w-full overflow-x-auto`},ra={key:1,class:`prompt`},ia={key:0},aa={key:1},oa={key:1,class:n({content:!0,failed:!0})},sa={key:0,class:`mb-4`},ca={key:1,class:n({operations:!0,"mt-2":!0})},la={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ua={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},da={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},fa={key:2,class:n({content:!0})},pa={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ma={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ha={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ga={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},_a={key:3,class:n({content:!0})},va={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ya={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function ba(n,u,d,m,_,v){let y=l(`capability-presentation`),b=l(`delete-icon`),x=l(`el-tooltip`),S=l(`image-preview`),C=l(`video-preview`),w=l(`audio-preview`),T=l(`video-player`),E=l(`el-button`),D=l(`api-code-button`),O=l(`report-button`),k=l(`channel-icon`),A=l(`magic-icon`),j=l(`copy-to-clipboard`),M=l(`time-icon`),N=l(`el-alert`),ee=l(`warning-icon`),te=l(`info-icon`);return g(),s(`div`,Yi,[e(`div`,Xi,[a(y,{capability:`kling`,part:`avatar`,class:`avatar`})]),e(`div`,Zi,[e(`div`,Qi,[a(y,{capability:`kling`,part:`name`}),e(`span`,$i,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(x,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:p(()=>[n.modelValue?.id?(g(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:u[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,ea)):o(``,!0)]),_:1},8,[`content`])]),n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0||n.displayText?(g(),s(`div`,ta,[n.referenceImages.length>0||n.referenceVideos.length>0||n.referenceAudios.length>0?(g(),s(`div`,na,[(g(!0),s(c,null,h(n.referenceImages,(e,t)=>(g(),f(S,{key:`image-${t}`,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceVideos,(e,t)=>(g(),f(C,{key:`video-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128)),(g(!0),s(c,null,h(n.referenceAudios,(e,t)=>(g(),f(w,{key:`audio-${t}`,url:e.url,name:e.name},null,8,[`url`,`name`]))),128))])):o(``,!0),n.displayText?(g(),s(`p`,ra,[r(i(n.displayText)+` `,1),n.modelValue?.response?n.isWaiting?(g(),s(`span`,aa,` - (`+i(n.$t(`kling.status.processing`))+`) `,1)):o(``,!0):(g(),s(`span`,ia,` - (`+i(n.$t(`kling.status.pending`))+`) `,1))])):o(``,!0)])):o(``,!0),n.modelValue?.response?.success===!0&&!n.isFailure?(g(),s(`div`,oa,[n.modelValue?.response.video_url?(g(),s(`div`,sa,[a(T,{src:n.modelValue?.response.video_url},null,8,[`src`])])):o(``,!0),n.modelValue?.response.success?(g(),s(`div`,ca,[a(x,{class:`box-item`,effect:`dark`,content:n.$t(`kling.message.downloadVideo`),placement:`top-start`},{default:p(()=>[n.modelValue?.response.video_url?(g(),f(E,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:u[1]||=e=>n.onDownload(e,n.modelValue?.response.video_url)},{default:p(()=>[r(i(n.$t(`kling.button.download`)),1)]),_:1})):o(``,!0)]),_:1},8,[`content`]),a(D,{path:`/kling/videos`,body:n.modelValue?.request},null,8,[`body`]),a(O,{service:`kling`,"target-id":n.modelValue?.id,snapshot:{prompt:n.displayText}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(N,{closable:!1,class:`mt-2 success`},{default:p(()=>[e(`p`,la,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.model`))+`: `+i(n.modelValue?.request?.model),1)]),e(`p`,ua,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,da,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),n.isFailure?(g(),s(`div`,fa,[a(N,{closable:!1,class:`failure`},{template:p(()=>[a(ee,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failure`)),1)]),default:p(()=>[e(`p`,pa,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,ma,[a(te,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.failureReason`))+`: `+i(n.modelValue?.response?.error?.message)+` `,1),a(j,{content:n.modelValue?.response?.error?.message},null,8,[`content`])]),n.modelValue?.elapsed?(g(),s(`p`,ha,[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.elapsed`))+`: `+i(n.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),n.modelValue?.response?.trace_id?(g(),s(`p`,ga,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0),n.isWaiting?(g(),s(`div`,_a,[a(N,{closable:!1,class:`info`},{template:p(()=>[a(M,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.response?`kling.status.processing`:`kling.status.pending`)),1)]),default:p(()=>[e(`p`,va,[a(A,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(j,{content:n.modelValue?.id},null,8,[`content`])]),n.modelValue?.response?.trace_id?(g(),s(`p`,ya,[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`kling.name.traceId`))+`: `+i(n.modelValue?.response?.trace_id)+` `,1),a(j,{content:n.modelValue?.response?.trace_id},null,8,[`content`])])):o(``,!0)]),_:1})])):o(``,!0)])])}var xa=v({name:`RecentPanel`,components:{TaskPreview:V(Ji,[[`render`,ba],[`__scopeId`,`data-v-73637147`]]),NoTasks:ie,BotPlaceholder:je,ScrollList:re},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?.()}}}),Sa={key:0},Ca={key:2,class:`w-full h-full flex items-center justify-center`};function wa(e,t,n,r,i,u){let d=l(`bot-placeholder`),m=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return g(),s(c,null,[e.tasks?.items===void 0?(g(),s(`div`,Sa,[a(d)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(g(),f(_,{key:1,ref:`scrollList`,class:`h-full w-full overflow-y-auto tasks`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(g(!0),s(c,null,h(e.tasks?.items,e=>(g(),f(m,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(g(),s(`div`,Ca,[a(v)])):o(``,!0)],64)}var Ta=v({name:`KlingIndex`,components:{ConfigPanel:_r,MotionPanel:gi,TalkingPhotoPanel:qi,TabSwitcher:xi,Layout:Le,RecentPanel:V(xa,[[`render`,wa]])},mixins:[Se],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===E.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===E.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},talkingPhotoConfig(){return this.$store.state.kling.talkingPhotoConfig},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 ae({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();let 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);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`kling/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!R(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let{camera_control:e,...t}=this.config||{},n={...t,async:!0},r=Number(!!n.start_image_url)+Number(!!n.end_image_url),i=n.image_list?.length||0,a=n.video_list?.length?4:7;if(r+i>a){D.warning(this.$t(`kling.message.referenceImagesTotalLimit`,{count:a}));return}if(n.video_list?.[0]?.refer_type===`base`&&(n.start_image_url||n.end_image_url||n.image_list?.some(({type:e})=>e))){D.warning(this.$t(`kling.message.baseVideoFrameConflict`));return}if(!n.video_id&&!t.video_url&&!n.start_image_url&&n.end_image_url){D.warning(this.$t(`kling.message.endImageRequiresStart`));return}if(n.action||(n.video_id||t.video_url?n.action=`extend`:n.start_image_url?n.action=`image2video`:n.action=`text2video`),n.action===`text2video`&&n.end_image_url&&delete n.end_image_url,e?.type&&(n.camera_control={type:e.type,...e.type===`simple`&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,e])=>e!=null))}:{}}),!K())return;let o=this.credential?.token;if(!o){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),B(`kling`,U.generate(n,{token:o})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.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(){if(!R(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.motionConfig||{};if(!e.image_url||!e.video_url){D.warning(this.$t(`kling.message.motionMissingInputs`));return}let 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.model_name?{model_name:e.model_name}:{},...e.prompt?{prompt:e.prompt}:{},async:!0};if(!K())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),B(`kling`,U.motion(t,{token:n})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.error(this.$t(`kling.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},async onGenerateTalkingPhoto(){if(!R(this.uploadTracker,e=>this.$t(e),e=>D.warning(e)))return;let e=this.talkingPhotoConfig||{};if(!e.image_url||!e.audio_url){D.warning(this.$t(`kling.message.talkingPhotoMissingInputs`));return}let t={image_url:e.image_url,audio_url:e.audio_url,model:e.model||`kling-v2-1-master`,mode:e.mode||`pro`,...e.prompt?{prompt:e.prompt}:{},...e.duration?{duration:e.duration}:{},async:!0};if(!K())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}D.info(this.$t(`kling.message.startingTask`)),B(`kling`,U.talkingPhoto(t,{token:n})).then(()=>{D.success(this.$t(`kling.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?D.error(this.$t(`kling.message.usedUp`)):D.error(this.$t(`kling.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ea={class:`flex flex-col h-full`},Da={class:`flex-1 min-h-0`};function Oa(t,n,r,i,s,c){let u=l(`tab-switcher`),d=l(`config-panel`),m=l(`motion-panel`),h=l(`talking-photo-panel`),_=l(`recent-panel`),v=l(`layout`);return g(),f(v,null,{config:p(()=>[e(`div`,Ea,[a(u,{"model-value":t.taskType,"onUpdate:modelValue":t.onTabChange},null,8,[`model-value`,`onUpdate:modelValue`]),e(`div`,Da,[t.taskType===`videos`?(g(),f(d,{key:0,onGenerate:t.onGenerate},null,8,[`onGenerate`])):t.taskType===`motion`?(g(),f(m,{key:1,onGenerate:t.onGenerateMotion},null,8,[`onGenerate`])):t.taskType===`talking-photo`?(g(),f(h,{key:2,onGenerate:t.onGenerateTalkingPhoto},null,8,[`onGenerate`])):o(``,!0)])])]),result:p(()=>[a(_,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var ka=V(Ta,[[`render`,Oa]]);export{ka as default};
@@ -0,0 +1 @@
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,qt as ee,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./arrow-right-BqDy8oUP.js";import{t as h}from"./check-DlRpPo6I.js";import{Yi as g}from"./constants-CLU-fDDu.js";import{Ii as _,M as v,O as y,i as b,r as x}from"./index-BMhc9ht-.js";var S=(e,t)=>({zh:e,en:t}),C={chatDesktop:S(`https://cdn.acedata.cloud/uploads/24b9ad71-e5c0-4550-b950-d52e73d74926`,`https://cdn.acedata.cloud/uploads/850faad3-4acd-4a4f-9f1a-29ca77119274`),chatMobile:S(`https://cdn.acedata.cloud/uploads/4bf02973-6482-4c5b-8174-83740d22ecca`,`https://cdn.acedata.cloud/uploads/1401bef2-4588-429a-9d5e-c3655a6a51a7`),midjourneyDesktop:S(`https://cdn.acedata.cloud/uploads/d5d1566f-893c-4dac-bf3d-3b181b7e8ab3`,`https://cdn.acedata.cloud/uploads/21379382-9aef-4597-8d6f-6bad33375943`),midjourneyMobile:S(`https://cdn.acedata.cloud/uploads/0671efb0-5f62-461c-b3a7-8b8eb08a6c39`,`https://cdn.acedata.cloud/uploads/93be4fb8-24bc-47f1-9fea-2d6504ec17f7`),nanobananaDesktop:S(`https://cdn.acedata.cloud/uploads/089b6deb-1ff1-4cf5-b938-36a2493a40da`,`https://cdn.acedata.cloud/uploads/165db012-430e-455c-844e-cd88bc88f60c`),nanobananaMobile:S(`https://cdn.acedata.cloud/uploads/8154ce9b-f221-4543-86c8-7e4556ee1917`,`https://cdn.acedata.cloud/uploads/6358331d-acf7-4784-b4f0-4f15189f9876`),seedreamDesktop:S(`https://cdn.acedata.cloud/uploads/7e45490e-8b41-48e9-9d31-dfae7072a7fa`,`https://cdn.acedata.cloud/uploads/91c96b92-31ff-4e99-bdd7-5314d1781246`),fluxDesktop:S(`https://cdn.acedata.cloud/uploads/7f7caa8d-5d61-4c03-9b14-14ddc865be5a`,`https://cdn.acedata.cloud/uploads/63e300df-a3c1-43c7-b170-6fd3fdfe15b5`),sunoDesktop:S(`https://cdn.acedata.cloud/uploads/5ab7f19e-2047-4c62-a228-ae4170ca58b0`,`https://cdn.acedata.cloud/uploads/6e962c96-1b2c-4e17-a791-e1c4a7929ba3`),sunoMobile:S(`https://cdn.acedata.cloud/uploads/f3a06507-d4fa-4568-9803-cfacfa39cfd6`,`https://cdn.acedata.cloud/uploads/aff42de2-62fe-43ad-9dd7-ceac814880e5`),fishDesktop:S(`https://cdn.acedata.cloud/uploads/db375091-7ddc-4d36-a4f8-db13fe1df424`,`https://cdn.acedata.cloud/uploads/d50b6bcd-e6a3-4863-a964-c68f259c4ae0`),klingDesktop:S(`https://cdn.acedata.cloud/uploads/fd38b6c8-9794-4414-884c-9ca9619c7da6`,`https://cdn.acedata.cloud/uploads/3531e27b-58d8-4c65-9010-148b7c785560`),klingMobile:S(`https://cdn.acedata.cloud/uploads/3abfa61f-d735-4a1d-b983-8b09a9c9e5f0`,`https://cdn.acedata.cloud/uploads/c3cb4afb-f554-4031-8f8b-c91359906f18`),veoDesktop:S(`https://cdn.acedata.cloud/uploads/e8291d40-e2d1-465e-88b6-3febbbba9a9b`,`https://cdn.acedata.cloud/uploads/efc32760-db07-439d-beff-ceaef735c3b4`),seedanceDesktop:S(`https://cdn.acedata.cloud/uploads/26a91d87-e267-4e39-9bbd-a2c5c8ec0cdc`,`https://cdn.acedata.cloud/uploads/8fd9cdc3-41f8-4d2f-9f32-60d083683307`),maestroDesktop:S(`https://cdn.acedata.cloud/uploads/e20d1a42-7824-4803-b6b6-8d121a7eb713`,`https://cdn.acedata.cloud/uploads/3b6887f8-5be1-4a19-9fcc-45ec6d695af0`),maestroMobile:S(`https://cdn.acedata.cloud/uploads/72648704-4c8e-40b4-9a60-70cbecc76401`,`https://cdn.acedata.cloud/uploads/12879735-e957-4c04-a30a-e6f463435bd7`),digitalHumanDesktop:S(`https://cdn.acedata.cloud/uploads/3a49d5fa-cd7a-4fb6-a6c0-e4f0a6d56d4d`,`https://cdn.acedata.cloud/uploads/b2ce6c5c-56d3-45e7-9d9e-598b5dfd9ae4`),serpDesktop:S(`https://cdn.acedata.cloud/uploads/8ccda980-60e5-4db7-9d99-66628ced5c44`,`https://cdn.acedata.cloud/uploads/94c23b79-4af7-4afd-9deb-1ac760e01950`),webextratorDesktop:S(`https://cdn.acedata.cloud/uploads/e1b19df4-1720-4674-abdd-9db0f7f529b2`,`https://cdn.acedata.cloud/uploads/6c9e4c43-d0bc-4a63-ba9e-4e9fbbd6b245`),codingBridgeDesktop:S(`https://cdn.acedata.cloud/uploads/ef0be118-adfa-4814-b672-a6977915e7f0`,`https://cdn.acedata.cloud/uploads/97d60828-c1c1-4ebb-a219-30bbed1e6353`),connectorsDesktop:S(`https://cdn.acedata.cloud/uploads/5a5ce9af-8a88-44c5-9262-dbf276aa5058`,`https://cdn.acedata.cloud/uploads/fb40fc97-9177-4778-b02a-0f2f1f37ad6c`)},w=[{key:`chat`,featureKeys:[`chatgpt`,`claude`,`gemini`,`grok`,`deepseek`,`kimi`],eyebrowKey:`intro.eyebrow.chat`,titleKey:`intro.title.chat`,siteTitleKey:`intro.title.site.chat`,subtitleKey:`intro.subtitle.chat`,bullets:[{key:`intro.bullet.chat.models`,catalogOnly:!0},{key:`intro.bullet.chat.multimodal`},{key:`intro.bullet.chat.agentic`}],entries:[{name:`ChatGPT`,descriptionKey:`intro.model.chatgpt`,featureKey:`chatgpt`,path:`/chatgpt`},{name:`Claude`,descriptionKey:`intro.model.claude`,featureKey:`claude`,path:`/claude`},{name:`Gemini`,descriptionKey:`intro.model.gemini`,featureKey:`gemini`,path:`/gemini`},{name:`Grok`,descriptionKey:`intro.model.grok`,featureKey:`grok`,path:`/grok`},{name:`DeepSeek`,descriptionKey:`intro.model.deepseek`,featureKey:`deepseek`,path:`/deepseek`},{name:`Kimi`,descriptionKey:`intro.model.kimi`,featureKey:`kimi`,path:`/kimi`},{name:`GLM`,descriptionKey:`intro.model.glm`,featureKey:`chatgpt`,icon:g,path:`/chatgpt`}],path:`/chatgpt`,screenshots:{chatgpt:{desktop:C.chatDesktop,mobile:C.chatMobile}}},{key:`image`,featureKeys:[`midjourney`,`nanobanana`,`openaiimage`,`seedream`,`flux`,`qrart`],eyebrowKey:`intro.eyebrow.image`,titleKey:`intro.title.image`,siteTitleKey:`intro.title.site.image`,subtitleKey:`intro.subtitle.image`,bullets:[{key:`intro.bullet.image.models`,catalogOnly:!0},{key:`intro.bullet.image.editing`,featureKeys:[`nanobanana`,`openaiimage`,`seedream`]},{key:`intro.bullet.image.resolution`,featureKeys:[`nanobanana`,`openaiimage`,`seedream`]}],entries:[{name:`Midjourney`,descriptionKey:`intro.model.midjourney`,featureKey:`midjourney`,path:`/midjourney`},{name:`Nano Banana`,descriptionKey:`intro.model.nanobanana`,featureKey:`nanobanana`,path:`/nanobanana`},{name:`GPT Image`,descriptionKey:`intro.model.gptimage`,featureKey:`openaiimage`,path:`/openaiimage`},{name:`Seedream`,descriptionKey:`intro.model.seedream`,featureKey:`seedream`,path:`/seedream`},{name:`Flux`,descriptionKey:`intro.model.flux`,featureKey:`flux`,path:`/flux`},{name:`QR Art`,descriptionKey:`intro.model.qrart`,featureKey:`qrart`,path:`/qrart`}],path:`/nanobanana`,screenshots:{midjourney:{desktop:C.midjourneyDesktop,mobile:C.midjourneyMobile},nanobanana:{desktop:C.nanobananaDesktop,mobile:C.nanobananaMobile},seedream:{desktop:C.seedreamDesktop},flux:{desktop:C.fluxDesktop}}},{key:`video`,featureKeys:[`kling`,`veo`,`sora`,`seedance`,`hailuo`,`luma`,`wan`,`pixverse`,`grokvideo`,`omni`],eyebrowKey:`intro.eyebrow.video`,titleKey:`intro.title.video`,siteTitleKey:`intro.title.site.video`,subtitleKey:`intro.subtitle.video`,bullets:[{key:`intro.bullet.video.models`,catalogOnly:!0},{key:`intro.bullet.video.control`,featureKeys:[`kling`,`veo`,`seedance`,`luma`]},{key:`intro.bullet.video.quality`,featureKeys:[`kling`,`seedance`,`grokvideo`]}],entries:[{name:`Kling`,descriptionKey:`intro.model.kling`,featureKey:`kling`,path:`/kling`},{name:`Veo`,descriptionKey:`intro.model.veo`,featureKey:`veo`,path:`/veo`},{name:`Sora`,descriptionKey:`intro.model.sora`,featureKey:`sora`,path:`/sora`},{name:`Seedance`,descriptionKey:`intro.model.seedance`,featureKey:`seedance`,path:`/seedance`},{name:`Hailuo`,descriptionKey:`intro.model.hailuo`,featureKey:`hailuo`,path:`/hailuo`},{name:`Luma`,descriptionKey:`intro.model.luma`,featureKey:`luma`,path:`/luma`},{name:`Wan`,descriptionKey:`intro.model.wan`,featureKey:`wan`,path:`/wan`},{name:`Pixverse`,descriptionKey:`intro.model.pixverse`,featureKey:`pixverse`,path:`/pixverse`},{name:`Grok Imagine`,descriptionKey:`intro.model.grokvideo`,featureKey:`grokvideo`,path:`/grokvideo`},{name:`Omni`,descriptionKey:`intro.model.omni`,featureKey:`omni`,path:`/omni`}],path:`/kling`,screenshots:{kling:{desktop:C.klingDesktop,mobile:C.klingMobile},veo:{desktop:C.veoDesktop},seedance:{desktop:C.seedanceDesktop}}},{key:`music`,featureKeys:[`suno`,`producer`,`fish`],eyebrowKey:`intro.eyebrow.music`,titleKey:`intro.title.music`,siteTitleKey:`intro.title.site.music`,subtitleKey:`intro.subtitle.music`,bullets:[{key:`intro.bullet.music.models`},{key:`intro.bullet.music.control`,featureKeys:[`suno`,`producer`]},{key:`intro.bullet.music.voice`,featureKeys:[`fish`]}],entries:[{name:`Suno`,descriptionKey:`intro.model.suno`,featureKey:`suno`,path:`/suno`},{name:`Producer`,descriptionKey:`intro.model.producer`,featureKey:`producer`,path:`/producer`},{name:`Fish Audio`,descriptionKey:`intro.model.fish`,featureKey:`fish`,path:`/fish`}],path:`/suno`,screenshots:{suno:{desktop:C.sunoDesktop,mobile:C.sunoMobile},fish:{desktop:C.fishDesktop}}},{key:`production`,featureKeys:[`maestro`,`digitalhuman`,`poivelle`],eyebrowKey:`intro.eyebrow.production`,titleKey:`intro.title.production`,siteTitleKey:`intro.title.site.production`,subtitleKey:`intro.subtitle.production`,bullets:[{key:`intro.bullet.production.oneline`,featureKeys:[`maestro`]},{key:`intro.bullet.production.styles`,featureKeys:[`maestro`,`digitalhuman`,`poivelle`]},{key:`intro.bullet.production.languages`,featureKeys:[`maestro`,`digitalhuman`]}],entries:[{name:`Maestro`,descriptionKey:`intro.model.maestro`,featureKey:`maestro`,path:`/maestro`},{name:`Digital Human`,descriptionKey:`intro.model.digitalhuman`,featureKey:`digitalhuman`,path:`/digital-human`},{name:`Poivelle`,descriptionKey:`intro.model.poivelle`,featureKey:`poivelle`,path:`/poivelle`}],path:`/maestro`,screenshots:{maestro:{desktop:C.maestroDesktop,mobile:C.maestroMobile},digitalhuman:{desktop:C.digitalHumanDesktop}}},{key:`tools`,featureKeys:[`serp`,`webextrator`,`codingBridge`],eyebrowKey:`intro.eyebrow.tools`,titleKey:`intro.title.tools`,siteTitleKey:`intro.title.site.tools`,subtitleKey:`intro.subtitle.tools`,bullets:[{key:`intro.bullet.tools.search`,featureKeys:[`serp`]},{key:`intro.bullet.tools.extract`,featureKeys:[`webextrator`]},{key:`intro.bullet.tools.coding`,featureKeys:[`codingBridge`]}],entries:[{name:`SERP`,descriptionKey:`intro.model.serp`,featureKey:`serp`,path:`/serp`},{name:`WebExtrator`,descriptionKey:`intro.model.webextrator`,featureKey:`webextrator`,path:`/webextrator`},{name:`Coding Bridge`,descriptionKey:`intro.model.codingbridge`,featureKey:`codingBridge`,path:`/coding-bridge`}],path:`/serp`,screenshots:{serp:{desktop:C.serpDesktop},webextrator:{desktop:C.webextratorDesktop},codingBridge:{desktop:C.codingBridgeDesktop}}}],T=[`intro.bullet.connector.catalog`,`intro.bullet.connector.modes`,`intro.bullet.connector.security`],E=p({name:`Intro`,components:{ElButton:_,ConfirmIcon:h,NextIcon:m},data(){return{connectorBullets:T}},computed:{site(){return this.$store.state.site},enabledFeatures(){return this.site?.features??{}},siteLoaded(){return!!this.site?.id},isChineseLocale(){return String(this.$i18n.locale).toLowerCase().startsWith(`zh`)},availableKeys(){return this.siteLoaded?b.filter(e=>this.enabledFeatures[e]?.enabled):[]},heroTitle(){return this.siteLoaded?this.$t(`intro.title.site`):this.$t(`intro.title.hero`)},heroSubtitle(){return this.siteLoaded?this.$t(`intro.subtitle.site`):this.$t(`intro.subtitle.hero`)},heroStats(){return[{value:`${this.availableKeys.length}`,labelKey:`intro.stat.capabilities`},{value:`${this.visibleEntryCount}`,labelKey:`intro.stat.products`},{value:`80+`,labelKey:`intro.stat.connectors`}]},visibleEntryCount(){return this.sections.reduce((e,t)=>e+t.entries.length,0)},sections(){let e=new Set(this.availableKeys);return w.map(t=>{let n=t.entries.filter(t=>!t.featureKey||e.has(t.featureKey)),r=this.sectionScreenshot(t.screenshots,e);return{...t,displayTitleKey:this.siteLoaded?t.siteTitleKey:t.titleKey,entries:n.map(e=>({...e,icon:e.icon??(e.featureKey?x[e.featureKey]:void 0)})),subtitle:this.siteLoaded?n.map(e=>e.name).join(` · `):this.$t(t.subtitleKey),bulletKeys:t.bullets.filter(t=>t.catalogOnly&&this.siteLoaded?!1:!t.featureKeys||t.featureKeys.some(t=>e.has(t))).map(e=>e.key),desktop:r?this.pick(r.desktop):void 0,mobile:r?.mobile?this.pick(r.mobile):void 0}}).filter(e=>e.entries.length>0).map(e=>({...e,path:e.entries.some(t=>t.path===e.path)?e.path:e.entries.find(e=>e.path)?.path??e.path}))},firstSectionKey(){return this.sections[0]?.key},heroDesktop(){return this.sections.find(e=>e.key===`chat`)?.desktop??this.sections.find(e=>e.desktop)?.desktop},heroMobile(){return this.sections.find(e=>e.key===`chat`)?.mobile??this.sections.find(e=>e.mobile)?.mobile},connectorShot(){return this.pick(C.connectorsDesktop)}},methods:{pick(e){return this.isChineseLocale?e.zh:e.en},sectionScreenshot(e,t){for(let n of b)if(t.has(n)&&e[n])return e[n]},onStart(){this.$router.push(v())},open(e){this.$router.push(e)},scrollTo(e){let t=document.getElementById(`app`),n=document.getElementById(e);if(!t||!n)return;let r=document.querySelector(`.header`)?.offsetHeight??0;t.scrollTop=n.offsetTop-r}}}),D={key:0,class:`intro`},O={class:`hero`},k={class:`container hero__content`},A={class:`eyebrow`},j={class:`hero__summary`},M={class:`hero__actions`},N={class:`hero__stats`},P={key:0,class:`hero__screens`},F={class:`macbook-frame hero__desktop`,"aria-hidden":`true`},I={class:`macbook-frame__lid`},L={class:`macbook-frame__viewport`},R=[`src`],z={key:0,class:`phone-device hero__mobile`,"aria-hidden":`true`},B={class:`phone-device__screen`},V=[`src`],H=[`id`],U={class:`container`},W={class:`capability__head`},G={class:`eyebrow eyebrow--light`},K={class:`macbook-frame screen-pair__desktop`},q={class:`macbook-frame__lid`},te={class:`macbook-frame__viewport`},J=[`src`,`alt`],Y={key:0,class:`phone-device screen-pair__mobile`},X={class:`phone-device__screen`},Z=[`src`],Q={class:`capability__copy`},ne={class:`feature-points`},re={class:`model-card__heading`},ie={class:`model-card__logo`,"aria-hidden":`true`},ae=[`src`],oe={class:`section connector-section`},se={class:`container`},ce={class:`capability__head`},le={class:`eyebrow eyebrow--light`},ue={class:`capability__body`},de={class:`screen-pair`},fe={class:`macbook-frame screen-pair__desktop`},pe={class:`macbook-frame__lid`},$={class:`macbook-frame__viewport`},me=[`src`,`alt`],he={class:`capability__copy`},ge={class:`feature-points`},_e={class:`final-cta`},ve={class:`container final-cta__content`},ye={class:`story-kicker`},be={class:`final-cta__actions`},xe=[`aria-label`];function Se(p,m,h,g,_,v){let y=c(`el-button`),b=c(`confirm-icon`),x=c(`next-icon`);return p.siteLoaded?(f(),o(`div`,D,[e(`section`,O,[m[7]||=e(`div`,{class:`hero__grid`},null,-1),e(`div`,k,[e(`span`,A,r(p.$t(`intro.badge.hero`)),1),e(`h1`,null,r(p.heroTitle),1),e(`p`,j,r(p.heroSubtitle),1),e(`div`,M,[i(y,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`]),p.firstSectionKey?(f(),l(y,{key:0,size:`large`,onClick:m[0]||=e=>p.scrollTo(p.firstSectionKey)},{default:u(()=>[n(r(p.$t(`intro.button.explore`)),1)]),_:1})):a(``,!0)]),e(`dl`,N,[(f(!0),o(s,null,d(p.heroStats,t=>(f(),o(`div`,{key:t.labelKey},[e(`dt`,null,r(t.value),1),e(`dd`,null,r(p.$t(t.labelKey)),1)]))),128))]),p.heroDesktop?(f(),o(`div`,P,[e(`div`,F,[e(`div`,I,[m[2]||=e(`span`,{class:`macbook-frame__camera`},null,-1),e(`div`,L,[e(`img`,{src:p.heroDesktop,alt:``},null,8,R)]),m[3]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[4]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),p.heroMobile?(f(),o(`div`,z,[m[6]||=e(`span`,{class:`phone-device__speaker`},null,-1),e(`div`,B,[m[5]||=e(`span`,{class:`phone-device__island`},null,-1),e(`img`,{src:p.heroMobile,alt:``},null,8,V)])])):a(``,!0)])):a(``,!0)])]),(f(!0),o(s,null,d(p.sections,(c,l)=>(f(),o(`section`,{id:c.key,key:c.key,class:t([`section capability`,{"capability--alt":l%2==1}])},[e(`div`,U,[e(`div`,W,[e(`span`,G,r(p.$t(c.eyebrowKey)),1),e(`h2`,null,r(p.$t(c.displayTitleKey)),1),e(`p`,null,r(c.subtitle),1)]),e(`div`,{class:t([`capability__body`,{"capability__body--reverse":l%2==1&&c.desktop,"capability__body--copy-only":!c.desktop}])},[c.desktop?(f(),o(`div`,{key:0,class:t([`screen-pair`,{"screen-pair--with-phone":c.mobile}])},[e(`div`,K,[e(`div`,q,[m[8]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,te,[e(`img`,{src:c.desktop,alt:p.$t(c.titleKey),loading:`lazy`},null,8,J)]),m[9]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[10]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)]),c.mobile?(f(),o(`div`,Y,[m[12]||=e(`span`,{class:`phone-device__speaker`,"aria-hidden":`true`},null,-1),e(`div`,X,[m[11]||=e(`span`,{class:`phone-device__island`,"aria-hidden":`true`},null,-1),e(`img`,{src:c.mobile,alt:``,loading:`lazy`},null,8,Z)])])):a(``,!0)],2)):a(``,!0),e(`div`,Q,[e(`ul`,ne,[(f(!0),o(s,null,d(c.bulletKeys,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),i(y,{type:`primary`,plain:``,onClick:e=>p.open(c.path)},{default:u(()=>[n(r(p.$t(`intro.button.try`))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`onClick`])])],2),e(`div`,{class:`model-grid`,style:ee({"--model-grid-columns":Math.min(c.entries.length,5),"--model-grid-columns-tablet":Math.min(c.entries.length,3),"--model-grid-columns-mobile":Math.min(c.entries.length,2)})},[(f(!0),o(s,null,d(c.entries,t=>(f(),o(`article`,{key:t.name,class:`model-card`},[e(`div`,re,[e(`span`,ie,[e(`img`,{src:t.icon,alt:``,loading:`lazy`},null,8,ae)]),e(`h3`,null,r(t.name),1)]),e(`p`,null,r(p.$t(t.descriptionKey)),1)]))),128))],4)])],10,H))),128)),e(`section`,oe,[e(`div`,se,[e(`div`,ce,[e(`span`,le,r(p.$t(`intro.eyebrow.connector`)),1),e(`h2`,null,r(p.$t(`intro.title.connector`)),1),e(`p`,null,r(p.$t(`intro.subtitle.connector`)),1)]),e(`div`,ue,[e(`div`,de,[e(`div`,fe,[e(`div`,pe,[m[13]||=e(`span`,{class:`macbook-frame__camera`,"aria-hidden":`true`},null,-1),e(`div`,$,[e(`img`,{src:p.connectorShot,alt:p.$t(`intro.title.connector`),loading:`lazy`},null,8,me)]),m[14]||=e(`div`,{class:`macbook-frame__chin`},null,-1)]),m[15]||=e(`div`,{class:`macbook-frame__base`},[e(`span`)],-1)])]),e(`div`,he,[e(`ul`,ge,[(f(!0),o(s,null,d(p.connectorBullets,t=>(f(),o(`li`,{key:t},[i(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,r(p.$t(t)),1)]))),128))]),i(y,{type:`primary`,plain:``,onClick:m[1]||=e=>p.open(`/console/connectors`)},{default:u(()=>[n(r(p.$t(`intro.button.try`))+` `,1),i(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1})])])])]),e(`section`,_e,[e(`div`,ve,[e(`div`,null,[e(`p`,ye,r(p.$t(`intro.eyebrow.cta`)),1),e(`h2`,null,r(p.$t(`intro.title.cta`)),1),e(`p`,null,r(p.$t(`intro.subtitle.cta`)),1)]),e(`div`,be,[i(y,{type:`primary`,size:`large`,onClick:p.onStart},{default:u(()=>[n(r(p.$t(`common.button.startForFree`)),1)]),_:1},8,[`onClick`])])])])])):(f(),o(`div`,{key:1,class:`intro-loading`,role:`status`,"aria-label":p.$t(`common.status.loading`)},[...m[16]||=[e(`span`,{class:`intro-loading__pulse`},null,-1)]],8,xe))}var Ce=y(E,[[`render`,Se],[`__scopeId`,`data-v-198ffd22`]]);export{Ce as default};