@acedatacloud/nexior 3.110.0 → 3.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Auth-CZBUsR-8.js → Auth-CKncbOs3.js} +1 -1
- package/dist/assets/{BotPlaceholder-808fKlrc.js → BotPlaceholder-pdWT9yaS.js} +1 -1
- package/dist/assets/{Callback-BCw34S4I.js → Callback-ug-RJzdC.js} +1 -1
- package/dist/assets/{Console-DPEMhi7m.js → Console-HM5QEMny.js} +1 -1
- package/dist/assets/{Consumption-D8o6ZGlD.js → Consumption-HjIHVPfJ.js} +1 -1
- package/dist/assets/{Conversation-BQ_U-I9L.js → Conversation-3fXcacWu.js} +7 -7
- package/dist/assets/{Conversation-CmjKckOg.css → Conversation-BOINVenJ.css} +1 -1
- package/dist/assets/{CopyToClipboard-99x8TU_E.js → CopyToClipboard-Bm9IiB5O.js} +1 -1
- package/dist/assets/{Detail-BTbBX_0l.js → Detail-W4psxShz.js} +2 -2
- package/dist/assets/{EditArray-BodaIya6.js → EditArray-CdJCgAF8.js} +1 -1
- package/dist/assets/{Extra-CUrRwWxs.js → Extra-BKIBFZ5w.js} +1 -1
- package/dist/assets/{FilePreview-BMrbMk0x.js → FilePreview-B-kt6wkS.js} +1 -1
- package/dist/assets/{History-ZibpTepi.js → History-DnkBBOXL.js} +1 -1
- package/dist/assets/{IconPark.vue_vue_type_script_setup_true_lang-BF3qQycP.js → IconPark.vue_vue_type_script_setup_true_lang-CUMeVlRQ.js} +1 -1
- package/dist/assets/{ImagePreview-B7ddO4K-.js → ImagePreview-B-kcZ7xf.js} +1 -1
- package/dist/assets/{ImageWrapper-B4mqUlhx.js → ImageWrapper-C6EfiSL4.js} +1 -1
- package/dist/assets/{Index-CjcUhG9o.js → Index-1fB1hKXH.js} +1 -1
- package/dist/assets/{Index-CdKg1Y3u.js → Index-BB_5NoTS.js} +1 -1
- package/dist/assets/{Index-DEnL8MY5.js → Index-BEHhdQWb.js} +1 -1
- package/dist/assets/{Index-CUQg6KBW.js → Index-BID7cAU3.js} +1 -1
- package/dist/assets/{Index-Ck00cdj3.js → Index-BRx9uhpp.js} +1 -1
- package/dist/assets/{Index-GcemLKVi.js → Index-BVlIcCLM.js} +1 -1
- package/dist/assets/{Index-BpUiKoDK.js → Index-Bb0CvWHW.js} +1 -1
- package/dist/assets/{Index-BIDqjbbO.js → Index-Bb4sqjBP.js} +1 -1
- package/dist/assets/{Index-BHFKdAzq.js → Index-BvAGIdGo.js} +1 -1
- package/dist/assets/{Index-CK59qCoD.js → Index-BwFbNF68.js} +1 -1
- package/dist/assets/{Index-DZEI8Sn1.js → Index-CDzIBHMu.js} +1 -1
- package/dist/assets/{Index-DUe_N0MN.js → Index-CERNv4NG.js} +1 -1
- package/dist/assets/{Index-Bg2Zm6-5.js → Index-CGzSyP7E.js} +1 -1
- package/dist/assets/{Index-CjvSntWd.js → Index-CU3TiMjH.js} +1 -1
- package/dist/assets/{Index-C1xSniax.js → Index-Clfys-rl.js} +1 -1
- package/dist/assets/{Index-RB9xEjUG.js → Index-D3VhpC77.js} +1 -1
- package/dist/assets/{Index-Fco5LKSK.js → Index-DFmUgljq.js} +1 -1
- package/dist/assets/{Index-DpUp9_s9.js → Index-DOpXe2QA.js} +1 -1
- package/dist/assets/{Index-CSso_LoA.js → Index-DRTcpond.js} +1 -1
- package/dist/assets/{Index-DCsM3bGF.js → Index-DX2b70BW.js} +1 -1
- package/dist/assets/{Index-DHRBWrtm.js → Index-DiYqwnkS.js} +1 -1
- package/dist/assets/{Index-CKjQDdoM.js → Index-Ja_nX74y.js} +1 -1
- package/dist/assets/{Index-rd81kAqo.js → Index-Jo8DToQ8.js} +1 -1
- package/dist/assets/{Index-CgdNSbRG.js → Index-lq5gDGvW.js} +1 -1
- package/dist/assets/{Invitees-BvTLQ2Dx.js → Invitees-DeZvE0vR.js} +1 -1
- package/dist/assets/{List-CzCbV2RI.js → List-BLNAIM--.js} +1 -1
- package/dist/assets/{List-DxmG5Fsu.js → List-BaDbbTt2.js} +1 -1
- package/dist/assets/{List-DrRSr6rf.js → List-DEn-WRCu.js} +1 -1
- package/dist/assets/{Main-DAOxrJFm.js → Main-DVf7M63m.js} +1 -1
- package/dist/assets/{Navigator-7tnlvMe5.js → Navigator-CCkQr_IE.js} +1 -1
- package/dist/assets/{NoTasks-CzCoCJiJ.js → NoTasks-CAc7WMUu.js} +1 -1
- package/dist/assets/{NotFound-1k_dya0M.js → NotFound-CGgtDNPl.js} +1 -1
- package/dist/assets/{OAuthCallback-D2YKjyo8.js → OAuthCallback-BST1uyNt.js} +1 -1
- package/dist/assets/{Pagination-BmrVtAe2.js → Pagination-C9VApaPW.js} +1 -1
- package/dist/assets/{ScrollList-CHr2ER0d.js → ScrollList-ClLx5Ay2.js} +1 -1
- package/dist/assets/{Status-BtwLPzrZ.js → Status-CvSbHrk3.js} +1 -1
- package/dist/assets/{Subscribe-DNcY8cWa.js → Subscribe-4E3Osz40.js} +1 -1
- package/dist/assets/{TransportWebHID-BiNkPg4j.js → TransportWebHID-DR_-jCTH.js} +1 -1
- package/dist/assets/{VideoPlayer-BJPVVH4v.js → VideoPlayer-DHTu44Da.js} +1 -1
- package/dist/assets/{_Uint8Array-BWy8cKCo.js → _Uint8Array-B8owGMyd.js} +1 -1
- package/dist/assets/{_baseClone-CVDR-yNh.js → _baseClone-CmG_Edvh.js} +1 -1
- package/dist/assets/{_baseIteratee-GCheQ423.js → _baseIteratee-DBmltUMm.js} +1 -1
- package/dist/assets/{_initCloneObject-BnGf6y2Q.js → _initCloneObject-D15ri8PG.js} +1 -1
- package/dist/assets/{add-CkjK2xW1.js → add-C0mpNF6k.js} +1 -1
- package/dist/assets/{all-wallets-CdL_YtIS.js → all-wallets-ClotN1E9.js} +1 -1
- package/dist/assets/{app-store-Bt1dpC73.js → app-store-CHklZbY1.js} +1 -1
- package/dist/assets/{apple-CEeGRsLR.js → apple-Bp91tKsA.js} +1 -1
- package/dist/assets/{arrow-bottom-CY7QPC3v.js → arrow-bottom-DC_JVzih.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-DUacLrTK.js → arrow-bottom-circle-CjNfFI8_.js} +1 -1
- package/dist/assets/{arrow-left-DdkU_cJC.js → arrow-left-DNF67cNt.js} +1 -1
- package/dist/assets/{arrow-right-BApVZAmW.js → arrow-right-Cq-twVbs.js} +1 -1
- package/dist/assets/{arrow-top-6DcF8ipC.js → arrow-top-BAPEAr7x.js} +1 -1
- package/dist/assets/{avatar-C0m3kdBO.js → avatar-BHUyKT-A.js} +1 -1
- package/dist/assets/{bank-FZTS0Bvm.js → bank-CNjbkHxk.js} +1 -1
- package/dist/assets/{basic-z3EiNtlJ.js → basic-cMadvC5q.js} +1 -1
- package/dist/assets/{browser-D-00yn8G.js → browser-mVDec-es.js} +1 -1
- package/dist/assets/{byokCredential-Cdy8REIp.js → byokCredential-XJt4P01K.js} +1 -1
- package/dist/assets/{card-D_wHBdr4.js → card-Du_mEvSr.js} +1 -1
- package/dist/assets/{castArray-BX2YHThj.js → castArray-BiIaTbnK.js} +1 -1
- package/dist/assets/{chat-D11jX4Iv.js → chat-DWj33yLu.js} +1 -1
- package/dist/assets/{checkmark-BEf3bMy_.js → checkmark-Cei_rTl3.js} +1 -1
- package/dist/assets/{checkmark-bold-Bw9dOPyC.js → checkmark-bold-D3tBxScN.js} +1 -1
- package/dist/assets/{chevron-bottom-GHiW7kBq.js → chevron-bottom-BWP3X89B.js} +1 -1
- package/dist/assets/{chevron-left-CNEj2dO4.js → chevron-left-ny6iN6nL.js} +1 -1
- package/dist/assets/{chevron-right-sgqFx8lL.js → chevron-right-B-UE9tuL.js} +1 -1
- package/dist/assets/{chevron-top-DlAuFkpk.js → chevron-top-B-6l7I9J.js} +1 -1
- package/dist/assets/{chrome-store-ClGqsVeO.js → chrome-store-BMLIHKOJ.js} +1 -1
- package/dist/assets/{clock-Dn87YZjp.js → clock-CbDF99vc.js} +1 -1
- package/dist/assets/{close-BwRH304n.js → close-BEl-n2L2.js} +1 -1
- package/dist/assets/{coinPlaceholder-D3MTdGQ0.js → coinPlaceholder-in5hstB8.js} +1 -1
- package/dist/assets/{compass-C-E2T0zy.js → compass-CeCFDZeC.js} +1 -1
- package/dist/assets/{copy-BNJGAvMa.js → copy-BE9gVTUY.js} +1 -1
- package/dist/assets/{cursor--i4Xa0OQ.js → cursor-EOAd-eyy.js} +1 -1
- package/dist/assets/{cursor-transparent-WOU8mk8F.js → cursor-transparent-DGW1C4WL.js} +1 -1
- package/dist/assets/{debounce-rFO21RGd.js → debounce-BIXA4vQu.js} +1 -1
- package/dist/assets/{desktop-CdiQ5DFl.js → desktop-5wy2kz4T.js} +1 -1
- package/dist/assets/{disconnect-BBTXz5Xp.js → disconnect-CiniaH88.js} +1 -1
- package/dist/assets/{discord-BavN0D2g.js → discord-ChaVMatf.js} +1 -1
- package/dist/assets/{distribution-gC6pfUsz.js → distribution-Cd4FxZnP.js} +1 -1
- package/dist/assets/{dropdown-D7fDLjhX.js → dropdown-Djw4XhII.js} +1 -1
- package/dist/assets/{etherscan-Bw-ZKmx-.js → etherscan-DZRo-j_B.js} +1 -1
- package/dist/assets/{exclamation-triangle-DOt3gbax.js → exclamation-triangle-Bh0MIQEt.js} +1 -1
- package/dist/assets/{extension-DAiziIeO.js → extension-UwWFgJsF.js} +1 -1
- package/dist/assets/{external-link-Cv8eFrXr.js → external-link-BfiFs4MY.js} +1 -1
- package/dist/assets/{facebook-CzJaALeT.js → facebook-CxpowLvQ.js} +1 -1
- package/dist/assets/{farcaster-DlHpFJ18.js → farcaster-B0fSWpie.js} +1 -1
- package/dist/assets/{filters-BWg9cLQ3.js → filters-BiMMkudc.js} +1 -1
- package/dist/assets/{flux-BP0RP-7R.js → flux-DGCtih8k.js} +1 -1
- package/dist/assets/{github-BlSjhO5R.js → github-i5XVnXPQ.js} +1 -1
- package/dist/assets/{google-wrIehkN1.js → google-DVKOuAf3.js} +1 -1
- package/dist/assets/{hailuo-CpEa1UDZ.js → hailuo-DY93FJRp.js} +1 -1
- package/dist/assets/{headshots-C_z_6iJl.js → headshots-Clx9yFtP.js} +1 -1
- package/dist/assets/{help-circle-CgG5yAaM.js → help-circle-CDCGzUXe.js} +1 -1
- package/dist/assets/{id-D2oqHw8z.js → id-BedLB6T_.js} +1 -1
- package/dist/assets/{image-D4yLPdQZ.js → image-BgiMeEyg.js} +1 -1
- package/dist/assets/{index-BEvg2pRE.js → index-15GiJQk_.js} +1 -1
- package/dist/assets/{index-B2l9Ai7a.js → index-6bMysa7o.js} +1 -1
- package/dist/assets/{index-B--xRYrq.js → index-B4eGti-_.js} +1 -1
- package/dist/assets/{index-DKT9lpv-.js → index-B4njNk04.js} +1 -1
- package/dist/assets/{index-Ds-UbI_q.js → index-B5SDKCdK.js} +1 -1
- package/dist/assets/{index-CRPCTgYK.js → index-BF_wH3W3.js} +1 -1
- package/dist/assets/{index-C1Nafj7o.js → index-BMEABvuF.js} +1 -1
- package/dist/assets/{index-RiVU3gTe.js → index-BOCCszA-.js} +1 -1
- package/dist/assets/{index-CW-yt64R.js → index-BV8tcem4.js} +1 -1
- package/dist/assets/{index-BwN6IC9f.js → index-BXBPY2JC.js} +1 -1
- package/dist/assets/{index-FF4WAJT-.js → index-B_w2jnax.js} +1 -1
- package/dist/assets/{index-CNnZhdJr.js → index-BahF1AaV.js} +1 -1
- package/dist/assets/{index-DB1wHeLA.js → index-BbT7wIiK.js} +1 -1
- package/dist/assets/{index-aO6Fi57H.js → index-BcLxs5FR.js} +1 -1
- package/dist/assets/{index-26h1mgt-.js → index-BhD-3nzt.js} +1 -1
- package/dist/assets/{index-BlG1KEGq.js → index-Bp2WW5ki.js} +1 -1
- package/dist/assets/{index-BCtLhxeC.js → index-BpC0_K8o.js} +1 -1
- package/dist/assets/{index-D4vu-0Vi.js → index-BqLSd7S8.js} +3 -3
- package/dist/assets/{index-DTQtEf7n.js → index-Btke2Pu_.js} +1 -1
- package/dist/assets/{index-FTscF_cz.js → index-BuYqOs8q.js} +4 -4
- package/dist/assets/{index-D4Yc4tRk.js → index-Buu7519g.js} +1 -1
- package/dist/assets/{index-DUswWNzD.js → index-BydGPbsc.js} +1 -1
- package/dist/assets/{index-CJJgickM.js → index-C0Am24Fv.js} +1 -1
- package/dist/assets/{index-W9z3tmv_.js → index-C1knIa8B.js} +1 -1
- package/dist/assets/{index-B2UzvqRs.js → index-C6K-Tjf2.js} +1 -1
- package/dist/assets/{index-CENBZ_Mi.js → index-C8kzC-fT.js} +1 -1
- package/dist/assets/{index-jii325vi.js → index-CADSUEtD.js} +1 -1
- package/dist/assets/{index-38G9IKZp.js → index-CEjOHMmS.js} +1 -1
- package/dist/assets/{index-DefEPu5Z.js → index-CIsfCFqq.js} +1 -1
- package/dist/assets/{index-ByyI6VwW.js → index-CLjGlCqv.js} +1 -1
- package/dist/assets/{index-Cu8jEzMt.js → index-CVnh-uJy.js} +1 -1
- package/dist/assets/{index-brUXT6Ic.js → index-CXPFo-z3.js} +1 -1
- package/dist/assets/{index-B5aLH4ZV.js → index-Cice4EwV.js} +1 -1
- package/dist/assets/{index-CJtfHm7C.js → index-CidH52Gm.js} +1 -1
- package/dist/assets/{index-DBcVZLrq.js → index-CkTa3bXW.js} +1 -1
- package/dist/assets/{index-BXMkJF7H.js → index-CpgGHDqx.js} +1 -1
- package/dist/assets/{index-DdfzO8ET.js → index-CrmvmSrr.js} +1 -1
- package/dist/assets/{index-Bw6diQ6i.js → index-CwwCvsDf.js} +1 -1
- package/dist/assets/{index-a10HPOrI.js → index-D5tBMy2e.js} +1 -1
- package/dist/assets/{index-BRydlsSG.js → index-D9mxLTtD.js} +1 -1
- package/dist/assets/{index-BVMM7e5x.js → index-DJ6hjNjr.js} +1 -1
- package/dist/assets/{index-CUOB8-6a.js → index-DN23pRhq.js} +6 -6
- package/dist/assets/{index-DPl_Q5wR.js → index-DW8Srdwr.js} +1 -1
- package/dist/assets/{index-DrvGU9i_.js → index-DWFPMm_t.js} +1 -1
- package/dist/assets/{index-3euot5lf.js → index-DXKnEKkD.js} +1 -1
- package/dist/assets/{index-CWoJcxvr.js → index-DinNeXmi.js} +1 -1
- package/dist/assets/{index-CbXIzWSz.js → index-DlKmz7tK.js} +1 -1
- package/dist/assets/{index-BdrHjNrn.js → index-Dsf-WzCN.js} +1 -1
- package/dist/assets/{index-O7t1BsNB.js → index-DwHZBeTH.js} +1 -1
- package/dist/assets/{index-o4zhAWG6.js → index-DywgxFYh.js} +1 -1
- package/dist/assets/{index-B_xoWE5M.js → index-Eg9Dtvnb.js} +1 -1
- package/dist/assets/{index-DWTCukaE.js → index-G7zvMRT-.js} +1 -1
- package/dist/assets/{index-DsKeM0Xq.js → index-OLF8hEHW.js} +1 -1
- package/dist/assets/{index-d1Dl3INe.js → index-Pz-2MS0a.js} +1 -1
- package/dist/assets/{index-BEYNW2EK.js → index-QCvk6zjY.js} +1 -1
- package/dist/assets/{index-CwJsW1oV.js → index-ZsRAFqiK.js} +1 -1
- package/dist/assets/{index-FhK8yklc.js → index-c06zQDT0.js} +1 -1
- package/dist/assets/{index-CNQqVjGk.js → index-cHGiSHLI.js} +1 -1
- package/dist/assets/{index-BHTuBZXJ.js → index-ot7wZnSG.js} +1 -1
- package/dist/assets/{index-D8V5LY1E.js → index-wLOejvGf.js} +1 -1
- package/dist/assets/{index-oWuBTe9g.js → index-x4n6plQ5.js} +1 -1
- package/dist/assets/{index.browser.esm-BaPNoGjI.js → index.browser.esm-DIXpj19X.js} +1 -1
- package/dist/assets/{index.es-B1lW1a9B.js → index.es-DAf85_c_.js} +1 -1
- package/dist/assets/{info-D2mbPMyX.js → info-Dcvf_89T.js} +1 -1
- package/dist/assets/{info-circle-CQtpHFeL.js → info-circle-DV3akfKd.js} +1 -1
- package/dist/assets/{isEqual-BiGspMHU.js → isEqual-CSXiaW-q.js} +1 -1
- package/dist/assets/{isPlainObject-1A9ncyWS.js → isPlainObject-C_0Ser3m.js} +1 -1
- package/dist/assets/{kling-Bga-2-Yk.js → kling-DF1S_RXj.js} +1 -1
- package/dist/assets/{lightbulb-SMN0MP8P.js → lightbulb-CTjRCOVB.js} +1 -1
- package/dist/assets/{luma-CHNWeOk6.js → luma-Ce6gwGqt.js} +1 -1
- package/dist/assets/{mail-D-ZfsNgq.js → mail-JYFL_gx5.js} +1 -1
- package/dist/assets/{midjourney-BdpbGQo1.js → midjourney-CuEnjhqh.js} +1 -1
- package/dist/assets/{mobile-DEieegSW.js → mobile-DIYoPDSS.js} +1 -1
- package/dist/assets/{more-BMIzMnqp.js → more-CUQy4jyV.js} +1 -1
- package/dist/assets/{nanobanana-JVOGegpV.js → nanobanana-YVmjD6V4.js} +1 -1
- package/dist/assets/{network-placeholder-ppqpKoOQ.js → network-placeholder-CQmyqqKl.js} +1 -1
- package/dist/assets/{nftPlaceholder-55iywwqB.js → nftPlaceholder-DOdHjKQn.js} +1 -1
- package/dist/assets/{off-CpesiVFf.js → off-BXm2uAZs.js} +1 -1
- package/dist/assets/{openaiimage-CEkHQ02c.js → openaiimage-RB3W1okN.js} +1 -1
- package/dist/assets/{order-BFBb3_Nm.js → order-B8iRnZ9u.js} +1 -1
- package/dist/assets/{pika-DF9AQtCB.js → pika-BYnVUjKG.js} +1 -1
- package/dist/assets/{pixverse-NFnml3Ad.js → pixverse-CXnOvngq.js} +1 -1
- package/dist/assets/{play-store-EtWgj9tY.js → play-store-CPfNZfrJ.js} +1 -1
- package/dist/assets/{plus-Bz9Zrmf7.js → plus-BXW-k2IL.js} +1 -1
- package/dist/assets/{price-D5TNZtWD.js → price-BLnrGcOE.js} +1 -1
- package/dist/assets/{producer-BTXuQmdX.js → producer-CSq1TP08.js} +1 -1
- package/dist/assets/{qr-code-BteNX7f7.js → qr-code-COhRIfZa.js} +1 -1
- package/dist/assets/{qrart-DBM0vNab.js → qrart-D8ryGM-9.js} +1 -1
- package/dist/assets/{recycle-horizontal-DoCeu-wB.js → recycle-horizontal-oiQLPHu6.js} +1 -1
- package/dist/assets/{refresh-B27QPFje.js → refresh-DkQoUj_h.js} +1 -1
- package/dist/assets/{reown-logo-DOxrtg5r.js → reown-logo-BmyPqZYO.js} +1 -1
- package/dist/assets/{search-Bbvjy0sE.js → search-BC02l1O6.js} +1 -1
- package/dist/assets/{secp256k1-cwsWPnax.js → secp256k1-CBqKWMtb.js} +1 -1
- package/dist/assets/{secp256k1-DfbSkrJA.js → secp256k1-sCCitGyD.js} +1 -1
- package/dist/assets/{seedance-DHGvvKi5.js → seedance-CQqE954y.js} +1 -1
- package/dist/assets/{seedream-BGv1ajnv.js → seedream-CbKKvSYs.js} +1 -1
- package/dist/assets/{send-CKT6bzdT.js → send-B5FP1wam.js} +1 -1
- package/dist/assets/{service-C5LrDt_v.js → service-CMBkXmXP.js} +1 -1
- package/dist/assets/{solana-wallets-D3sNEfV2.js → solana-wallets-BnLlJgtL.js} +2 -2
- package/dist/assets/{solana-wallets-vue-CJOnb2mO.js → solana-wallets-vue-C3FNJ-KO.js} +1 -1
- package/dist/assets/{solanaEmbed.esm-AUvjIviJ.js → solanaEmbed.esm-BVmZmGt9.js} +1 -1
- package/dist/assets/{sora-B2wrmmta.js → sora-rDGW7zC2.js} +1 -1
- package/dist/assets/{string_decoder-pE91rp0R.js → string_decoder-BwKhmRiq.js} +1 -1
- package/dist/assets/{suno-D94YFwAz.js → suno-D3BndtXK.js} +1 -1
- package/dist/assets/{swapHorizontal-7WpTJnsP.js → swapHorizontal-DDJN4WuP.js} +1 -1
- package/dist/assets/{swapHorizontalBold-BCnSLf6o.js → swapHorizontalBold-CKBCDFj1.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-mWC-N_Ro.js → swapHorizontalMedium-BuYlPcYm.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-Bu0IBfBl.js → swapHorizontalRoundedBold-CtXfzUhW.js} +1 -1
- package/dist/assets/{swapVertical-zPCGtEyW.js → swapVertical-Dr_u3jzk.js} +1 -1
- package/dist/assets/{telegram-CqVol6C7.js → telegram-DKCJn8tP.js} +1 -1
- package/dist/assets/{three-dots-BvwfJBxD.js → three-dots-Blqhwg1v.js} +1 -1
- package/dist/assets/{twitch-W0B0uQ2_.js → twitch-CfZ8VTU0.js} +1 -1
- package/dist/assets/{twitterIcon-Dy3K7R98.js → twitterIcon-BO8ajIje.js} +1 -1
- package/dist/assets/{typescript-CUMR9uNq.js → typescript-Bu1ceUI1.js} +1 -1
- package/dist/assets/{use-form-item-DDWqgx7q.js → use-form-item-Bcf9wMdQ.js} +1 -1
- package/dist/assets/validator-BqhII7fg.js +1 -0
- package/dist/assets/{veo-ibQ-pqXQ.js → veo-BYRN1b7S.js} +1 -1
- package/dist/assets/{verify-qcg7LJmo.js → verify-Bp_XfnF7.js} +1 -1
- package/dist/assets/{verify-filled-CKhjqWtR.js → verify-filled-BDgsXFBn.js} +1 -1
- package/dist/assets/{w3m-modal-BYAeKj4C.js → w3m-modal-DOfTvFLZ.js} +1 -1
- package/dist/assets/{wallet-q_V1cxSj.js → wallet-BxuFLslW.js} +1 -1
- package/dist/assets/{wallet-placeholder-DdZaIWvi.js → wallet-placeholder-UhpiYUNA.js} +1 -1
- package/dist/assets/{walletconnect-DqDsf_VI.js → walletconnect-DbKdQMMx.js} +1 -1
- package/dist/assets/{wan-BSsn6vES.js → wan-DwtDIND_.js} +1 -1
- package/dist/assets/{warning-circle-olX97x29.js → warning-circle-Dqt3R-fW.js} +1 -1
- package/dist/assets/{web-CpRQ4ifd.js → web-CHMoqKkF.js} +1 -1
- package/dist/assets/{web-Csr5ExDC.js → web-DCcjiHPr.js} +1 -1
- package/dist/assets/{x-DfcqJEz9.js → x-Cegnpxkg.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/validator-pb75_c-A.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as E}from"./index.es-B1lW1a9B.js";import{E as L}from"./index-jii325vi.js";import{E as de}from"./index-38G9IKZp.js";import{d as b,H as m,E as i,z as j,C as n,y as h,D as o,q as l,F as r,x as V,O as T,N as I,Q as R,J as k,R as be,I as w,M as ye}from"./vendor-vue-DU0w5ewx.js";import{E as y,b1 as A,a0 as we,F as Ce,ap as te}from"./index-FTscF_cz.js";import{b as Ve,c as oe,d as F,e as N,f as Se,g as Te,h as Ie}from"./kling-CtoPhhA9.js";import{E as P,a as D}from"./index-DKT9lpv-.js";import{E as q}from"./index-DsKeM0Xq.js";import{E as C}from"./index-FF4WAJT-.js";import{I as S,S as Ee}from"./ScrollList-CHr2ER0d.js";import{a as H,E as me}from"./index-DefEPu5Z.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as G}from"./ImagePreview-B7ddO4K-.js";import{E as J}from"./index-DTQtEf7n.js";import{E as K}from"./index-aO6Fi57H.js";import{C as pe}from"./Consumption-D8o6ZGlD.js";import{E as ue}from"./index-o4zhAWG6.js";import{E as Q}from"./index-DUswWNzD.js";import{a as ge}from"./price-D5TNZtWD.js";import{F as Le}from"./FilePreview-BMrbMk0x.js";import{E as Me,a as Ue}from"./index-B--xRYrq.js";import{E as Re,a as Ae}from"./index-CW-yt64R.js";import{b as ne}from"./errorCode-Cqj9Td_Z.js";import{k as se}from"./kling-Bga-2-Yk.js";import{C as Pe}from"./CopyToClipboard-99x8TU_E.js";import{V as De}from"./VideoPlayer-BJPVVH4v.js";import{E as Ge}from"./index-B2l9Ai7a.js";import{E as Ke}from"./index-DdfzO8ET.js";import{B as Oe}from"./BotPlaceholder-808fKlrc.js";import{N as je}from"./NoTasks-CzCoCJiJ.js";import{l as Ne}from"./pagination-CcnL0MdN.js";import"./use-form-item-DDWqgx7q.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./index-BRydlsSG.js";import"./typescript-CUMR9uNq.js";import"./index-DB1wHeLA.js";import"./strings-DigWlKo9.js";import"./isEqual-BiGspMHU.js";import"./_Uint8Array-BWy8cKCo.js";import"./castArray-BX2YHThj.js";import"./debounce-rFO21RGd.js";import"./_baseIteratee-GCheQ423.js";import"./index-CJtfHm7C.js";import"./validator-pb75_c-A.js";import"./index-Bz0iDXPF.js";import"./index-BdrHjNrn.js";import"./_baseClone-CVDR-yNh.js";import"./_initCloneObject-BnGf6y2Q.js";import"./index-RiVU3gTe.js";import"./isPlainObject-1A9ncyWS.js";import"./vue-plyr-BO2nlN4c.js";import"./index-CJJgickM.js";const Be=b({name:"LayoutKling",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},data(){return{drawer:!1}}}),ze={class:"main flex flex-row flex-1 min-h-0"},Fe={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},qe={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function He(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),m("div",ze,[i("div",Fe,[j(e.$slots,"config",{},void 0,!0)]),i("div",qe,[j(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=d=>e.drawer=!0)},{default:h(()=>[n(c,{icon:"fa-solid fa-magic"})]),_:1}),n(f,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=d=>e.drawer=d),direction:"ltr","with-header":!1,size:"350px"},{default:h(()=>[j(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const We=y(Be,[["render",He],["__scopeId","data-v-8fa7523c"]]),Je={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function fe(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Je}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=fe(s,a,u),c=[];return e.end_image_url&&!$.endImage&&c.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&c.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&!$.motionControl&&c.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),c}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Qe=b({name:"ModelSelector",components:{ElSelect:D,ElOption:P},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0,options:[{value:"kling-v3",label:"v3"},{value:"kling-v3-omni",label:"v3-Omni"},{value:"kling-v2-6",label:"v2.6"},{value:"kling-v2-5-turbo",label:"v2.5-Turbo"},{value:"kling-v2-1-master",label:"v2.1-Master"},{value:"kling-v2-master",label:"v2-Master"},{value:"kling-v1-6",label:"v1.6"},{value:"kling-v1",label:"v1"},{value:"kling-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Ve)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ye={class:"field"},Xe={class:"title font-bold"};function Ze(e,t,s,a,u,$){const c=o("el-option"),p=o("el-select");return l(),m("div",Ye,[i("h2",Xe,r(e.$t("pika.name.model")),1),(l(),V(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,f=>(l(),V(c,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const xe=y(Qe,[["render",Ze],["__scopeId","data-v-04059875"]]),et=b({name:"ModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},cameraControlSet(){return!!this.$store.state.kling?.config?.camera_control?.type},fourKReason(){return F.includes(this.selectedModel)?this.cameraControlSet?this.$t("kling.description.mode4kIncompatibleCamera"):"":this.$t("kling.description.mode4kRequiresV3")},options(){return[{value:"std",label:this.$t("kling.name.modeStd"),disabled:!1,disabledReason:""},{value:"pro",label:this.$t("kling.name.modePro"),disabled:!1,disabledReason:""},{value:"4k",label:this.$t("kling.name.mode4k"),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value==="4k"&&this.applyMode(oe)}},mounted(){this.value||this.applyMode(oe)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),tt={class:"field"},ot={class:"header"},nt={class:"title font-bold"},st={key:0,class:"opt-tip"};function it(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",tt,[i("div",ot,[i("h2",nt,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),V(f,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value,disabled:d.disabled},{default:h(()=>[i("span",{class:R({"opt-disabled":d.disabled})},r(d.label),3),d.disabled&&d.disabledReason?(l(),m("span",st,r(d.disabledReason),1)):k("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const lt=y(et,[["render",it],["__scopeId","data-v-9a8fa3c5"]]),ie=[3,5,8,10,12,15],le=[5,10],at=b({name:"DurationSelector",components:{ElSlider:H,InfoIcon:S},props:{modelValue:{type:Number,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return F.includes(this.selectedModel)},sliderMin(){return this.isV3Model?3:5},sliderMax(){return this.isV3Model?15:10},sliderStep(){return this.isV3Model?1:5},marks(){const e=this.isV3Model?ie:le,t={};for(const s of e)t[s]=`${s}s`;return t},value(){return this.$store.state.kling?.config?.duration??N},sliderValue(){const e=this.value;return e<this.sliderMin?this.sliderMin:e>this.sliderMax?this.sliderMax:e}},watch:{isV3Model(e){(this.isV3Model?ie:le).includes(this.value)||this.applyDuration(N)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(N)},methods:{async onChange(e){const t=Array.isArray(e)?e[0]:e,s=this.$store.state.kling?.config||{},a=Y(s,{duration:t});if(a.length===0){this.applyDuration(t);return}const u=a.map($=>this.$t($.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:u}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const $=X({...s,duration:t},a);this.$store.commit("kling/setConfig",$),C.success(this.$t("kling.message.featureRemovedNotice",{fields:u}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),rt={class:"field"},ct={class:"header"},dt={class:"title font-bold"},mt={class:"value-display"};function pt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-slider");return l(),m("div",rt,[i("div",ct,[i("h2",dt,r(e.$t("kling.name.duration")),1),n(c,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"]),i("span",mt,r(e.value)+"s",1)]),(l(),V(p,{key:e.revertKey,"model-value":e.sliderValue,class:"slider",min:e.sliderMin,max:e.sliderMax,step:e.sliderStep,marks:e.marks,"show-tooltip":!1,onChange:e.onChange},null,8,["model-value","min","max","step","marks","onChange"]))])}const ut=y(at,[["render",pt],["__scopeId","data-v-aa1a22a1"]]),gt=b({name:"RatioSelector",data(){return{options:[{value:"1:1",label:"1:1",width:20,height:20},{value:"16:9",label:"16:9",width:25,height:13},{value:"9:16",label:"9:16",width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state?.kling?.config?.aspect_ratio},set(e){console.debug("set ratio",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||(this.value=Se)}}),ft={class:"text-sm font-bold mb-2 block"},ht={class:"items"},_t=["onClick"],$t={class:"name"};function vt(e,t,s,a,u,$){return l(),m("div",null,[i("span",ft,r(e.$t("kling.name.ratio")),1),i("div",ht,[(l(!0),m(T,null,I(e.options,(c,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:f=>e.value=c.value},[i("div",{class:R(["preview",c.label])},[i("div",{class:"rect",style:be({width:c.width+"px",height:c.height+"px"})},null,4)],2),i("p",$t,r(c.label),1)],10,_t))),128))])])}const kt=y(gt,[["render",vt],["__scopeId","data-v-cdb14b2f"]]),bt=b({name:"StartImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},value:{get(){return this.$store.state?.kling?.config?.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),yt={class:"relative"},wt={class:"flex justify-between"},Ct={class:"flex justify-start items-center"},Vt={class:"text-sm font-bold"};function St(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",yt,[i("div",wt,[i("div",Ct,[i("span",Vt,r(e.$t("kling.name.startImage")),1),n(c,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Tt=y(bt,[["render",St],["__scopeId","data-v-40832274"]]),It=b({name:"EndImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,ImagePreview:G,InfoIcon:S,FontAwesomeIcon:E},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},klingConfig(){return this.$store.state?.kling?.config||{}},endImageSupported(){return fe(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},uploadDisabled(){return this.reachedLimit||!this.endImageSupported},uploadTooltip(){return this.endImageSupported?this.reachedLimit?this.$t("kling.message.uploadReferencesExceed"):"":this.$t("kling.message.endImageNotSupported")},storeValue(){return this.klingConfig.end_image_url},value:{get(){return this.storeValue},set(){}}},watch:{storeValue(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?!0:(C.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Et={class:"relative"},Lt={class:"flex justify-between"},Mt={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"};function Rt(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",Et,[i("div",Lt,[i("div",Mt,[i("span",Ut,r(e.$t("kling.name.endImage")),1),n(c,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","before-upload","on-exceed","on-error","on-success","headers"])])}const At=y(It,[["render",Rt],["__scopeId","data-v-6959ad44"]]),Pt=b({name:"CfgScaleSelector",components:{ElSlider:H,InfoIcon:S,ElInputNumber:me},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug("set cfg_scale",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||(this.value=Te)}}),Dt={class:"flex justify-between"},Gt={class:"flex justify-start items-center"},Kt={class:"text-sm font-bold"},Ot={class:"flex justify-end items-center"},jt={class:"w-full"};function Nt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input-number"),f=o("el-slider");return l(),m("div",null,[i("div",Dt,[i("div",Gt,[i("span",Kt,r(e.$t("kling.name.cfgScale")),1),n(c,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",Ot,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),"controls-position":"right"},null,8,["modelValue"])])]),i("div",jt,[n(f,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=d=>e.value=d),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Bt=y(Pt,[["render",Nt]]),zt=b({name:"GenerateAudioSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(F.includes(this.selectedModel)||this.selectedModel==="kling-v2-6"&&this.selectedMode==="pro")},tooltipContent(){return this.supported?this.$t("kling.description.generateAudio"):this.$t("kling.description.generateAudioUnsupported")},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??Ie:!1},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:!1})}}}),Ft={class:"relative"},qt={class:"flex justify-between items-center"},Ht={class:"flex justify-start items-center"},Wt={class:"text-sm font-bold"};function Jt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",Ft,[i("div",qt,[i("div",Ht,[i("span",Wt,r(e.$t("kling.name.generateAudio")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const Qt=y(zt,[["render",Jt]]),Yt=["horizontal","vertical","pan","tilt","roll","zoom"],Xt=b({name:"CameraControlSelector",components:{ElSelect:D,ElOption:P,ElSlider:H,ElInputNumber:me,InfoIcon:S},data(){return{configKeys:Yt}},computed:{typeOptions(){return[{value:"",label:this.$t("kling.name.cameraTypeNone")},{value:"simple",label:this.$t("kling.name.cameraTypeSimple")},{value:"down_back",label:this.$t("kling.name.cameraTypeDownBack")},{value:"forward_up",label:this.$t("kling.name.cameraTypeForwardUp")},{value:"left_turn_forward",label:this.$t("kling.name.cameraTypeLeftTurnForward")},{value:"right_turn_forward",label:this.$t("kling.name.cameraTypeRightTurnForward")}]},selectedMode(){return this.$store.state.kling?.config?.mode||""},disabled(){return this.selectedMode==="4k"},tooltipContent(){return this.disabled?this.$t("kling.description.cameraControlDisabled4k"):this.$t("kling.description.cameraControl")},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??""},set(e){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="simple"?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw="")}},methods:{writeConfig(e,t){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),Zt={class:"field"},xt={class:"header"},eo={class:"text-sm font-bold"},to={key:0,class:"config-grid"},oo={class:"cfg-row-head"},no={class:"cfg-name"};function so(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select"),d=o("el-input-number"),v=o("el-slider");return l(),m("div",Zt,[i("div",xt,[i("span",eo,r(e.$t("kling.name.cameraControl")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(f,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=g=>e.selectedTypeRaw=g),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:h(()=>[(l(!0),m(T,null,I(e.typeOptions,g=>(l(),V(p,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",to,[(l(!0),m(T,null,I(e.configKeys,g=>(l(),m("div",{key:g,class:"cfg-row"},[i("div",oo,[i("span",no,r(e.$t(`kling.name.cc_${g}`)),1),n(d,{modelValue:e.configValues[g],"onUpdate:modelValue":_=>e.configValues[g]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(g,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(v,{"model-value":e.configValues[g]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(g,_)},null,8,["model-value","onInput"])]))),128))])):k("",!0)])}const io=y(Xt,[["render",so],["__scopeId","data-v-fb7b34d0"]]),he=[{groupKey:"cameraMovements",chipKeys:["rotateAround","stationary","handheld","zoomOut","zoomIn","follow","panRight","tiltUp","tiltDown","orbit"]},{groupKey:"cameraSpeed",chipKeys:["speedSlow","speedMedium","speedFast"]},{groupKey:"shotType",chipKeys:["shotClose","shotMedium","shotLong","shotLowAngle","shotHighAngle","shotShallowDof","shotFront","shotProfile","shotCloseUp","shotDrone"]},{groupKey:"light",chipKeys:["lightSunlight","lightSoft","lightNeon","lightWarm","lightNature","lightCandle","lightCityNight"]},{groupKey:"frame",chipKeys:["frameRichDetails","frameSimpleBg"]},{groupKey:"atmosphere",chipKeys:["atmosphereMysterious","atmospherePeaceful","atmosphereHeartwarming","atmosphereVivid","atmosphereColorful"]}],B=", ";function lo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${B}${t}`:t}function z(e,t){if(!e||!t)return e||"";const s=[`${t}${B}`,`${B}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const ao=b({name:"InspirationPills",components:{FontAwesomeIcon:E},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=z(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),ro={key:0,class:"pills",role:"list"},co={class:"pill-text"},mo=["aria-label","onClick"];function po(e,t,s,a,u,$){const c=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",ro,[(l(!0),m(T,null,I(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",co,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:ye(f=>e.onRemove(p),["stop"])},[n(c,{icon:"fa-solid fa-xmark"})],8,mo)]))),128))])):k("",!0)}const uo=y(ao,[["render",po],["__scopeId","data-v-5fc4fa65"]]),go="",fo=b({name:"PromptInput",components:{ElInput:Q,ElButton:L,FontAwesomeIcon:E,InfoIcon:S,InspirationPills:uo},emits:["open-inspiration"],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=go)}}),ho={class:"field"},_o={class:"box"},$o={class:"title font-bold"},vo={class:"actions"};function ko(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("info-icon"),d=o("inspiration-pills"),v=o("el-input");return l(),m("div",ho,[i("div",_o,[i("h2",$o,r(e.$t("kling.name.prompt")),1),i("div",vo,[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=g=>e.$emit("open-inspiration"))},{default:h(()=>[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1}),n(f,{content:e.$t("kling.description.prompt"),class:"info"},null,8,["content"])])]),n(d),n(v,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.prompt")},null,8,["modelValue","placeholder"])])}const bo=y(fo,[["render",ko],["__scopeId","data-v-0a5c57b8"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.config?.negative_prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,negative_prompt:e})}}},mounted(){this.prompt||(this.prompt=yo)}}),Co={class:"field"},Vo={class:"box"},So={class:"title font-bold"};function To(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",Vo,[i("h2",So,r(e.$t("kling.name.negativePrompt")),1),n(c,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const Io=y(wo,[["render",To],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:we}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},drawerSize(){return window.innerWidth<768?"100%":"380px"},prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(z(this.prompt,e)):this.setPrompt(lo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=z(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Uo={class:"title-row"},Ro={class:"title"},Ao={class:"hint"},Po={key:0,class:"selected-bar"},Do={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function No(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),V(f,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=d=>e.visible=d),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:h(()=>[i("div",Lo,[i("div",Mo,[i("div",Uo,[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Ro,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=d=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Po,[i("span",Do,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:h(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):k("",!0),i("div",Go,[(l(!0),m(T,null,I(e.groups,d=>(l(),m("div",{key:d.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${d.groupKey}`)),1),i("div",Oo,[(l(!0),m(T,null,I(d.chipKeys,v=>(l(),m("button",{key:v,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(v))}),onClick:g=>e.onToggle(e.chipText(v))},r(e.chipText(v)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const Bo=y(Eo,[["render",No],["__scopeId","data-v-7d457a69"]]),zo={"kling-v3":"v3","kling-v3-omni":"v3-Omni","kling-v2-6":"v2.6","kling-v2-5-turbo":"v2.5-Turbo","kling-v2-1-master":"v2.1-Master","kling-v2-master":"v2-Master","kling-v1-6":"v1.6","kling-v1":"v1","kling-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:E},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const c=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(c,{icon:"fa-solid fa-headphones"})],8,Xo)):k("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:L,Consumption:pe,FontAwesomeIcon:E,PromptInput:bo,NegativePromptInput:Io,ModelSelector:xe,ModeSelector:lt,DurationSelector:ut,RatioSelector:kt,StartImage:Tt,CfgScaleSelector:Bt,GenerateAudioSelector:Qt,CameraControlSelector:io,InspirationDrawer:Bo,SummaryChip:xo,EndImage:At},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return ge(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const c=o("prompt-input"),p=o("model-selector"),f=o("ratio-selector"),d=o("start-image"),v=o("end-image"),g=o("duration-selector"),_=o("mode-selector"),M=o("generate-audio-selector"),U=o("camera-control-selector"),O=o("cfg-scale-selector"),_e=o("negative-prompt-input"),$e=o("summary-chip"),ve=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(c,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(f,{class:"mb-4"}),n(d,{class:"mb-2"}),n(v,{class:"mb-2"}),n(g,{class:"mb-4"}),n(_,{class:"mb-4"}),n(M,{class:"mb-4"}),n(U,{class:"mb-4"}),n(O,{class:"mb-4"}),n(_e,{class:"mb-4"})]),i("div",nn,[n($e),n(ve,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),V(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),V(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:K,ElButton:L,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function pn(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(c,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(v,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.url&&g.percentage!==void 0?(l(),V(p,{key:0,url:g.url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const un=y(an,[["render",pn],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:K,ElButton:L,InfoIcon:S,FilePreview:Le,FontAwesomeIcon:E},data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetVideoUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){C.error(this.$t("kling.message.uploadVideoError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(C.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(C.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("file-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(c,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(v,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.percentage!==void 0?(l(),V(p,{key:0,url:g.url||g.response?.file_url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const kn=y(gn,[["render",vn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(c,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Sn=y(bn,[["render",Vn],["__scopeId","data-v-ca9fdbe5"]]),ae="video",Tn=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:Ue,ElRadioButton:Me,InfoIcon:S},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,character_orientation:e})}}},mounted(){this.$store.state.kling?.motionConfig?.character_orientation||(this.value=ae)}}),In={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-radio-button"),f=o("el-radio-group");return l(),m("div",In,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(c,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),size:"small",class:"value"},{default:h(()=>[n(p,{label:"image"},{default:h(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:h(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Un=y(Tn,[["render",Mn],["__scopeId","data-v-7a91195b"]]),re="std",Rn=b({name:"MotionModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},computed:{options(){return[{value:"std",label:this.$t("kling.name.modeStd")},{value:"pro",label:this.$t("kling.name.modePro")}]},value:{get(){return this.$store.state.kling?.motionConfig?.mode||re},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=re)}}),An={class:"field"},Pn={class:"header"},Dn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",An,[i("div",Pn,[i("h2",Dn,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Rn,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{value:{get(){return(this.$store.state.kling?.motionConfig?.keep_original_sound??"yes")==="yes"},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,keep_original_sound:e?"yes":"no"})}}}}),jn={class:"relative"},Nn={class:"flex justify-between items-center"},Bn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Nn,[i("div",Bn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(c,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:L,FontAwesomeIcon:E,Consumption:pe,MotionImage:un,MotionVideo:kn,MotionPromptInput:Sn,CharacterOrientationSelector:Un,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return ge(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const c=o("motion-image"),p=o("motion-video"),f=o("motion-prompt-input"),d=o("character-orientation-selector"),v=o("motion-mode-selector"),g=o("keep-original-sound-selector"),_=o("consumption"),M=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(c,{class:"mb-3"}),n(p,{class:"mb-3"}),n(f,{class:"mb-4"}),n(d,{class:"mb-4"}),n(v,{class:"mb-4"}),n(g,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:h(()=>[n(M,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ae,ElTabPane:Re,ElTag:Ce},props:{modelValue:{type:String,default:"videos"}},emits:["update:modelValue"],computed:{tabs(){return[{value:"videos",label:this.$t("kling.tab.videoGeneration")},{value:"motion",label:this.$t("kling.tab.motionControl")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const c=o("el-tag"),p=o("el-tab-pane"),f=o("el-tabs");return l(),V(f,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:h(()=>[(l(!0),m(T,null,I(e.tabs,d=>(l(),V(p,{key:d.value,name:d.value,disabled:d.disabled},{label:h(()=>[i("span",{class:"tab-label",title:d.disabled?d.disabledReason:void 0},[i("span",es,r(d.label),1),d.badge?(l(),V(c,{key:0,size:"small",type:"warning",class:"badge"},{default:h(()=>[w(r(d.badge),1)]),_:2},1024)):k("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ke,CopyToClipboard:Pe,FontAwesomeIcon:E,ElAlert:Ge,VideoPlayer:De,ElTooltip:J,ElButton:L,ImagePreview:G},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},ps={key:0},us={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},vs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},ks={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Vs={key:2,class:R({content:!0})},Ss={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ts={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Is(e,t,s,a,u,$){const c=o("el-image"),p=o("image-preview"),f=o("video-player"),d=o("el-button"),v=o("el-tooltip"),g=o("font-awesome-icon"),_=o("copy-to-clipboard"),M=o("el-alert");return l(),m("div",ss,[i("div",is,[n(c,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(T,null,I(e.referenceImages,(U,O)=>(l(),V(p,{key:O,url:U.url,name:U.name,closable:!1},null,8,["url","name"]))),128))])):k("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?k("",!0):(l(),m("span",ps," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",us," - ("+r(e.$t("kling.status.processing"))+") ",1)):k("",!0)])):k("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(f,{src:e.modelValue?.response.video_url},null,8,["src"])])):k("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(v,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:h(()=>[e.modelValue?.response.video_url?(l(),V(d,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=U=>e.onDownload(U,e.modelValue?.response.video_url))},{default:h(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):k("",!0)]),_:1},8,["content"])])):k("",!0),n(M,{closable:!1,class:"mt-2 success"},{default:h(()=>[i("p",_s,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",vs,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===!1?(l(),m("div",ks,[n(M,{closable:!1,class:"failure"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",bs,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(g,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(_,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Vs,[n(M,{closable:!1,class:"info"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",Ss,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Ts,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0)])])}const Es=y(ns,[["render",Is],["__scopeId","data-v-e8e87659"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:je,BotPlaceholder:Oe,ScrollList:Ee},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.kling?.tasks,items:this.$store.state.kling?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ms={key:0},Us={key:2,class:"w-full h-full flex items-center justify-center"};function Rs(e,t,s,a,u,$){const c=o("bot-placeholder"),p=o("task-preview"),f=o("scroll-list"),d=o("no-tasks");return l(),m(T,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(c)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),V(f,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=v=>e.$emit("reach-top"))},{default:h(()=>[(l(!0),m(T,null,I(e.tasks?.items,v=>(l(),V(p,{key:v.id,"model-value":v},null,8,["model-value"]))),128))]),_:1},8,["loading"])):k("",!0),e.tasks?.items?.length===0?(l(),m("div",Us,[n(d)])):k("",!0)],64)}const As=y(Ls,[["render",Rs]]),ce="https://webhook.acedata.cloud/kling",Ps=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:We,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===te.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===te.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Ne({tasks:this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("kling/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("kling/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();const e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:ce};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){C.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.generate(s,{token:a}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(await this.$store.dispatch("kling/setTaskType",e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){C.warning(this.$t("kling.message.motionMissingInputs"));return}const t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||"video",mode:e.mode||"std",keep_original_sound:e.keep_original_sound??"yes",...e.prompt?{prompt:e.prompt}:{},callback_url:ce},s=this.credential?.token;if(!s){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.motion(t,{token:s}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ds={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const c=o("tab-switcher"),p=o("config-panel"),f=o("motion-panel"),d=o("recent-panel"),v=o("layout");return l(),V(v,null,{config:h(()=>[i("div",Ds,[n(c,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),V(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),V(f,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):k("",!0)])])]),result:h(()=>[n(d,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const ji=y(Ps,[["render",Ks]]);export{ji as default};
|
|
1
|
+
import{F as E}from"./index.es-DAf85_c_.js";import{E as L}from"./index-CADSUEtD.js";import{E as de}from"./index-CEjOHMmS.js";import{d as b,H as m,E as i,z as j,C as n,y as h,D as o,q as l,F as r,x as V,O as T,N as I,Q as R,J as k,R as be,I as w,M as ye}from"./vendor-vue-DU0w5ewx.js";import{E as y,b1 as A,a0 as we,F as Ce,ap as te}from"./index-BuYqOs8q.js";import{b as Ve,c as oe,d as F,e as N,f as Se,g as Te,h as Ie}from"./kling-CtoPhhA9.js";import{E as P,a as D}from"./index-B4njNk04.js";import{E as q}from"./index-OLF8hEHW.js";import{E as C}from"./index-B_w2jnax.js";import{I as S,S as Ee}from"./ScrollList-ClLx5Ay2.js";import{a as H,E as me}from"./index-CIsfCFqq.js";import{p as W}from"./pasteUploadMixin-BurWbGNQ.js";import{I as G}from"./ImagePreview-B-kcZ7xf.js";import{E as J}from"./index-Btke2Pu_.js";import{E as K}from"./index-BcLxs5FR.js";import{C as pe}from"./Consumption-HjIHVPfJ.js";import{E as ue}from"./index-DywgxFYh.js";import{E as Q}from"./index-BydGPbsc.js";import{a as ge}from"./price-BLnrGcOE.js";import{F as Le}from"./FilePreview-B-kt6wkS.js";import{E as Me,a as Ue}from"./index-B4eGti-_.js";import{E as Re,a as Ae}from"./index-BV8tcem4.js";import{b as ne}from"./errorCode-Cqj9Td_Z.js";import{k as se}from"./kling-DF1S_RXj.js";import{C as Pe}from"./CopyToClipboard-Bm9IiB5O.js";import{V as De}from"./VideoPlayer-DHTu44Da.js";import{E as Ge}from"./index-6bMysa7o.js";import{E as Ke}from"./index-CrmvmSrr.js";import{B as Oe}from"./BotPlaceholder-pdWT9yaS.js";import{N as je}from"./NoTasks-CAc7WMUu.js";import{l as Ne}from"./pagination-CcnL0MdN.js";import"./use-form-item-Bcf9wMdQ.js";import"./index-BuyEbX8F.js";import"./vendor-axios-B8_nURbH.js";import"./vendor-dayjs-Cvgzdobq.js";import"./vendor-vue-router-9TBHB1ku.js";import"./index-D9mxLTtD.js";import"./typescript-Bu1ceUI1.js";import"./index-BbT7wIiK.js";import"./strings-DigWlKo9.js";import"./isEqual-CSXiaW-q.js";import"./_Uint8Array-B8owGMyd.js";import"./castArray-BiIaTbnK.js";import"./debounce-BIXA4vQu.js";import"./_baseIteratee-DBmltUMm.js";import"./index-CidH52Gm.js";import"./validator-BqhII7fg.js";import"./index-Bz0iDXPF.js";import"./index-Dsf-WzCN.js";import"./_baseClone-CmG_Edvh.js";import"./_initCloneObject-D15ri8PG.js";import"./index-BOCCszA-.js";import"./isPlainObject-C_0Ser3m.js";import"./vue-plyr-BO2nlN4c.js";import"./index-C0Am24Fv.js";const Be=b({name:"LayoutKling",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},data(){return{drawer:!1}}}),ze={class:"main flex flex-row flex-1 min-h-0"},Fe={class:"config w-[320px] flex-none h-full flex flex-col bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]"},qe={class:"result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]"};function He(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),m("div",ze,[i("div",Fe,[j(e.$slots,"config",{},void 0,!0)]),i("div",qe,[j(e.$slots,"result",{},void 0,!0)]),n(p,{circle:"",class:"menu",onClick:t[0]||(t[0]=d=>e.drawer=!0)},{default:h(()=>[n(c,{icon:"fa-solid fa-magic"})]),_:1}),n(f,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=d=>e.drawer=d),direction:"ltr","with-header":!1,size:"350px"},{default:h(()=>[j(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}const We=y(Be,[["render",He],["__scopeId","data-v-8fa7523c"]]),Je={text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};function fe(e,t,s){const a=t||"std",u=s??5;switch(e){case"kling-v1":return{text2video:!0,image2video:!0,endImage:u===5,audio:!1,motionControl:u===5};case"kling-v1-6":case"kling-v2-5-turbo":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:!1,motionControl:!1};case"kling-v2-6":return{text2video:!0,image2video:!0,endImage:a==="pro",audio:a==="pro",motionControl:!1};case"kling-v2-master":case"kling-v2-1-master":return{text2video:!0,image2video:!0,endImage:!1,audio:!1,motionControl:!1};case"kling-v3":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:a!=="4k"};case"kling-v3-omni":return{text2video:!0,image2video:!0,endImage:!0,audio:!0,motionControl:!1};case"kling-video-o1":return{text2video:!0,image2video:!0,endImage:!0,audio:!1,motionControl:!1};default:return Je}}function Y(e,t){if(!e)return[];const s=t.model??e.model,a=t.mode??e.mode,u=t.duration??e.duration;if(!s)return[];const $=fe(s,a,u),c=[];return e.end_image_url&&!$.endImage&&c.push({field:"end_image_url",i18nLabel:"kling.name.endImage"}),e.generate_audio&&!$.audio&&c.push({field:"generate_audio",i18nLabel:"kling.name.generateAudio"}),e.camera_control?.type&&!$.motionControl&&c.push({field:"camera_control",i18nLabel:"kling.name.cameraControl"}),c}function X(e,t){const s={...e};for(const a of t)a.field==="end_image_url"&&(s.end_image_url=void 0),a.field==="generate_audio"&&(s.generate_audio=!1),a.field==="camera_control"&&(s.camera_control=void 0);return s}const Qe=b({name:"ModelSelector",components:{ElSelect:D,ElOption:P},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0,options:[{value:"kling-v3",label:"v3"},{value:"kling-v3-omni",label:"v3-Omni"},{value:"kling-v2-6",label:"v2.6"},{value:"kling-v2-5-turbo",label:"v2.5-Turbo"},{value:"kling-v2-1-master",label:"v2.1-Master"},{value:"kling-v2-master",label:"v2-Master"},{value:"kling-v1-6",label:"v1.6"},{value:"kling-v1",label:"v1"},{value:"kling-video-o1",label:"Video-o1"}]}},computed:{value(){return this.$store.state.kling?.config?.model}},mounted(){this.value||this.applyModel(Ve)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{model:e});if(s.length===0){this.applyModel(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,model:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,model:e})}}}),Ye={class:"field"},Xe={class:"title font-bold"};function Ze(e,t,s,a,u,$){const c=o("el-option"),p=o("el-select");return l(),m("div",Ye,[i("h2",Xe,r(e.$t("pika.name.model")),1),(l(),V(p,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("pika.placeholder.select"),onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,f=>(l(),V(c,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const xe=y(Qe,[["render",Ze],["__scopeId","data-v-04059875"]]),et=b({name:"ModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},cameraControlSet(){return!!this.$store.state.kling?.config?.camera_control?.type},fourKReason(){return F.includes(this.selectedModel)?this.cameraControlSet?this.$t("kling.description.mode4kIncompatibleCamera"):"":this.$t("kling.description.mode4kRequiresV3")},options(){return[{value:"std",label:this.$t("kling.name.modeStd"),disabled:!1,disabledReason:""},{value:"pro",label:this.$t("kling.name.modePro"),disabled:!1,disabledReason:""},{value:"4k",label:this.$t("kling.name.mode4k"),disabled:!!this.fourKReason,disabledReason:this.fourKReason}]},value(){return this.$store.state.kling?.config?.mode}},watch:{fourKReason(e){e&&this.value==="4k"&&this.applyMode(oe)}},mounted(){this.value||this.applyMode(oe)},methods:{async onChange(e){const t=this.$store.state.kling?.config||{},s=Y(t,{mode:e});if(s.length===0){this.applyMode(e);return}const a=s.map(u=>this.$t(u.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:a}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const u=X({...t,mode:e},s);this.$store.commit("kling/setConfig",u),C.success(this.$t("kling.message.featureRemovedNotice",{fields:a}))}catch{this.revertKey+=1}},applyMode(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,mode:e})}}}),tt={class:"field"},ot={class:"header"},nt={class:"title font-bold"},st={key:0,class:"opt-tip"};function it(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",tt,[i("div",ot,[i("h2",nt,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.mode"),class:"info-icon"},null,8,["content"])]),(l(),V(f,{key:e.revertKey,"model-value":e.value,class:"value",placeholder:e.$t("kling.placeholder.select"),clearable:!0,onChange:e.onChange},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value,disabled:d.disabled},{default:h(()=>[i("span",{class:R({"opt-disabled":d.disabled})},r(d.label),3),d.disabled&&d.disabledReason?(l(),m("span",st,r(d.disabledReason),1)):k("",!0)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["model-value","placeholder","onChange"]))])}const lt=y(et,[["render",it],["__scopeId","data-v-9a8fa3c5"]]),ie=[3,5,8,10,12,15],le=[5,10],at=b({name:"DurationSelector",components:{ElSlider:H,InfoIcon:S},props:{modelValue:{type:Number,default:void 0}},emits:["update:modelValue"],data(){return{revertKey:0}},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},isV3Model(){return F.includes(this.selectedModel)},sliderMin(){return this.isV3Model?3:5},sliderMax(){return this.isV3Model?15:10},sliderStep(){return this.isV3Model?1:5},marks(){const e=this.isV3Model?ie:le,t={};for(const s of e)t[s]=`${s}s`;return t},value(){return this.$store.state.kling?.config?.duration??N},sliderValue(){const e=this.value;return e<this.sliderMin?this.sliderMin:e>this.sliderMax?this.sliderMax:e}},watch:{isV3Model(e){(this.isV3Model?ie:le).includes(this.value)||this.applyDuration(N)}},mounted(){this.$store.state.kling?.config?.duration||this.applyDuration(N)},methods:{async onChange(e){const t=Array.isArray(e)?e[0]:e,s=this.$store.state.kling?.config||{},a=Y(s,{duration:t});if(a.length===0){this.applyDuration(t);return}const u=a.map($=>this.$t($.i18nLabel)).join("、");try{await q.confirm(this.$t("kling.message.featureNotSupportedBody",{fields:u}),this.$t("kling.message.featureNotSupportedTitle"),{confirmButtonText:this.$t("kling.button.confirmContinue"),cancelButtonText:this.$t("kling.button.cancelSwitch"),type:"warning"});const $=X({...s,duration:t},a);this.$store.commit("kling/setConfig",$),C.success(this.$t("kling.message.featureRemovedNotice",{fields:u}))}catch{this.revertKey+=1}},applyDuration(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling.config,duration:e})}}}),rt={class:"field"},ct={class:"header"},dt={class:"title font-bold"},mt={class:"value-display"};function pt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-slider");return l(),m("div",rt,[i("div",ct,[i("h2",dt,r(e.$t("kling.name.duration")),1),n(c,{content:e.$t("kling.description.duration"),class:"info-icon ml-1"},null,8,["content"]),i("span",mt,r(e.value)+"s",1)]),(l(),V(p,{key:e.revertKey,"model-value":e.sliderValue,class:"slider",min:e.sliderMin,max:e.sliderMax,step:e.sliderStep,marks:e.marks,"show-tooltip":!1,onChange:e.onChange},null,8,["model-value","min","max","step","marks","onChange"]))])}const ut=y(at,[["render",pt],["__scopeId","data-v-aa1a22a1"]]),gt=b({name:"RatioSelector",data(){return{options:[{value:"1:1",label:"1:1",width:20,height:20},{value:"16:9",label:"16:9",width:25,height:13},{value:"9:16",label:"9:16",width:13,height:25}]}},computed:{active(){return this.options.findIndex(e=>e.value===this.value)||0},value:{get(){return this.$store.state?.kling?.config?.aspect_ratio},set(e){console.debug("set ratio",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,aspect_ratio:e})}}},mounted(){this.value||(this.value=Se)}}),ft={class:"text-sm font-bold mb-2 block"},ht={class:"items"},_t=["onClick"],$t={class:"name"};function vt(e,t,s,a,u,$){return l(),m("div",null,[i("span",ft,r(e.$t("kling.name.ratio")),1),i("div",ht,[(l(!0),m(T,null,I(e.options,(c,p)=>(l(),m("div",{key:p,class:R({active:e.active===p,item:!0}),onClick:f=>e.value=c.value},[i("div",{class:R(["preview",c.label])},[i("div",{class:"rect",style:be({width:c.width+"px",height:c.height+"px"})},null,4)],2),i("p",$t,r(c.label),1)],10,_t))),128))])])}const kt=y(gt,[["render",vt],["__scopeId","data-v-cdb14b2f"]]),bt=b({name:"StartImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],emits:["change"],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},value:{get(){return this.$store.state?.kling?.config?.start_image_url},set(){}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetStartImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,start_image_url:e})},async onSuccess(){this.onSetStartImageUrl()}}}),yt={class:"relative"},wt={class:"flex justify-between"},Ct={class:"flex justify-start items-center"},Vt={class:"text-sm font-bold"};function St(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",yt,[i("div",wt,[i("div",Ct,[i("span",Vt,r(e.$t("kling.name.startImage")),1),n(c,{content:e.$t("kling.description.uploadStartImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.reachedLimit,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.$t("kling.message.uploadReferencesExceed"),disabled:!e.reachedLimit,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.reachedLimit},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","on-exceed","on-error","on-success","headers"])])}const Tt=y(bt,[["render",St],["__scopeId","data-v-40832274"]]),It=b({name:"EndImage",components:{ElUpload:K,ElButton:L,ElTooltip:J,ImagePreview:G,InfoIcon:S,FontAwesomeIcon:E},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},reachedLimit(){return(this.fileList?.length||0)>=1},klingConfig(){return this.$store.state?.kling?.config||{}},endImageSupported(){return fe(this.klingConfig.model,this.klingConfig.mode,this.klingConfig.duration).endImage},uploadDisabled(){return this.reachedLimit||!this.endImageSupported},uploadTooltip(){return this.endImageSupported?this.reachedLimit?this.$t("kling.message.uploadReferencesExceed"):"":this.$t("kling.message.endImageNotSupported")},storeValue(){return this.klingConfig.end_image_url},value:{get(){return this.storeValue},set(){}}},watch:{storeValue(e){!e&&this.fileList.length>0&&(this.fileList=[])}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onBeforeUpload(){return this.endImageSupported?!0:(C.warning(this.$t("kling.message.endImageNotSupported")),!1)},onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onSetEndImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,end_image_url:e})},async onSuccess(){this.onSetEndImageUrl()}}}),Et={class:"relative"},Lt={class:"flex justify-between"},Mt={class:"flex justify-start items-center"},Ut={class:"text-sm font-bold"};function Rt(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-tooltip"),g=o("el-upload");return l(),m("div",Et,[i("div",Lt,[i("div",Mt,[i("span",Ut,r(e.$t("kling.name.endImage")),1),n(c,{content:e.$t("kling.description.uploadEndImage")},null,8,["content"])])]),n(g,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=_=>e.fileList=_),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,disabled:e.uploadDisabled,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","before-upload":e.onBeforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:_})=>[_.url&&_.percentage!==void 0?(l(),V(p,{key:0,url:_.url,name:_.name,percentage:_.percentage,onRemove:M=>e.fileList.splice(e.fileList.indexOf(_),1)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(v,{content:e.uploadTooltip,disabled:!e.uploadDisabled,placement:"top"},{default:h(()=>[i("span",null,[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload",disabled:e.uploadDisabled},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1},8,["disabled"])])]),_:1},8,["content","disabled"])]),_:1},8,["file-list","disabled","action","before-upload","on-exceed","on-error","on-success","headers"])])}const At=y(It,[["render",Rt],["__scopeId","data-v-6959ad44"]]),Pt=b({name:"CfgScaleSelector",components:{ElSlider:H,InfoIcon:S,ElInputNumber:me},computed:{value:{get(){return this.$store.state?.kling?.config?.cfg_scale},set(e){console.debug("set cfg_scale",e),this.$store.commit("kling/setConfig",{...this.$store.state?.kling?.config,cfg_scale:e})}}},mounted(){this.value||(this.value=Te)}}),Dt={class:"flex justify-between"},Gt={class:"flex justify-start items-center"},Kt={class:"text-sm font-bold"},Ot={class:"flex justify-end items-center"},jt={class:"w-full"};function Nt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input-number"),f=o("el-slider");return l(),m("div",null,[i("div",Dt,[i("div",Gt,[i("span",Kt,r(e.$t("kling.name.cfgScale")),1),n(c,{content:e.$t("kling.description.cfgScale")},null,8,["content"])]),i("div",Ot,[n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),"controls-position":"right"},null,8,["modelValue"])])]),i("div",jt,[n(f,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=d=>e.value=d),min:0,max:1,step:.1},null,8,["modelValue"])])])}const Bt=y(Pt,[["render",Nt]]),zt=b({name:"GenerateAudioSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{selectedModel(){return this.$store.state.kling?.config?.model||""},selectedMode(){return this.$store.state.kling?.config?.mode||""},supported(){return!!(F.includes(this.selectedModel)||this.selectedModel==="kling-v2-6"&&this.selectedMode==="pro")},tooltipContent(){return this.supported?this.$t("kling.description.generateAudio"):this.$t("kling.description.generateAudioUnsupported")},value:{get(){return this.supported?this.$store.state.kling?.config?.generate_audio??Ie:!1},set(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:e})}}},watch:{supported(e){!e&&this.$store.state.kling?.config?.generate_audio&&this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,generate_audio:!1})}}}),Ft={class:"relative"},qt={class:"flex justify-between items-center"},Ht={class:"flex justify-start items-center"},Wt={class:"text-sm font-bold"};function Jt(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",Ft,[i("div",qt,[i("div",Ht,[i("span",Wt,r(e.$t("kling.name.generateAudio")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f),class:"value",disabled:!e.supported},null,8,["modelValue","disabled"])])])}const Qt=y(zt,[["render",Jt]]),Yt=["horizontal","vertical","pan","tilt","roll","zoom"],Xt=b({name:"CameraControlSelector",components:{ElSelect:D,ElOption:P,ElSlider:H,ElInputNumber:me,InfoIcon:S},data(){return{configKeys:Yt}},computed:{typeOptions(){return[{value:"",label:this.$t("kling.name.cameraTypeNone")},{value:"simple",label:this.$t("kling.name.cameraTypeSimple")},{value:"down_back",label:this.$t("kling.name.cameraTypeDownBack")},{value:"forward_up",label:this.$t("kling.name.cameraTypeForwardUp")},{value:"left_turn_forward",label:this.$t("kling.name.cameraTypeLeftTurnForward")},{value:"right_turn_forward",label:this.$t("kling.name.cameraTypeRightTurnForward")}]},selectedMode(){return this.$store.state.kling?.config?.mode||""},disabled(){return this.selectedMode==="4k"},tooltipContent(){return this.disabled?this.$t("kling.description.cameraControlDisabled4k"):this.$t("kling.description.cameraControl")},selectedType(){return this.$store.state.kling?.config?.camera_control?.type},selectedTypeRaw:{get(){return this.selectedType??""},set(e){const t=this.$store.state.kling?.config||{};if(!e){const a={...t};delete a.camera_control,this.$store.commit("kling/setConfig",a);return}const s=e;this.$store.commit("kling/setConfig",{...t,camera_control:{type:s,config:s==="simple"?t.camera_control?.config||{}:void 0}})}},configValues(){return this.$store.state.kling?.config?.camera_control?.config||{}}},watch:{disabled(e){e&&this.selectedType!==void 0&&(this.selectedTypeRaw="")}},methods:{writeConfig(e,t){const s=this.$store.state.kling?.config||{},a=s.camera_control||{type:"simple"},u={...a.config||{}};t==null?delete u[e]:u[e]=t,this.$store.commit("kling/setConfig",{...s,camera_control:{...a,type:"simple",config:u}})},onSliderChange(e,t){this.writeConfig(e,t)},onNumberChange(e,t){this.writeConfig(e,t)}}}),Zt={class:"field"},xt={class:"header"},eo={class:"text-sm font-bold"},to={key:0,class:"config-grid"},oo={class:"cfg-row-head"},no={class:"cfg-name"};function so(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select"),d=o("el-input-number"),v=o("el-slider");return l(),m("div",Zt,[i("div",xt,[i("span",eo,r(e.$t("kling.name.cameraControl")),1),n(c,{content:e.tooltipContent},null,8,["content"])]),n(f,{modelValue:e.selectedTypeRaw,"onUpdate:modelValue":t[0]||(t[0]=g=>e.selectedTypeRaw=g),class:"value",placeholder:e.$t("kling.placeholder.cameraType"),clearable:!0,disabled:e.disabled},{default:h(()=>[(l(!0),m(T,null,I(e.typeOptions,g=>(l(),V(p,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled"]),e.selectedType==="simple"&&!e.disabled?(l(),m("div",to,[(l(!0),m(T,null,I(e.configKeys,g=>(l(),m("div",{key:g,class:"cfg-row"},[i("div",oo,[i("span",no,r(e.$t(`kling.name.cc_${g}`)),1),n(d,{modelValue:e.configValues[g],"onUpdate:modelValue":_=>e.configValues[g]=_,min:-1,max:1,step:.1,precision:1,"controls-position":"right",size:"small",class:"cfg-num",onChange:_=>e.onNumberChange(g,_)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),n(v,{"model-value":e.configValues[g]??0,min:-1,max:1,step:.1,onInput:_=>e.onSliderChange(g,_)},null,8,["model-value","onInput"])]))),128))])):k("",!0)])}const io=y(Xt,[["render",so],["__scopeId","data-v-fb7b34d0"]]),he=[{groupKey:"cameraMovements",chipKeys:["rotateAround","stationary","handheld","zoomOut","zoomIn","follow","panRight","tiltUp","tiltDown","orbit"]},{groupKey:"cameraSpeed",chipKeys:["speedSlow","speedMedium","speedFast"]},{groupKey:"shotType",chipKeys:["shotClose","shotMedium","shotLong","shotLowAngle","shotHighAngle","shotShallowDof","shotFront","shotProfile","shotCloseUp","shotDrone"]},{groupKey:"light",chipKeys:["lightSunlight","lightSoft","lightNeon","lightWarm","lightNature","lightCandle","lightCityNight"]},{groupKey:"frame",chipKeys:["frameRichDetails","frameSimpleBg"]},{groupKey:"atmosphere",chipKeys:["atmosphereMysterious","atmospherePeaceful","atmosphereHeartwarming","atmosphereVivid","atmosphereColorful"]}],B=", ";function lo(e,t){const s=(e||"").trim();return s?s.includes(t)?s:`${s}${B}${t}`:t}function z(e,t){if(!e||!t)return e||"";const s=[`${t}${B}`,`${B}${t}`,t];let a=e;for(const u of s)if(a.includes(u)){a=a.replace(u,"");break}return a.replace(/(?:,\s*)+$/,"").replace(/^(?:,\s*)+/,"")}const ao=b({name:"InspirationPills",components:{FontAwesomeIcon:E},computed:{prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return he.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selected(){const e=this.prompt;if(!e)return[];const t=[];for(const s of this.allChipTexts){const a=e.indexOf(s);a!==-1&&t.push({text:s,idx:a})}return t.sort((s,a)=>s.idx-a.idx).map(s=>s.text)}},methods:{onRemove(e){const t=z(this.prompt,e);this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:t})}}}),ro={key:0,class:"pills",role:"list"},co={class:"pill-text"},mo=["aria-label","onClick"];function po(e,t,s,a,u,$){const c=o("font-awesome-icon");return e.selected.length>0?(l(),m("div",ro,[(l(!0),m(T,null,I(e.selected,p=>(l(),m("div",{key:p,class:"pill",role:"listitem"},[i("span",co,r(p),1),i("button",{type:"button",class:"pill-remove","aria-label":e.$t("kling.inspiration.removeChip"),onClick:ye(f=>e.onRemove(p),["stop"])},[n(c,{icon:"fa-solid fa-xmark"})],8,mo)]))),128))])):k("",!0)}const uo=y(ao,[["render",po],["__scopeId","data-v-5fc4fa65"]]),go="",fo=b({name:"PromptInput",components:{ElInput:Q,ElButton:L,FontAwesomeIcon:E,InfoIcon:S,InspirationPills:uo},emits:["open-inspiration"],computed:{prompt:{get(){return this.$store.state.kling?.config?.prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})}}},mounted(){this.prompt||(this.prompt=go)}}),ho={class:"field"},_o={class:"box"},$o={class:"title font-bold"},vo={class:"actions"};function ko(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("info-icon"),d=o("inspiration-pills"),v=o("el-input");return l(),m("div",ho,[i("div",_o,[i("h2",$o,r(e.$t("kling.name.prompt")),1),i("div",vo,[n(p,{text:"",size:"small",class:"inspiration-btn",onClick:t[0]||(t[0]=g=>e.$emit("open-inspiration"))},{default:h(()=>[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-1"}),w(" "+r(e.$t("kling.inspiration.openButton")),1)]),_:1}),n(f,{content:e.$t("kling.description.prompt"),class:"info"},null,8,["content"])])]),n(d),n(v,{modelValue:e.prompt,"onUpdate:modelValue":t[1]||(t[1]=g=>e.prompt=g),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.prompt")},null,8,["modelValue","placeholder"])])}const bo=y(fo,[["render",ko],["__scopeId","data-v-0a5c57b8"]]),yo="",wo=b({name:"NegativePromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.config?.negative_prompt},set(e){console.debug("set prompt",e),this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,negative_prompt:e})}}},mounted(){this.prompt||(this.prompt=yo)}}),Co={class:"field"},Vo={class:"box"},So={class:"title font-bold"};function To(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",Co,[i("div",Vo,[i("h2",So,r(e.$t("kling.name.negativePrompt")),1),n(c,{content:e.$t("kling.description.negativePrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.negativePrompt")},null,8,["modelValue","placeholder"])])}const Io=y(wo,[["render",To],["__scopeId","data-v-de98cf01"]]),Eo=b({name:"InspirationDrawer",components:{ElDrawer:de,ElButton:L,FontAwesomeIcon:E},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{groups:he,Close:we}},computed:{visible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},drawerSize(){return window.innerWidth<768?"100%":"380px"},prompt(){return this.$store.state.kling?.config?.prompt||""},allChipTexts(){return this.groups.flatMap(e=>e.chipKeys.map(t=>this.$t(`kling.inspiration.chip.${t}`)))},selectedCount(){return this.allChipTexts.filter(e=>this.isSelected(e)).length}},methods:{chipText(e){return this.$t(`kling.inspiration.chip.${e}`)},isSelected(e){return e?this.prompt.includes(e):!1},setPrompt(e){this.$store.commit("kling/setConfig",{...this.$store.state.kling?.config,prompt:e})},onToggle(e){e&&(this.isSelected(e)?this.setPrompt(z(this.prompt,e)):this.setPrompt(lo(this.prompt,e)))},onClearSelected(){let e=this.prompt;for(const t of this.allChipTexts)for(;e.includes(t);)e=z(e,t);this.setPrompt(e)}}}),Lo={class:"drawer-content"},Mo={class:"drawer-header"},Uo={class:"title-row"},Ro={class:"title"},Ao={class:"hint"},Po={key:0,class:"selected-bar"},Do={class:"selected-text"},Go={class:"groups"},Ko={class:"group-title"},Oo={class:"chip-grid"},jo=["onClick"];function No(e,t,s,a,u,$){const c=o("font-awesome-icon"),p=o("el-button"),f=o("el-drawer");return l(),V(f,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=d=>e.visible=d),direction:"rtl","with-header":!1,size:e.drawerSize,"custom-class":"kling-inspiration-drawer","destroy-on-close":!1},{default:h(()=>[i("div",Lo,[i("div",Mo,[i("div",Uo,[n(c,{icon:"fa-regular fa-lightbulb",class:"mr-2"}),i("span",Ro,r(e.$t("kling.inspiration.title")),1)]),n(p,{text:"",icon:e.Close,class:"close-btn",onClick:t[0]||(t[0]=d=>e.visible=!1)},null,8,["icon"])]),i("div",Ao,r(e.$t("kling.inspiration.hint")),1),e.selectedCount>0?(l(),m("div",Po,[i("span",Do,r(e.$t("kling.inspiration.selectedSummary",{count:e.selectedCount})),1),n(p,{text:"",size:"small",class:"clear-btn",onClick:e.onClearSelected},{default:h(()=>[w(r(e.$t("kling.inspiration.clearSelected")),1)]),_:1},8,["onClick"])])):k("",!0),i("div",Go,[(l(!0),m(T,null,I(e.groups,d=>(l(),m("div",{key:d.groupKey,class:"group"},[i("div",Ko,r(e.$t(`kling.inspiration.group.${d.groupKey}`)),1),i("div",Oo,[(l(!0),m(T,null,I(d.chipKeys,v=>(l(),m("button",{key:v,type:"button",class:R({chip:!0,active:e.isSelected(e.chipText(v))}),onClick:g=>e.onToggle(e.chipText(v))},r(e.chipText(v)),11,jo))),128))])]))),128))])])]),_:1},8,["modelValue","size"])}const Bo=y(Eo,[["render",No],["__scopeId","data-v-7d457a69"]]),zo={"kling-v3":"v3","kling-v3-omni":"v3-Omni","kling-v2-6":"v2.6","kling-v2-5-turbo":"v2.5-Turbo","kling-v2-1-master":"v2.1-Master","kling-v2-master":"v2-Master","kling-v1-6":"v1.6","kling-v1":"v1","kling-video-o1":"Video-o1"},Fo={std:"720p",pro:"1080p","4k":"4K"},qo=b({name:"SummaryChip",components:{FontAwesomeIcon:E},computed:{config(){return this.$store.state.kling?.config||{}},modelLabel(){const e=this.config?.model||"kling-v2-5-turbo";return zo[e]||e},durationLabel(){return`${this.config?.duration??5}s`},aspectRatio(){return this.config?.aspect_ratio||""},modeLabel(){const e=this.config?.mode||"std";return Fo[e]||e},generateAudio(){return!!this.config?.generate_audio}}}),Ho={class:"summary-chip"},Wo=["title"],Jo=["title"],Qo=["title"],Yo=["title"],Xo=["title"];function Zo(e,t,s,a,u,$){const c=o("font-awesome-icon");return l(),m("div",Ho,[i("span",{class:"part",title:e.$t("kling.name.model")},r(e.modelLabel),9,Wo),t[0]||(t[0]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.duration")},r(e.durationLabel),9,Jo),t[1]||(t[1]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.ratio")},r(e.aspectRatio||"16:9"),9,Qo),t[2]||(t[2]=i("span",{class:"dot"},"·",-1)),i("span",{class:"part",title:e.$t("kling.name.mode")},r(e.modeLabel),9,Yo),e.generateAudio?(l(),m("span",{key:0,class:"audio",title:e.$t("kling.name.generateAudio")},[n(c,{icon:"fa-solid fa-headphones"})],8,Xo)):k("",!0)])}const xo=y(qo,[["render",Zo],["__scopeId","data-v-418a6733"]]),en=b({name:"ConfigPanel",components:{ElButton:L,Consumption:pe,FontAwesomeIcon:E,PromptInput:bo,NegativePromptInput:Io,ModelSelector:xe,ModeSelector:lt,DurationSelector:ut,RatioSelector:kt,StartImage:Tt,CfgScaleSelector:Bt,GenerateAudioSelector:Qt,CameraControlSelector:io,InspirationDrawer:Bo,SummaryChip:xo,EndImage:At},emits:["generate"],data(){return{inspirationOpen:!1}},computed:{config(){return this.$store.state.kling?.config},consumption(){return ge(this.config,this.service?.cost)},service(){return this.$store.state.kling?.service}},methods:{onGenerate(){this.$emit("generate")}}}),tn={class:"flex flex-col h-full"},on={class:"flex-1 overflow-y-auto p-5"},nn={class:"flex flex-col items-center justify-center px-5 pb-5"};function sn(e,t,s,a,u,$){const c=o("prompt-input"),p=o("model-selector"),f=o("ratio-selector"),d=o("start-image"),v=o("end-image"),g=o("duration-selector"),_=o("mode-selector"),M=o("generate-audio-selector"),U=o("camera-control-selector"),O=o("cfg-scale-selector"),_e=o("negative-prompt-input"),$e=o("summary-chip"),ve=o("consumption"),Z=o("font-awesome-icon"),x=o("el-button"),ke=o("inspiration-drawer");return l(),m("div",tn,[i("div",on,[n(c,{class:"mb-4",onOpenInspiration:t[0]||(t[0]=ee=>e.inspirationOpen=!0)}),n(p,{class:"mb-4"}),n(f,{class:"mb-4"}),n(d,{class:"mb-2"}),n(v,{class:"mb-2"}),n(g,{class:"mb-4"}),n(_,{class:"mb-4"}),n(M,{class:"mb-4"}),n(U,{class:"mb-4"}),n(O,{class:"mb-4"}),n(_e,{class:"mb-4"})]),i("div",nn,[n($e),n(ve,{value:e.consumption,service:e.service},null,8,["value","service"]),e.config?.video_url!==void 0||e.config?.custom?(l(),V(x,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.extend")),1)]),_:1},8,["onClick"])):(l(),V(x,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:h(()=>[n(Z,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generate")),1)]),_:1},8,["onClick"]))]),n(ke,{modelValue:e.inspirationOpen,"onUpdate:modelValue":t[1]||(t[1]=ee=>e.inspirationOpen=ee)},null,8,["modelValue"])])}const ln=y(en,[["render",sn]]),an=b({name:"MotionImage",components:{ElUpload:K,ElButton:L,InfoIcon:S,FontAwesomeIcon:E,ImagePreview:G},mixins:[W],data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetImageUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadReferencesExceed"))},onError(){C.error(this.$t("kling.message.uploadReferencesError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:void 0})},onSetImageUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,image_url:e})},async onSuccess(){this.onSetImageUrl()}}}),rn={class:"relative"},cn={class:"flex justify-between"},dn={class:"flex justify-start items-center"},mn={class:"text-sm font-bold"};function pn(e,t,s,a,u,$){const c=o("info-icon"),p=o("image-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",rn,[i("div",cn,[i("div",dn,[i("span",mn,r(e.$t("kling.name.motionImage")),1),n(c,{content:e.$t("kling.description.motionImage")},null,8,["content"])])]),n(v,{ref:"uploader","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),name:"file",accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",limit:1,class:"upload-wrapper",multiple:!1,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.url&&g.percentage!==void 0?(l(),V(p,{key:0,url:g.url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadReferences")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])])}const un=y(an,[["render",pn],["__scopeId","data-v-37d42da7"]]),gn=b({name:"MotionVideo",components:{ElUpload:K,ElButton:L,InfoIcon:S,FilePreview:Le,FontAwesomeIcon:E},data(){return{fileList:[],uploadUrl:A()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},mounted(){this.onSetVideoUrl()},methods:{onExceed(){C.warning(this.$t("kling.message.uploadVideoExceed"))},onError(){C.error(this.$t("kling.message.uploadVideoError"))},onRemove(e){this.fileList.splice(this.fileList.indexOf(e),1),this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:void 0})},beforeUpload(e){const t=e.type==="video/mp4"||e.type==="video/quicktime",s=e.size/1024/1024<100;return t?s?!0:(C.error(this.$t("kling.message.uploadVideoSizeExceed")),!1):(C.error(this.$t("kling.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){const e=this.urls?.[0];this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,video_url:e})},async onSuccess(){this.onSetVideoUrl()}}}),fn={class:"relative"},hn={class:"flex justify-between"},_n={class:"flex justify-start items-center"},$n={class:"text-sm font-bold"};function vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("file-preview"),f=o("font-awesome-icon"),d=o("el-button"),v=o("el-upload");return l(),m("div",fn,[i("div",hn,[i("div",_n,[i("span",$n,r(e.$t("kling.name.motionVideo")),1),n(c,{content:e.$t("kling.description.motionVideo")},null,8,["content"])])]),n(v,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=g=>e.fileList=g),accept:".mp4,.mov",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{file:h(({file:g})=>[g.percentage!==void 0?(l(),V(p,{key:0,url:g.url||g.response?.file_url,name:g.name,percentage:g.percentage,onRemove:_=>e.onRemove(g)},null,8,["url","name","percentage","onRemove"])):k("",!0)]),default:h(()=>[n(d,{round:"",type:"primary",size:"small",class:"btn btn-upload"},{default:h(()=>[n(f,{icon:"fa-solid fa-upload",class:"icon mr-1"}),w(" "+r(e.$t("kling.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])])}const kn=y(gn,[["render",vn],["__scopeId","data-v-5cf93212"]]),bn=b({name:"MotionPromptInput",components:{ElInput:Q,InfoIcon:S},computed:{prompt:{get(){return this.$store.state.kling?.motionConfig?.prompt||""},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,prompt:e})}}}}),yn={class:"field"},wn={class:"box"},Cn={class:"title font-bold"};function Vn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-input");return l(),m("div",yn,[i("div",wn,[i("h2",Cn,r(e.$t("kling.name.motionPrompt")),1),n(c,{content:e.$t("kling.description.motionPrompt"),class:"info"},null,8,["content"])]),n(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=f=>e.prompt=f),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("kling.placeholder.motionPrompt")},null,8,["modelValue","placeholder"])])}const Sn=y(bn,[["render",Vn],["__scopeId","data-v-ca9fdbe5"]]),ae="video",Tn=b({name:"CharacterOrientationSelector",components:{ElRadioGroup:Ue,ElRadioButton:Me,InfoIcon:S},computed:{value:{get(){return this.$store.state.kling?.motionConfig?.character_orientation||ae},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,character_orientation:e})}}},mounted(){this.$store.state.kling?.motionConfig?.character_orientation||(this.value=ae)}}),In={class:"field"},En={class:"header"},Ln={class:"text-sm font-bold"};function Mn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-radio-button"),f=o("el-radio-group");return l(),m("div",In,[i("div",En,[i("span",Ln,r(e.$t("kling.name.characterOrientation")),1),n(c,{content:e.$t("kling.description.characterOrientation")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),size:"small",class:"value"},{default:h(()=>[n(p,{label:"image"},{default:h(()=>[w(r(e.$t("kling.name.orientationImage")),1)]),_:1}),n(p,{label:"video"},{default:h(()=>[w(r(e.$t("kling.name.orientationVideo")),1)]),_:1})]),_:1},8,["modelValue"])])}const Un=y(Tn,[["render",Mn],["__scopeId","data-v-7a91195b"]]),re="std",Rn=b({name:"MotionModeSelector",components:{ElSelect:D,ElOption:P,InfoIcon:S},computed:{options(){return[{value:"std",label:this.$t("kling.name.modeStd")},{value:"pro",label:this.$t("kling.name.modePro")}]},value:{get(){return this.$store.state.kling?.motionConfig?.mode||re},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,mode:e})}}},mounted(){this.$store.state.kling?.motionConfig?.mode||(this.value=re)}}),An={class:"field"},Pn={class:"header"},Dn={class:"title font-bold"};function Gn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-option"),f=o("el-select");return l(),m("div",An,[i("div",Pn,[i("h2",Dn,r(e.$t("kling.name.mode")),1),n(c,{content:e.$t("kling.description.motionMode")},null,8,["content"])]),n(f,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value",placeholder:e.$t("kling.placeholder.select")},{default:h(()=>[(l(!0),m(T,null,I(e.options,d=>(l(),V(p,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}const Kn=y(Rn,[["render",Gn],["__scopeId","data-v-1295688c"]]),On=b({name:"KeepOriginalSoundSelector",components:{ElSwitch:ue,InfoIcon:S},computed:{value:{get(){return(this.$store.state.kling?.motionConfig?.keep_original_sound??"yes")==="yes"},set(e){this.$store.commit("kling/setMotionConfig",{...this.$store.state.kling?.motionConfig,keep_original_sound:e?"yes":"no"})}}}}),jn={class:"relative"},Nn={class:"flex justify-between items-center"},Bn={class:"flex justify-start items-center"},zn={class:"text-sm font-bold"};function Fn(e,t,s,a,u,$){const c=o("info-icon"),p=o("el-switch");return l(),m("div",jn,[i("div",Nn,[i("div",Bn,[i("span",zn,r(e.$t("kling.name.keepOriginalSound")),1),n(c,{content:e.$t("kling.description.keepOriginalSound")},null,8,["content"])]),n(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=f=>e.value=f)},null,8,["modelValue"])])])}const qn=y(On,[["render",Fn]]),Hn=b({name:"MotionPanel",components:{ElButton:L,FontAwesomeIcon:E,Consumption:pe,MotionImage:un,MotionVideo:kn,MotionPromptInput:Sn,CharacterOrientationSelector:Un,MotionModeSelector:Kn,KeepOriginalSoundSelector:qn},emits:["generate"],computed:{motionConfig(){return this.$store.state.kling?.motionConfig},consumption(){return ge(this.motionConfig,this.service?.cost)},service(){return this.$store.state.kling?.service},canGenerate(){const e=this.motionConfig;return!!(e?.image_url&&e?.video_url)}},methods:{onGenerate(){this.$emit("generate")}}}),Wn={class:"flex flex-col h-full"},Jn={class:"flex-1 overflow-y-auto p-5"},Qn={class:"flex flex-col items-center justify-center px-5 pb-5"};function Yn(e,t,s,a,u,$){const c=o("motion-image"),p=o("motion-video"),f=o("motion-prompt-input"),d=o("character-orientation-selector"),v=o("motion-mode-selector"),g=o("keep-original-sound-selector"),_=o("consumption"),M=o("font-awesome-icon"),U=o("el-button");return l(),m("div",Wn,[i("div",Jn,[n(c,{class:"mb-3"}),n(p,{class:"mb-3"}),n(f,{class:"mb-4"}),n(d,{class:"mb-4"}),n(v,{class:"mb-4"}),n(g,{class:"mb-4"})]),i("div",Qn,[n(_,{value:e.consumption,service:e.service},null,8,["value","service"]),n(U,{type:"primary",class:"btn w-full",round:"",disabled:!e.canGenerate,onClick:e.onGenerate},{default:h(()=>[n(M,{icon:"fa-solid fa-magic",class:"mr-2"}),w(" "+r(e.$t("kling.button.generateMotion")),1)]),_:1},8,["disabled","onClick"])])])}const Xn=y(Hn,[["render",Yn]]),Zn=b({name:"KlingTabSwitcher",components:{ElTabs:Ae,ElTabPane:Re,ElTag:Ce},props:{modelValue:{type:String,default:"videos"}},emits:["update:modelValue"],computed:{tabs(){return[{value:"videos",label:this.$t("kling.tab.videoGeneration")},{value:"motion",label:this.$t("kling.tab.motionControl")}]}},methods:{onUpdate(e){this.$emit("update:modelValue",e)}}}),xn=["title"],es={class:"text"};function ts(e,t,s,a,u,$){const c=o("el-tag"),p=o("el-tab-pane"),f=o("el-tabs");return l(),V(f,{"model-value":e.modelValue,class:"kling-tabs",stretch:"","onUpdate:modelValue":e.onUpdate},{default:h(()=>[(l(!0),m(T,null,I(e.tabs,d=>(l(),V(p,{key:d.value,name:d.value,disabled:d.disabled},{label:h(()=>[i("span",{class:"tab-label",title:d.disabled?d.disabledReason:void 0},[i("span",es,r(d.label),1),d.badge?(l(),V(c,{key:0,size:"small",type:"warning",class:"badge"},{default:h(()=>[w(r(d.badge),1)]),_:2},1024)):k("",!0)],8,xn)]),_:2},1032,["name","disabled"]))),128))]),_:1},8,["model-value","onUpdate:modelValue"])}const os=y(Zn,[["render",ts],["__scopeId","data-v-bf00c27e"]]),ns=b({name:"TaskPreview",components:{ElImage:Ke,CopyToClipboard:Pe,FontAwesomeIcon:E,ElAlert:Ge,VideoPlayer:De,ElTooltip:J,ElButton:L,ImagePreview:G},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.kling?.application},config(){return this.$store.state.kling?.config},referenceImages(){const e=[],t=this.modelValue?.request?.start_image_url,s=this.modelValue?.request?.end_image_url;return t&&e.push({url:t,name:"start-image"}),s&&e.push({url:s,name:"end-image"}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onOpenVideo(e){window.open(e,"_blank")}}}),ss={class:"preview"},is={class:"left"},ls={class:"main"},as={class:"bot"},rs={class:"datetime"},cs={class:"info"},ds={key:0,class:"flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto"},ms={key:1,class:"prompt mt-2"},ps={key:0},us={key:1},gs={key:0,class:R({content:!0,failed:!0})},fs={key:0,class:"mb-4"},hs={key:1,class:R({operations:!0,"mt-2":!0})},_s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},$s={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},vs={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},ks={key:1,class:R({content:!0})},bs={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ys={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},ws={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Cs={key:1,class:"text-[var(--el-text-color-regular)] text-xs mb-0"},Vs={key:2,class:R({content:!0})},Ss={class:"text-[var(--el-text-color-regular)] text-xs mb-2"},Ts={key:0,class:"text-[var(--el-text-color-regular)] text-xs mb-0"};function Is(e,t,s,a,u,$){const c=o("el-image"),p=o("image-preview"),f=o("video-player"),d=o("el-button"),v=o("el-tooltip"),g=o("font-awesome-icon"),_=o("copy-to-clipboard"),M=o("el-alert");return l(),m("div",ss,[i("div",is,[n(c,{src:"https://cdn.acedata.cloud/qpbbbb.jpg",class:"avatar"})]),i("div",ls,[i("div",as,[w(r(e.$t("kling.name.klingBot"))+" ",1),i("span",rs,r(e.$dayjs.format(""+new Date(parseFloat((e.modelValue?.created_at||"").toString())*1e3))),1)]),i("div",cs,[e.referenceImages.length>0?(l(),m("div",ds,[(l(!0),m(T,null,I(e.referenceImages,(U,O)=>(l(),V(p,{key:O,url:U.url,name:U.name,closable:!1},null,8,["url","name"]))),128))])):k("",!0),e.modelValue?.request?.prompt?(l(),m("p",ms,[w(r(e.modelValue?.request?.prompt)+" ",1),e.modelValue?.response?k("",!0):(l(),m("span",ps," - ("+r(e.$t("kling.status.pending"))+") ",1)),e.modelValue?.response?.state==="submitted"||e.modelValue?.response?.state==="processing"||e.modelValue?.response?.state==="pending"||e.modelValue?.response?.state==="completed"?(l(),m("span",us," - ("+r(e.$t("kling.status.processing"))+") ",1)):k("",!0)])):k("",!0)]),e.modelValue?.response?.success===!0?(l(),m("div",gs,[e.modelValue?.response.video_url?(l(),m("div",fs,[n(f,{src:e.modelValue?.response.video_url},null,8,["src"])])):k("",!0),e.modelValue?.response.success?(l(),m("div",hs,[n(v,{class:"box-item",effect:"dark",content:e.$t("kling.message.downloadVideo"),placement:"top-start"},{default:h(()=>[e.modelValue?.response.video_url?(l(),V(d,{key:0,type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=U=>e.onDownload(U,e.modelValue?.response.video_url))},{default:h(()=>[w(r(e.$t("kling.button.download")),1)]),_:1})):k("",!0)]),_:1},8,["content"])])):k("",!0),n(M,{closable:!1,class:"mt-2 success"},{default:h(()=>[i("p",_s,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.model"))+": "+r(e.modelValue?.request?.model),1)]),i("p",$s,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",vs,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===!1?(l(),m("div",ks,[n(M,{closable:!1,class:"failure"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",bs,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),i("p",ys,[n(g,{icon:"fa-solid fa-circle-info",class:"mr-1"}),w(" "+r(e.$t("kling.name.failureReason"))+": "+r(e.modelValue?.response?.error?.message)+" ",1),n(_,{content:e.modelValue?.response?.error?.message},null,8,["content"])]),e.modelValue?.elapsed?(l(),m("p",ws,[n(g,{icon:"fa-solid fa-clock",class:"mr-1"}),w(" "+r(e.$t("kling.name.elapsed"))+": "+r(e.modelValue?.elapsed?.toFixed(2))+"s ",1)])):k("",!0),e.modelValue?.response?.trace_id?(l(),m("p",Cs,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0),e.modelValue?.response?.success===void 0?(l(),m("div",Vs,[n(M,{closable:!1,class:"info"},{template:h(()=>[n(g,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),w(" "+r(e.$t("kling.name.failure")),1)]),default:h(()=>[i("p",Ss,[n(g,{icon:"fa-solid fa-magic",class:"mr-1"}),w(" "+r(e.$t("kling.name.taskId"))+": "+r(e.modelValue?.id)+" ",1),n(_,{content:e.modelValue?.id},null,8,["content"])]),e.modelValue?.response?.trace_id?(l(),m("p",Ts,[n(g,{icon:"fa-solid fa-hashtag",class:"mr-1"}),w(" "+r(e.$t("kling.name.traceId"))+": "+r(e.modelValue?.response?.trace_id)+" ",1),n(_,{content:e.modelValue?.response?.trace_id},null,8,["content"])])):k("",!0)]),_:1})])):k("",!0)])])}const Es=y(ns,[["render",Is],["__scopeId","data-v-e8e87659"]]),Ls=b({name:"RecentPanel",components:{TaskPreview:Es,NoTasks:je,BotPlaceholder:Oe,ScrollList:Ee},props:{loading:{type:Boolean,default:!1}},emits:["reach-top"],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.kling?.tasks,items:this.$store.state.kling?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Ms={key:0},Us={key:2,class:"w-full h-full flex items-center justify-center"};function Rs(e,t,s,a,u,$){const c=o("bot-placeholder"),p=o("task-preview"),f=o("scroll-list"),d=o("no-tasks");return l(),m(T,null,[e.tasks?.items===void 0?(l(),m("div",Ms,[n(c)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(l(),V(f,{key:1,ref:"scrollList",class:"h-full w-full overflow-y-auto tasks",loading:e.loading,onReachTop:t[0]||(t[0]=v=>e.$emit("reach-top"))},{default:h(()=>[(l(!0),m(T,null,I(e.tasks?.items,v=>(l(),V(p,{key:v.id,"model-value":v},null,8,["model-value"]))),128))]),_:1},8,["loading"])):k("",!0),e.tasks?.items?.length===0?(l(),m("div",Us,[n(d)])):k("",!0)],64)}const As=y(Ls,[["render",Rs]]),ce="https://webhook.acedata.cloud/kling",Ps=b({name:"KlingIndex",components:{ConfigPanel:ln,MotionPanel:Xn,TabSwitcher:os,Layout:We,RecentPanel:As},inject:["initialized"],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.kling?.status?.getApplications===te.Request},tasksLoading(){return this.$store.state.kling?.status?.getTasks===te.Request||this.fetchingTasks},credential(){return this.$store.state.kling.credential},config(){return this.$store.state.kling.config},motionConfig(){return this.$store.state.kling.motionConfig},taskType(){return this.$store.state.kling.taskType||"videos"},tasks(){return this.$store.state.kling.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug("new tasks detected")},deep:!0},initialized:{async handler(e){e&&(console.debug("layout initialized"),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await Ne({tasks:this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("kling/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("kling/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();const e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug("loading");return}console.debug("start onGetTasks",e);const{limit:t=5,createdAtMin:s,createdAtMax:a}=e||{};console.debug("limit",t,"createdAtMin",s,"createdAtMax",a),this.fetchingTasks=!0;try{await this.$store.dispatch("kling/getTasks",{limit:t,createdAtMin:s,createdAtMax:a})}finally{this.fetchingTasks=!1}},async onGenerate(){const{camera_control:e,...t}=this.config||{},s={...t,callback_url:ce};if(!s.video_id&&!t.video_url&&!s.start_image_url&&s.end_image_url){C.warning(this.$t("kling.message.endImageRequiresStart"));return}s.action||(s.video_id||t.video_url?s.action="extend":s.start_image_url?s.action="image2video":s.action="text2video"),s.action==="text2video"&&s.end_image_url&&delete s.end_image_url,e?.type&&(s.camera_control={type:e.type,...e.type==="simple"&&e.config?{config:Object.fromEntries(Object.entries(e.config).filter(([,u])=>u!=null))}:{}});const a=this.credential?.token;if(!a){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.generate(s,{token:a}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(u=>{u?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()},async onTabChange(e){e!==this.taskType&&(await this.$store.dispatch("kling/setTaskType",e),await this.onGetTasks(),await this.onScrollDown())},async onGenerateMotion(){const e=this.motionConfig||{};if(!e.image_url||!e.video_url){C.warning(this.$t("kling.message.motionMissingInputs"));return}const t={image_url:e.image_url,video_url:e.video_url,character_orientation:e.character_orientation||"video",mode:e.mode||"std",keep_original_sound:e.keep_original_sound??"yes",...e.prompt?{prompt:e.prompt}:{},callback_url:ce},s=this.credential?.token;if(!s){console.error("no token specified");return}C.info(this.$t("kling.message.startingTask")),se.motion(t,{token:s}).then(()=>{C.success(this.$t("kling.message.startTaskSuccess"))}).catch(a=>{a?.response?.data?.error?.code===ne?C.error(this.$t("kling.message.usedUp")):C.error(this.$t("kling.message.startTaskFailed"))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})}}}),Ds={class:"flex flex-col h-full"},Gs={class:"flex-1 min-h-0"};function Ks(e,t,s,a,u,$){const c=o("tab-switcher"),p=o("config-panel"),f=o("motion-panel"),d=o("recent-panel"),v=o("layout");return l(),V(v,null,{config:h(()=>[i("div",Ds,[n(c,{"model-value":e.taskType,"onUpdate:modelValue":e.onTabChange},null,8,["model-value","onUpdate:modelValue"]),i("div",Gs,[e.taskType==="videos"?(l(),V(p,{key:0,onGenerate:e.onGenerate},null,8,["onGenerate"])):e.taskType==="motion"?(l(),V(f,{key:1,onGenerate:e.onGenerateMotion},null,8,["onGenerate"])):k("",!0)])])]),result:h(()=>[n(d,{ref:"recentPanel",loading:e.loadingMore,onReachTop:e.onReachTop},null,8,["loading","onReachTop"])]),_:1})}const ji=y(Ps,[["render",Ks]]);export{ji as default};
|