@acedatacloud/nexior 3.272.1 → 3.274.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/assets/{ApiCodeButton-DmgbbHgv.js → ApiCodeButton-izt0MrJt.js} +1 -1
  2. package/dist/assets/{AskUserQuestionCard-BqHFLywL.js → AskUserQuestionCard-hh5dLFJh.js} +1 -1
  3. package/dist/assets/{Auth-DeCYgNQ-.js → Auth-DgjLgixx.js} +1 -1
  4. package/dist/assets/{Bare-D2g7TWIi.js → Bare-CPm2r4ow.js} +1 -1
  5. package/dist/assets/{BotPlaceholder-DdLK7DwC.js → BotPlaceholder-D3yP8ahU.js} +1 -1
  6. package/dist/assets/{BottomFooter-CjIfHdMh.js → BottomFooter-CM98_CTW.js} +1 -1
  7. package/dist/assets/{Callback-8uKnd5gW.js → Callback--rPiyG0j.js} +1 -1
  8. package/dist/assets/{Console-fIjEqCjc.js → Console-BvntbEuz.js} +1 -1
  9. package/dist/assets/{Consumption-DiPiwllg.js → Consumption-87pk2Rrh.js} +1 -1
  10. package/dist/assets/Conversation-DiMJLsck.js +3 -0
  11. package/dist/assets/{CopyToClipboard-BvqdtQdo.js → CopyToClipboard-Dkx-UeG9.js} +1 -1
  12. package/dist/assets/{Detail-CkvtJk79.js → Detail-YYL5IMOW.js} +2 -2
  13. package/dist/assets/{Extra-Bet8UHnl.js → Extra-Cl0HSq4q.js} +1 -1
  14. package/dist/assets/{FilePreview-BhfWzt3j.js → FilePreview-B9zgHaDz.js} +1 -1
  15. package/dist/assets/{Hailuo-DaImuNaU.js → Hailuo-B009tjyU.js} +1 -1
  16. package/dist/assets/{History-Buz6IbGa.js → History-CalRO8EX.js} +1 -1
  17. package/dist/assets/{ImagePreview-Cel1agBC.js → ImagePreview-DeW8m863.js} +1 -1
  18. package/dist/assets/{ImageWrapper-D4L76WuX.js → ImageWrapper-8MM2tJEi.js} +1 -1
  19. package/dist/assets/{Index-Bi2OfoQe.css → Index-7mpwBbsc.css} +1 -1
  20. package/dist/assets/{Index-DWk_ajm7.js → Index-BE0CSc0W.js} +1 -1
  21. package/dist/assets/{Index-ua_TP9VB2.js → Index-BiceioRZ2.js} +1 -1
  22. package/dist/assets/{Index-C16XGcSA2.js → Index-BoNVYF1X2.js} +1 -1
  23. package/dist/assets/{Index-DkoJlXL0.js → Index-BqNYExTU.js} +1 -1
  24. package/dist/assets/{Index-n0QQo3Ww.js → Index-BrblkbIC.js} +1 -1
  25. package/dist/assets/{Index-CSs5_J7s.js → Index-C03ClqLQ.js} +1 -1
  26. package/dist/assets/{Index-DZkgTeM-.js → Index-COQsNNp7.js} +1 -1
  27. package/dist/assets/Index-CRz9crNZ.js +1 -0
  28. package/dist/assets/{Index-Ckikz9nL.js → Index-CTwRfOCy.js} +1 -1
  29. package/dist/assets/{Index-D56Gl5U0.js → Index-Ch8D-0we.js} +1 -1
  30. package/dist/assets/{Index-BkT_hdus.js → Index-ChwtDKcu.js} +1 -1
  31. package/dist/assets/{Index-CwCsz8IS.js → Index-CpMPVARM.js} +1 -1
  32. package/dist/assets/{Index-BjrTSkOB.js → Index-Cww5cEUu.js} +1 -1
  33. package/dist/assets/{Index-C82mVBtq.js → Index-D0j_1sPR.js} +1 -1
  34. package/dist/assets/{Index-B3YHu4KC.js → Index-DHATS7Ky.js} +1 -1
  35. package/dist/assets/Index-Di7t07u2.js +1 -0
  36. package/dist/assets/{Index-DzzuviGC.js → Index-DkrwSpMP.js} +1 -1
  37. package/dist/assets/Index-DpG-qzGP.js +1 -0
  38. package/dist/assets/{Index-Cog_vg19.js → Index-Dy-xpL6V.js} +1 -1
  39. package/dist/assets/{Index-K8gO-aDG.js → Index-DyQCQeVu.js} +1 -1
  40. package/dist/assets/{Index-B949lS_I.js → Index-KTOQydLC.js} +1 -1
  41. package/dist/assets/{Index-RJ2QKasP2.js → Index-W0Cbth_e2.js} +1 -1
  42. package/dist/assets/Index-_IvKFKcY.js +1 -0
  43. package/dist/assets/{Index-ME4gEbg6.js → Index-e5Pg9C7H.js} +1 -1
  44. package/dist/assets/Index-xq2Gci47.js +1 -0
  45. package/dist/assets/{Invitees-DbZu96Ko.js → Invitees-wd2nW0GB.js} +1 -1
  46. package/dist/assets/{List-CFcHC1BQ.js → List-CkOgFIfg.js} +1 -1
  47. package/dist/assets/{List-CeQcmnkV.js → List-DEw0xltu.js} +1 -1
  48. package/dist/assets/{List-DVafqPMb.js → List-QNPpC_sr.js} +1 -1
  49. package/dist/assets/{Main-CHVTmTmi.js → Main-DMBRhF8j.js} +1 -1
  50. package/dist/assets/{Model-9Iq2_30B.js → Model-DU8ABpbt.js} +1 -1
  51. package/dist/assets/{Navigator-DQw6TS7u.js → Navigator-C-3ZvfEa.js} +2 -2
  52. package/dist/assets/{NoTasks-BvxBJO_n.js → NoTasks-DgPpHfON.js} +1 -1
  53. package/dist/assets/{NotFound-Ces6ZqID.js → NotFound-BMoMFCwB.js} +1 -1
  54. package/dist/assets/{Pagination-CARpmT0K.js → Pagination-BDvzj9pL.js} +1 -1
  55. package/dist/assets/{Pay-Dz29D1-Q.js → Pay-Cxb8WV_y.js} +1 -1
  56. package/dist/assets/{Player-BT1OJI1o.js → Player-B4OZmqh9.js} +1 -1
  57. package/dist/assets/{Status-Co7VN9Zl.js → Status-ru9xTdh9.js} +1 -1
  58. package/dist/assets/{Subscribe-BkDoXW1c.js → Subscribe-BS75xqsd.js} +1 -1
  59. package/dist/assets/{TabSwitcher-C3Kf0k0t.js → TabSwitcher-CM-uPrwG.js} +1 -1
  60. package/dist/assets/Tts-QI_TGp5R.js +1 -0
  61. package/dist/assets/{VideoPlayer-BBb01skM.js → VideoPlayer-BMJgt1nn.js} +1 -1
  62. package/dist/assets/{avatar-B-kgl6b8.js → avatar-XhgOIdSJ.js} +1 -1
  63. package/dist/assets/{basic-NQnNaDEK.js → basic-rbZkwySN.js} +1 -1
  64. package/dist/assets/{chat-CCUl7-iP.js → chat-D0PEnKc5.js} +1 -1
  65. package/dist/assets/codingBridge-BBTz-LNk.js +1 -0
  66. package/dist/assets/codingBridge-BEdoIvhU.js +1 -0
  67. package/dist/assets/codingBridge-BJOs2wGl.js +1 -0
  68. package/dist/assets/codingBridge-Bb2vpBlj.js +1 -0
  69. package/dist/assets/codingBridge-Bg-bg7GC.js +1 -0
  70. package/dist/assets/codingBridge-BtUDmyf5.js +1 -0
  71. package/dist/assets/codingBridge-CapiE9kS.js +1 -0
  72. package/dist/assets/codingBridge-D0aUF3ys.js +1 -0
  73. package/dist/assets/codingBridge-DBHW6da0.js +1 -0
  74. package/dist/assets/codingBridge-DEIry9_G.js +2 -0
  75. package/dist/assets/codingBridge-DHBG8hRH.js +1 -0
  76. package/dist/assets/codingBridge-DPbhaNxe.js +1 -0
  77. package/dist/assets/codingBridge-DdWd-svT.js +1 -0
  78. package/dist/assets/codingBridge-DesQMnCS.js +1 -0
  79. package/dist/assets/codingBridge-DhU4hcRW.js +1 -0
  80. package/dist/assets/codingBridge-DyGBsBaQ.js +1 -0
  81. package/dist/assets/codingBridge-VBvS-ufO.js +1 -0
  82. package/dist/assets/codingBridge-cDeiH5ZF.js +1 -0
  83. package/dist/assets/codingBridge-gF-qCrm2.js +1 -0
  84. package/dist/assets/{collapse-DCoJLlkZ.js → collapse-kfuj8uXP.js} +1 -1
  85. package/dist/assets/{constants-vDFRJTq6.js → constants-C2ehd_ov.js} +1 -1
  86. package/dist/assets/{createTaskActions-CirZ3ZjL.js → createTaskActions-C_M-waEz.js} +1 -1
  87. package/dist/assets/{date-picker-DTkfZEzy.js → date-picker-DM7DY090.js} +1 -1
  88. package/dist/assets/{dropdown-ApRxFZDH.js → dropdown-CSZNqOKL.js} +1 -1
  89. package/dist/assets/{esm-DCuOb9aF.js → esm-2IrHjk9y.js} +1 -1
  90. package/dist/assets/{esm-BL86PSOV.js → esm-BR9NcgII.js} +3 -3
  91. package/dist/assets/{esm-DLn8-aqC.js → esm-CjxY7gsK.js} +1 -1
  92. package/dist/assets/{esm-D6UTzOcl.js → esm-Cp4vWvgm.js} +1 -1
  93. package/dist/assets/{esm-CQp8gSdR.js → esm-CqViCKeq.js} +2 -2
  94. package/dist/assets/{fish-D0XwmhC6.js → fish-BCZOGDBU.js} +1 -1
  95. package/dist/assets/{flux-Cq1tftwS.js → flux-BBlPM4n-.js} +1 -1
  96. package/dist/assets/{hailuo-BnEyKSHm.js → hailuo-iBvKjPzs.js} +1 -1
  97. package/dist/assets/{headshots-BPvvGwtB.js → headshots-Bh5kcvU0.js} +1 -1
  98. package/dist/assets/{image-DvjKNoxC.js → image-BPPkb2eq.js} +1 -1
  99. package/dist/assets/{index-Bpg44eWB.js → index-BkE6zZfO.js} +5 -5
  100. package/dist/assets/{index-BvmE2JX2.css → index-DzfCaX1N.css} +1 -1
  101. package/dist/assets/{index.browser.esm-DzBgLs84.js → index.browser.esm-Cg0rBOy0.js} +1 -1
  102. package/dist/assets/{index.es-D2Gtib5p.js → index.es-C68r3aRl.js} +1 -1
  103. package/dist/assets/{input-number-Oh-d0JaX.js → input-number-DUanhx78.js} +1 -1
  104. package/dist/assets/{kling-xSsQUjlg.js → kling-BgqPAeiX.js} +1 -1
  105. package/dist/assets/{luma-DDiKGWVj.js → luma-C33hAU4n.js} +1 -1
  106. package/dist/assets/{midjourney-Cd-twOLj.js → midjourney-d7Yh7smZ.js} +1 -1
  107. package/dist/assets/{nanobanana-DxY6uqP0.js → nanobanana-B5fjsOMa.js} +1 -1
  108. package/dist/assets/{openaiimage-BpVpztMb.js → openaiimage-Mey35hGy.js} +1 -1
  109. package/dist/assets/{pagination-BlR28kYu.js → pagination-Ch6Ip7cV.js} +1 -1
  110. package/dist/assets/{pika-D6ek_DUA.js → pika-BfMYhFxM.js} +1 -1
  111. package/dist/assets/{pixverse-NGrvOUF9.js → pixverse-CGIthx6c.js} +1 -1
  112. package/dist/assets/{popover-CcRl4vxr.js → popover-iuFyilQ-.js} +1 -1
  113. package/dist/assets/{producer-CvJ733bR.js → producer-D-borcA_.js} +1 -1
  114. package/dist/assets/{qrart-BBOZfldd.js → qrart-DO4M5K6a.js} +1 -1
  115. package/dist/assets/{row-pgH1L2rc.js → row-DgULQK_W.js} +1 -1
  116. package/dist/assets/{seedance-DfYwbJeD.js → seedance-fU1DxoKG.js} +1 -1
  117. package/dist/assets/{seedream-C7tpvM_U.js → seedream-Bw4fAnp2.js} +1 -1
  118. package/dist/assets/{select-BR8DyZel.js → select-DDvgcQGA.js} +1 -1
  119. package/dist/assets/{serp-BPd5r_IS.js → serp-CSf99xWs.js} +1 -1
  120. package/dist/assets/{slider-BZdPs70x.js → slider-B48RSIqk.js} +1 -1
  121. package/dist/assets/{solana-wallets-C5d77CHX.js → solana-wallets-Bo8yZA-8.js} +2 -2
  122. package/dist/assets/{solana-wallets-vue-Cy6CKdZs.js → solana-wallets-vue-CC5qs8gs.js} +1 -1
  123. package/dist/assets/{sora-BHfbeScD.js → sora-B_HB-DxF.js} +1 -1
  124. package/dist/assets/{suno-BSfRKrHj.js → suno-C5VBXOh0.js} +1 -1
  125. package/dist/assets/{switch-D1UMnFeG.js → switch-B1q1xj6W.js} +1 -1
  126. package/dist/assets/{tabs-DecpaDdx.js → tabs-DA45A2mE.js} +1 -1
  127. package/dist/assets/{upload-DD2n4P3p.js → upload-0VZ39tZO.js} +1 -1
  128. package/dist/assets/{veo-DRL8dCBY.js → veo-DvatGkKQ.js} +1 -1
  129. package/dist/assets/{wan-BCPd-DA5.js → wan-UDBgxT1Y.js} +1 -1
  130. package/dist/assets/{web-DqbD1cTl.js → web-BIQzgdCZ.js} +1 -1
  131. package/dist/assets/{web-D_OeX-rD.js → web-D2OrjM_z.js} +1 -1
  132. package/dist/assets/{web-VzzrXY4l.js → web-kRqbno-S.js} +1 -1
  133. package/dist/assets/{web-CVcqWo5X.js → web-z8ZyaWnW.js} +1 -1
  134. package/dist/assets/{webextrator-DjFiPf2q.js → webextrator-BEEj3h3M.js} +1 -1
  135. package/dist/index.html +3 -3
  136. package/package.json +1 -1
  137. package/dist/assets/Conversation-BUelWx1T.js +0 -3
  138. package/dist/assets/Index-B5G49g-6.js +0 -1
  139. package/dist/assets/Index-C50ClBNG.js +0 -1
  140. package/dist/assets/Index-DFTWHLYR.js +0 -1
  141. package/dist/assets/Index-DoThKXvJ.js +0 -1
  142. package/dist/assets/Index-a__Lr50W.js +0 -1
  143. package/dist/assets/Tts-B9a3WBQB.js +0 -1
  144. package/dist/assets/codingBridge-BCdY-7LL.js +0 -1
  145. package/dist/assets/codingBridge-BFvinfZm.js +0 -1
  146. package/dist/assets/codingBridge-BIk_g6XI.js +0 -1
  147. package/dist/assets/codingBridge-BNLPQfcB.js +0 -1
  148. package/dist/assets/codingBridge-BQpL36C8.js +0 -1
  149. package/dist/assets/codingBridge-BmF1iiRA.js +0 -1
  150. package/dist/assets/codingBridge-C4SdYcxG.js +0 -1
  151. package/dist/assets/codingBridge-C_zYqcPg.js +0 -1
  152. package/dist/assets/codingBridge-CcD-p5UZ.js +0 -1
  153. package/dist/assets/codingBridge-Cks2hxaa.js +0 -1
  154. package/dist/assets/codingBridge-ClZoc5vq.js +0 -1
  155. package/dist/assets/codingBridge-D-iSlWtJ.js +0 -1
  156. package/dist/assets/codingBridge-D2GU6WEK.js +0 -2
  157. package/dist/assets/codingBridge-DRvMxeh3.js +0 -1
  158. package/dist/assets/codingBridge-DcNEFGfM.js +0 -1
  159. package/dist/assets/codingBridge-DkAMWy7B.js +0 -1
  160. package/dist/assets/codingBridge-aimgP5u6.js +0 -1
  161. package/dist/assets/codingBridge-f6O1bx99.js +0 -1
  162. package/dist/assets/codingBridge-qsb1Bcs4.js +0 -1
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{$ as e,Bt as t,D as n,E as r,Ht as i,M as a,N as o,O as s,P as c,Q as l,Ut as u,X as d,et as f,k as p,lt as m,x as h,y as g}from"./vendor-chart-Df3WBvr0.js";import{t as _}from"./button-Diu_mJ2H.js";import{r as v,t as y}from"./select-BR8DyZel.js";import{t as b}from"./upload-DD2n4P3p.js";import{t as x}from"./tooltip-hII4wDEz.js";import{t as S}from"./image-DvjKNoxC.js";import{t as C}from"./alert-Cs6WDxgv.js";import{t as w}from"./drawer-B42T8GMw.js";import{t as T}from"./input-number-Oh-d0JaX.js";import{t as E}from"./switch-D1UMnFeG.js";import{At as D,Ct as O,Dt as k,Et as A,Jr as j,Mt as M,Ot as N,St as P,Tt as F,_t as ee,bt as te,ft as ne,gt as re,ht as ie,jt as ae,lt as oe,mt as se,pt as ce,ut as I,vt as L,wt as R,xt as z,yt as B}from"./constants-vDFRJTq6.js";import{At as V,Dt as H,E as U,Er as W,Mt as G,Nn as le,Ot as K,Xt as ue,gr as q,kt as de,yr as J}from"./index-Bpg44eWB.js";import{t as Y}from"./index.es-D2Gtib5p.js";import{t as fe}from"./CopyToClipboard-BvqdtQdo.js";import{t as X}from"./ImagePreview-Cel1agBC.js";import{t as pe}from"./BotPlaceholder-DdLK7DwC.js";import{i as Z,n as me,t as he}from"./pagination-BlR28kYu.js";import{n as ge,t as _e}from"./NoTasks-BvxBJO_n.js";import{t as ve}from"./Consumption-DiPiwllg.js";import{t as ye}from"./ApiCodeButton-DmgbbHgv.js";import{t as be}from"./ImageWrapper-D4L76WuX.js";import{t as xe}from"./VideoPlayer-BBb01skM.js";var Se=c({name:`LayoutSeedance`,components:{ElDrawer:w,ElButton:_,FontAwesomeIcon:Y},data(){return{drawer:!1}}}),Ce={class:`main flex flex-row flex-1`},we={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Te={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Ee(t,n,i,a,s,c){let l=f(`font-awesome-icon`),u=f(`el-button`),h=f(`el-drawer`);return d(),p(`div`,Ce,[r(`div`,we,[e(t.$slots,`config`,{},void 0,!0)]),r(`div`,Te,[e(t.$slots,`result`,{},void 0,!0)]),o(u,{circle:``,class:`menu`,onClick:n[0]||=e=>t.drawer=!0},{default:m(()=>[o(l,{icon:`fa-solid fa-magic`})]),_:1}),o(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`},{default:m(()=>[e(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var De=U(Se,[[`render`,Ee],[`__scopeId`,`data-v-caafd095`]]),Oe=c({name:`SeedancePromptInput`,components:{PromptTextarea:ge},computed:{prompt:{get(){return this.$store.state.seedance?.config?.prompt},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,prompt:e})}}},mounted(){this.prompt||=``}});function ke(e,t,r,i,a,o){let s=f(`prompt-textarea`);return d(),n(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`seedance.name.prompt`),info:e.$t(`seedance.description.prompt`),placeholder:e.$t(`seedance.placeholder.prompt`),"min-rows":5},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ae=U(Oe,[[`render`,ke]]),je=c({name:`SeedanceModelSelector`,components:{ElSelect:v,ElOption:y,InfoIcon:Z},data(){return{options:[{value:B,label:this.$t(`seedance.model.seedance20`)},{value:te,label:this.$t(`seedance.model.seedance20Fast`)},{value:L,label:this.$t(`seedance.model.seedance15pro`)},{value:re,label:this.$t(`seedance.model.seedance10pro`)},{value:ee,label:this.$t(`seedance.model.seedance10proFast`)},{value:ie,label:this.$t(`seedance.model.seedance10liteT2v`)},{value:se,label:this.$t(`seedance.model.seedance10liteI2v`)}]}},computed:{value:{get(){return this.$store.state.seedance?.config?.model},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,model:e})}}},mounted(){this.value||=oe}}),Me={class:`field`},Ne={class:`label`},Pe={class:`box`},Fe={class:`title font-bold`};function Ie(e,t,i,a,s,c){let g=f(`info-icon`),_=f(`el-option`),v=f(`el-select`);return d(),p(`div`,Me,[r(`div`,Ne,[r(`div`,Pe,[r(`h2`,Fe,u(e.$t(`seedance.name.model`)),1),o(g,{content:e.$t(`seedance.description.model`),class:`info`},null,8,[`content`])])]),o(v,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`seedance.placeholder.select`)},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Le=U(je,[[`render`,Ie],[`__scopeId`,`data-v-61816a81`]]),Re=c({name:`SeedanceDurationSelector`,components:{ElSelect:v,ElOption:y,InfoIcon:Z},data(){return{options:[{value:2,label:`2s`},{value:3,label:`3s`},{value:4,label:`4s`},{value:5,label:`5s`},{value:6,label:`6s`},{value:7,label:`7s`},{value:8,label:`8s`},{value:9,label:`9s`},{value:10,label:`10s`},{value:11,label:`11s`},{value:12,label:`12s`}]}},computed:{value:{get(){return this.$store.state.seedance?.config?.duration},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,duration:e})}}},mounted(){this.value||=5}}),ze={class:`field`},Be={class:`label`},Ve={class:`box`},He={class:`title font-bold`};function Ue(e,t,i,a,s,c){let g=f(`info-icon`),_=f(`el-option`),v=f(`el-select`);return d(),p(`div`,ze,[r(`div`,Be,[r(`div`,Ve,[r(`h2`,He,u(e.$t(`seedance.name.duration`)),1),o(g,{content:e.$t(`seedance.description.duration`),class:`info`},null,8,[`content`])])]),o(v,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`seedance.placeholder.select`)},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var We=U(Re,[[`render`,Ue],[`__scopeId`,`data-v-5c809a72`]]),Ge=N,Q={[k]:0,[N]:1,[A]:2},Ke=c({name:`SeedanceResolutionSelector`,components:{InfoIcon:Z,ElTooltip:x},computed:{model(){return this.$store.state.seedance?.config?.model},capability(){return M(this.model)},isLiteModel(){return typeof this.model==`string`&&this.model.includes(`-lite-`)},options(){let e=[{value:k,label:`480p`},{value:N,label:`720p`},{value:A,label:`1080p`}],t=this.isLiteModel;return e.map(e=>({...e,disabled:t&&Q[e.value]>Q[Ge]}))},value:{get(){return this.$store.state.seedance?.config?.resolution},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,resolution:e})}}},watch:{model(){this.clampValue()}},mounted(){this.value?this.clampValue():this.value=this.capability.defaultResolution||`720p`},methods:{onSelect(e){e.disabled||(this.value=e.value)},clampValue(){let e=this.value,t=this.options.find(t=>t.value===e);(!e||t&&t.disabled)&&(this.value=this.capability.defaultResolution||`720p`)}}}),qe={class:`resolution`},Je={class:`header`},Ye={class:`title font-bold`},Xe={class:`items`},Ze=[`onClick`];function Qe(e,i,a,s,c,g){let _=f(`info-icon`),v=f(`el-tooltip`);return d(),p(`div`,qe,[r(`div`,Je,[r(`h2`,Ye,u(e.$t(`seedance.name.resolution`)),1),o(_,{content:e.$t(`seedance.description.resolution`),class:`info`},null,8,[`content`])]),r(`div`,Xe,[(d(!0),p(h,null,l(e.options,i=>(d(),n(v,{key:i.value,content:e.$t(`seedance.message.resolutionNotSupported`),disabled:!i.disabled,placement:`top`},{default:m(()=>[r(`div`,{class:t([`item`,{active:e.value===i.value,disabled:i.disabled}]),onClick:t=>e.onSelect(i)},u(i.label),11,Ze)]),_:2},1032,[`content`,`disabled`]))),128))])])}var $e=U(Ke,[[`render`,Qe],[`__scopeId`,`data-v-fd8d4e4b`]]),et=c({name:`SeedanceRatioSelector`,components:{InfoIcon:Z},computed:{options(){return[{value:P,label:`16:9`,w:32,h:18},{value:R,label:`9:16`,w:18,h:32},{value:`4:3`,label:`4:3`,w:28,h:21},{value:`3:4`,label:`3:4`,w:21,h:28},{value:`1:1`,label:`1:1`,w:24,h:24},{value:O,label:`21:9`,w:34,h:14},{value:F,label:this.$t(`seedance.ratio.adaptive`),w:0,h:0}]},value:{get(){return this.$store.state.seedance?.config?.ratio},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,ratio:e})}}},mounted(){this.value||=I}}),tt={class:`ratio`},nt={class:`header`},rt={class:`title font-bold`},it={class:`items`},at=[`onClick`],ot={class:`preview`},st={key:1,class:`rect rect-auto`},ct={class:`name`};function lt(e,n,a,s,c,m){let g=f(`info-icon`);return d(),p(`div`,tt,[r(`div`,nt,[r(`h2`,rt,u(e.$t(`seedance.name.ratio`)),1),o(g,{content:e.$t(`seedance.description.ratio`),class:`info`},null,8,[`content`])]),r(`div`,it,[(d(!0),p(h,null,l(e.options,n=>(d(),p(`div`,{key:n.value,class:t([`item`,{active:e.value===n.value}]),onClick:t=>e.value=n.value},[r(`div`,ot,[n.w&&n.h?(d(),p(`div`,{key:0,class:`rect`,style:i({width:n.w+`px`,height:n.h+`px`})},null,4)):(d(),p(`div`,st,`A`))]),r(`div`,ct,u(n.label),1)],10,at))),128))])])}var ut=U(et,[[`render`,lt],[`__scopeId`,`data-v-8ddec2dd`]]),dt=c({name:`SeedanceGenerateAudioSwitch`,components:{ElSwitch:E,InfoIcon:Z},computed:{isSupported(){let e=this.$store.state.seedance?.config?.model;return M(e).acceptsAudio},value:{get(){return this.$store.state.seedance?.config?.generate_audio??!1},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,generate_audio:e})}}},watch:{isSupported(e){!e&&this.value&&(this.value=!1)}},mounted(){this.value===void 0&&(this.value=!1)}}),ft={key:0,class:`field`},pt={class:`label`},mt={class:`box`},ht={class:`title font-bold`},gt={class:`value`};function _t(e,t,n,i,a,c){let l=f(`info-icon`),m=f(`el-switch`);return e.isSupported?(d(),p(`div`,ft,[r(`div`,pt,[r(`div`,mt,[r(`h2`,ht,u(e.$t(`seedance.name.generateAudio`)),1),o(l,{content:e.$t(`seedance.description.generateAudio`),class:`info`},null,8,[`content`])])]),r(`div`,gt,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,"inline-prompt":``,"active-text":e.$t(`seedance.button.on`),"inactive-text":e.$t(`seedance.button.off`)},null,8,[`modelValue`,`active-text`,`inactive-text`])])])):s(``,!0)}var vt=U(dt,[[`render`,_t],[`__scopeId`,`data-v-df51dfbd`]]),yt=c({name:`SeedanceCameraFixedSwitch`,components:{ElSwitch:E,InfoIcon:Z},computed:{value:{get(){return this.$store.state.seedance?.config?.camerafixed??!1},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,camerafixed:e})}}},mounted(){this.$store.state.seedance?.config?.camerafixed===void 0&&(this.value=!1)}}),bt={class:`field`},xt={class:`label`},St={class:`box`},Ct={class:`title font-bold`},wt={class:`value`};function Tt(e,t,n,i,a,s){let c=f(`info-icon`),l=f(`el-switch`);return d(),p(`div`,bt,[r(`div`,xt,[r(`div`,St,[r(`h2`,Ct,u(e.$t(`seedance.name.cameraFixed`)),1),o(c,{content:e.$t(`seedance.description.cameraFixed`),class:`info`},null,8,[`content`])])]),r(`div`,wt,[o(l,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,"inline-prompt":``,"active-text":e.$t(`seedance.button.on`),"inactive-text":e.$t(`seedance.button.off`)},null,8,[`modelValue`,`active-text`,`inactive-text`])])])}var Et=U(yt,[[`render`,Tt],[`__scopeId`,`data-v-ae777d61`]]),Dt=c({name:`SeedanceFirstFrameImage`,components:{ElUpload:b,ElButton:_,InfoIcon:Z,FontAwesomeIcon:Y,ImagePreview:X},mixins:[V,K],data(){return{fileList:[],uploadUrl:J()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},model(){return this.$store.state.seedance?.config?.model},capability(){return M(this.model)},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{"capability.acceptsImage"(e){e||(this.fileList=[],this.onSetFirstFrameUrl())}},methods:{onExceed(){W.warning(this.$t(`seedance.message.uploadExceed`))},onError(){W.error(this.$t(`seedance.message.uploadError`))},onSetFirstFrameUrl(){let e=this.urls?.[0],t=(this.$store.state.seedance?.config?.images||[]).filter(e=>e?.role!==`first_frame`);e&&t.push({url:e,role:`first_frame`}),this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,images:t.length>0?t:void 0})},async onSuccess(){this.onSetFirstFrameUrl()},async onRemove(){this.onSetFirstFrameUrl()}}}),Ot={key:0,class:`relative`},kt={class:`flex justify-between`},At={class:`flex justify-start items-center`},jt={class:`text-sm font-bold`},Mt={key:0,class:`required-badge`};function Nt(e,t,i,c,l,h){let g=f(`info-icon`),_=f(`image-preview`),v=f(`font-awesome-icon`),y=f(`el-button`),b=f(`el-upload`);return e.capability.acceptsImage?(d(),p(`div`,Ot,[r(`div`,kt,[r(`div`,At,[r(`span`,jt,u(e.$t(`seedance.name.firstFrame`)),1),e.capability.requiresImage?(d(),p(`span`,Mt,u(e.$t(`seedance.name.required`)),1)):s(``,!0),o(g,{content:e.$t(`seedance.description.firstFrame`)},null,8,[`content`])])]),o(b,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,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,"on-remove":e.onRemove,headers:e.headers},{file:m(({file:t})=>[t.url&&t.percentage!==void 0?(d(),n(_,{key:0,url:t.url,name:t.name,percentage:t.percentage,onRemove:n=>e.fileList.splice(e.fileList.indexOf(t),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):s(``,!0)]),default:m(()=>[o(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[o(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+u(e.$t(`seedance.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`on-remove`,`headers`])])):s(``,!0)}var Pt=U(Dt,[[`render`,Nt],[`__scopeId`,`data-v-e2597f23`]]),Ft=c({name:`SeedanceLastFrameImage`,components:{ElUpload:b,ElButton:_,ImagePreview:X,InfoIcon:Z,FontAwesomeIcon:Y},mixins:[V,K],data(){return{fileList:[],uploadUrl:J()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},model(){return this.$store.state.seedance?.config?.model},capability(){return M(this.model)},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{"capability.acceptsLastFrame"(e){e||(this.fileList=[],this.onSetLastFrameUrl())}},methods:{onExceed(){W.warning(this.$t(`seedance.message.uploadExceed`))},onError(){W.error(this.$t(`seedance.message.uploadError`))},onSetLastFrameUrl(){let e=this.urls?.[0],t=(this.$store.state.seedance?.config?.images||[]).filter(e=>e?.role!==`last_frame`);e&&t.push({url:e,role:`last_frame`}),this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,images:t.length>0?t:void 0})},async onSuccess(){this.onSetLastFrameUrl()},async onRemove(){this.onSetLastFrameUrl()}}}),It={key:0,class:`relative`},Lt={class:`flex justify-between`},Rt={class:`flex justify-start items-center`},zt={class:`text-sm font-bold`};function Bt(e,t,i,c,l,h){let g=f(`info-icon`),_=f(`image-preview`),v=f(`font-awesome-icon`),y=f(`el-button`),b=f(`el-upload`);return e.capability.acceptsLastFrame?(d(),p(`div`,It,[r(`div`,Lt,[r(`div`,Rt,[r(`span`,zt,u(e.$t(`seedance.name.lastFrame`)),1),o(g,{content:e.$t(`seedance.description.lastFrame`)},null,8,[`content`])])]),o(b,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,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,"on-remove":e.onRemove,headers:e.headers},{file:m(({file:t})=>[t.url&&t.percentage!==void 0?(d(),n(_,{key:0,url:t.url,name:t.name,percentage:t.percentage,onRemove:n=>e.fileList.splice(e.fileList.indexOf(t),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):s(``,!0)]),default:m(()=>[o(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[o(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+u(e.$t(`seedance.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`on-remove`,`headers`])])):s(``,!0)}var Vt=U(Ft,[[`render`,Bt],[`__scopeId`,`data-v-3a191e51`]]),Ht=c({name:`SeedanceServiceTierSelector`,components:{ElSelect:v,ElOption:y,InfoIcon:Z},data(){return{options:[{value:D,label:this.$t(`seedance.serviceTier.default`)},{value:ae,label:this.$t(`seedance.serviceTier.flex`)}]}},computed:{value:{get(){return this.$store.state.seedance?.config?.service_tier},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,service_tier:e})}}},mounted(){this.value||=ne}}),Ut={class:`field`},Wt={class:`label`},Gt={class:`box`},Kt={class:`title font-bold`};function qt(e,t,i,a,s,c){let g=f(`info-icon`),_=f(`el-option`),v=f(`el-select`);return d(),p(`div`,Ut,[r(`div`,Wt,[r(`div`,Gt,[r(`h2`,Kt,u(e.$t(`seedance.name.serviceTier`)),1),o(g,{content:e.$t(`seedance.description.serviceTier`),class:`info`},null,8,[`content`])])]),o(v,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`seedance.placeholder.select`)},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Jt=U(Ht,[[`render`,qt],[`__scopeId`,`data-v-cc938de2`]]),Yt=c({name:`SeedanceReturnLastFrameSwitch`,components:{ElSwitch:E,InfoIcon:Z},computed:{model(){return this.$store.state.seedance?.config?.model},isSupported(){return M(this.model).acceptsReturnLastFrame},value:{get(){return this.$store.state.seedance?.config?.return_last_frame},set(e){this.$store.commit(`seedance/setConfig`,{...this.$store.state.seedance?.config,return_last_frame:e})}}},watch:{isSupported(e){!e&&this.value&&(this.value=!1)}},mounted(){this.value===void 0&&(this.value=!1)}}),Xt={key:0,class:`field`},Zt={class:`label`},Qt={class:`box`},$t={class:`title font-bold`},en={class:`value`};function tn(e,t,n,i,a,c){let l=f(`info-icon`),m=f(`el-switch`);return e.isSupported?(d(),p(`div`,Xt,[r(`div`,Zt,[r(`div`,Qt,[r(`h2`,$t,u(e.$t(`seedance.name.returnLastFrame`)),1),o(l,{content:e.$t(`seedance.description.returnLastFrame`),class:`info`},null,8,[`content`])])]),r(`div`,en,[o(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,"inline-prompt":``,"active-text":e.$t(`seedance.button.on`),"inactive-text":e.$t(`seedance.button.off`)},null,8,[`modelValue`,`active-text`,`inactive-text`])])])):s(``,!0)}var nn=U(Yt,[[`render`,tn],[`__scopeId`,`data-v-edea5451`]]),rn=c({name:`SeedanceSeedInput`,components:{ElInputNumber:T,InfoIcon:Z},computed:{value:{get(){let e=this.$store.state.seedance?.config?.seed;return typeof e==`number`?e:-1},set(e){let t={...this.$store.state.seedance?.config||{}};t.seed=typeof e==`number`&&Number.isInteger(e)?e:-1,this.$store.commit(`seedance/setConfig`,t)}}}}),an={class:`field`},on={class:`label`},sn={class:`box`},cn={class:`title font-bold`},ln={class:`value`};function un(e,t,n,i,a,s){let c=f(`info-icon`),l=f(`el-input-number`);return d(),p(`div`,an,[r(`div`,on,[r(`div`,sn,[r(`h2`,cn,u(e.$t(`seedance.name.seed`)),1),o(c,{content:e.$t(`seedance.description.seed`),class:`info`},null,8,[`content`])])]),r(`div`,ln,[o(l,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,min:-1,max:2147483647,step:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`])])])}var dn=c({name:`SeedanceConfigPanel`,components:{ElButton:_,FontAwesomeIcon:Y,PromptInput:Ae,ModelSelector:Le,DurationSelector:We,ResolutionSelector:$e,RatioSelector:ut,GenerateAudioSwitch:vt,CameraFixedSwitch:Et,ServiceTierSelector:Jt,ReturnLastFrameSwitch:nn,SeedInput:U(rn,[[`render`,un],[`__scopeId`,`data-v-685a9869`]]),FirstFrameImage:Pt,LastFrameImage:Vt,Consumption:ve},emits:[`generate`],computed:{config(){return this.$store.state.seedance?.config},consumption(){return G(this.config,this.service?.cost)},service(){return this.$store.state.seedance?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),fn={class:`flex flex-col h-full`},pn={class:`flex-1 overflow-y-auto p-5`},mn={class:`flex flex-col items-center justify-center px-5 pb-5`};function hn(e,t,n,i,s,c){let l=f(`prompt-input`),h=f(`model-selector`),g=f(`ratio-selector`),_=f(`resolution-selector`),v=f(`duration-selector`),y=f(`service-tier-selector`),b=f(`generate-audio-switch`),x=f(`camera-fixed-switch`),S=f(`return-last-frame-switch`),C=f(`seed-input`),w=f(`first-frame-image`),T=f(`last-frame-image`),E=f(`consumption`),D=f(`font-awesome-icon`),O=f(`el-button`);return d(),p(`div`,fn,[r(`div`,pn,[o(l,{class:`mb-4`}),o(h,{class:`mb-4`}),o(g,{class:`mb-4`}),o(_,{class:`mb-4`}),o(v,{class:`mb-4`}),o(y,{class:`mb-4`}),o(b,{class:`mb-4`}),o(x,{class:`mb-4`}),o(S,{class:`mb-4`}),o(C,{class:`mb-4`}),o(w,{class:`mb-2`}),o(T,{class:`mb-2`})]),r(`div`,mn,[o(E,{value:e.consumption,service:e.service},null,8,[`value`,`service`]),o(O,{type:`primary`,class:`btn w-full`,round:``,onClick:e.onGenerate},{default:m(()=>[o(D,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+u(e.$t(`seedance.button.generate`)),1)]),_:1},8,[`onClick`])])])}var gn=U(dn,[[`render`,hn]]),_n=c({name:`SeedanceTaskPreview`,components:{ElImage:S,CopyToClipboard:fe,FontAwesomeIcon:Y,ElAlert:C,VideoPlayer:xe,ElTooltip:x,ElButton:_,ImageWrapper:be,ImagePreview:X,ApiCodeButton:ye},props:{modelValue:{type:Object,required:!0}},data(){return{seedanceLogo:ce}},computed:{video(){return this.modelValue?.response?.data},referenceImages(){let e=this.modelValue?.request?.images;if(!Array.isArray(e))return[];let t=[],n=e.find(e=>e?.role===`first_frame`);n?.url&&t.push({url:n.url,name:`first-frame`});let r=e.find(e=>e?.role===`last_frame`);return r?.url&&t.push({url:r.url,name:`last-frame`}),e.forEach((e,n)=>{e?.url&&e.role!==`first_frame`&&e.role!==`last_frame`&&t.push({url:e.url,name:e.role||`image-${n}`})}),t}},methods:{onDownload(e){window.open(e,`_blank`)}}}),vn={class:`preview`},yn={class:`left`},bn={class:`main`},xn={class:`bot`},Sn={class:`datetime`},Cn={class:`info`},wn={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Tn={key:1,class:`prompt mt-2`},En={key:0},Dn={key:1},On={key:0,class:t({content:!0})},kn={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},An={key:1,class:t({content:!0})},jn={key:0,class:`mb-4`},Mn={key:1,class:`mb-4`},Nn={key:2,class:t({operations:!0,"mt-2":!0,"mb-2":!0})},Pn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Fn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},In={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ln={key:0},Rn={key:1},zn={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Bn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Vn={key:5,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Hn={key:2,class:t({content:!0})},Un={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Wn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Gn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Kn={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},qn={key:3,class:t({content:!0})},Jn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Yn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Xn(e,t,i,c,_,v){let y=f(`el-image`),b=f(`image-preview`),x=f(`font-awesome-icon`),S=f(`copy-to-clipboard`),C=f(`el-alert`),w=f(`video-player`),T=f(`image-wrapper`),E=f(`el-button`),D=f(`el-tooltip`),O=f(`api-code-button`);return d(),p(`div`,vn,[r(`div`,yn,[o(y,{src:e.seedanceLogo,class:`avatar`},null,8,[`src`])]),r(`div`,bn,[r(`div`,xn,[a(u(e.$t(`seedance.name.seedanceBot`))+` `,1),r(`span`,Sn,u(e.$dayjs.format(``+new Date(parseFloat((e.modelValue?.created_at||``).toString())*1e3))),1)]),r(`div`,Cn,[e.referenceImages.length>0?(d(),p(`div`,wn,[(d(!0),p(h,null,l(e.referenceImages,(e,t)=>(d(),n(b,{key:t,url:e.url,name:e.name,closable:!1},null,8,[`url`,`name`]))),128))])):s(``,!0),e.modelValue?.request?.prompt?(d(),p(`p`,Tn,[a(u(e.modelValue?.request?.prompt)+` `,1),e.modelValue?.response?e.video?.status===`processing`||e.video?.status===`pending`?(d(),p(`span`,Dn,` - (`+u(e.$t(`seedance.status.processing`))+`) `,1)):s(``,!0):(d(),p(`span`,En,` - (`+u(e.$t(`seedance.status.pending`))+`) `,1))])):s(``,!0)]),e.modelValue?.response?e.modelValue?.response?.success===!0?(d(),p(`div`,An,[e.video?.video_url?(d(),p(`div`,jn,[o(w,{src:e.video?.video_url},null,8,[`src`])])):s(``,!0),e.video?.last_frame_url?(d(),p(`div`,Mn,[o(T,{src:e.video?.last_frame_url,"raw-src":e.video?.last_frame_url},null,8,[`src`,`raw-src`])])):s(``,!0),e.video?.video_url?(d(),p(`div`,Nn,[o(D,{class:`box-item`,effect:`dark`,content:e.$t(`seedance.message.downloadVideo`),placement:`top-start`},{default:m(()=>[o(E,{type:`info`,size:`small`,class:`btn-action`,onClick:t[0]||=g(t=>e.onDownload(e.video?.video_url),[`stop`])},{default:m(()=>[a(u(e.$t(`seedance.button.download`)),1)]),_:1})]),_:1},8,[`content`]),o(O,{path:`/seedance/videos`,body:e.modelValue?.request},null,8,[`body`])])):s(``,!0),o(C,{closable:!1,class:`mt-2 success`},{default:m(()=>[e.modelValue?.request?.model?(d(),p(`p`,Pn,[o(x,{icon:`fa-solid fa-cube`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.model`))+`: `+u(e.modelValue?.request?.model),1)])):s(``,!0),e.video?.duration?(d(),p(`p`,Fn,[o(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.duration`))+`: `+u(e.video?.duration)+`s `,1)])):s(``,!0),e.video?.resolution?(d(),p(`p`,In,[o(x,{icon:`fa-solid fa-expand`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.resolution`))+`: `+u(e.video?.resolution)+` `,1),e.video?.ratio?(d(),p(`span`,Ln,` · `+u(e.video?.ratio),1)):s(``,!0),e.video?.framespersecond?(d(),p(`span`,Rn,` · `+u(e.video?.framespersecond)+`fps`,1)):s(``,!0)])):s(``,!0),e.modelValue?.request?.generate_audio?(d(),p(`p`,zn,[o(x,{icon:`fa-solid fa-volume-up`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.generateAudio`))+`: `+u(e.$t(`seedance.button.on`)),1)])):s(``,!0),r(`p`,Bn,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),e.modelValue?.elapsed?(d(),p(`p`,$,[o(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.elapsed`))+`: `+u(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):s(``,!0),e.modelValue?.response?.trace_id?(d(),p(`p`,Vn,[o(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.traceId`))+`: `+u(e.modelValue?.response?.trace_id)+` `,1),o(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):s(``,!0)]),_:1})])):e.modelValue?.response?.success===!1?(d(),p(`div`,Hn,[o(C,{closable:!1,class:`failure`},{template:m(()=>[o(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.failure`)),1)]),default:m(()=>[r(`p`,Un,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),e.modelValue?.response?.error?.message?(d(),p(`p`,Wn,[o(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.failureReason`))+`: `+u(e.modelValue?.response?.error?.message)+` `,1),o(S,{content:e.modelValue?.response?.error?.message,class:`btn-copy inline-block`},null,8,[`content`])])):s(``,!0),e.modelValue?.elapsed?(d(),p(`p`,Gn,[o(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.elapsed`))+`: `+u(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):s(``,!0),e.modelValue?.response?.trace_id?(d(),p(`p`,Kn,[o(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.traceId`))+`: `+u(e.modelValue?.response?.trace_id)+` `,1),o(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):s(``,!0)]),_:1})])):(d(),p(`div`,qn,[o(C,{closable:!1,class:`info`},{template:m(()=>[o(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.status`)),1)]),default:m(()=>[r(`p`,Jn,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),e.modelValue?.response?.trace_id?(d(),p(`p`,Yn,[o(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.traceId`))+`: `+u(e.modelValue?.response?.trace_id)+` `,1),o(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):s(``,!0)]),_:1})])):(d(),p(`div`,On,[o(C,{closable:!1,class:`info`},{template:m(()=>[o(x,{icon:`fa-regular fa-clock`,class:`mr-1`}),a(` `+u(e.$t(`seedance.status.pending`)),1)]),default:m(()=>[r(`p`,kn,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`seedance.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])])]),_:1})]))])])}var Zn=c({name:`SeedanceRecentPanel`,components:{TaskPreview:U(_n,[[`render`,Xn],[`__scopeId`,`data-v-8b7e10f0`]]),BotPlaceholder:pe,NoTasks:_e,ScrollList:me},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.seedance?.tasks,items:this.$store.state.seedance?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Qn={key:0},$n={key:2,class:`w-full h-full flex items-center justify-center`};function er(e,t,r,i,a,c){let u=f(`bot-placeholder`),g=f(`task-preview`),_=f(`scroll-list`),v=f(`no-tasks`);return d(),p(h,null,[e.tasks?.items===void 0?(d(),p(`div`,Qn,[o(u)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(d(),n(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:m(()=>[(d(!0),p(h,null,l(e.tasks?.items,e=>(d(),n(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):s(``,!0),e.tasks?.items?.length===0?(d(),p(`div`,$n,[o(v)])):s(``,!0)],64)}var tr=U(Zn,[[`render`,er]]),nr=j(`seedance`),rr=c({name:`SeedanceIndex`,components:{ConfigPanel:gn,Layout:De,RecentPanel:tr},mixins:[de],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.seedance?.status?.getApplications===q.Request},tasksLoading(){return this.$store.state.seedance?.status?.getTasks===q.Request||this.fetchingTasks},credential(){return this.$store.state.seedance?.credential},config(){return this.$store.state.seedance?.config},tasks(){return this.$store.state.seedance?.tasks}},watch:{initialized:{async handler(e){e&&(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 he({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(){await this.$store.dispatch(`seedance/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`seedance/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!H(this.uploadTracker,e=>this.$t(e),e=>W.warning(e)))return;let e={...this.config||{}};if(typeof e?.prompt==`string`&&(e.prompt=e.prompt.trim(),e.prompt||delete e.prompt),Array.isArray(e?.images)){e.images=e.images.filter(e=>!!e?.url);let t=e.images.some(e=>e?.role===`first_frame`),n=e.images.some(e=>e?.role===`last_frame`);!t&&n&&(e.images=e.images.map(e=>e?.role===`last_frame`?{...e,role:`first_frame`}:e))}let t=Array.isArray(e?.images)&&e.images.length>0;if(!t&&`images`in e&&delete e.images,e?.model&&!z[e.model]){W.warning(this.$t(`seedance.message.modelUnsupported`));return}let n=M(e?.model);if(n.requiresImage&&!t){W.warning(this.$t(`seedance.message.modelRequiresImage`));return}if(!n.acceptsImage&&t){W.warning(this.$t(`seedance.message.modelRejectsImage`));return}if(!n.acceptsText&&!t){W.warning(this.$t(`seedance.message.modelRequiresImage`));return}!n.acceptsAudio&&e.generate_audio&&(e.generate_audio=!1),!n.acceptsReturnLastFrame&&e.return_last_frame&&(e.return_last_frame=!1),!n.acceptsLastFrame&&t&&(e.images=e.images.filter(e=>e?.role!==`last_frame`));let r={...e,callback_url:nr},i=this.credential?.token;if(!i){console.error(`no token specified`);return}W.info(this.$t(`seedance.message.startingTask`)),le(`seedance`,ue.generate(r,{token:i})).then(()=>{W.success(this.$t(`seedance.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?W.error(this.$t(`seedance.message.usedUp`)):W.error(this.$t(`seedance.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function ir(e,t,r,i,a,s){let c=f(`config-panel`),l=f(`recent-panel`),u=f(`layout`);return d(),n(u,null,{config:m(()=>[o(c,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:m(()=>[o(l,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var ar=U(rr,[[`render`,ir]]);export{ar as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{$ as e,Bt as t,D as n,E as r,M as i,N as a,O as o,P as s,Q as c,Ut as l,X as u,et as d,k as f,lt as p,x as m,y as h}from"./vendor-chart-Df3WBvr0.js";import{t as g}from"./button-Diu_mJ2H.js";import{n as _,r as v,t as y}from"./select-BR8DyZel.js";import{t as b}from"./upload-DD2n4P3p.js";import{t as x}from"./tooltip-hII4wDEz.js";import{t as S}from"./image-DvjKNoxC.js";import{t as C}from"./alert-Cs6WDxgv.js";import{t as w}from"./drawer-B42T8GMw.js";import{t as T}from"./input-number-Oh-d0JaX.js";import{t as E}from"./switch-D1UMnFeG.js";import{Bt as D,Gt as O,Ht as ee,It as k,Jr as te,Lt as A,Nt as j,Pt as M,Rt as N,Vt as P,Wt as F,zt as I}from"./constants-vDFRJTq6.js";import{At as ne,Dt as re,E as L,Er as R,Mt as z,Nn as B,Ot as V,Tr as H,Zt as U,gr as W,kt as G,yr as K}from"./index-Bpg44eWB.js";import{t as q}from"./index.es-D2Gtib5p.js";import{t as J}from"./CopyToClipboard-BvqdtQdo.js";import{t as Y}from"./ImagePreview-Cel1agBC.js";import{t as X}from"./BotPlaceholder-DdLK7DwC.js";import{i as Z,n as ie,t as ae}from"./pagination-BlR28kYu.js";import{n as oe,t as se}from"./NoTasks-BvxBJO_n.js";import{t as ce}from"./Consumption-DiPiwllg.js";import{t as le}from"./ApiCodeButton-DmgbbHgv.js";import{t as ue}from"./ImageWrapper-D4L76WuX.js";var de=s({name:`LayoutSeedream`,components:{ElDrawer:w,ElButton:g,FontAwesomeIcon:q},data(){return{drawer:!1}}}),fe={class:`main flex flex-row flex-1`},pe={class:`config w-[320px] h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},me={class:`result h-full p-6 flex-1 flex flex-col bg-[var(--app-content-bg)]`};function he(t,n,i,o,s,c){let l=d(`font-awesome-icon`),m=d(`el-button`),h=d(`el-drawer`);return u(),f(`div`,fe,[r(`div`,pe,[e(t.$slots,`config`,{},void 0,!0)]),r(`div`,me,[e(t.$slots,`result`,{},void 0,!0)]),a(m,{circle:``,class:`menu`,onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(l,{icon:`fa-solid fa-magic`})]),_:1}),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer`},{default:p(()=>[e(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var ge=L(de,[[`render`,he],[`__scopeId`,`data-v-f2a6eb9e`]]),_e=s({name:`SeedreamPromptInput`,components:{PromptTextarea:oe},computed:{prompt:{get(){return this.$store.state.seedream?.config?.prompt},set(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,prompt:e})}}},mounted(){this.prompt||=``}});function ve(e,t,r,i,a,o){let s=d(`prompt-textarea`);return u(),n(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`seedream.name.prompt`),info:e.$t(`seedream.description.prompt`),placeholder:e.$t(`seedream.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var ye=L(_e,[[`render`,ve]]),be={image:!0,imageRequired:!1,sizeTiers:[`1K`,`2K`,`3K`,`4K`],sizeAdaptive:!0,sizePixel:!0,sizePixelDefault:void 0,groupGeneration:!1,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};function Q(e){switch(e){case I:return{image:!0,imageRequired:!1,sizeTiers:[`2K`,`3K`,`4K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!0,tools:!0};case N:return{image:!0,imageRequired:!1,sizeTiers:[`2K`,`4K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};case A:return{image:!0,imageRequired:!1,sizeTiers:[`1K`,`2K`,`4K`],sizeAdaptive:!0,sizePixel:!0,groupGeneration:!0,seed:!1,guidanceScale:!1,outputFormat:!1,tools:!1};case k:return{image:!1,imageRequired:!1,sizeTiers:[],sizeAdaptive:!1,sizePixel:!0,sizePixelDefault:`1024x1024`,groupGeneration:!1,seed:!0,guidanceScale:!0,guidanceScaleDefault:M[k],outputFormat:!1,tools:!1};case D:return{image:!0,imageRequired:!0,sizeTiers:[],sizeAdaptive:!1,sizePixel:!0,sizePixelDefault:`1024x1024`,groupGeneration:!1,seed:!1,guidanceScale:!0,guidanceScaleDefault:M[D],outputFormat:!1,tools:!1};default:return be}}var xe=[`1K`,`2K`,`3K`,`4K`];function Se(e,t){if(!e)return[];let n=t.model??e.model;if(!n)return[];let r=Q(n),i=[];Array.isArray(e.image)&&e.image.length>0&&!r.image&&i.push({field:`image`,i18nLabel:`seedream.name.imageUrls`});let a=typeof e.size==`string`?e.size:void 0;if(a){let e=a.toUpperCase();(xe.includes(e)&&!r.sizeTiers.includes(e)||a===`adaptive`&&!r.sizeAdaptive)&&i.push({field:`size`,i18nLabel:`seedream.name.size`})}return e.sequential_image_generation===`auto`&&!r.groupGeneration&&i.push({field:`sequential_image_generation`,i18nLabel:`seedream.name.maxImages`}),e.seed!==void 0&&e.seed!==null&&!r.seed&&i.push({field:`seed`,i18nLabel:`seedream.name.seed`}),e.guidance_scale!==void 0&&e.guidance_scale!==null&&!r.guidanceScale&&i.push({field:`guidance_scale`,i18nLabel:`seedream.name.guidanceScale`}),e.output_format&&!r.outputFormat&&i.push({field:`output_format`,i18nLabel:`seedream.name.outputFormat`}),Array.isArray(e.tools)&&e.tools.length>0&&!r.tools&&i.push({field:`tools`,i18nLabel:`seedream.name.tools`}),i}function Ce(e,t,n){let r={...e},i=Q(n.model??e.model);for(let e of t)switch(e.field){case`image`:delete r.image;break;case`size`:i.sizePixelDefault?r.size=i.sizePixelDefault:delete r.size;break;case`sequential_image_generation`:r.sequential_image_generation=`disabled`,delete r.sequential_image_generation_options;break;case`seed`:delete r.seed;break;case`guidance_scale`:delete r.guidance_scale;break;case`output_format`:delete r.output_format;break;case`tools`:delete r.tools;break}return r}var we=s({name:`SeedreamImageInput`,components:{ElUpload:b,ElButton:g,InfoIcon:Z,ImagePreview:Y,FontAwesomeIcon:q},mixins:[ne,V],data(){return{fileList:[],uploadUrl:K()+`/api/v1/files/`,suppressWatch:!1}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url).filter(e=>!!e)},value(){return this.$store.state.seedream?.config?.image},model(){return this.$store.state.seedream?.config?.model},supported(){return Q(this.model).image}},watch:{value:{immediate:!0,handler(e){if(this.suppressWatch)return;if(!e||e.length===0){let e=(this.fileList||[]).filter(e=>!e?.response?.file_url);this.fileList=e.length?e:[];return}let t=[];e.forEach(e=>{let n=this.fileList.find(t=>t?.response?.file_url===e||t?.url===e);n?t.push(n):t.push({name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}})}),(this.fileList||[]).filter(e=>!e?.response?.file_url).forEach(e=>{t.some(t=>t===e||t?.url===e?.url||t?.response?.file_url===e?.response?.file_url)||t.push(e)}),this.fileList=t}}},methods:{onChange(e){if(!e?.url&&e?.raw)try{e.url=URL.createObjectURL(e.raw)}catch{}},onRemove(e){if(e?.url&&typeof e.url==`string`&&e.url.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}this.onSetImages()},onExceed(){R.warning(this.$t(`seedream.message.uploadImageExceed`))},onError(){R.error(this.$t(`seedream.message.uploadImageError`))},onSetImages(){let e=this.urls;this.suppressWatch=!0,this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,image:e}),this.$nextTick(()=>{this.suppressWatch=!1})},async onSuccess(e,t){e?.file_url&&(t.url=e.file_url,t.response=e),this.onSetImages()},onRemovePreview(e,t){if(this.fileList.splice(e,1),t?.url&&typeof t.url==`string`&&t.url.startsWith(`blob:`))try{URL.revokeObjectURL(t.url)}catch{}this.onSetImages()}}}),Te={key:0},Ee={class:`field`},De={class:`label`},Oe={class:`box`},ke={class:`title font-bold`},Ae={class:`value`},je={class:`file-list mt-2 flex flex-wrap gap-[10px]`};function Me(e,t,s,h,g,_){let v=d(`info-icon`),y=d(`font-awesome-icon`),b=d(`el-button`),x=d(`el-upload`),S=d(`image-preview`);return e.supported?(u(),f(`div`,Te,[r(`div`,Ee,[r(`div`,De,[r(`div`,Oe,[r(`h2`,ke,l(e.$t(`seedream.name.imageUrls`)),1),a(v,{content:e.$t(`seedream.description.imageUrls`),class:`info`},null,8,[`content`])])]),r(`div`,Ae,[a(x,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,name:`file`,limit:14,multiple:!0,"show-file-list":!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,"on-change":e.onChange,"on-remove":e.onRemove,headers:e.headers},{default:p(()=>[a(b,{size:`small`,type:`primary`,round:``},{default:p(()=>[a(y,{icon:`fa-solid fa-upload`,class:`mr-1`}),i(` `+l(e.$t(`seedream.button.uploadImageUrls`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`on-change`,`on-remove`,`headers`])])]),r(`div`,je,[(u(!0),f(m,null,c(e.fileList,(t,r)=>(u(),n(S,{key:t.uid||t?.response?.file_url||t.url||r,url:t.url||t?.response?.file_url,name:t.name,percentage:t.percentage,onRemove:n=>e.onRemovePreview(r,t)},null,8,[`url`,`name`,`percentage`,`onRemove`]))),128))])])):o(``,!0)}var Ne=L(we,[[`render`,Me],[`__scopeId`,`data-v-6ef4c2e4`]]),Pe=s({name:`SeedreamModelSelector`,components:{ElSelect:v,ElOption:y,InfoIcon:Z},data(){return{revertKey:0,options:[{value:I,label:this.$t(`seedream.model.seedream50`)},{value:N,label:this.$t(`seedream.model.seedream45`)},{value:A,label:this.$t(`seedream.model.seedream40`)},{value:k,label:this.$t(`seedream.model.seedream30t2i`)},{value:D,label:this.$t(`seedream.model.seededit30i2i`)}]}},computed:{value(){return this.$store.state.seedream?.config?.model}},mounted(){this.value||this.applyModel(j)},methods:{async onChange(e){let t=this.$store.state.seedream?.config||{},n=Se(t,{model:e});if(n.length===0){this.applyModel(e);return}let r=n.map(e=>this.$t(e.i18nLabel)).join(`、`);try{await H.confirm(this.$t(`seedream.message.featureNotSupportedBody`,{fields:r}),this.$t(`seedream.message.featureNotSupportedTitle`),{confirmButtonText:this.$t(`seedream.button.confirmContinue`),cancelButtonText:this.$t(`seedream.button.cancelSwitch`),type:`warning`});let i=Ce({...t,model:e},n,{model:e});this.$store.commit(`seedream/setConfig`,i),R.success(this.$t(`seedream.message.featureRemovedNotice`,{fields:r}))}catch{this.revertKey+=1}},applyModel(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,model:e})}}}),Fe={class:`field`},Ie={class:`label`},Le={class:`box`},Re={class:`title font-bold`};function ze(e,t,i,o,s,h){let g=d(`info-icon`),_=d(`el-option`),v=d(`el-select`);return u(),f(`div`,Fe,[r(`div`,Ie,[r(`div`,Le,[r(`h2`,Re,l(e.$t(`seedream.name.model`)),1),a(g,{content:e.$t(`seedream.description.model`),class:`info`},null,8,[`content`])])]),(u(),n(v,{key:e.revertKey,"model-value":e.value,class:`value`,placeholder:e.$t(`seedream.placeholder.select`),onChange:e.onChange},{default:p(()=>[(u(!0),f(m,null,c(e.options,e=>(u(),n(_,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`placeholder`,`onChange`]))])}var Be=L(Pe,[[`render`,ze],[`__scopeId`,`data-v-8892a12c`]]),Ve=s({name:`SeedreamSizeSelector`,components:{ElSelect:v,ElOption:y,ElOptionGroup:_,InfoIcon:Z},data(){return{SEEDREAM_SIZE_ADAPTIVE:F,pixelOptions:ee}},computed:{model(){return this.$store.state.seedream?.config?.model},capabilities(){return Q(this.model)},value:{get(){return this.$store.state.seedream?.config?.size},set(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,size:e})}}},watch:{model:{immediate:!0,handler(){if(this.value)return;let e=this.capabilities;e.sizeTiers.length?this.value=e.sizeTiers.includes(`2K`)?`2K`:e.sizeTiers[0]:e.sizePixelDefault&&(this.value=e.sizePixelDefault)}}}}),He={class:`field`},Ue={class:`label`},We={class:`box`},Ge={class:`title font-bold`};function Ke(e,t,i,s,h,g){let _=d(`info-icon`),v=d(`el-option`),y=d(`el-option-group`),b=d(`el-select`);return u(),f(`div`,He,[r(`div`,Ue,[r(`div`,We,[r(`h2`,Ge,l(e.$t(`seedream.name.size`)),1),a(_,{content:e.$t(`seedream.description.size`),class:`info`},null,8,[`content`])])]),a(b,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`seedream.placeholder.size`),filterable:``,"allow-create":``,"default-first-option":``},{default:p(()=>[e.capabilities.sizeTiers.length?(u(),n(y,{key:0,label:e.$t(`seedream.size.group.tier`)},{default:p(()=>[(u(!0),f(m,null,c(e.capabilities.sizeTiers,e=>(u(),n(v,{key:e,label:e,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`label`])):o(``,!0),e.capabilities.sizeAdaptive?(u(),n(y,{key:1,label:e.$t(`seedream.size.group.adaptive`)},{default:p(()=>[(u(),n(v,{key:e.SEEDREAM_SIZE_ADAPTIVE,label:e.$t(`seedream.size.adaptive`),value:e.SEEDREAM_SIZE_ADAPTIVE},null,8,[`label`,`value`]))]),_:1},8,[`label`])):o(``,!0),a(y,{label:e.$t(`seedream.size.group.pixel`)},{default:p(()=>[(u(!0),f(m,null,c(e.pixelOptions,e=>(u(),n(v,{key:e.value,label:`${e.value} (${e.ratio})`,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`label`])]),_:1},8,[`modelValue`,`placeholder`])])}var qe=L(Ve,[[`render`,Ke],[`__scopeId`,`data-v-dd7bd021`]]),Je=s({name:`SeedreamMaxImagesSelector`,components:{ElInputNumber:T,InfoIcon:Z},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return Q(this.config?.model).groupGeneration},referenceImageCount(){let e=this.config?.image;return Array.isArray(e)?e.length:0},effectiveMax(){let e=15-this.referenceImageCount;return Math.max(1,Math.min(15,e))},value:{get(){let e=this.config?.sequential_image_generation_options?.max_images;return typeof e==`number`&&e>=1?e:1},set(e){let t={...this.config||{}},n=Math.max(1,Math.min(this.effectiveMax,Math.floor(e||1)));n>1?(t.sequential_image_generation=`auto`,t.sequential_image_generation_options={...t.sequential_image_generation_options||{},max_images:n}):(t.sequential_image_generation=`disabled`,t.sequential_image_generation_options&&delete t.sequential_image_generation_options),this.$store.commit(`seedream/setConfig`,t)}}},watch:{effectiveMax(e){this.value>e&&(this.value=e)}}}),Ye={key:0,class:`field`},Xe={class:`label`},Ze={class:`box`},Qe={class:`title font-bold`},$e={class:`value`};function et(e,t,n,i,s,c){let p=d(`info-icon`),m=d(`el-input-number`);return e.supported?(u(),f(`div`,Ye,[r(`div`,Xe,[r(`div`,Ze,[r(`h2`,Qe,l(e.$t(`seedream.name.maxImages`)),1),a(p,{content:e.$t(`seedream.description.maxImages`),class:`info`},null,8,[`content`])])]),r(`div`,$e,[a(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,min:1,max:e.effectiveMax,step:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`,`max`])])])):o(``,!0)}var tt=L(Je,[[`render`,et],[`__scopeId`,`data-v-f079fd20`]]),nt=s({name:`SeedreamOutputFormatSelector`,components:{ElSelect:v,ElOption:y,InfoIcon:Z},data(){return{options:[...P]}},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return Q(this.config?.model).outputFormat},value:{get(){return this.config?.output_format},set(e){let t={...this.config||{}};t.output_format=e,this.$store.commit(`seedream/setConfig`,t)}}}}),rt={key:0,class:`field`},it={class:`label`},at={class:`box`},ot={class:`title font-bold`};function st(e,t,i,s,h,g){let _=d(`info-icon`),v=d(`el-option`),y=d(`el-select`);return e.supported?(u(),f(`div`,rt,[r(`div`,it,[r(`div`,at,[r(`h2`,ot,l(e.$t(`seedream.name.outputFormat`)),1),a(_,{content:e.$t(`seedream.description.outputFormat`),class:`info`},null,8,[`content`])])]),a(y,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`seedream.placeholder.select`)},{default:p(()=>[(u(!0),f(m,null,c(e.options,e=>(u(),n(v,{key:e,label:e.toUpperCase(),value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])):o(``,!0)}var ct=L(nt,[[`render`,st],[`__scopeId`,`data-v-69ea4c07`]]),lt=s({name:`SeedreamSeedInput`,components:{ElInputNumber:T,InfoIcon:Z},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return Q(this.config?.model).seed},value:{get(){let e=this.config?.seed;return typeof e==`number`?e:-1},set(e){let t={...this.config||{}};t.seed=typeof e==`number`&&Number.isInteger(e)?e:-1,this.$store.commit(`seedream/setConfig`,t)}}}}),ut={key:0,class:`field`},dt={class:`label`},ft={class:`box`},pt={class:`title font-bold`},mt={class:`value`};function ht(e,t,n,i,s,c){let p=d(`info-icon`),m=d(`el-input-number`);return e.supported?(u(),f(`div`,ut,[r(`div`,dt,[r(`div`,ft,[r(`h2`,pt,l(e.$t(`seedream.name.seed`)),1),a(p,{content:e.$t(`seedream.description.seed`),class:`info`},null,8,[`content`])])]),r(`div`,mt,[a(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,min:-1,max:2147483647,step:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`])])])):o(``,!0)}var gt=L(lt,[[`render`,ht],[`__scopeId`,`data-v-10cdc1e0`]]),_t=s({name:`SeedreamGuidanceScaleInput`,components:{ElInputNumber:T,InfoIcon:Z},computed:{config(){return this.$store.state.seedream?.config||{}},supported(){return Q(this.config?.model).guidanceScale},defaultValue(){return Q(this.config?.model).guidanceScaleDefault??2.5},value:{get(){let e=this.config?.guidance_scale;return typeof e==`number`?e:this.defaultValue},set(e){let t={...this.config||{}};t.guidance_scale=typeof e==`number`&&e>=1&&e<=10?e:this.defaultValue,this.$store.commit(`seedream/setConfig`,t)}}}}),vt={key:0,class:`field`},yt={class:`label`},bt={class:`box`},xt={class:`title font-bold`},St={class:`value`};function Ct(e,t,n,i,s,c){let p=d(`info-icon`),m=d(`el-input-number`);return e.supported?(u(),f(`div`,vt,[r(`div`,yt,[r(`div`,bt,[r(`h2`,xt,l(e.$t(`seedream.name.guidanceScale`)),1),a(p,{content:e.$t(`seedream.description.guidanceScale`),class:`info`},null,8,[`content`])])]),r(`div`,St,[a(m,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,min:1,max:10,step:.1,precision:1,size:`default`,"controls-position":`right`,class:`counter`},null,8,[`modelValue`])])])):o(``,!0)}var wt=L(_t,[[`render`,Ct],[`__scopeId`,`data-v-7386f064`]]),Tt=s({name:`SeedreamWatermarkSwitch`,components:{ElSwitch:E,InfoIcon:Z},computed:{value:{get(){let e=this.$store.state.seedream?.config?.watermark;return e===void 0?!1:!!e},set(e){this.$store.commit(`seedream/setConfig`,{...this.$store.state.seedream?.config,watermark:e})}}}}),Et={class:`field`},Dt={class:`label`},Ot={class:`box`},kt={class:`title font-bold`},At={class:`value`};function jt(e,t,n,i,o,s){let c=d(`info-icon`),p=d(`el-switch`);return u(),f(`div`,Et,[r(`div`,Dt,[r(`div`,Ot,[r(`h2`,kt,l(e.$t(`seedream.name.watermark`)),1),a(c,{content:e.$t(`seedream.description.watermark`),class:`info`},null,8,[`content`])])]),r(`div`,At,[a(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t},null,8,[`modelValue`])])])}var Mt=s({name:`SeedreamConfigPanel`,components:{ElButton:g,FontAwesomeIcon:q,PromptInput:ye,Consumption:ce,ImageInput:Ne,ModelSelector:Be,SizeSelector:qe,MaxImagesSelector:tt,OutputFormatSelector:ct,SeedInput:gt,GuidanceScaleInput:wt,WatermarkSwitch:L(Tt,[[`render`,jt],[`__scopeId`,`data-v-9e2abf0f`]])},emits:[`generate`],computed:{config(){return this.$store.state.seedream?.config},consumption(){let e={...this.config||{}},t=Array.isArray(e?.image)&&e.image.length>0,n=e?.sequential_image_generation===`auto`?Math.max(1,Math.floor(e?.sequential_image_generation_options?.max_images||1)):1;return z({...e,action:t?`edit`:`generate`,model:O(e?.model),count:n},this.service?.cost)},service(){return this.$store.state.seedream?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),Nt={class:`flex flex-col h-full`},Pt={class:`flex-1 overflow-y-auto p-5`},Ft={class:`flex flex-col items-center justify-center px-5 pb-5`};function It(e,t,n,o,s,c){let m=d(`model-selector`),h=d(`size-selector`),g=d(`max-images-selector`),_=d(`output-format-selector`),v=d(`seed-input`),y=d(`guidance-scale-input`),b=d(`watermark-switch`),x=d(`prompt-input`),S=d(`image-input`),C=d(`consumption`),w=d(`font-awesome-icon`),T=d(`el-button`);return u(),f(`div`,Nt,[r(`div`,Pt,[a(m,{class:`mb-4`}),a(h,{class:`mb-4`}),a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),a(v,{class:`mb-4`}),a(y,{class:`mb-4`}),a(b,{class:`mb-4`}),a(x,{class:`mb-4`}),a(S,{class:`mb-4`})]),r(`div`,Ft,[a(C,{value:e.consumption,service:e.service},null,8,[`value`,`service`]),a(T,{type:`primary`,class:`btn w-full`,round:``,onClick:e.onGenerate},{default:p(()=>[a(w,{icon:`fa-solid fa-magic`,class:`mr-2`}),i(` `+l(e.$t(`seedream.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Lt=L(Mt,[[`render`,It]]),Rt=s({name:`SeedreamTaskPreview`,components:{ElImage:S,CopyToClipboard:J,FontAwesomeIcon:q,ElAlert:C,ImageWrapper:ue,ElButton:g,ElTooltip:x,ImagePreview:Y,ApiCodeButton:le},props:{modelValue:{type:Object,required:!0}},computed:{isEdit(){return Array.isArray(this.modelValue?.request?.image)&&(this.modelValue?.request?.image?.length||0)>0},images(){let e=[];return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(t=>{e.push(t)}),e}},methods:{shortModel(e){return O(e)||e},onEdit(e){if(!e)return;console.debug(`Edit image:`,e);let t={...this.$store.state.seedream?.config||{}};t.image=[e],this.$store.commit(`seedream/setConfig`,t)}}}),zt={class:`preview`},Bt={class:`left`},Vt={class:`main`},Ht={class:`bot`},Ut={class:`datetime`},Wt={class:`info`},Gt={key:0,class:`flex justify-start items-center gap-2 mt-2 w-full overflow-x-auto`},Kt={key:1,class:`prompt mt-2`},qt={key:0},Jt={key:0,class:t({content:!0})},Yt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Xt={key:1,class:t({content:!0,failed:!0})},Zt={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},Qt={class:t({operations:!0,"mt-2":!0,"mb-2":!0})},$t={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},en={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},tn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},nn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},rn={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},an={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},on={key:2,class:t({content:!0})},sn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},cn={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},ln={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},un={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},dn={key:3,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},fn={key:4,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},pn={key:3,class:t({content:!0})},mn={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},hn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function gn(e,t,s,g,_,v){let y=d(`el-image`),b=d(`image-preview`),x=d(`font-awesome-icon`),S=d(`copy-to-clipboard`),C=d(`el-alert`),w=d(`image-wrapper`),T=d(`el-button`),E=d(`el-tooltip`),D=d(`api-code-button`);return u(),f(`div`,zt,[r(`div`,Bt,[a(y,{src:`https://cdn.acedata.cloud/9egrbn.png`,class:`avatar`})]),r(`div`,Vt,[r(`div`,Ht,[i(l(e.$t(`seedream.name.seedreamBot`))+` `,1),r(`span`,Ut,l(e.$dayjs.format(``+new Date(parseFloat((e.modelValue?.created_at||``).toString())*1e3))),1)]),r(`div`,Wt,[Array.isArray(e.modelValue?.request?.image)&&e.modelValue?.request?.image.length>0?(u(),f(`div`,Gt,[(u(!0),f(m,null,c(e.modelValue?.request?.image,(e,t)=>(u(),n(b,{key:t,url:e,name:`image-${t+1}`,closable:!1},null,8,[`url`,`name`]))),128))])):o(``,!0),e.modelValue?.request?.prompt?(u(),f(`p`,Kt,[i(l(e.modelValue?.request?.prompt)+` `,1),e.modelValue?.response?o(``,!0):(u(),f(`span`,qt,` - (`+l(e.$t(`seedream.status.pending`))+`) `,1))])):o(``,!0)]),e.modelValue?.response?e.modelValue?.response?.success===!0?(u(),f(`div`,Xt,[r(`div`,Zt,[(u(!0),f(m,null,c(e.images,(e,t)=>(u(),n(w,{key:t,src:e?.image_url,"raw-src":e?.image_url},null,8,[`src`,`raw-src`]))),128))]),r(`div`,Qt,[a(E,{class:`box-item`,effect:`dark`,content:e.$t(`common.button.edit`),placement:`top-start`},{default:p(()=>[a(T,{type:`info`,size:`small`,class:`btn-action`,onClick:t[0]||=h(t=>e.onEdit(e.images?.[0]?.image_url),[`stop`])},{default:p(()=>[i(l(e.$t(`common.button.edit`)),1)]),_:1})]),_:1},8,[`content`]),a(D,{path:`/seedream/images`,body:e.modelValue?.request},null,8,[`body`])]),a(C,{closable:!1,class:`mt-2 success`},{default:p(()=>[e.modelValue?.request?.model?(u(),f(`p`,$t,[a(x,{icon:`fa-solid fa-cube`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.model`))+`: `+l(e.shortModel(e.modelValue?.request?.model)),1)])):o(``,!0),e.modelValue?.request?.size?(u(),f(`p`,en,[a(x,{icon:`fa-solid fa-image`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.size`))+`: `+l(e.modelValue?.request?.size),1)])):o(``,!0),r(`p`,tn,[a(x,{icon:`fa-solid fa-bolt`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.task`))+`: `+l(e.isEdit?e.$t(`seedream.name.edits`):e.$t(`seedream.name.generate`)),1)]),r(`p`,nn,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),e.modelValue?.elapsed?(u(),f(`p`,rn,[a(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.elapsed`))+`: `+l(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e.modelValue?.response?.trace_id?(u(),f(`p`,an,[a(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.traceId`))+`: `+l(e.modelValue?.response?.trace_id)+` `,1),a(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy inline-block`},null,8,[`content`])])):o(``,!0)]),_:1})])):e.modelValue?.response?.success===!1?(u(),f(`div`,on,[a(C,{closable:!1,class:`failure`},{template:p(()=>[a(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.failure`)),1)]),default:p(()=>[e.modelValue?.request?.model?(u(),f(`p`,sn,[a(x,{icon:`fa-solid fa-cube`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.model`))+`: `+l(e.shortModel(e.modelValue?.request?.model)),1)])):o(``,!0),e.modelValue?.request?.size?(u(),f(`p`,cn,[a(x,{icon:`fa-solid fa-image`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.size`))+`: `+l(e.modelValue?.request?.size),1)])):o(``,!0),r(`p`,$,[a(x,{icon:`fa-solid fa-bolt`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.task`))+`: `+l(e.isEdit?e.$t(`seedream.name.edits`):e.$t(`seedream.name.generate`)),1)]),r(`p`,ln,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e.modelValue?.response?.error?.message?(u(),f(`p`,un,[a(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.failureReason`))+`: `+l(e.modelValue?.response?.error?.message)+` `,1),a(S,{content:e.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])])):o(``,!0),e.modelValue?.elapsed?(u(),f(`p`,dn,[a(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.elapsed`))+`: `+l(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),e.modelValue?.response?.trace_id?(u(),f(`p`,fn,[a(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.traceId`))+`: `+l(e.modelValue?.response?.trace_id)+` `,1),a(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])):o(``,!0)]),_:1})])):(u(),f(`div`,pn,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.status`)),1)]),default:p(()=>[r(`p`,mn,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),e.modelValue?.response?.trace_id?(u(),f(`p`,hn,[a(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.traceId`))+`: `+l(e.modelValue?.response?.trace_id)+` `,1),a(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])):o(``,!0)]),_:1})])):(u(),f(`div`,Jt,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(x,{icon:`fa-regular fa-clock`,class:`mr-1`}),i(` `+l(e.$t(`seedream.status.pending`)),1)]),default:p(()=>[r(`p`,Yt,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`seedream.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])])]),_:1})]))])])}var _n=s({name:`SeedreamRecentPanel`,components:{TaskPreview:L(Rt,[[`render`,gn],[`__scopeId`,`data-v-1b4654bc`]]),BotPlaceholder:X,NoTasks:se,ScrollList:ie},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.seedream?.tasks,items:this.$store.state.seedream?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),vn={key:0},yn={key:2,class:`w-full h-full flex items-center justify-center`};function bn(e,t,r,i,s,l){let h=d(`bot-placeholder`),g=d(`task-preview`),_=d(`scroll-list`),v=d(`no-tasks`);return u(),f(m,null,[e.tasks?.items===void 0?(u(),f(`div`,vn,[a(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(u(),n(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(u(!0),f(m,null,c(e.tasks?.items,e=>(u(),n(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(u(),f(`div`,yn,[a(v)])):o(``,!0)],64)}var xn=L(_n,[[`render`,bn]]),Sn=te(`seedream`),Cn=s({name:`SeedreamIndex`,components:{ConfigPanel:Lt,Layout:ge,RecentPanel:xn},mixins:[G],inject:[`initialized`],data(){return{task:void 0,job:0,loading:!1}},computed:{applicationsLoading(){return this.$store.state.seedream?.status?.getApplications===W.Request},tasksLoading(){return this.$store.state.seedream?.status?.getTasks===W.Request},credential(){return this.$store.state.seedream?.credential},config(){return this.$store.state.seedream?.config},application(){return this.$store.state.seedream?.application},tasks(){return this.$store.state.seedream?.tasks}},watch:{tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await ae({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loading,setLoading:e=>this.loading=e,isBlocked:()=>this.tasksLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`seedream/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`seedream/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.tasksLoading){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=20,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),await this.$store.dispatch(`seedream/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})},async onGenerate(){if(!re(this.uploadTracker,e=>this.$t(e),e=>R.warning(e)))return;let e={...this.config||{}};!(Array.isArray(e?.image)&&e.image.length>0)&&`image`in e&&delete e.image,e?.size||delete e.size;let t={...e,callback_url:Sn},n=this.credential?.token;if(!n){console.error(`no token specified`);return}R.info(this.$t(`seedream.message.startingTask`)),B(`seedream`,U.generate(t,{token:n})).then(()=>{R.success(this.$t(`seedream.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?R.error(this.$t(`seedream.message.usedUp`)):R.error(this.$t(`seedream.message.startTaskFailed`)+(t?.error?.message||``))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function wn(e,t,r,i,o,s){let c=d(`config-panel`),l=d(`recent-panel`),f=d(`layout`);return u(),n(f,null,{config:p(()=>[a(c,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(l,{ref:`recentPanel`,loading:e.loading,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Tn=L(Cn,[[`render`,wn]]);export{Tn as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{$ as e,Bt as t,D as n,E as r,M as i,N as a,O as o,P as s,Q as c,Ut as l,X as u,et as d,k as f,lt as p,x as m}from"./vendor-chart-Df3WBvr0.js";import{t as h}from"./button-Diu_mJ2H.js";import{r as g,t as _}from"./select-BR8DyZel.js";import{t as v}from"./upload-DD2n4P3p.js";import{t as y}from"./image-DvjKNoxC.js";import{t as b}from"./alert-Cs6WDxgv.js";import{t as x}from"./drawer-B42T8GMw.js";import{t as S}from"./input-number-Oh-d0JaX.js";import{t as C}from"./slider-BZdPs70x.js";import{Jr as ee,Sn as te,xn as w}from"./constants-vDFRJTq6.js";import{At as T,Dt as E,E as D,Er as O,Mt as k,Nn as A,Ot as j,gr as M,kt as N,sn as P,yr as F}from"./index-Bpg44eWB.js";import{t as I}from"./index.es-D2Gtib5p.js";import{t as L}from"./CopyToClipboard-BvqdtQdo.js";import{t as R}from"./ImagePreview-Cel1agBC.js";import{t as z}from"./BotPlaceholder-DdLK7DwC.js";import{i as B,n as V,t as H}from"./pagination-BlR28kYu.js";import{n as U,t as W}from"./NoTasks-BvxBJO_n.js";import{t as G}from"./Consumption-DiPiwllg.js";import{t as K}from"./ApiCodeButton-DmgbbHgv.js";import{t as q}from"./ImageWrapper-D4L76WuX.js";var J=s({name:`LayoutFlux`,components:{ElDrawer:x,ElButton:h,FontAwesomeIcon:I},data(){return{drawer:!1}}}),Y={class:`main flex flex-row flex-1`},X={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Z={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function Q(t,n,i,o,s,c){let l=d(`font-awesome-icon`),m=d(`el-button`),h=d(`el-drawer`);return u(),f(`div`,Y,[r(`div`,X,[e(t.$slots,`config`,{},void 0,!0)]),r(`div`,Z,[e(t.$slots,`result`,{},void 0,!0)]),a(m,{circle:``,class:`menu`,onClick:n[0]||=e=>t.drawer=!0},{default:p(()=>[a(l,{icon:`fa-solid fa-magic`})]),_:1}),a(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`340px`,class:`drawer`},{default:p(()=>[e(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var ne=D(J,[[`render`,Q],[`__scopeId`,`data-v-d022364a`]]),re=s({name:`ModelSelector`,components:{ElSelect:g,ElOption:_},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`flux-dev`,label:`flux-dev`},{value:`flux-pro`,label:`flux-pro`},{value:`flux-kontext-pro`,label:`flux-kontext-pro`},{value:`flux-kontext-max`,label:`flux-kontext-max`},{value:`flux-2-flex`,label:`flux-2-flex`},{value:`flux-2-pro`,label:`flux-2-pro`},{value:`flux-2-max`,label:`flux-2-max`}]}},computed:{value:{get(){return this.$store.state.flux?.config?.model},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,model:e})}}},mounted(){this.value||=te}}),ie={class:`field`},ae={class:`title font-bold`};function oe(e,t,i,o,s,h){let g=d(`el-option`),_=d(`el-select`);return u(),f(`div`,ie,[r(`h2`,ae,l(e.$t(`flux.name.model`)),1),a(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`flux.placeholder.select`)},{default:p(()=>[(u(!0),f(m,null,c(e.options,e=>(u(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var se=D(re,[[`render`,oe],[`__scopeId`,`data-v-e9b17945`]]),ce=s({name:`CountSelector`,components:{ElSlider:C,InfoIcon:B,ElInputNumber:S},computed:{value:{get(){return this.$store.state.flux?.config?.count},set(e){console.debug(`set count`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,count:e})}}},mounted(){this.value||=1}}),le={class:`flex justify-between`},ue={class:`flex justify-start items-center`},de={class:`text-sm font-bold`},fe={class:`flex justify-end items-center`},pe={class:`w-full`};function me(e,t,n,i,o,s){let c=d(`info-icon`),p=d(`el-input-number`),m=d(`el-slider`);return u(),f(`div`,null,[r(`div`,le,[r(`div`,ue,[r(`span`,de,l(e.$t(`flux.name.numbers`)),1),a(c,{content:e.$t(`flux.description.numbers`)},null,8,[`content`])]),r(`div`,fe,[a(p,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,"controls-position":`right`},null,8,[`modelValue`])])]),r(`div`,pe,[a(m,{modelValue:e.value,"onUpdate:modelValue":t[1]||=t=>e.value=t,min:1,max:4,step:1},null,8,[`modelValue`])])])}var he=D(ce,[[`render`,me]]),ge=s({name:`ActionSelector`,components:{ElSelect:g,ElOption:_},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`generate`,label:this.$t(`flux.name.generate`)},{value:`edits`,label:this.$t(`flux.name.edits`)}]}},computed:{value:{get(){return this.$store.state.flux?.config?.action},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,action:e})}}},mounted(){this.value||=w}}),_e={class:`field`},ve={class:`title font-bold`};function ye(e,t,i,o,s,h){let g=d(`el-option`),_=d(`el-select`);return u(),f(`div`,_e,[r(`h2`,ve,l(e.$t(`flux.name.task`)),1),a(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`flux.placeholder.select`)},{default:p(()=>[(u(!0),f(m,null,c(e.options,e=>(u(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var be=D(ge,[[`render`,ye],[`__scopeId`,`data-v-81fd05e5`]]),xe=s({name:`ImageUrlInput`,components:{ElUpload:v,ElButton:h,InfoIcon:B,FontAwesomeIcon:I,ImagePreview:R},mixins:[T,j],emits:[`change`],data(){return{fileList:[],uploadUrl:F()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)}},watch:{urls:{handler(e){console.debug(`URLs changed:`,e),this.$store.commit(`flux/setConfig`,{...this.$store.state.flux.config,image_url:e[0]})}}},methods:{onExceed(){O.warning(this.$t(`flux.message.uploadStartImageExceed`))},onError(){O.error(this.$t(`flux.message.uploadStartImageError`))}}}),Se={class:`relative`},Ce={class:`flex justify-between`},we={class:`flex justify-start items-center`},Te={class:`text-sm font-bold`};function Ee(e,t,n,o,s,c){let m=d(`info-icon`),h=d(`image-preview`),g=d(`font-awesome-icon`),_=d(`el-button`),v=d(`el-upload`);return u(),f(`div`,Se,[r(`div`,Ce,[r(`div`,we,[r(`span`,Te,l(e.$t(`flux.name.imageUrl`)),1),a(m,{content:e.$t(`flux.description.imageUrl`)},null,8,[`content`])])]),a(v,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,name:`file`,limit:5,class:`upload-wrapper`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,multiple:!0,"list-type":`picture`,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{file:p(({file:t})=>[a(h,{url:t.url||t.response?.file_url,name:t.name,percentage:t.percentage,onRemove:n=>e.fileList.splice(e.fileList.indexOf(t),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])]),default:p(()=>[a(_,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:p(()=>[a(g,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),i(` `+l(e.$t(`flux.button.uploadImageUrl`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`headers`])])}var De=D(xe,[[`render`,Ee],[`__scopeId`,`data-v-7482072d`]]),Oe=s({name:`PromptInput`,components:{PromptTextarea:U},computed:{prompt:{get(){return this.$store.state.flux?.config?.prompt},set(e){this.$store.commit(`flux/setConfig`,{...this.$store.state.flux?.config,prompt:e})}}},mounted(){this.prompt||=``}});function ke(e,t,r,i,a,o){let s=d(`prompt-textarea`);return u(),n(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`flux.name.prompt`),info:e.$t(`flux.description.prompt`),placeholder:e.$t(`flux.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var Ae=s({name:`PresetPanel`,components:{ElButton:h,FontAwesomeIcon:I,PromptInput:D(Oe,[[`render`,ke]]),ModelSelector:se,CountSelector:he,Consumption:G,ActionSelector:be,ImageUrlInput:De},emits:[`generate`],computed:{config(){return this.$store.state.flux?.config},consumption(){return k(this.config,this.service?.cost)},service(){return this.$store.state.flux?.service}},methods:{onGenerate(){this.$emit(`generate`)}}}),je={class:`flex flex-col h-full`},Me={class:`flex-1 overflow-y-auto p-5`},Ne={class:`flex flex-col items-center justify-center px-5 pb-5`};function Pe(e,t,s,c,m,h){let g=d(`action-selector`),_=d(`prompt-input`),v=d(`image-url-input`),y=d(`model-selector`),b=d(`count-selector`),x=d(`consumption`),S=d(`font-awesome-icon`),C=d(`el-button`);return u(),f(`div`,je,[r(`div`,Me,[a(g,{class:`mb-4`}),a(_,{class:`mb-4`}),e.config?.action===`edits`?(u(),n(v,{key:0,class:`mb-4`})):o(``,!0),a(y,{class:`mb-4`}),a(b,{class:`mb-4`})]),r(`div`,Ne,[a(x,{value:e.consumption,service:e.service},null,8,[`value`,`service`]),a(C,{type:`primary`,class:`btn w-full`,round:``,onClick:e.onGenerate},{default:p(()=>[a(S,{icon:`fa-solid fa-magic`,class:`mr-2`}),i(` `+l(e.$t(`flux.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Fe=D(Ae,[[`render`,Pe]]),Ie=s({name:`TaskPreview`,components:{ElImage:y,CopyToClipboard:L,FontAwesomeIcon:I,ElAlert:b,ImageWrapper:q,ApiCodeButton:K},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.flux?.application},config(){return this.$store.state.flux?.config},images(){let e=[],t=this.modelValue?.request?.action;return Array.isArray(this.modelValue?.response?.data)&&this.modelValue?.response?.data?.forEach(n=>{let r=n;t&&(r.action=t),e.push(r)}),e}},methods:{onDownload(e,t){e.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenImage(e){window.open(e,`_blank`)}}}),Le={class:`preview`},Re={class:`left`},ze={class:`main`},Be={class:`bot`},Ve={class:`datetime`},He={class:`info`},Ue={key:0,class:`prompt mt-2`},We={key:0},Ge={key:0,class:t({content:!0,failed:!0})},Ke={class:`flex justify-start items-center gap-4 w-full overflow-x-auto`},qe={class:t({operations:!0,"mt-2":!0,"mb-2":!0})},Je={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ye={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Xe={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Ze={key:1,class:t({content:!0})},Qe={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$e={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},et={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},tt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`},$={key:2,class:t({content:!0})},nt={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function rt(e,t,s,h,g,_){let v=d(`el-image`),y=d(`image-wrapper`),b=d(`api-code-button`),x=d(`font-awesome-icon`),S=d(`copy-to-clipboard`),C=d(`el-alert`);return u(),f(`div`,Le,[r(`div`,Re,[a(v,{src:`https://cdn.acedata.cloud/ogm2oa.png`,class:`avatar`})]),r(`div`,ze,[r(`div`,Be,[i(l(e.$t(`flux.name.fluxBot`))+` `,1),r(`span`,Ve,l(e.$dayjs.format(``+new Date(parseFloat((e.modelValue?.created_at||``).toString())*1e3))),1)]),r(`div`,He,[e.modelValue?.request?.prompt?(u(),f(`p`,Ue,[i(l(e.modelValue?.request?.prompt)+` `,1),e.modelValue?.response?o(``,!0):(u(),f(`span`,We,` - (`+l(e.$t(`flux.status.pending`))+`) `,1))])):o(``,!0)]),e.modelValue?.response?.success===!0?(u(),f(`div`,Ge,[r(`div`,Ke,[(u(!0),f(m,null,c(e.images,(e,t)=>(u(),n(y,{key:t,src:e?.image_url,"raw-src":e?.image_url,"model-value":e},null,8,[`src`,`raw-src`,`model-value`]))),128))]),r(`div`,qe,[a(b,{path:`/flux/images`,body:e.modelValue?.request},null,8,[`body`])]),a(C,{closable:!1,class:`mt-2 success`},{default:p(()=>[r(`p`,Je,[a(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.model`))+`: `+l(e.modelValue?.request?.model),1)]),r(`p`,Ye,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy inline-block`},null,8,[`content`])]),e.modelValue?.elapsed?(u(),f(`p`,Xe,[a(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.elapsed`))+`: `+l(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0)]),_:1})])):o(``,!0),e.modelValue?.response?.success===!1?(u(),f(`div`,Ze,[a(C,{closable:!1,class:`failure`},{template:p(()=>[a(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.failure`)),1)]),default:p(()=>[r(`p`,Qe,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy`},null,8,[`content`])]),r(`p`,$e,[a(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.failureReason`))+`: `+l(e.modelValue?.response?.error?.message)+` `,1),a(S,{content:e.modelValue?.response?.error?.message,class:`btn-copy`},null,8,[`content`])]),e.modelValue?.elapsed?(u(),f(`p`,et,[a(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.elapsed`))+`: `+l(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):o(``,!0),r(`p`,tt,[a(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.traceId`))+`: `+l(e.modelValue?.response?.trace_id)+` `,1),a(S,{content:e.modelValue?.response?.trace_id,class:`btn-copy`},null,8,[`content`])])]),_:1})])):o(``,!0),e.modelValue?.response?o(``,!0):(u(),f(`div`,$,[a(C,{closable:!1,class:`info`},{template:p(()=>[a(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.failure`)),1)]),default:p(()=>[r(`p`,nt,[a(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),i(` `+l(e.$t(`flux.name.taskId`))+`: `+l(e.modelValue?.id)+` `,1),a(S,{content:e.modelValue?.id,class:`btn-copy`},null,8,[`content`])])]),_:1})]))])])}var it=s({name:`RecentPanel`,components:{TaskPreview:D(Ie,[[`render`,rt],[`__scopeId`,`data-v-6a2b3fc7`]]),BotPlaceholder:z,NoTasks:W,ScrollList:V},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.flux?.tasks,items:this.$store.state.flux?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),at={key:0},ot={key:2,class:`w-full h-full flex items-center justify-center`};function st(e,t,r,i,s,l){let h=d(`bot-placeholder`),g=d(`task-preview`),_=d(`scroll-list`),v=d(`no-tasks`);return u(),f(m,null,[e.tasks?.items===void 0?(u(),f(`div`,at,[a(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(u(),n(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:p(()=>[(u(!0),f(m,null,c(e.tasks?.items,e=>(u(),n(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(u(),f(`div`,ot,[a(v)])):o(``,!0)],64)}var ct=D(it,[[`render`,st]]),lt=ee(`flux`),ut=s({name:`FluxIndex`,components:{ConfigPanel:Fe,Layout:ne,RecentPanel:ct},mixins:[N],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.flux?.status?.getApplications===M.Request},tasksLoading(){return this.$store.state.flux?.status?.getTasks===M.Request||this.fetchingTasks},credential(){return this.$store.state.flux?.credential},config(){return this.$store.state.flux?.config},application(){return this.$store.state.flux?.application},tasks(){return this.$store.state.flux?.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 H({tasks:this.tasks,getTasks:()=>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(`flux/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`flux/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`flux/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!E(this.uploadTracker,e=>this.$t(e),e=>O.warning(e)))return;let e={...this.config,callback_url:lt},t=this.credential?.token;if(!t){console.error(`no token specified`);return}O.info(this.$t(`flux.message.startingTask`)),A(`flux`,P.generate(e,{token:t})).then(()=>{O.success(this.$t(`flux.message.startTaskSuccess`))}).catch(e=>{let t=e?.response?.data;t?.error?.code===`used_up`?O.error(this.$t(`flux.message.usedUp`)):O.error(this.$t(`flux.message.startTaskFailed`)+t?.error?.message)}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function dt(e,t,r,i,o,s){let c=d(`config-panel`),l=d(`recent-panel`),f=d(`layout`);return u(),n(f,null,{config:p(()=>[a(c,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:p(()=>[a(l,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var ft=D(ut,[[`render`,dt]]);export{ft as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{Bt as e,D as t,E as n,M as r,N as i,O as a,P as o,Q as s,Ut as c,X as l,et as u,k as d,lt as f,tt as p,ut as m,v as h,x as g,y as _}from"./vendor-chart-Df3WBvr0.js";import{t as v}from"./button-Diu_mJ2H.js";import{t as y}from"./upload-DD2n4P3p.js";import{t as b}from"./drawer-B42T8GMw.js";import{n as x,r as S,t as C}from"./dropdown-ApRxFZDH.js";import{t as w}from"./popover-CcRl4vxr.js";import{At as T,E,Er as D,Nr as O,Pt as k,Tr as A,gr as j,kr as M,yr as ee}from"./index-Bpg44eWB.js";import"./vendor-highlight-mMg7GAOR.js";import{t as N}from"./index.es-D2Gtib5p.js";import{n as te,t as ne}from"./AskUserQuestionCard-BqHFLywL.js";var re=o({name:`CodingBridgeNodeList`,components:{ElButton:v,FontAwesomeIcon:N},emits:[`pair`],computed:{nodes(){return this.$store.state.codingBridge?.nodes??[]},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},connection(){return this.$store.state.codingBridge?.connection??`disconnected`},connectionLabel(){return this.$t(`codingBridge.connection.${this.connection}`)},connectionDotClass(){switch(this.connection){case`connected`:return`bg-[var(--el-color-success)]`;case`connecting`:return`bg-[var(--el-color-warning)]`;case`error`:return`bg-[var(--el-color-danger)]`;default:return`bg-[var(--app-text-subtle)]`}}},methods:{onSelect(e){this.$store.dispatch(`codingBridge/selectNode`,e)},onRefresh(){this.$store.dispatch(`codingBridge/getNodes`)},async onDelete(e){try{await A.confirm(this.$t(`codingBridge.nodeList.removeConfirm`,{name:e.name}),this.$t(`codingBridge.nodeList.remove`),{confirmButtonText:this.$t(`codingBridge.nodeList.remove`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`})}catch{return}try{await this.$store.dispatch(`codingBridge/deleteNode`,e.node_id),D.success(this.$t(`codingBridge.nodeList.removeSuccess`))}catch{D.error(this.$t(`codingBridge.nodeList.removeFailed`))}}}}),P={class:`node-list flex flex-col h-full bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},F={class:`flex items-center justify-between px-4 py-3 border-b border-[var(--app-border-subtle)]`},I={class:`flex items-center gap-2 font-medium`},L={class:`flex items-center gap-1`},R={class:`flex items-center gap-2 px-4 py-2 text-xs border-b border-[var(--app-border-subtle)]`},z={class:`text-[var(--app-text-subtle)]`},B={class:`flex-1 overflow-y-auto`},V={key:0,class:`p-6 text-center text-sm text-[var(--app-text-subtle)]`},H={class:`mb-3`},U={key:1,class:`list-none m-0 p-0`},W=[`onClick`],G={class:`flex-1 min-w-0`},K={class:`flex items-center gap-2`},q={class:`truncate font-medium`},J=[`title`],Y={class:`text-xs text-[var(--app-text-subtle)] truncate`};function X(t,a,o,p,m,h){let v=u(`font-awesome-icon`),y=u(`el-button`);return l(),d(`div`,P,[n(`div`,F,[n(`div`,I,[i(v,{icon:`fa-solid fa-laptop-code`}),n(`span`,null,c(t.$t(`codingBridge.nodeList.title`)),1)]),n(`div`,L,[i(y,{circle:``,size:`small`,title:t.$t(`codingBridge.nodeList.refresh`),onClick:t.onRefresh},{default:f(()=>[i(v,{icon:`fa-solid fa-rotate-right`})]),_:1},8,[`title`,`onClick`]),i(y,{type:`primary`,circle:``,size:`small`,title:t.$t(`codingBridge.nodeList.pair`),onClick:a[0]||=e=>t.$emit(`pair`)},{default:f(()=>[i(v,{icon:`fa-solid fa-plus`})]),_:1},8,[`title`])])]),n(`div`,R,[n(`span`,{class:e([`inline-block w-2 h-2 rounded-full`,t.connectionDotClass])},null,2),n(`span`,z,c(t.connectionLabel),1)]),n(`div`,B,[t.nodes.length?(l(),d(`ul`,U,[(l(!0),d(g,null,s(t.nodes,r=>(l(),d(`li`,{key:r.node_id,class:e([`group flex items-center gap-3 px-4 py-3 cursor-pointer border-b border-[var(--app-border-subtle)] hover:bg-[var(--app-content-bg)]`,{"bg-[var(--app-content-bg)]":r.node_id===t.currentNodeId}]),onClick:e=>t.onSelect(r.node_id)},[i(v,{icon:`fa-solid fa-desktop`,class:`text-[var(--app-text-subtle)]`}),n(`div`,G,[n(`div`,K,[n(`span`,q,c(r.name),1),n(`span`,{class:e([`inline-block w-2 h-2 rounded-full flex-none`,r.status===`online`?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`]),title:r.status===`online`?t.$t(`codingBridge.status.online`):t.$t(`codingBridge.status.offline`)},null,10,J)]),n(`div`,Y,c(r.status===`online`?t.$t(`codingBridge.status.online`):t.$t(`codingBridge.status.offline`)),1)]),i(y,{class:`opacity-0 group-hover:opacity-100`,text:``,circle:``,size:`small`,title:t.$t(`codingBridge.nodeList.remove`),onClick:_(e=>t.onDelete(r),[`stop`])},{default:f(()=>[i(v,{icon:`fa-solid fa-trash`})]),_:1},8,[`title`,`onClick`])],10,W))),128))])):(l(),d(`div`,V,[n(`p`,H,c(t.$t(`codingBridge.nodeList.empty`)),1),i(y,{type:`primary`,round:``,size:`small`,onClick:a[1]||=e=>t.$emit(`pair`)},{default:f(()=>[i(v,{icon:`fa-solid fa-plus`,class:`mr-1`}),r(` `+c(t.$t(`codingBridge.nodeList.pairFirst`)),1)]),_:1})]))])])}var ie=E(re,[[`render`,X]]),ae=e=>{let t=e?.questions;return Array.isArray(t)&&t.length>0&&t.every(e=>e&&typeof e.question==`string`&&Array.isArray(e.options))},Z=e=>e?(e.tool||``).toLowerCase()===`askuserquestion`?!0:ae(e.input):!1,oe=e=>({questions:e.input?.questions??[]}),se=o({name:`CodingBridgeTranscriptItem`,directives:{highlight:k},components:{FontAwesomeIcon:N,VueMarkdown:te},props:{event:{type:Object,required:!0}},computed:{commandText(){let e=this.event.input;if(!e)return``;for(let t of[`command`,`cmd`,`script`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}return``},filePath(){let e=this.event.input;if(!e)return``;for(let t of[`file_path`,`filePath`,`path`,`notebook_path`,`filename`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}return``},toolDescription(){let e=this.event.input?.description;return typeof e==`string`?e:``},toolIcon(){if(this.commandText)return`fa-solid fa-terminal`;let e=(this.event.tool??``).toLowerCase();return/read|cat|view/.test(e)?`fa-solid fa-file-lines`:/write|edit|create|update|insert/.test(e)?`fa-solid fa-pen`:/grep|glob|search|find|list/.test(e)?`fa-solid fa-magnifying-glass`:`fa-solid fa-code`},questionLines(){let e=(this.event.tool??``).toLowerCase(),t=this.event.input?.questions;return!(e===`askuserquestion`||Array.isArray(t))||!Array.isArray(t)?[]:t.filter(e=>e&&typeof e.question==`string`).map(e=>({header:typeof e.header==`string`?e.header:``,question:e.question}))},inputText(){let e=this.event.input;if(!e)return``;let t={};for(let[n,r]of Object.entries(e))n===`timeout`||n===`description`||(t[n]=r);if(Object.keys(t).length===0)return``;try{return JSON.stringify(t,null,2)}catch{return String(e)}},resultText(){let e=this.event.content;return typeof e==`string`&&e.length>0?e:`—`},resultLabel(){let e=[];return this.event.is_error?e.push(this.$t(`codingBridge.transcript.turnFailed`)):e.push(this.$t(`codingBridge.transcript.turnDone`)),typeof this.event.cost_usd==`number`&&this.event.cost_usd>0&&e.push(`$${this.event.cost_usd.toFixed(4)}`),e.join(` · `)},hasAttachments(){return!!this.event.attachments?.length},noticeText(){let e=this.event.subtype,t=this.event.command;if(t){if(e===`slash_unavailable`)return this.$t(`codingBridge.notice.slashUnavailable`,{command:t});if(e===`slash_codex_unsupported`)return this.$t(`codingBridge.notice.slashCodexUnsupported`,{command:t})}return this.event.text||``}}}),ce={key:0,class:`flex justify-end`},le={class:`max-w-[85%] rounded-lg px-3 py-2 bg-[var(--el-color-primary)] text-white whitespace-pre-wrap break-words`},ue=[`src`],de=[`href`],fe=[`src`],pe={key:1,class:`flex h-9 w-9 items-center justify-center rounded bg-white/15`},me={class:`min-w-0 truncate`},he={key:2},ge={key:2,class:`whitespace-pre-wrap break-words italic text-[var(--app-text-subtle)] border-l-2 border-[var(--app-border-subtle)] pl-3`},_e={key:3,class:`overflow-hidden rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)]`},ve={class:`flex items-center gap-2 px-2.5 py-1.5 font-medium text-[var(--app-text-subtle)]`},ye={key:0,class:`min-w-0 truncate text-xs font-normal opacity-70`},be={key:0,class:`flex flex-col gap-1.5 px-2.5 pb-2`},xe={key:0,class:`font-medium text-[var(--app-text)]`},Se={class:`whitespace-pre-wrap break-words text-[var(--app-text-subtle)]`},Ce={key:1,class:`px-2.5 pb-2`},we={class:`flex gap-2 overflow-x-auto rounded border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-2.5 py-1.5 font-mono text-xs`},Te={class:`whitespace-pre-wrap break-words`},Ee={key:2,class:`px-2.5 pb-2 font-mono text-xs break-all text-[var(--app-text-subtle)]`},De={key:3,class:`m-0 overflow-x-auto whitespace-pre-wrap break-words px-2.5 pb-2 text-xs text-[var(--app-text-subtle)]`},Oe={key:5,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)]`},ke={key:6,class:`flex items-start gap-2 rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)] text-[var(--app-text-subtle)] px-3 py-2 text-xs`},Ae={class:`whitespace-pre-wrap break-words`},je={key:7,class:`rounded-md bg-[var(--el-color-danger-light-9)] text-[var(--el-color-danger)] px-3 py-2 whitespace-pre-wrap break-words`};function Me(r,o,f,h,_,v){let y=u(`font-awesome-icon`),b=u(`vue-markdown`),x=p(`highlight`);return l(),d(`div`,{class:e([`transcript-item text-sm leading-relaxed`,`kind-${r.event.kind}`])},[r.event.kind===`prompt`?(l(),d(`div`,ce,[n(`div`,le,[r.event.images&&r.event.images.length?(l(),d(`div`,{key:0,class:e([`flex flex-wrap gap-1.5`,{"mb-1.5":r.event.text||r.hasAttachments}])},[(l(!0),d(g,null,s(r.event.images,(e,t)=>(l(),d(`img`,{key:t,src:e,class:`w-16 h-16 rounded object-cover`,alt:``},null,8,ue))),128))],2)):a(``,!0),r.hasAttachments?(l(),d(`div`,{key:1,class:e([`flex flex-wrap gap-1.5`,{"mb-1.5":r.event.text}])},[(l(!0),d(g,null,s(r.event.attachments,(e,t)=>(l(),d(`a`,{key:`${e.url}-${t}`,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`flex max-w-[220px] items-center gap-2 rounded-md bg-white/15 px-2 py-1.5 text-xs text-white hover:bg-white/20`},[e.type===`image`?(l(),d(`img`,{key:0,src:e.url,class:`h-9 w-9 rounded object-cover`,alt:``},null,8,fe)):(l(),d(`span`,pe,[i(y,{icon:`fa-solid fa-file`})])),n(`span`,me,c(e.name||e.url),1)],8,de))),128))],2)):a(``,!0),r.event.text?(l(),d(`span`,he,c(r.event.text),1)):a(``,!0)])])):r.event.kind===`text`?m((l(),t(b,{key:1,source:r.event.text||``,class:`markdown-body bg-transparent text-[var(--app-text)]`},null,8,[`source`])),[[x]]):r.event.kind===`thinking`?(l(),d(`div`,ge,c(r.event.text),1)):r.event.kind===`tool_use`?(l(),d(`div`,_e,[n(`div`,ve,[i(y,{icon:r.toolIcon,class:`text-[var(--el-color-primary)]`},null,8,[`icon`]),n(`span`,null,c(r.event.tool),1),r.toolDescription?(l(),d(`span`,ye,c(r.toolDescription),1)):a(``,!0)]),r.questionLines.length?(l(),d(`div`,be,[(l(!0),d(g,null,s(r.questionLines,(e,t)=>(l(),d(`div`,{key:t,class:`rounded border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-2.5 py-1.5 text-xs`},[e.header?(l(),d(`div`,xe,c(e.header),1)):a(``,!0),n(`div`,Se,c(e.question),1)]))),128))])):r.commandText?(l(),d(`div`,Ce,[n(`div`,we,[o[0]||=n(`span`,{class:`select-none text-[var(--el-color-success)]`},`$`,-1),n(`span`,Te,c(r.commandText),1)])])):r.filePath?(l(),d(`div`,Ee,c(r.filePath),1)):r.inputText?(l(),d(`pre`,De,c(r.inputText),1)):a(``,!0)])):r.event.kind===`tool_result`?(l(),d(`div`,{key:4,class:e([`overflow-hidden rounded-md`,r.event.is_error?`bg-[var(--el-color-danger-light-9)]`:`bg-[var(--app-sidebar-bg)]`])},[n(`pre`,{class:e([`m-0 max-h-72 overflow-auto whitespace-pre-wrap break-words px-2.5 py-2 font-mono text-xs`,r.event.is_error?`text-[var(--el-color-danger)]`:`text-[var(--app-text-subtle)]`])},c(r.resultText),3)],2)):r.event.kind===`result`?(l(),d(`div`,Oe,[i(y,{icon:r.event.is_error?`fa-solid fa-xmark`:`fa-solid fa-check`},null,8,[`icon`]),n(`span`,null,c(r.resultLabel),1)])):r.event.kind===`notice`?(l(),d(`div`,ke,[i(y,{icon:`fa-solid fa-circle-info`,class:`mt-0.5 flex-none text-[var(--el-color-primary)]`}),n(`span`,Ae,c(r.noticeText),1)])):r.event.kind===`error`?(l(),d(`div`,je,c(r.event.text),1)):a(``,!0)],2)}var Ne=E(se,[[`render`,Me],[`__scopeId`,`data-v-805ee49c`]]),Pe=o({name:`CodingBridgeDirectoryDialog`,components:{ElDialog:M,ElButton:v,FontAwesomeIcon:N},props:{visible:{type:Boolean,default:!1},initialPath:{type:String,default:``}},emits:[`update:visible`,`select`],computed:{listing(){return this.$store.state.codingBridge?.directory},loading(){return this.$store.state.codingBridge?.directoryLoading===!0},directories(){return(this.listing?.entries??[]).filter(e=>e.type===`dir`)},files(){return(this.listing?.entries??[]).filter(e=>e.type===`file`)},isEmpty(){return!!this.listing&&!this.listing.error&&(this.listing.entries??[]).length===0}},methods:{onOpen(){this.$store.dispatch(`codingBridge/browseDir`,this.initialPath||void 0)},onVisibleChange(e){this.$emit(`update:visible`,e),e||this.$store.dispatch(`codingBridge/clearDirectory`)},openDir(e){this.$store.dispatch(`codingBridge/browseDir`,e)},goParent(){this.listing?.parent&&this.$store.dispatch(`codingBridge/browseDir`,this.listing.parent)},refresh(){this.$store.dispatch(`codingBridge/browseDir`,this.listing?.path||this.initialPath||void 0)},chooseCurrent(){this.listing&&!this.listing.error&&(this.$emit(`select`,this.listing.path),this.onVisibleChange(!1))}}}),Fe={class:`flex flex-col gap-2`},Ie={class:`flex items-center gap-2 min-w-0`},Le={class:`text-xs text-[var(--app-text-subtle)] truncate flex-1`,dir:`ltr`},Re={class:`h-72 overflow-y-auto border border-[var(--app-border-subtle)] rounded-md divide-y divide-[var(--app-border-subtle)]`},ze={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)]`},Be={key:1,class:`h-full flex items-center justify-center text-sm text-[var(--el-color-danger)]`},Ve=[`onClick`],He={class:`truncate`,dir:`ltr`},Ue={class:`truncate`,dir:`ltr`},We={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)] py-8`},Ge={key:0,class:`text-[11px] text-[var(--app-text-subtle)] px-1`},Ke={class:`flex items-center justify-end gap-2`};function qe(e,o,p,m,h,_){let v=u(`font-awesome-icon`),y=u(`el-button`),b=u(`el-dialog`);return l(),t(b,{"model-value":e.visible,title:e.$t(`codingBridge.directory.title`),width:`520px`,"append-to-body":``,"onUpdate:modelValue":e.onVisibleChange,onOpen:e.onOpen},{footer:f(()=>[n(`div`,Ke,[i(y,{round:``,onClick:o[0]||=t=>e.onVisibleChange(!1)},{default:f(()=>[r(c(e.$t(`common.button.cancel`)),1)]),_:1}),i(y,{type:`primary`,round:``,disabled:!e.listing||!!e.listing.error,onClick:e.chooseCurrent},{default:f(()=>[r(c(e.$t(`codingBridge.directory.choose`)),1)]),_:1},8,[`disabled`,`onClick`])])]),default:f(()=>[n(`div`,Fe,[n(`div`,Ie,[i(y,{size:`small`,circle:``,disabled:!e.listing||!e.listing.parent||e.loading,title:e.$t(`codingBridge.directory.up`),onClick:e.goParent},{default:f(()=>[i(v,{icon:`fa-solid fa-arrow-up`})]),_:1},8,[`disabled`,`title`,`onClick`]),n(`span`,Le,c(e.listing?e.listing.path:`…`),1),i(y,{size:`small`,circle:``,disabled:e.loading,title:e.$t(`codingBridge.directory.refresh`),onClick:e.refresh},{default:f(()=>[i(v,{icon:`fa-solid fa-rotate-right`,spin:e.loading},null,8,[`spin`])]),_:1},8,[`disabled`,`title`,`onClick`])]),n(`div`,Re,[e.loading&&!e.listing?(l(),d(`div`,ze,c(e.$t(`codingBridge.directory.loading`)),1)):e.listing&&e.listing.error?(l(),d(`div`,Be,c(e.listing.error),1)):(l(),d(g,{key:2},[(l(!0),d(g,null,s(e.directories,t=>(l(),d(`button`,{key:t.path,type:`button`,class:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--app-content-hover-bg)]`,onClick:n=>e.openDir(t.path)},[i(v,{icon:`fa-solid fa-folder`,class:`text-[var(--el-color-warning)]`}),n(`span`,He,c(t.name),1)],8,Ve))),128)),(l(!0),d(g,null,s(e.files,e=>(l(),d(`div`,{key:e.path,class:`w-full flex items-center gap-2 px-3 py-2 text-sm text-[var(--app-text-subtle)]`},[i(v,{icon:`fa-solid fa-file`}),n(`span`,Ue,c(e.name),1)]))),128)),e.isEmpty?(l(),d(`div`,We,c(e.$t(`codingBridge.directory.empty`)),1)):a(``,!0)],64))]),e.listing&&e.listing.truncated?(l(),d(`p`,Ge,c(e.$t(`codingBridge.directory.truncated`)),1)):a(``,!0)])]),_:1},8,[`model-value`,`title`,`onUpdate:modelValue`,`onOpen`])}var Je=E(Pe,[[`render`,qe]]),Ye=`data:image/svg+xml,%3csvg%20fill='%23D97757'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='m4.7144%2015.9555%204.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608%201.5179.1032%202.2767.1578%201.6514.0972%202.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973%209.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686%201.9064%201.4754%202.4893%201.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335%206.6997%200l.9957.1336.419.3642.6192%201.4147%201.0018%202.2282%201.5543%203.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853%201.8517-.5586%202.9021-.3643%201.9429h.2125l.2429-.2429.9835-1.3053%201.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759%201.1293-.34%201.1657-1.0625%201.3478-.8804%201.1414-1.2628%201.7-.7893%201.36.0729.1093.1882-.0183%202.8535-.607%201.5421-.2794%201.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607%201.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929%201.0686%202.0035%201.8092%202.5075%202.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496%202.3436%203.5214.1214%201.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38%2017.959l-1.1414-1.9428-.1397.079-.674%207.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328%201.9672-2.1796%202.9446-1.7243%201.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889%202.386-3.0357%201.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385%204.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429%201.9064-1.3114Z'/%3e%3c/svg%3e`,Xe=`data:image/svg+xml,%3csvg%20fill='%23000000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M22.282%209.821a5.985%205.985%200%200%200-.516-4.91%206.046%206.046%200%200%200-6.51-2.9A6.065%206.065%200%200%200%204.981%204.18a5.985%205.985%200%200%200-3.998%202.9%206.046%206.046%200%200%200%20.743%207.097%205.98%205.98%200%200%200%20.51%204.911%206.051%206.051%200%200%200%206.515%202.9A5.985%205.985%200%200%200%2013.26%2024a6.056%206.056%200%200%200%205.772-4.206%205.99%205.99%200%200%200%203.997-2.9%206.056%206.056%200%200%200-.747-7.073zM13.26%2022.43a4.476%204.476%200%200%201-2.876-1.04l.141-.081%204.779-2.758a.795.795%200%200%200%20.392-.681v-6.737l2.02%201.168a.071.071%200%200%201%20.038.052v5.583a4.504%204.504%200%200%201-4.494%204.494zM3.6%2018.304a4.47%204.47%200%200%201-.535-3.014l.142.085%204.783%202.759a.771.771%200%200%200%20.78%200l5.843-3.369v2.332a.08.08%200%200%201-.033.062L9.74%2019.95a4.5%204.5%200%200%201-6.14-1.646zM2.34%207.896a4.485%204.485%200%200%201%202.366-1.973V11.6a.766.766%200%200%200%20.388.676l5.815%203.355-2.02%201.168a.076.076%200%200%201-.071%200l-4.83-2.786A4.504%204.504%200%200%201%202.34%207.872zm16.597%203.855l-5.833-3.387L15.119%207.2a.076.076%200%200%201%20.071%200l4.83%202.791a4.494%204.494%200%200%201-.676%208.105v-5.678a.79.79%200%200%200-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776%200%200%200-.785%200L9.409%209.23V6.897a.066.066%200%200%201%20.028-.061l4.83-2.787a4.5%204.5%200%200%201%206.68%204.66zm-12.64%204.135l-2.02-1.164a.08.08%200%200%201-.038-.057V6.075a4.5%204.5%200%200%201%207.375-3.453l-.142.08L8.704%205.46a.795.795%200%200%200-.393.681zm1.097-2.365l2.602-1.5%202.607%201.5v2.999l-2.597%201.5-2.607-1.5z'/%3e%3c/svg%3e`,Ze=50*1024*1024,Q=10,Qe={claude:{src:Ye,invertOnDark:!1},codex:{src:Xe,invertOnDark:!0}},$e=o({name:`CodingBridgeSessionView`,components:{ElInput:O,ElButton:v,ElPopover:w,ElDropdown:C,ElDropdownMenu:S,ElDropdownItem:x,ElUpload:y,FontAwesomeIcon:N,TranscriptItem:Ne,DirectoryDialog:Je,AskUserQuestionCard:ne},mixins:[T],emits:[`history`],data(){return{prompt:``,cwd:``,model:``,customModelDraft:``,permissionMode:`default`,provider:`claude`,effort:``,directoryVisible:!1,slashMenuOpen:!1,slashActiveIndex:0,attachmentFileList:[],uploadUrl:ee()+`/api/v1/files/`,maxAttachments:Q}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},currentNode(){return this.$store.state.codingBridge?.nodes?.find(e=>e.node_id===this.currentNodeId)},nodeOnline(){return this.currentNode?.status===`online`},currentSessionId(){return this.$store.state.codingBridge?.currentSessionId},currentSession(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.sessions?.[e]:void 0},events(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.events?.[e]??[]:[]},pendingQuestion(){let e=this.currentSessionId;if(!e)return;let t=(this.$store.state.codingBridge?.permissions??[]).find(t=>t.session_id===e&&Z(t));return t?{request_id:t.request_id,payload:oe(t)}:void 0},isNewSession(){return!this.currentSessionId},readonly(){return this.currentSession?.readonly===!0},resumeHint(){return!!this.currentSession?.provider&&!this.currentSession?.started&&!this.readonly},replayLabel(){return!this.currentSession?.provider||this.currentSession?.started?``:this.currentSession.provider===`codex`?this.$t(`codingBridge.history.codexLabel`):this.$t(`codingBridge.history.claudeLabel`)},running(){let e=this.currentSession?.status;return e===`running`||e===`starting`},connected(){return this.$store.state.codingBridge?.connection===`connected`},attachments(){return(this.attachmentFileList||[]).map(e=>{let t=e.response?.file_url||(typeof e.url==`string`&&!e.url.startsWith(`blob:`)?e.url:``);if(!t)return;let n=e.raw,r=n?.type||e.mime_type||``;return{type:this.isImageAttachment(e)?`image`:`file`,url:t,name:e.name,mime_type:r,size:n?.size}}).filter(e=>!!e)},uploadingAttachments(){return(this.attachmentFileList||[]).some(e=>this.isAttachmentUploading(e))},canSend(){return(!!this.prompt.trim()||this.attachments.length>0)&&!this.uploadingAttachments&&this.connected&&this.nodeOnline&&this.currentProviderAvailable},composerHint(){return this.uploadingAttachments?this.$t(`codingBridge.session.uploadingAttachment`):this.providerCaps.length&&!this.currentProviderAvailable?this.$t(`codingBridge.session.providerUnavailableHint`,{name:this.providerName(this.provider)}):this.resumeHint?this.$t(`codingBridge.history.resumeHint`):this.$t(`codingBridge.session.enterHint`)},nodeCapabilities(){let e=this.currentNodeId;return e?this.$store.state.codingBridge?.capabilities?.[e]:void 0},providerCaps(){return this.nodeCapabilities?.providers??[]},currentProviderCap(){return this.providerCaps.find(e=>e.name===this.provider)},currentProviderAvailable(){return this.providerCaps.length?this.currentProviderCap?.available!==!1:!0},providerOptions(){return this.providerCaps.length?this.providerCaps.map(e=>({value:e.name,label:e.label,available:e.available!==!1})):[{label:this.$t(`codingBridge.session.providerClaude`),value:`claude`,available:!0},{label:this.$t(`codingBridge.session.providerCodex`),value:`codex`,available:!0}]},modelOptions(){return this.currentProviderCap?.models??[]},allowCustomModel(){return this.currentProviderCap?.allow_custom_model??!0},effortOptions(){let e=this.currentProviderCap?.efforts;return(e&&e.length?e:[``]).map(e=>({value:e,label:this.effortLabel(e)}))},permissionModeOptions(){let e=this.currentProviderCap?.permission_modes;return(e&&e.length?e:[`default`,`acceptEdits`,`plan`,`bypassPermissions`]).map(e=>({value:e,label:this.permissionModeLabel(e)}))},sessionMeta(){let e=this.currentSession;if(!e)return``;let t=[];return e.provider&&t.push(this.providerName(e.provider)),e.cwd&&t.push(e.cwd),e.model&&t.push(e.model),t.join(` · `)},activeProviderName(){return this.currentSession?.provider||this.provider},slashCommands(){let e=this.activeProviderName;return this.providerCaps.find(t=>t.name===e)?.commands??[]},slashMatches(){let e=this.prompt.match(/^\/(\S*)$/);if(!e)return[];let t=e[1].toLowerCase();return this.slashCommands.filter(e=>[e.name,...e.aliases??[]].some(e=>e.toLowerCase().startsWith(t))).slice(0,8)},slashMenuVisible(){return this.slashMenuOpen&&this.slashMatches.length>0}},watch:{events(){this.scrollToBottom()},pendingQuestion(){this.scrollToBottom()},currentSessionId(){this.scrollToBottom(),this.syncSessionSettings()},currentNodeId(){this.requestCapabilities()},providerCaps(){if(!this.isNewSession||!this.providerCaps.length)return;let e=this.providerCaps.find(e=>e.name===this.provider);if(!e||e.available===!1){let e=this.providerCaps.find(e=>e.available!==!1);e&&(this.provider=e.name)}},provider(){this.isNewSession&&(this.model=``,this.effort=``)},prompt(e){this.slashMenuOpen=/^\/\S*$/.test(e),this.slashActiveIndex>=this.slashMatches.length&&(this.slashActiveIndex=0)}},mounted(){this.requestCapabilities(),this.syncSessionSettings()},methods:{requestCapabilities(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getCapabilities`,this.currentNodeId)},effortLabel(e){let t={"":`codingBridge.session.effortDefault`,low:`codingBridge.session.effortLow`,medium:`codingBridge.session.effortMedium`,high:`codingBridge.session.effortHigh`,max:`codingBridge.session.effortMax`}[e];return t?this.$t(t):e},permissionModeLabel(e){let t={default:`codingBridge.session.permissionModeDefault`,acceptEdits:`codingBridge.session.permissionModeAcceptEdits`,plan:`codingBridge.session.permissionModePlan`,bypassPermissions:`codingBridge.session.permissionModeBypass`}[e];return t?this.$t(t):e},providerName(e){let t=this.providerCaps.find(t=>t.name===e);return t?t.label:e===`codex`?this.$t(`codingBridge.session.providerCodex`):this.$t(`codingBridge.session.providerClaude`)},providerIcon(e){return Qe[e]??null},syncSessionSettings(){let e=this.currentSession;e&&(e.provider&&(this.provider=e.provider),this.model=e.model??``,this.customModelDraft=``,e.cwd&&(this.cwd=e.cwd))},selectModel(e){this.model=e,this.customModelDraft=``,this.closeModelPopover()},applyCustomModel(){let e=this.customModelDraft.trim();e&&(this.model=e,this.customModelDraft=``,this.closeModelPopover())},closeModelPopover(){this.$refs.modelPopover?.hide?.()},onComposerEnter(e){let t=e;t.isComposing||t.keyCode===229||t.shiftKey||t.ctrlKey||t.metaKey||t.altKey||(t.preventDefault(),this.onSend())},onComposerKeydown(e){let t=e;if(this.slashMenuVisible&&!t.isComposing&&t.keyCode!==229){if(t.key===`ArrowDown`){t.preventDefault(),this.moveSlash(1);return}if(t.key===`ArrowUp`){t.preventDefault(),this.moveSlash(-1);return}if(t.key===`Escape`){t.preventDefault(),this.slashMenuOpen=!1;return}if(t.key===`Tab`||t.key===`Enter`&&!t.shiftKey){t.preventDefault(),this.applySlash(this.slashMatches[this.slashActiveIndex]);return}}t.key===`Enter`&&this.onComposerEnter(t)},moveSlash(e){let t=this.slashMatches.length;t&&(this.slashActiveIndex=(this.slashActiveIndex+e+t)%t)},applySlash(e){e&&(this.prompt=`/${e.name} `,this.slashMenuOpen=!1,this.slashActiveIndex=0)},onSend(){if(!this.canSend)return;let e=this.attachments;this.$store.dispatch(`codingBridge/sendPrompt`,{prompt:this.prompt,cwd:this.cwd,model:this.model,permissionMode:this.permissionMode,provider:this.provider,effort:this.effort,attachments:e.length?e:void 0}),this.prompt=``,this.slashMenuOpen=!1,this.slashActiveIndex=0,this.clearAttachments()},onAnswerQuestion(e){this.$store.dispatch(`codingBridge/answerQuestion`,{request_id:e.tool_use_id,output:e.output})},onSkipQuestion(e){this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:e.tool_use_id,decision:`deny`})},beforeAttachmentUpload(e){return this.attachmentFileList.length>=Q?(D.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:Q})),!1):e.size>Ze?(D.warning(this.$t(`codingBridge.session.attachmentTooLarge`)),!1):!0},onAttachmentChange(e){if(!e.url&&e.raw&&this.isImageAttachment(e))try{e.url=URL.createObjectURL(e.raw)}catch{}},onAttachmentSuccess(e,t){e?.file_url&&(this.revokeBlobUrl(t),t.url=e.file_url,t.response=e)},onAttachmentError(){D.error(this.$t(`codingBridge.session.attachmentUploadError`))},onAttachmentExceed(){D.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:Q}))},onTriggerAttachmentUpload(){this.$nextTick(()=>{let e=this.$refs.uploader?.$el;(e?.querySelector(`input.el-upload__input`)||e?.querySelector(`input[type="file"]`))?.click()})},isAttachmentUploading(e){return e.status===`ready`||e.status===`uploading`},isImageAttachment(e){return(e.raw?.type||``).startsWith(`image/`)?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(e.name||e.url||``)},attachmentPreviewUrl(e){return this.isImageAttachment(e)&&(e.url||e.response?.file_url)||``},removeAttachment(e,t){this.revokeBlobUrl(t),this.attachmentFileList.splice(e,1)},clearAttachments(){for(let e of this.attachmentFileList)this.revokeBlobUrl(e);this.attachmentFileList=[]},revokeBlobUrl(e){if(e.url?.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}},onInterrupt(){this.$store.dispatch(`codingBridge/interruptSession`)},openDirectory(){this.directoryVisible=!0},onDirectorySelect(e){this.cwd=e},onNewSession(){this.$store.dispatch(`codingBridge/newSession`),this.cwd=``,this.model=``,this.customModelDraft=``,this.permissionMode=`default`,this.provider=`claude`,this.effort=``,this.prompt=``,this.slashMenuOpen=!1,this.slashActiveIndex=0,this.clearAttachments()},scrollToBottom(){this.$nextTick(()=>{let e=this.$refs.transcript;e&&(e.scrollTop=e.scrollHeight)})}}}),et={class:`session-view flex flex-col h-full bg-[var(--app-content-bg)]`},tt={key:0,class:`flex-1 flex flex-col items-center justify-center text-center p-8 text-[var(--app-text-subtle)]`},nt={class:`text-sm`},rt={class:`flex items-center justify-between gap-3 px-5 py-3 border-b border-[var(--app-border-subtle)]`},it={class:`min-w-0`},at={class:`flex items-center gap-2 font-medium`},ot={class:`truncate`},st={key:0,class:`text-xs text-[var(--app-text-subtle)] truncate`},ct={key:0,class:`text-[var(--el-color-primary)]`},lt={class:`flex items-center gap-2 flex-none`},ut={key:0,class:`px-5 py-2 text-xs bg-[var(--el-color-warning-light-9)] text-[var(--el-color-warning)] border-b border-[var(--app-border-subtle)]`},dt={ref:`transcript`,class:`flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-3`},ft={key:0,class:`m-auto text-center text-sm text-[var(--app-text-subtle)]`},pt={class:`border-t border-[var(--app-border-subtle)] p-3`},mt={key:0,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)] px-1 py-2`},ht={class:`cb-composer rounded-2xl border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-3 py-2.5 transition-colors focus-within:border-[var(--el-color-primary-light-5)]`},gt={key:0,class:`flex flex-wrap gap-2 pb-2`},_t=[`src`,`alt`],vt={key:1,class:`flex h-8 w-8 items-center justify-center rounded bg-[var(--app-content-bg)]`},yt=[`title`],bt={key:2,class:`text-[10px] text-[var(--app-text-subtle)]`},xt=[`title`,`onClick`],St={key:1,class:`cb-slash-menu`},Ct=[`onMousedown`,`onMouseenter`],wt={class:`cb-slash-menu__name`},Tt={key:0,class:`cb-slash-menu__hint`},Et={key:1,class:`cb-slash-menu__desc`},Dt={ref:`attachmentUploadTrigger`,class:`block h-0 w-0`,"aria-hidden":`true`},Ot={class:`mt-1.5 flex items-center gap-1.5`},kt=[`title`],At={class:`flex min-w-0 flex-1 flex-wrap items-center gap-1.5`},jt={type:`button`,class:`cb-pill`},Mt=[`src`],Nt={class:`truncate`},Pt=[`src`],Ft={key:1,class:`ml-1 text-xs opacity-60`},It={key:1,class:`cb-pill cb-pill--static`},Lt=[`src`],Rt={class:`truncate`},zt={type:`button`,class:`cb-pill`},Bt={class:`truncate`},Vt={class:`cb-model-menu`},Ht={class:`truncate`},Ut=[`onClick`],Wt={class:`truncate`},Gt={key:0,class:`cb-model-custom`},Kt={type:`button`,class:`cb-pill`},qt={class:`truncate`},Jt={type:`button`,class:`cb-pill`},Yt={class:`truncate`},Xt={type:`button`,class:`cb-pill`},Zt={class:`truncate`},Qt=[`title`,`aria-label`],$t={key:3,class:`cb-pill cb-pill--static`},en={class:`truncate`},tn={class:`text-[11px] text-[var(--app-text-subtle)] mt-1 px-1`};function nn(o,p,m,v,y,b){let x=u(`font-awesome-icon`),S=u(`el-button`),C=u(`transcript-item`),w=u(`ask-user-question-card`),T=u(`el-input`),E=u(`el-upload`),D=u(`el-dropdown-item`),O=u(`el-dropdown-menu`),k=u(`el-dropdown`),A=u(`el-popover`),j=u(`directory-dialog`);return l(),d(`div`,et,[o.currentNode?(l(),d(g,{key:1},[n(`div`,rt,[n(`div`,it,[n(`div`,at,[n(`span`,ot,c(o.currentNode.name),1),n(`span`,{class:e([`inline-block w-2 h-2 rounded-full flex-none`,o.nodeOnline?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`])},null,2)]),o.currentSession?(l(),d(`div`,st,[n(`span`,null,c(o.sessionMeta),1),o.replayLabel?(l(),d(`span`,ct,` · `+c(o.replayLabel),1)):a(``,!0)])):a(``,!0)]),n(`div`,lt,[i(S,{size:`small`,round:``,onClick:p[0]||=e=>o.$emit(`history`)},{default:f(()=>[i(x,{icon:`fa-solid fa-clock-rotate-left`,class:`mr-1`}),r(` `+c(o.$t(`codingBridge.history.button`)),1)]),_:1}),o.currentSessionId?(l(),t(S,{key:0,size:`small`,round:``,onClick:o.onNewSession},{default:f(()=>[i(x,{icon:`fa-solid fa-plus`,class:`mr-1`}),r(` `+c(o.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])):a(``,!0)])]),o.nodeOnline?a(``,!0):(l(),d(`div`,ut,c(o.$t(`codingBridge.session.deviceOffline`)),1)),n(`div`,dt,[o.events.length?a(``,!0):(l(),d(`div`,ft,c(o.$t(`codingBridge.session.startHint`)),1)),(l(!0),d(g,null,s(o.events,e=>(l(),t(C,{key:e.id,event:e},null,8,[`event`]))),128)),o.pendingQuestion?(l(),t(w,{key:o.pendingQuestion.request_id,"tool-use-id":o.pendingQuestion.request_id,payload:o.pendingQuestion.payload,onSubmit:o.onAnswerQuestion,onSkip:o.onSkipQuestion},null,8,[`tool-use-id`,`payload`,`onSubmit`,`onSkip`])):a(``,!0)],512),n(`div`,pt,[o.readonly?(l(),d(`div`,mt,[i(x,{icon:`fa-solid fa-eye`}),n(`span`,null,c(o.$t(`codingBridge.history.readonly`)),1),i(S,{class:`ml-auto`,size:`small`,round:``,onClick:o.onNewSession},{default:f(()=>[r(c(o.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])])):(l(),d(g,{key:1},[n(`div`,ht,[o.attachmentFileList.length?(l(),d(`div`,gt,[(l(!0),d(g,null,s(o.attachmentFileList,(e,t)=>(l(),d(`div`,{key:e.uid||e.name||t,class:`group relative flex max-w-[220px] items-center gap-2 rounded-md border border-[var(--app-border-subtle)] bg-[var(--app-sidebar-bg)] px-2 py-1.5 text-xs`},[o.attachmentPreviewUrl(e)?(l(),d(`img`,{key:0,src:o.attachmentPreviewUrl(e),class:`h-8 w-8 rounded object-cover`,alt:o.$t(`codingBridge.session.attachmentImageAlt`)},null,8,_t)):(l(),d(`span`,vt,[i(x,{icon:`fa-solid fa-file`})])),n(`span`,{class:`min-w-0 flex-1 truncate`,title:e.name},c(e.name),9,yt),o.isAttachmentUploading(e)?(l(),d(`span`,bt,c(Math.round(e.percentage||0))+`% `,1)):a(``,!0),n(`button`,{type:`button`,class:`flex h-5 w-5 items-center justify-center rounded-full text-[var(--app-text-subtle)] hover:bg-[var(--app-content-hover-bg)] hover:text-[var(--el-color-danger)]`,title:o.$t(`codingBridge.session.removeAttachment`),onClick:n=>o.removeAttachment(t,e)},[i(x,{icon:`fa-solid fa-xmark`})],8,xt)]))),128))])):a(``,!0),o.slashMenuVisible?(l(),d(`ul`,St,[(l(!0),d(g,null,s(o.slashMatches,(t,r)=>(l(),d(`li`,{key:t.name,class:e([`cb-slash-menu__item`,{"cb-slash-menu__item--active":r===o.slashActiveIndex}]),onMousedown:_(e=>o.applySlash(t),[`prevent`]),onMouseenter:e=>o.slashActiveIndex=r},[n(`span`,wt,`/`+c(t.name),1),t.argument_hint?(l(),d(`span`,Tt,c(t.argument_hint),1)):a(``,!0),t.description?(l(),d(`span`,Et,c(t.description),1)):a(``,!0)],42,Ct))),128))])):a(``,!0),i(T,{modelValue:o.prompt,"onUpdate:modelValue":p[1]||=e=>o.prompt=e,type:`textarea`,autosize:{minRows:2,maxRows:12},resize:`none`,class:`cb-composer__input`,placeholder:o.$t(`codingBridge.session.promptPlaceholder`),onKeydown:o.onComposerKeydown},null,8,[`modelValue`,`placeholder`,`onKeydown`]),i(E,{ref:`uploader`,"file-list":o.attachmentFileList,"onUpdate:fileList":p[2]||=e=>o.attachmentFileList=e,class:`h-0 w-0 overflow-hidden opacity-0`,name:`file`,action:o.uploadUrl,headers:o.headers,multiple:!0,limit:o.maxAttachments,"show-file-list":!1,"before-upload":o.beforeAttachmentUpload,"on-change":o.onAttachmentChange,"on-success":o.onAttachmentSuccess,"on-error":o.onAttachmentError,"on-exceed":o.onAttachmentExceed},{default:f(()=>[n(`span`,Dt,null,512)]),_:1},8,[`file-list`,`action`,`headers`,`limit`,`before-upload`,`on-change`,`on-success`,`on-error`,`on-exceed`]),n(`div`,Ot,[n(`button`,{type:`button`,class:`cb-icon-btn`,title:o.$t(`codingBridge.session.attachFile`),onClick:p[3]||=(...e)=>o.onTriggerAttachmentUpload&&o.onTriggerAttachmentUpload(...e)},[i(x,{icon:`fa-solid fa-paperclip`})],8,kt),n(`div`,At,[o.isNewSession?(l(),t(k,{key:0,trigger:`click`,onCommand:p[4]||=e=>o.provider=e},{dropdown:f(()=>[i(O,null,{default:f(()=>[(l(!0),d(g,null,s(o.providerOptions,n=>(l(),t(D,{key:n.value,command:n.value,disabled:!n.available},{default:f(()=>[i(x,{icon:`fa-solid fa-check`,class:e([`mr-2`,n.value===o.provider?`opacity-100`:`opacity-0`])},null,8,[`class`]),o.providerIcon(n.value)?(l(),d(`img`,{key:0,src:o.providerIcon(n.value).src,class:e([`cb-pill__brand mr-1.5`,{"cb-pill__brand--invert":o.providerIcon(n.value).invertOnDark}]),alt:``},null,10,Pt)):a(``,!0),r(` `+c(n.label)+` `,1),n.available?a(``,!0):(l(),d(`span`,Ft,c(o.$t(`codingBridge.session.providerUnavailable`)),1))]),_:2},1032,[`command`,`disabled`]))),128))]),_:1})]),default:f(()=>[n(`button`,jt,[o.providerIcon(o.provider)?(l(),d(`img`,{key:0,src:o.providerIcon(o.provider).src,class:e([`cb-pill__brand`,{"cb-pill__brand--invert":o.providerIcon(o.provider).invertOnDark}]),alt:``},null,10,Mt)):(l(),t(x,{key:1,icon:`fa-solid fa-code`,class:`cb-pill__icon`})),n(`span`,Nt,c(o.providerName(o.provider)),1),i(x,{icon:`fa-solid fa-chevron-down`,class:`cb-pill__caret`})])]),_:1})):(l(),d(`span`,It,[o.providerIcon(o.currentSession?.provider||`claude`)?(l(),d(`img`,{key:0,src:o.providerIcon(o.currentSession?.provider||`claude`).src,class:e([`cb-pill__brand`,{"cb-pill__brand--invert":o.providerIcon(o.currentSession?.provider||`claude`).invertOnDark}]),alt:``},null,10,Lt)):(l(),t(x,{key:1,icon:`fa-solid fa-code`,class:`cb-pill__icon`})),n(`span`,Rt,c(o.providerName(o.currentSession?.provider||`claude`)),1)])),i(A,{ref:`modelPopover`,trigger:`click`,placement:`top-start`,width:260},{reference:f(()=>[n(`button`,zt,[i(x,{icon:`fa-solid fa-brain`,class:`cb-pill__icon`}),n(`span`,Bt,c(o.model||o.$t(`codingBridge.session.modelDefault`)),1),i(x,{icon:`fa-solid fa-chevron-down`,class:`cb-pill__caret`})])]),default:f(()=>[n(`div`,Vt,[n(`button`,{type:`button`,class:`cb-model-option`,onClick:p[5]||=e=>o.selectModel(``)},[i(x,{icon:`fa-solid fa-check`,class:e([`cb-model-option__check`,o.model?`opacity-0`:`opacity-100`])},null,8,[`class`]),n(`span`,Ht,c(o.$t(`codingBridge.session.modelDefault`)),1)]),(l(!0),d(g,null,s(o.modelOptions,t=>(l(),d(`button`,{key:t.value,type:`button`,class:`cb-model-option`,onClick:e=>o.selectModel(t.value)},[i(x,{icon:`fa-solid fa-check`,class:e([`cb-model-option__check`,t.value===o.model?`opacity-100`:`opacity-0`])},null,8,[`class`]),n(`span`,Wt,c(t.label),1)],8,Ut))),128)),o.allowCustomModel?(l(),d(`div`,Gt,[i(T,{modelValue:o.customModelDraft,"onUpdate:modelValue":p[6]||=e=>o.customModelDraft=e,size:`small`,placeholder:o.$t(`codingBridge.session.modelPlaceholder`),onKeyup:h(o.applyCustomModel,[`enter`])},{append:f(()=>[i(S,{disabled:!o.customModelDraft.trim(),onClick:o.applyCustomModel},{default:f(()=>[i(x,{icon:`fa-solid fa-check`})]),_:1},8,[`disabled`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`onKeyup`])])):a(``,!0)])]),_:1},512),o.isNewSession?(l(),d(g,{key:2},[o.effortOptions.length>1?(l(),t(k,{key:0,trigger:`click`,onCommand:p[7]||=e=>o.effort=e},{dropdown:f(()=>[i(O,null,{default:f(()=>[(l(!0),d(g,null,s(o.effortOptions,n=>(l(),t(D,{key:n.value,command:n.value},{default:f(()=>[i(x,{icon:`fa-solid fa-check`,class:e([`mr-2`,n.value===o.effort?`opacity-100`:`opacity-0`])},null,8,[`class`]),r(` `+c(n.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:f(()=>[n(`button`,Kt,[i(x,{icon:`fa-solid fa-gauge-high`,class:`cb-pill__icon`}),n(`span`,qt,c(o.effortLabel(o.effort)),1),i(x,{icon:`fa-solid fa-chevron-down`,class:`cb-pill__caret`})])]),_:1})):a(``,!0),i(k,{trigger:`click`,onCommand:p[8]||=e=>o.permissionMode=e},{dropdown:f(()=>[i(O,null,{default:f(()=>[(l(!0),d(g,null,s(o.permissionModeOptions,n=>(l(),t(D,{key:n.value,command:n.value},{default:f(()=>[i(x,{icon:`fa-solid fa-check`,class:e([`mr-2`,n.value===o.permissionMode?`opacity-100`:`opacity-0`])},null,8,[`class`]),r(` `+c(n.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:f(()=>[n(`button`,Jt,[i(x,{icon:`fa-solid fa-shield-halved`,class:`cb-pill__icon`}),n(`span`,Yt,c(o.permissionModeLabel(o.permissionMode)),1),i(x,{icon:`fa-solid fa-chevron-down`,class:`cb-pill__caret`})])]),_:1}),i(A,{trigger:`click`,placement:`top-start`,width:320},{reference:f(()=>[n(`button`,Xt,[i(x,{icon:`fa-solid fa-folder-open`,class:`cb-pill__icon`}),n(`span`,Zt,c(o.cwd||o.$t(`codingBridge.session.cwdDefault`)),1),i(x,{icon:`fa-solid fa-chevron-down`,class:`cb-pill__caret`})])]),default:f(()=>[i(T,{modelValue:o.cwd,"onUpdate:modelValue":p[12]||=e=>o.cwd=e,size:`small`,clearable:``,class:`cb-cwd-input`,placeholder:o.$t(`codingBridge.session.cwdPlaceholder`)},{suffix:f(()=>[n(`span`,{class:`cb-cwd-browse`,role:`button`,tabindex:`0`,title:o.$t(`codingBridge.directory.title`),"aria-label":o.$t(`codingBridge.directory.title`),onClick:p[9]||=(...e)=>o.openDirectory&&o.openDirectory(...e),onKeydown:[p[10]||=h(_((...e)=>o.openDirectory&&o.openDirectory(...e),[`prevent`]),[`enter`]),p[11]||=h(_((...e)=>o.openDirectory&&o.openDirectory(...e),[`prevent`]),[`space`])]},[i(x,{icon:`fa-solid fa-folder-open`})],40,Qt)]),_:1},8,[`modelValue`,`placeholder`])]),_:1})],64)):a(``,!0),!o.isNewSession&&o.currentSession?.cwd?(l(),d(`span`,$t,[i(x,{icon:`fa-solid fa-folder-open`,class:`cb-pill__icon`}),n(`span`,en,c(o.currentSession?.cwd),1)])):a(``,!0)]),o.running?(l(),t(S,{key:0,circle:``,onClick:o.onInterrupt},{default:f(()=>[i(x,{icon:`fa-solid fa-stop`})]),_:1},8,[`onClick`])):a(``,!0),i(S,{type:`primary`,round:``,disabled:!o.canSend,onClick:o.onSend},{default:f(()=>[r(c(o.$t(`codingBridge.session.send`)),1)]),_:1},8,[`disabled`,`onClick`])])]),n(`p`,tn,c(o.composerHint),1)],64))])],64)):(l(),d(`div`,tt,[i(x,{icon:`fa-solid fa-laptop-code`,class:`text-4xl mb-3`}),n(`p`,nt,c(o.$t(`codingBridge.session.noDevice`)),1)])),i(j,{visible:o.directoryVisible,"onUpdate:visible":p[13]||=e=>o.directoryVisible=e,"initial-path":o.cwd,onSelect:o.onDirectorySelect},null,8,[`visible`,`initial-path`,`onSelect`])])}var rn=E($e,[[`render`,nn],[`__scopeId`,`data-v-6318a784`]]),an=o({name:`CodingBridgePairDialog`,components:{ElDialog:M,ElInput:O,ElButton:v,FontAwesomeIcon:N},props:{visible:{type:Boolean,default:!1},initialCode:{type:String,default:``}},emits:[`update:visible`],data(){return{code:``}},computed:{claiming(){return this.$store.state.codingBridge?.status?.claimPair===j.Request}},watch:{visible(e){e&&this.initialCode&&(this.code=this.initialCode)},initialCode(e){e&&(this.code=e)}},methods:{async onClaim(){let e=this.code.trim();if(e)try{let t=await this.$store.dispatch(`codingBridge/claimPair`,e);D.success(this.$t(`codingBridge.pair.success`,{name:t})),this.code=``,this.$emit(`update:visible`,!1)}catch(e){let t=e?.response?.status;t===404?D.error(this.$t(`codingBridge.pair.invalidCode`)):t===409?D.error(this.$t(`codingBridge.pair.usedCode`)):D.error(this.$t(`codingBridge.pair.failed`))}}}}),on={class:`content`},sn={class:`text-sm text-[var(--app-text-subtle)] mb-4`},cn={class:`steps list-none m-0 p-0 mb-4`},ln={class:`flex gap-3 mb-3`},un={class:`flex-1 min-w-0`},dn={class:`text-sm mb-1`},fn={class:`flex gap-3 mb-3`},pn={class:`flex-1 min-w-0`},mn={class:`text-sm mb-1`},hn={class:`flex gap-3`},gn={class:`flex-1 min-w-0`},_n={class:`text-sm`};function vn(e,a,o,s,d,p){let m=u(`el-input`),g=u(`font-awesome-icon`),_=u(`el-button`),v=u(`el-dialog`);return l(),t(v,{"model-value":e.visible,width:`520px`,title:e.$t(`codingBridge.pair.title`),center:``,"onUpdate:modelValue":a[1]||=t=>e.$emit(`update:visible`,t)},{default:f(()=>[n(`div`,on,[n(`p`,sn,c(e.$t(`codingBridge.pair.intro`)),1),n(`ol`,cn,[n(`li`,ln,[a[3]||=n(`span`,{class:`step-index`},`1`,-1),n(`div`,un,[n(`p`,dn,c(e.$t(`codingBridge.pair.step1`)),1),a[2]||=n(`code`,{class:`cmd`},`pip install coding-bridge-agent`,-1)])]),n(`li`,fn,[a[5]||=n(`span`,{class:`step-index`},`2`,-1),n(`div`,pn,[n(`p`,mn,c(e.$t(`codingBridge.pair.step2`)),1),a[4]||=n(`code`,{class:`cmd`},`coding-bridge-agent up`,-1)])]),n(`li`,hn,[a[6]||=n(`span`,{class:`step-index`},`3`,-1),n(`div`,gn,[n(`p`,_n,c(e.$t(`codingBridge.pair.step3`)),1)])])]),i(m,{modelValue:e.code,"onUpdate:modelValue":a[0]||=t=>e.code=t,size:`large`,class:`mb-3`,placeholder:e.$t(`codingBridge.pair.codePlaceholder`),clearable:``,onKeyup:h(e.onClaim,[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeyup`]),i(_,{type:`primary`,round:``,class:`w-full`,loading:e.claiming,disabled:!e.code.trim(),onClick:e.onClaim},{default:f(()=>[i(g,{icon:`fa-solid fa-link`,class:`mr-1`}),r(` `+c(e.$t(`codingBridge.pair.claim`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:1},8,[`model-value`,`title`])}var yn=E(an,[[`render`,vn],[`__scopeId`,`data-v-3d1ed01f`]]),bn=o({name:`CodingBridgePermissionDialog`,components:{ElDialog:M,ElButton:v,FontAwesomeIcon:N},computed:{request(){return(this.$store.state.codingBridge?.permissions??[]).find(e=>!Z(e))},hasInput(){return!!this.request?.input&&Object.keys(this.request.input).length>0},inputText(){try{return JSON.stringify(this.request?.input,null,2)}catch{return String(this.request?.input??``)}}},methods:{onAllow(){this.request&&this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:this.request.request_id,decision:`allow`})},onDeny(){this.request&&this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:this.request.request_id,decision:`deny`})}}}),xn={key:0,class:`content`},Sn={class:`text-sm text-[var(--app-text-subtle)] mb-3`},Cn={class:`rounded-md border border-[var(--app-border-subtle)] p-3 mb-3`},wn={class:`flex items-center gap-2 font-medium`},Tn={key:0,class:`text-xs text-[var(--app-text-subtle)] mt-1`},En={key:1,class:`mt-2 text-xs overflow-x-auto whitespace-pre-wrap break-words text-[var(--app-text-subtle)] max-h-[200px]`},Dn={class:`flex justify-end gap-2`};function On(e,o,s,p,m,h){let g=u(`font-awesome-icon`),_=u(`el-button`),v=u(`el-dialog`);return l(),t(v,{"model-value":!!e.request,width:`480px`,title:e.$t(`codingBridge.permission.title`),"close-on-click-modal":!1,"show-close":!1,center:``},{footer:f(()=>[n(`div`,Dn,[i(_,{round:``,onClick:e.onDeny},{default:f(()=>[i(g,{icon:`fa-solid fa-xmark`,class:`mr-1`}),r(` `+c(e.$t(`codingBridge.permission.deny`)),1)]),_:1},8,[`onClick`]),i(_,{type:`primary`,round:``,onClick:e.onAllow},{default:f(()=>[i(g,{icon:`fa-solid fa-check`,class:`mr-1`}),r(` `+c(e.$t(`codingBridge.permission.allow`)),1)]),_:1},8,[`onClick`])])]),default:f(()=>[e.request?(l(),d(`div`,xn,[n(`p`,Sn,c(e.$t(`codingBridge.permission.subtitle`)),1),n(`div`,Cn,[n(`div`,wn,[i(g,{icon:`fa-solid fa-code`}),n(`span`,null,c(e.request.display_name||e.request.title||e.request.tool),1)]),e.request.description?(l(),d(`p`,Tn,c(e.request.description),1)):a(``,!0),e.hasInput?(l(),d(`pre`,En,c(e.inputText),1)):a(``,!0)])])):a(``,!0)]),_:1},8,[`model-value`,`title`])}var kn=E(bn,[[`render`,On]]),An=o({name:`CodingBridgeHistoryDrawer`,components:{ElDrawer:b,ElButton:v,FontAwesomeIcon:N},props:{visible:{type:Boolean,default:!1}},emits:[`update:visible`],computed:{currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},loading(){return this.$store.state.codingBridge?.status?.getHistory===j.Request},sessions(){let e=this.currentNodeId;return[...e?this.$store.state.codingBridge?.history?.[e]??[]:[]].sort((e,t)=>(t.updated_at??0)-(e.updated_at??0))}},watch:{visible(e){e&&this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)}},methods:{refresh(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)},open(e){this.currentNodeId&&(this.$store.dispatch(`codingBridge/getHistoryDetail`,{node_id:this.currentNodeId,provider:e.provider,session_id:e.session_id}),this.$emit(`update:visible`,!1))},formatTime(e){try{return new Date(e).toLocaleString()}catch{return``}}}}),jn={class:`flex flex-col h-full`},Mn={class:`flex items-center justify-between mb-3`},Nn={class:`text-xs text-[var(--app-text-subtle)] m-0`},$={key:0,class:`m-auto text-sm text-[var(--app-text-subtle)]`},Pn={key:1,class:`m-auto text-sm text-[var(--app-text-subtle)]`},Fn={key:2,class:`m-auto text-sm text-[var(--app-text-subtle)] text-center`},In={key:3,class:`list-none m-0 p-0 flex-1 overflow-y-auto flex flex-col gap-2`},Ln=[`onClick`],Rn={class:`flex items-center gap-2 mb-1`},zn={class:`text-sm font-medium truncate flex-1`},Bn={class:`text-[11px] text-[var(--app-text-subtle)] truncate`},Vn={key:0},Hn={key:1},Un={class:`text-[11px] text-[var(--app-text-subtle)] mt-0.5`},Wn={key:0},Gn={key:1};function Kn(o,p,m,h,_,v){let y=u(`font-awesome-icon`),b=u(`el-button`),x=u(`el-drawer`);return l(),t(x,{"model-value":o.visible,direction:`rtl`,size:`380px`,title:o.$t(`codingBridge.history.title`),"onUpdate:modelValue":p[0]||=e=>o.$emit(`update:visible`,e)},{default:f(()=>[n(`div`,jn,[n(`div`,Mn,[n(`p`,Nn,c(o.$t(`codingBridge.history.intro`)),1),i(b,{size:`small`,round:``,loading:o.loading,onClick:o.refresh},{default:f(()=>[o.loading?a(``,!0):(l(),t(y,{key:0,icon:`fa-solid fa-rotate-right`,class:`mr-1`})),r(` `+c(o.$t(`codingBridge.history.refresh`)),1)]),_:1},8,[`loading`,`onClick`])]),o.currentNodeId?o.loading&&!o.sessions.length?(l(),d(`div`,Pn,c(o.$t(`codingBridge.history.loading`)),1)):o.sessions.length?(l(),d(`ul`,In,[(l(!0),d(g,null,s(o.sessions,t=>(l(),d(`li`,{key:t.provider+`:`+t.session_id,class:`item rounded-lg p-3 cursor-pointer border border-[var(--app-border-subtle)]`,onClick:e=>o.open(t)},[n(`div`,Rn,[n(`span`,{class:e([`provider-tag`,t.provider])},c(t.provider===`codex`?`Codex`:`Claude`),3),n(`span`,zn,c(t.title),1)]),n(`div`,Bn,[t.cwd?(l(),d(`span`,Vn,c(t.cwd),1)):a(``,!0),t.git_branch?(l(),d(`span`,Hn,` · `+c(t.git_branch),1)):a(``,!0)]),n(`div`,Un,[t.updated_at?(l(),d(`span`,Wn,c(o.formatTime(t.updated_at)),1)):a(``,!0),t.message_count?(l(),d(`span`,Gn,` · `+c(o.$t(`codingBridge.history.messages`,{count:t.message_count})),1)):a(``,!0)])],8,Ln))),128))])):(l(),d(`div`,Fn,c(o.$t(`codingBridge.history.empty`)),1)):(l(),d(`div`,$,c(o.$t(`codingBridge.session.noDevice`)),1))])]),_:1},8,[`model-value`,`title`])}var qn=o({name:`CodingBridgeIndex`,components:{ElButton:v,ElDrawer:b,FontAwesomeIcon:N,NodeList:ie,SessionView:rn,PairDialog:yn,PermissionDialog:kn,HistoryDrawer:E(An,[[`render`,Kn],[`__scopeId`,`data-v-3414881a`]])},data(){return{drawer:!1,pairVisible:!1,historyVisible:!1,initialCode:``}},mounted(){this.$store.dispatch(`codingBridge/connect`),this.$store.dispatch(`codingBridge/getNodes`);let e=this.$route.query.code;typeof e==`string`&&e&&(this.initialCode=e,this.pairVisible=!0)},beforeUnmount(){this.$store.dispatch(`codingBridge/disconnect`)},methods:{openPair(){this.initialCode=``,this.pairVisible=!0},openPairFromDrawer(){this.drawer=!1,this.openPair()}}}),Jn={class:`coding-bridge flex flex-row h-full relative`};function Yn(e,t,n,r,a,o){let s=u(`node-list`),c=u(`session-view`),p=u(`font-awesome-icon`),m=u(`el-button`),h=u(`el-drawer`),g=u(`pair-dialog`),_=u(`permission-dialog`),v=u(`history-drawer`);return l(),d(`div`,Jn,[i(s,{class:`sidebar w-[300px] flex-none`,onPair:e.openPair},null,8,[`onPair`]),i(c,{class:`flex-1 min-w-0`,onHistory:t[0]||=t=>e.historyVisible=!0}),i(m,{circle:``,class:`menu`,onClick:t[1]||=t=>e.drawer=!0},{default:f(()=>[i(p,{icon:`fa-solid fa-laptop-code`})]),_:1}),i(h,{modelValue:e.drawer,"onUpdate:modelValue":t[2]||=t=>e.drawer=t,direction:`ltr`,"with-header":!1,size:`300px`,class:`drawer`},{default:f(()=>[i(s,{onPair:e.openPairFromDrawer},null,8,[`onPair`])]),_:1},8,[`modelValue`]),i(g,{visible:e.pairVisible,"onUpdate:visible":t[3]||=t=>e.pairVisible=t,"initial-code":e.initialCode},null,8,[`visible`,`initial-code`]),i(_),i(v,{visible:e.historyVisible,"onUpdate:visible":t[4]||=t=>e.historyVisible=t},null,8,[`visible`])])}var Xn=E(qn,[[`render`,Yn],[`__scopeId`,`data-v-3a406429`]]);export{Xn as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{$ as e,Bt as t,D as n,E as r,Ht as i,M as a,N as o,O as s,P as c,Q as l,Ut as u,X as d,et as f,k as p,lt as m,x as h}from"./vendor-chart-Df3WBvr0.js";import{t as g}from"./button-Diu_mJ2H.js";import{r as _,t as v}from"./select-BR8DyZel.js";import{t as y}from"./upload-DD2n4P3p.js";import{t as b}from"./tooltip-hII4wDEz.js";import{t as x}from"./image-DvjKNoxC.js";import{t as S}from"./alert-Cs6WDxgv.js";import{t as C}from"./drawer-B42T8GMw.js";import{t as w}from"./switch-D1UMnFeG.js";import{Gn as T,Hn as E,Jr as D,Kn as O,Un as k,Vn as A,Wn as j,Yn as M,Zn as ee,qn as N}from"./constants-vDFRJTq6.js";import{At as P,Dt as F,E as I,Er as L,Mt as te,Nn as ne,Nr as R,Ot as z,gr as B,kt as V,un as H,yr as U}from"./index-Bpg44eWB.js";import{t as W}from"./index.es-D2Gtib5p.js";import{t as G}from"./CopyToClipboard-BvqdtQdo.js";import{t as K}from"./ImagePreview-Cel1agBC.js";import{t as q}from"./BotPlaceholder-DdLK7DwC.js";import{i as J,n as Y,t as X}from"./pagination-BlR28kYu.js";import{n as Z,t as re}from"./NoTasks-BvxBJO_n.js";import{t as ie}from"./Consumption-DiPiwllg.js";import{t as ae}from"./ApiCodeButton-DmgbbHgv.js";import{t as Q}from"./VideoPlayer-BBb01skM.js";var oe=c({name:`LayoutVeo`,components:{ElDrawer:C,ElButton:g,FontAwesomeIcon:W},data(){return{drawer:!1}}}),se={class:`main flex flex-row flex-1`},ce={class:`config w-[320px] flex-none h-full overflow-y-auto bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},le={class:`result h-full p-6 flex-1 flex flex-col min-w-0 overflow-x-hidden bg-[var(--app-content-bg)]`};function ue(t,n,i,a,s,c){let l=f(`font-awesome-icon`),u=f(`el-button`),h=f(`el-drawer`);return d(),p(`div`,se,[r(`div`,ce,[e(t.$slots,`config`,{},void 0,!0)]),r(`div`,le,[e(t.$slots,`result`,{},void 0,!0)]),o(u,{circle:``,class:`menu`,onClick:n[0]||=e=>t.drawer=!0},{default:m(()=>[o(l,{icon:`fa-solid fa-magic`})]),_:1}),o(h,{modelValue:t.drawer,"onUpdate:modelValue":n[1]||=e=>t.drawer=e,direction:`ltr`,"with-header":!1,size:`350px`},{default:m(()=>[e(t.$slots,`config`,{},void 0,!0)]),_:3},8,[`modelValue`])])}var de=I(oe,[[`render`,ue],[`__scopeId`,`data-v-9b26d591`]]),fe=c({name:`ModelSelector`,components:{ElSelect:_,ElOption:v},props:{modelValue:{type:String,default:void 0}},emits:[`update:modelValue`],data(){return{options:[{value:`veo2`,label:`veo2`},{value:`veo2-fast`,label:`veo2-fast`},{value:`veo3`,label:`veo3`},{value:`veo3-fast`,label:`veo3-fast`},{value:`veo31-fast`,label:`veo31-fast`},{value:`veo31`,label:`veo31`},{value:`veo31-fast-ingredients`,label:`veo31-fast-ingredients`}]}},computed:{value:{get(){return this.$store.state.veo?.config?.model},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo.config,model:e})}}},mounted(){this.value||=j}}),pe={class:`field`},me={class:`title font-bold`};function he(e,t,i,a,s,c){let g=f(`el-option`),_=f(`el-select`);return d(),p(`div`,pe,[r(`h2`,me,u(e.$t(`veo.name.model`)),1),o(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`veo.placeholder.select`)},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ge=I(fe,[[`render`,he],[`__scopeId`,`data-v-a59d89c9`]]),_e=c({name:`ActionSelector`,components:{ElSelect:_,ElOption:v},data(){return{}},computed:{options(){return[{value:`text2video`,label:this.$t(`veo.button.action1`)},{value:`image2video`,label:this.$t(`veo.button.action2`)},{value:`ingredients2video`,label:this.$t(`veo.button.actionIngredients`)},{value:`upsample`,label:this.$t(`veo.button.actionUpsample`)},{value:`extend`,label:this.$t(`veo.button.actionExtend`)},{value:`reshoot`,label:this.$t(`veo.button.actionReshoot`)},{value:`object_insert`,label:this.$t(`veo.button.actionObjectInsert`)},{value:`object_remove`,label:this.$t(`veo.button.actionObjectRemove`)}]},value:{get(){return this.$store.state.veo?.config?.action},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo?.config,action:e})}}},mounted(){this.value||=A}}),ve={class:`field`},ye={class:`title font-bold`},be={class:`float-left`};function xe(e,t,i,a,s,c){let g=f(`el-option`),_=f(`el-select`);return d(),p(`div`,ve,[r(`h2`,ye,u(e.$t(`veo.name.action`)),1),o(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`veo.placeholder.select`),clearable:``},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(g,{key:e.value,label:e.label,value:e.value},{default:m(()=>[r(`span`,be,u(e.label),1)]),_:2},1032,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var Se=I(_e,[[`render`,xe],[`__scopeId`,`data-v-f4d8785c`]]),Ce=c({name:`TranslationSelector`,components:{ElSwitch:w,InfoIcon:J},computed:{value:{get(){return this.$store.state.veo?.config?.translation},set(e){console.debug(`set translation`,e),this.$store.commit(`veo/setConfig`,{...this.$store.state.veo?.config,translation:e})}}},mounted(){this.value===void 0&&(this.value=!1)}}),we={class:`relative`},Te={class:`flex justify-between`},Ee={class:`flex justify-start items-center`},De={class:`text-sm font-bold`},Oe={class:`flex justify-end items-center`};function ke(e,t,n,i,a,s){let c=f(`info-icon`),l=f(`el-switch`);return d(),p(`div`,we,[r(`div`,Te,[r(`div`,Ee,[r(`span`,De,u(e.$t(`veo.name.translation`)),1),o(c,{content:e.$t(`veo.description.translation`)},null,8,[`content`])]),r(`div`,Oe,[o(l,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`},null,8,[`modelValue`])])])])}var Ae=I(Ce,[[`render`,ke]]),je=c({name:`AspectRatioSelector`,data(){return{options:[{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.veo?.config?.aspect_ratio},set(e){console.debug(`set aspect_ratio`,e),this.$store.commit(`veo/setConfig`,{...this.$store.state?.veo?.config,aspect_ratio:e})}}},mounted(){this.value||=E}}),Me={class:`text-sm font-bold mb-2 block`},Ne={class:`items`},Pe=[`onClick`],Fe={class:`name`};function Ie(e,n,a,o,s,c){return d(),p(`div`,null,[r(`span`,Me,u(e.$t(`veo.name.ratio`)),1),r(`div`,Ne,[(d(!0),p(h,null,l(e.options,(n,a)=>(d(),p(`div`,{key:a,class:t({active:e.active===a,item:!0}),onClick:t=>e.value=n.value},[r(`div`,{class:t([`preview`,n.label])},[r(`div`,{class:`rect`,style:i({width:n.width+`px`,height:n.height+`px`})},null,4)],2),r(`p`,Fe,u(n.label),1)],10,Pe))),128))])])}var Le=I(je,[[`render`,Ie],[`__scopeId`,`data-v-28c472c4`]]),Re=c({name:`VideoFromInput`,components:{VideoPlayer:Q},props:{modelValue:{type:Object,required:!1,default:void 0}},data(){return{options:{quality:{default:`1080p`}}}},computed:{config(){return this.$store.state.veo?.config}}}),ze={class:`relative`},Be={class:`flex mb-2`},Ve={class:`text-sm font-bold`};function He(e,t,i,a,o,c){let l=f(`video-player`);return d(),p(`div`,ze,[r(`div`,Be,[r(`span`,Ve,u(e.$t(`veo.name.action3`)),1)]),r(`div`,null,[e.config?.video_url?(d(),n(l,{key:0,src:e.config?.video_url},null,8,[`src`])):s(``,!0)])])}var Ue=I(Re,[[`render`,He]]),We=c({name:`VideoIdInput`,components:{ElInput:R},computed:{value:{get(){return this.$store.state.veo?.config?.video_id},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo.config,video_id:e})}}}}),Ge={class:`field`},Ke={class:`title font-bold`};function qe(e,t,n,i,a,s){let c=f(`el-input`);return d(),p(`div`,Ge,[r(`h2`,Ke,u(e.$t(`veo.name.videoId`)),1),o(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,type:`text`,placeholder:e.$t(`veo.placeholder.videoId`),clearable:``},null,8,[`modelValue`,`placeholder`])])}var Je=I(We,[[`render`,qe],[`__scopeId`,`data-v-6eba4026`]]),Ye=c({name:`StartEndImage`,components:{ElUpload:y,ElButton:g,InfoIcon:J,FontAwesomeIcon:W,ImagePreview:K},mixins:[P,z],emits:[`change`],data(){return{fileList:[],uploadUrl:U()+`/api/v1/files/`}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>e?.response?.file_url)},value:{get(){return this.$store.state?.veo?.config?.image_urls},set(){}}},mounted(){this.value||=void 0,this.onSetStartEndImageUrl()},methods:{onExceed(){L.warning(this.$t(`veo.message.uploadReferencesExceed`))},onError(){L.error(this.$t(`veo.message.uploadReferencesError`))},onSetStartEndImageUrl(){let e=this.urls;this.$store.commit(`veo/setConfig`,{...this.$store.state?.veo?.config,image_urls:e})},async onSuccess(){this.onSetStartEndImageUrl()}}}),Xe={class:`relative`},Ze={class:`flex justify-between`},Qe={class:`flex justify-start items-center`},$e={class:`text-sm font-bold`};function et(e,t,i,c,l,h){let g=f(`info-icon`),_=f(`image-preview`),v=f(`font-awesome-icon`),y=f(`el-button`),b=f(`el-upload`);return d(),p(`div`,Xe,[r(`div`,Ze,[r(`div`,Qe,[r(`span`,$e,u(e.$t(`veo.name.startEndImage`)),1),o(g,{content:e.$t(`veo.description.uploadStartEndImage`)},null,8,[`content`])])]),o(b,{ref:`uploader`,"file-list":e.fileList,"onUpdate:fileList":t[0]||=t=>e.fileList=t,name:`file`,accept:`.png,.jpg,.jpeg,.gif,.bmp,.webp`,limit:2,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:m(({file:t})=>[t.url&&t.percentage!==void 0?(d(),n(_,{key:0,url:t.url,name:t.name,percentage:t.percentage,onRemove:n=>e.fileList.splice(e.fileList.indexOf(t),1)},null,8,[`url`,`name`,`percentage`,`onRemove`])):s(``,!0)]),default:m(()=>[o(y,{round:``,type:`primary`,size:`small`,class:`btn btn-upload`},{default:m(()=>[o(v,{icon:`fa-solid fa-upload`,class:`icon mr-1`}),a(` `+u(e.$t(`veo.button.uploadReferences`)),1)]),_:1})]),_:1},8,[`file-list`,`action`,`on-exceed`,`on-error`,`on-success`,`headers`])])}var tt=I(Ye,[[`render`,et],[`__scopeId`,`data-v-f9a79b4a`]]),nt=c({name:`UpsampleActionSelector`,components:{ElSelect:_,ElOption:v},computed:{options(){return ee.map(e=>({value:e,label:e}))},value:{get(){return this.$store.state.veo?.config?.upsample_action},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo.config,upsample_action:e})}}},mounted(){this.value||=O}}),rt={class:`field`},it={class:`title font-bold`};function at(e,t,i,a,s,c){let g=f(`el-option`),_=f(`el-select`);return d(),p(`div`,rt,[r(`h2`,it,u(e.$t(`veo.name.upsampleAction`)),1),o(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`veo.placeholder.select`)},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var ot=I(nt,[[`render`,at],[`__scopeId`,`data-v-8b74a7ae`]]),st=c({name:`ExtendModelSelector`,components:{ElSelect:_,ElOption:v},computed:{options(){return N.map(e=>({value:e,label:e}))},value:{get(){return this.$store.state.veo?.config?.model},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo.config,model:e})}}},mounted(){(!this.value||!N.includes(this.value))&&(this.value=k)}}),ct={class:`field`},lt={class:`title font-bold`};function ut(e,t,i,a,s,c){let g=f(`el-option`),_=f(`el-select`);return d(),p(`div`,ct,[r(`h2`,lt,u(e.$t(`veo.name.model`)),1),o(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`veo.placeholder.select`)},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var dt=I(st,[[`render`,ut],[`__scopeId`,`data-v-cc3f9355`]]),ft=c({name:`MotionTypeSelector`,components:{ElSelect:_,ElOption:v},computed:{options(){return M.map(e=>({value:e,label:e}))},value:{get(){return this.$store.state.veo?.config?.motion_type},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo.config,motion_type:e})}}},mounted(){this.value||=T}}),pt={class:`field`},mt={class:`title font-bold`};function ht(e,t,i,a,s,c){let g=f(`el-option`),_=f(`el-select`);return d(),p(`div`,pt,[r(`h2`,mt,u(e.$t(`veo.name.motionType`)),1),o(_,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,placeholder:e.$t(`veo.placeholder.select`),filterable:``},{default:m(()=>[(d(!0),p(h,null,l(e.options,e=>(d(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var gt=I(ft,[[`render`,ht],[`__scopeId`,`data-v-3affff3c`]]),_t=c({name:`ImageMaskInput`,components:{ElInput:R},computed:{value:{get(){return this.$store.state.veo?.config?.image_mask},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo.config,image_mask:e})}}}}),vt={class:`field`},yt={class:`title font-bold`};function bt(e,t,n,i,a,s){let c=f(`el-input`);return d(),p(`div`,vt,[r(`h2`,yt,u(e.$t(`veo.name.imageMask`)),1),o(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||=t=>e.value=t,class:`value`,type:`text`,placeholder:e.$t(`veo.placeholder.imageMask`),clearable:``},null,8,[`modelValue`,`placeholder`])])}var xt=I(_t,[[`render`,bt],[`__scopeId`,`data-v-6cc27c68`]]),St=c({name:`PromptInput`,components:{PromptTextarea:Z},computed:{prompt:{get(){return this.$store.state.veo?.config?.prompt},set(e){this.$store.commit(`veo/setConfig`,{...this.$store.state.veo?.config,prompt:e})}}},mounted(){this.prompt||=``}});function Ct(e,t,r,i,a,o){let s=f(`prompt-textarea`);return d(),n(s,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||=t=>e.prompt=t,title:e.$t(`veo.name.prompt`),info:e.$t(`veo.description.prompt`),placeholder:e.$t(`veo.placeholder.prompt`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var wt=I(St,[[`render`,Ct]]),Tt=[`upsample`,`extend`,`reshoot`,`object_insert`,`object_remove`,`get1080p`],Et=[`text2video`,`image2video`,`ingredients2video`],Dt=c({name:`ConfigPanel`,components:{ElButton:g,Consumption:ie,FontAwesomeIcon:W,PromptInput:wt,ModelSelector:ge,StartEndImage:tt,ActionSelector:Se,VideoFromInput:Ue,VideoIdInput:Je,UpsampleActionSelector:ot,ExtendModelSelector:dt,MotionTypeSelector:gt,ImageMaskInput:xt,TranslationSelector:Ae,AspectRatioSelector:Le},emits:[`generate`],computed:{config(){return this.$store.state.veo?.config},consumption(){return te(this.config,this.service?.cost)},service(){return this.$store.state.veo?.service},isPostProcessing(){return Tt.includes(this.config?.action??``)},isGeneration(){return Et.includes(this.config?.action??``)}},methods:{onGenerate(){this.$emit(`generate`)}}}),Ot={class:`flex flex-col h-full`},kt={class:`flex-1 overflow-y-auto p-5`},At={class:`flex flex-col items-center justify-center px-5 pb-5`};function jt(e,t,i,c,l,g){let _=f(`action-selector`),v=f(`video-from-input`),y=f(`video-id-input`),b=f(`upsample-action-selector`),x=f(`extend-model-selector`),S=f(`prompt-input`),C=f(`motion-type-selector`),w=f(`image-mask-input`),T=f(`translation-selector`),E=f(`aspect-ratio-selector`),D=f(`model-selector`),O=f(`start-end-image`),k=f(`consumption`),A=f(`font-awesome-icon`),j=f(`el-button`);return d(),p(`div`,Ot,[r(`div`,kt,[o(_,{class:`mb-4`}),e.isPostProcessing?(d(),p(h,{key:0},[e.config?.video_url?(d(),n(v,{key:0,class:`mb-4`})):s(``,!0),o(y,{class:`mb-4`})],64)):s(``,!0),e.config?.action===`upsample`?(d(),n(b,{key:1,class:`mb-4`})):s(``,!0),e.config?.action===`extend`?(d(),n(x,{key:2,class:`mb-4`})):s(``,!0),e.config?.action===`extend`?(d(),n(S,{key:3,class:`mb-4`})):s(``,!0),e.config?.action===`reshoot`?(d(),n(C,{key:4,class:`mb-4`})):s(``,!0),e.config?.action===`object_insert`?(d(),n(S,{key:5,class:`mb-4`})):s(``,!0),e.config?.action===`object_insert`||e.config?.action===`object_remove`?(d(),n(w,{key:6,class:`mb-4`})):s(``,!0),e.config?.action===`object_remove`?(d(),n(S,{key:7,class:`mb-4`})):s(``,!0),e.isGeneration?(d(),p(h,{key:8},[o(T,{class:`mb-4`}),o(E,{class:`mb-4`}),o(S,{class:`mb-4`}),e.config?.action===`ingredients2video`?s(``,!0):(d(),n(D,{key:0,class:`mb-4`})),e.config?.action===`image2video`||e.config?.action===`ingredients2video`?(d(),n(O,{key:1,class:`mb-2`})):s(``,!0)],64)):s(``,!0)]),r(`div`,At,[o(k,{value:e.consumption,service:e.service},null,8,[`value`,`service`]),o(j,{type:`primary`,class:`btn w-full`,round:``,onClick:e.onGenerate},{default:m(()=>[o(A,{icon:`fa-solid fa-magic`,class:`mr-2`}),a(` `+u(e.$t(`veo.button.generate`)),1)]),_:1},8,[`onClick`])])])}var Mt=I(Dt,[[`render`,jt]]),Nt=c({name:`TaskPreview`,components:{ElImage:x,CopyToClipboard:G,FontAwesomeIcon:W,ElAlert:S,VideoPlayer:Q,ElTooltip:b,ElButton:g,ApiCodeButton:ae},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){return this.$store.state.veo?.application},config(){return this.$store.state.veo?.config}},methods:{onPickAction(e,t,n,r){console.debug(`seed config from preview`,{action:n,upsampleAction:r,response:t}),this.$store.commit(`veo/setConfig`,{...this.$store.state.veo?.config,action:n,video_id:t?.data?.[0]?.id,video_url:t?.data?.[0]?.video_url,...r?{upsample_action:r}:{}})},onDownload(e,t){e.stopPropagation(),console.log(`on download`),window.open(t,`_blank`)},onOpenVideo(e){window.open(e,`_blank`)}}}),Pt={class:`preview`},Ft={class:`left`},It={class:`main`},Lt={class:`bot`},Rt={class:`datetime`},zt={class:`info`},Bt={key:0,class:`prompt mt-2`},Vt={key:0},Ht={key:1},Ut={key:0,class:t({content:!0,failed:!0})},Wt={key:0,class:`mb-4`},Gt={key:1,class:t({operations:!0,"mt-2":!0})},Kt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},qt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},$={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Jt={key:1,class:t({content:!0})},Yt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Xt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Zt={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Qt={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},$t={key:2,class:t({content:!0})},en={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},tn={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function nn(e,t,i,c,l,h){let g=f(`el-image`),_=f(`video-player`),v=f(`el-button`),y=f(`el-tooltip`),b=f(`api-code-button`),x=f(`font-awesome-icon`),S=f(`copy-to-clipboard`),C=f(`el-alert`);return d(),p(`div`,Pt,[r(`div`,Ft,[o(g,{src:`https://cdn.acedata.cloud/8nxyy9.jpg`,class:`avatar`})]),r(`div`,It,[r(`div`,Lt,[a(u(e.$t(`veo.name.veoBot`))+` `,1),r(`span`,Rt,u(e.$dayjs.format(``+new Date(parseFloat((e.modelValue?.created_at||``).toString())*1e3))),1)]),r(`div`,zt,[e.modelValue?.request?.prompt?(d(),p(`p`,Bt,[a(u(e.modelValue?.request?.prompt)+` `,1),e.modelValue?.response?s(``,!0):(d(),p(`span`,Vt,` - (`+u(e.$t(`veo.status.pending`))+`) `,1)),Array.isArray(e.modelValue?.response?.data)&&e.modelValue?.response?.data[0]?.state===`running`?(d(),p(`span`,Ht,` - (`+u(e.$t(`veo.status.processing`))+`) `,1)):s(``,!0)])):s(``,!0)]),e.modelValue?.response?.success===!0&&e.modelValue?.response?.data?(d(),p(`div`,Ut,[e.modelValue?.response?.data[0]?.video_url?(d(),p(`div`,Wt,[o(_,{src:e.modelValue?.response?.data[0]?.video_url},null,8,[`src`])])):s(``,!0),e.modelValue?.response.success?(d(),p(`div`,Gt,[e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:t[0]||=t=>e.onPickAction(t,e.modelValue?.response,`upsample`,`1080p`)},{default:m(()=>[a(u(e.$t(`veo.button.actionUpsample1080p`)),1)]),_:1})):s(``,!0),e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:1,type:`info`,size:`small`,class:`btn-action`,onClick:t[1]||=t=>e.onPickAction(t,e.modelValue?.response,`upsample`,`4k`)},{default:m(()=>[a(u(e.$t(`veo.button.actionUpsample4k`)),1)]),_:1})):s(``,!0),e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:2,type:`info`,size:`small`,class:`btn-action`,onClick:t[2]||=t=>e.onPickAction(t,e.modelValue?.response,`upsample`,`gif`)},{default:m(()=>[a(u(e.$t(`veo.button.actionUpsampleGif`)),1)]),_:1})):s(``,!0),e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:3,type:`info`,size:`small`,class:`btn-action`,onClick:t[3]||=t=>e.onPickAction(t,e.modelValue?.response,`extend`)},{default:m(()=>[a(u(e.$t(`veo.button.actionExtend`)),1)]),_:1})):s(``,!0),e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:4,type:`info`,size:`small`,class:`btn-action`,onClick:t[4]||=t=>e.onPickAction(t,e.modelValue?.response,`reshoot`)},{default:m(()=>[a(u(e.$t(`veo.button.actionReshoot`)),1)]),_:1})):s(``,!0),e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:5,type:`info`,size:`small`,class:`btn-action`,onClick:t[5]||=t=>e.onPickAction(t,e.modelValue?.response,`object_insert`)},{default:m(()=>[a(u(e.$t(`veo.button.actionObjectInsert`)),1)]),_:1})):s(``,!0),e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:6,type:`info`,size:`small`,class:`btn-action`,onClick:t[6]||=t=>e.onPickAction(t,e.modelValue?.response,`object_remove`)},{default:m(()=>[a(u(e.$t(`veo.button.actionObjectRemove`)),1)]),_:1})):s(``,!0),o(y,{class:`box-item`,effect:`dark`,content:e.$t(`veo.message.downloadVideo`),placement:`top-start`},{default:m(()=>[e.modelValue?.response?.data[0]?.video_url?(d(),n(v,{key:0,type:`info`,size:`small`,class:`btn-action`,onClick:t[7]||=t=>e.onDownload(t,e.modelValue?.response?.data[0]?.video_url)},{default:m(()=>[a(u(e.$t(`veo.button.download`)),1)]),_:1})):s(``,!0)]),_:1},8,[`content`]),o(b,{path:`/veo/videos`,body:e.modelValue?.request},null,8,[`body`])])):s(``,!0),o(C,{closable:!1,class:`mt-2 success`},{default:m(()=>[r(`p`,Kt,[o(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.model`))+`: `+u(e.modelValue?.request?.model),1)]),r(`p`,qt,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id},null,8,[`content`])]),e.modelValue?.elapsed?(d(),p(`p`,$,[o(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.elapsed`))+`: `+u(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):s(``,!0)]),_:1})])):s(``,!0),e.modelValue?.response?.success===!1?(d(),p(`div`,Jt,[o(C,{closable:!1,class:`failure`},{template:m(()=>[o(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.failure`)),1)]),default:m(()=>[r(`p`,Yt,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id},null,8,[`content`])]),r(`p`,Xt,[o(x,{icon:`fa-solid fa-circle-info`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.failureReason`))+`: `+u(e.modelValue?.response?.error?.message)+` `,1),o(S,{content:e.modelValue?.response?.error?.message},null,8,[`content`])]),e.modelValue?.elapsed?(d(),p(`p`,Zt,[o(x,{icon:`fa-solid fa-clock`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.elapsed`))+`: `+u(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):s(``,!0),e.modelValue?.response?.trace_id?(d(),p(`p`,Qt,[o(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.traceId`))+`: `+u(e.modelValue?.response?.trace_id)+` `,1),o(S,{content:e.modelValue?.response?.trace_id},null,8,[`content`])])):s(``,!0)]),_:1})])):s(``,!0),e.modelValue?.response?.success===void 0?(d(),p(`div`,$t,[o(C,{closable:!1,class:`info`},{template:m(()=>[o(x,{icon:`fa-solid fa-exclamation-triangle`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.failure`)),1)]),default:m(()=>[r(`p`,en,[o(x,{icon:`fa-solid fa-magic`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.taskId`))+`: `+u(e.modelValue?.id)+` `,1),o(S,{content:e.modelValue?.id},null,8,[`content`])]),e.modelValue?.response?.trace_id?(d(),p(`p`,tn,[o(x,{icon:`fa-solid fa-hashtag`,class:`mr-1`}),a(` `+u(e.$t(`veo.name.traceId`))+`: `+u(e.modelValue?.response?.trace_id)+` `,1),o(S,{content:e.modelValue?.response?.trace_id},null,8,[`content`])])):s(``,!0)]),_:1})])):s(``,!0)])])}var rn=c({name:`RecentPanel`,components:{TaskPreview:I(Nt,[[`render`,nn],[`__scopeId`,`data-v-912779c9`]]),NoTasks:re,BotPlaceholder:q,ScrollList:Y},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.veo?.tasks,items:this.$store.state.veo?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),an={key:0},on={key:2,class:`w-full h-full flex items-center justify-center`};function sn(e,t,r,i,a,c){let u=f(`bot-placeholder`),g=f(`task-preview`),_=f(`scroll-list`),v=f(`no-tasks`);return d(),p(h,null,[e.tasks?.items===void 0?(d(),p(`div`,an,[o(u)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(d(),n(_,{key:1,ref:`scrollList`,class:`tasks h-full w-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:m(()=>[(d(!0),p(h,null,l(e.tasks?.items,(e,t)=>(d(),n(g,{key:t,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):s(``,!0),e.tasks?.items?.length===0?(d(),p(`div`,on,[o(v)])):s(``,!0)],64)}var cn=I(rn,[[`render`,sn]]),ln=D(`veo`),un=c({name:`VeoIndex`,components:{ConfigPanel:Mt,Layout:de,RecentPanel:cn},mixins:[V],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.veo?.status?.getApplications===B.Request},tasksLoading(){return this.$store.state.veo?.status?.getTasks===B.Request||this.fetchingTasks},credential(){return this.$store.state.veo.credential},config(){return this.$store.state.veo.config},tasks(){return this.$store.state.veo.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 X({tasks:this.tasks,getTasks:()=>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(`veo/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`veo/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`veo/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!F(this.uploadTracker,e=>this.$t(e),e=>L.warning(e)))return;let e={...this.config,callback_url:ln},t=this.credential?.token;if(!t){console.error(`no token specified`);return}if(e.action===`image2video`&&!(e.image_urls&&e.image_urls.length>0)){L.warning(this.$t(`veo.message.imageRequired`));return}(!e.image_urls||e.image_urls.length===0)&&delete e.image_urls,L.info(this.$t(`veo.message.startingTask`)),ne(`veo`,H.generate(e,{token:t})).then(()=>{L.success(this.$t(`veo.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?L.error(this.$t(`veo.message.usedUp`)):L.error(this.$t(`veo.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function dn(e,t,r,i,a,s){let c=f(`config-panel`),l=f(`recent-panel`),u=f(`layout`);return d(),n(u,null,{config:m(()=>[o(c,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:m(()=>[o(l,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var fn=I(un,[[`render`,dn]]);export{fn as default};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{D as e,E as t,M as n,N as r,O as i,P as a,Q as o,Ut as s,X as c,et as l,k as u,lt as d,x as f,y as p}from"./vendor-chart-Df3WBvr0.js";import{t as m}from"./button-Diu_mJ2H.js";import{r as h,t as g}from"./select-BR8DyZel.js";import{t as _}from"./image-DvjKNoxC.js";import{t as v}from"./alert-Cs6WDxgv.js";import{t as y}from"./slider-BZdPs70x.js";import{$ as b,Jr as x,X as S}from"./constants-vDFRJTq6.js";import{Dt as C,E as w,Er as T,Kt as ee,Mt as te,Nn as E,gr as D,kt as O}from"./index-Bpg44eWB.js";import{t as k}from"./index.es-D2Gtib5p.js";import{t as A}from"./CopyToClipboard-BvqdtQdo.js";import{t as j}from"./Hailuo-DaImuNaU.js";import{t as M}from"./BotPlaceholder-DdLK7DwC.js";import{t as N}from"./TabSwitcher-C3Kf0k0t.js";import{n as P,t as F}from"./pagination-BlR28kYu.js";import{n as I,t as L}from"./NoTasks-BvxBJO_n.js";import{t as R}from"./Consumption-DiPiwllg.js";import{t as z}from"./ApiCodeButton-DmgbbHgv.js";var B=a({name:`FishTextInput`,components:{PromptTextarea:I},computed:{text:{get(){return this.$store.state.fish?.config?.text},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,text:e})}}}});function V(t,n,r,i,a,o){let s=l(`prompt-textarea`);return c(),e(s,{modelValue:t.text,"onUpdate:modelValue":n[0]||=e=>t.text=e,title:t.$t(`fish.name.text`),info:t.$t(`fish.description.text`),placeholder:t.$t(`fish.placeholder.text`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var H=w(B,[[`render`,V]]),U=a({name:`FishModelSelector`,components:{ElSelect:h,ElOption:g},computed:{options(){return[{value:b,label:this.$t(`fish.button.modelS2Pro`)},{value:`s1`,label:this.$t(`fish.button.modelS1`)}]},value:{get(){return this.$store.state.fish?.config?.model},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,model:e})}}},mounted(){this.value||=S}}),W={class:`field`},G={class:`title font-bold`};function K(n,i,a,p,m,h){let g=l(`el-option`),_=l(`el-select`);return c(),u(`div`,W,[t(`h2`,G,s(n.$t(`fish.name.model`)),1),r(_,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,class:`value`,placeholder:n.$t(`fish.placeholder.select`)},{default:d(()=>[(c(!0),u(f,null,o(n.options,t=>(c(),e(g,{key:t.value,label:t.label,value:t.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var q=w(U,[[`render`,K],[`__scopeId`,`data-v-9702e6d3`]]),J=a({name:`FishVoicePicker`,components:{ElSelect:h,ElOption:g},computed:{loading(){return this.$store.state.fish?.status?.getApplications===D.Request},options(){return this.$store.state.fish?.voices??[]},displayOptions(){return this.options.map(e=>{let t=e,n=(t.id||t._id||t.reference_id||``).toString();return{value:n,label:t.title||n}}).filter(e=>!!e.value)},credential(){return this.$store.state.fish?.credential},value:{get(){return this.$store.state.fish?.config?.reference_id},set(e){this.$store.commit(`fish/setConfig`,{...this.$store.state.fish?.config,reference_id:e||void 0})}}},watch:{credential:{immediate:!0,handler(e){if(!e?.token)return;let t=this.$store.state.fish?.voices;(t===void 0||t.length===0)&&this.$store.dispatch(`fish/getVoices`)}}}}),Y={class:`field`},X={class:`title font-bold`};function Z(n,i,a,p,m,h){let g=l(`el-option`),_=l(`el-select`);return c(),u(`div`,Y,[t(`h2`,X,s(n.$t(`fish.name.voice`)),1),r(_,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,class:`value`,placeholder:n.$t(`fish.placeholder.voice`),clearable:``,filterable:``,loading:n.loading,"no-data-text":n.$t(`fish.message.noVoices`)},{default:d(()=>[(c(!0),u(f,null,o(n.displayOptions,t=>(c(),e(g,{key:t.value,label:t.label,value:t.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`loading`,`no-data-text`])])}var Q=a({name:`FishConfigPanel`,components:{ElButton:m,ElSlider:y,FontAwesomeIcon:k,TextInput:H,ModelSelector:q,VoicePicker:w(J,[[`render`,Z],[`__scopeId`,`data-v-ac9e3a92`]]),Consumption:R},emits:[`generate`],computed:{config(){return this.$store.state.fish?.config},consumption(){return te(this.config,this.service?.cost)},service(){return this.$store.state.fish?.service},canGenerate(){let e=this.config?.text;return typeof e==`string`&&e.trim().length>0},speed:{get(){return this.config?.prosody?.speed??1},set(e){this.$store.commit(`fish/setConfig`,{...this.config,prosody:{...this.config?.prosody??{},speed:e}})}}},methods:{onGenerate(){this.$emit(`generate`)}}}),ne={class:`flex flex-col h-full`},re={class:`flex-1 overflow-y-auto p-5`},ie={class:`field mb-2`},ae={class:`title font-bold`},oe={class:`flex flex-col items-center justify-center px-5 pb-5`};function se(e,i,a,o,f,p){let m=l(`text-input`),h=l(`model-selector`),g=l(`voice-picker`),_=l(`el-slider`),v=l(`consumption`),y=l(`font-awesome-icon`),b=l(`el-button`);return c(),u(`div`,ne,[t(`div`,re,[r(m,{class:`mb-4`}),r(h,{class:`mb-4`}),r(g,{class:`mb-4`}),t(`div`,ie,[t(`h2`,ae,s(e.$t(`fish.name.speed`)),1),r(_,{modelValue:e.speed,"onUpdate:modelValue":i[0]||=t=>e.speed=t,min:.5,max:2,step:.1,class:`value`,"show-input":``},null,8,[`modelValue`])])]),t(`div`,oe,[r(v,{value:e.consumption,service:e.service},null,8,[`value`,`service`]),r(b,{type:`primary`,class:`btn w-full`,round:``,disabled:!e.canGenerate,onClick:e.onGenerate},{default:d(()=>[r(y,{icon:`fa-solid fa-magic`,class:`mr-2`}),n(` `+s(e.$t(`fish.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var ce=w(Q,[[`render`,se],[`__scopeId`,`data-v-1ccd36ba`]]),le=a({name:`FishTaskPreview`,components:{ElImage:_,CopyToClipboard:A,FontAwesomeIcon:k,ElAlert:v,ElButton:m,ApiCodeButton:z},props:{modelValue:{type:Object,required:!0}},computed:{prompt(){return this.modelValue?.request?.text},audioUrl(){return this.modelValue?.response?.audio_url}},methods:{onDownload(e){window.open(e,`_blank`)}}}),ue={class:`preview`},de={class:`left`},fe={class:`main`},pe={class:`bot`},me={class:`datetime`},he={class:`info`},ge={key:0,class:`prompt mt-2`},_e={key:0},ve={key:0,class:`content`},ye=[`src`],be={class:`operations mt-2`},xe={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Se={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ce={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},we={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},Te={key:1,class:`content`},Ee={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function De(e,a,o,f,m,h){let g=l(`el-image`),_=l(`el-button`),v=l(`api-code-button`),y=l(`font-awesome-icon`),b=l(`copy-to-clipboard`),x=l(`el-alert`);return c(),u(`div`,ue,[t(`div`,de,[r(g,{src:`https://cdn.acedata.cloud/e40fccc727.png`,class:`avatar`})]),t(`div`,fe,[t(`div`,pe,[n(s(e.$t(`fish.name.fishBot`))+` `,1),t(`span`,me,s(e.$dayjs.format(``+new Date(parseFloat((e.modelValue?.created_at||``).toString())*1e3))),1)]),t(`div`,he,[e.prompt?(c(),u(`p`,ge,[n(s(e.prompt)+` `,1),e.modelValue?.response?i(``,!0):(c(),u(`span`,_e,` - (`+s(e.$t(`fish.status.pending`))+`) `,1))])):i(``,!0)]),e.audioUrl?(c(),u(`div`,ve,[t(`audio`,{src:e.audioUrl,controls:``,preload:`metadata`,class:`w-full mb-3`},null,8,ye),t(`div`,be,[r(_,{type:`info`,size:`small`,class:`mb-2`,onClick:a[0]||=p(t=>e.onDownload(e.audioUrl),[`stop`])},{default:d(()=>[n(s(e.$t(`fish.button.download`)),1)]),_:1}),r(v,{path:`/fish/tts`,body:e.modelValue?.request},null,8,[`body`])]),r(x,{closable:!1,class:`mt-2 success`},{default:d(()=>[e.modelValue?.request?.model?(c(),u(`p`,xe,[r(y,{icon:`fa-solid fa-microchip`,class:`mr-1`}),n(` `+s(e.$t(`fish.name.model`))+`: `+s(e.modelValue?.request?.model),1)])):i(``,!0),e.modelValue?.request?.reference_id?(c(),u(`p`,Se,[r(y,{icon:`fa-solid fa-microphone`,class:`mr-1`}),n(` `+s(e.$t(`fish.name.referenceId`))+`: `+s(e.modelValue?.request?.reference_id)+` `,1),r(b,{content:e.modelValue?.request?.reference_id},null,8,[`content`])])):i(``,!0),t(`p`,Ce,[r(y,{icon:`fa-solid fa-magic`,class:`mr-1`}),n(` `+s(e.$t(`fish.name.taskId`))+`: `+s(e.modelValue?.id)+` `,1),r(b,{content:e.modelValue?.id},null,8,[`content`])]),e.modelValue?.elapsed?(c(),u(`p`,we,[r(y,{icon:`fa-solid fa-clock`,class:`mr-1`}),n(` `+s(e.$t(`fish.name.elapsed`))+`: `+s(e.modelValue?.elapsed?.toFixed(2))+`s `,1)])):i(``,!0)]),_:1})])):(c(),u(`div`,Te,[r(x,{closable:!1,class:`info`},{default:d(()=>[t(`p`,Ee,[r(y,{icon:`fa-solid fa-magic`,class:`mr-1`}),n(` `+s(e.$t(`fish.name.taskId`))+`: `+s(e.modelValue?.id)+` `,1),r(b,{content:e.modelValue?.id},null,8,[`content`])])]),_:1})]))])])}var $=a({name:`FishRecentPanel`,components:{TaskPreview:w(le,[[`render`,De],[`__scopeId`,`data-v-754753f2`]]),BotPlaceholder:M,NoTasks:L,ScrollList:P},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],computed:{tasks(){return{...this.$store.state.fish?.tasks,items:this.$store.state.fish?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),Oe={key:0},ke={key:2,class:`w-full h-full flex items-center justify-center`};function Ae(t,n,a,s,p,m){let h=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return c(),u(f,null,[t.tasks?.items===void 0?(c(),u(`div`,Oe,[r(h)])):t.tasks?.items?.length&&t.tasks?.items?.length>0?(c(),e(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:t.loading,onReachTop:n[0]||=e=>t.$emit(`reach-top`)},{default:d(()=>[(c(!0),u(f,null,o(t.tasks?.items,t=>(c(),e(g,{key:t.id,"model-value":t},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):i(``,!0),t.tasks?.items?.length===0?(c(),u(`div`,ke,[r(v)])):i(``,!0)],64)}var je=w($,[[`render`,Ae]]),Me=x(`fish`),Ne=a({name:`FishTtsIndex`,components:{ConfigPanel:ce,Layout:j,RecentPanel:je,TabSwitcher:N},mixins:[O],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.fish?.status?.getApplications===D.Request},tasksLoading(){return this.$store.state.fish?.status?.getTasks===D.Request||this.fetchingTasks},credential(){return this.$store.state.fish?.credential},config(){return this.$store.state.fish?.config},application(){return this.$store.state.fish?.application},tasks(){return this.$store.state.fish?.tasks}},watch:{initialized:{async handler(e){e&&(await this.onGetTasks(),await this.onScrollDown(),this.job=window.setInterval(()=>{this.onGetTasks()},5e3))},immediate:!0}},async mounted(){await this.onGetService(),await this.$store.dispatch(`fish/getVoices`)},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await F({tasks:this.tasks,getTasks:()=>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(){await this.$store.dispatch(`fish/getService`)},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks)return;let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};this.fetchingTasks=!0;try{await this.$store.dispatch(`fish/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!C(this.uploadTracker,e=>this.$t(e),e=>T.warning(e)))return;let e=this.config??{},t=e.text?.trim();if(!t){T.warning(this.$t(`fish.message.textRequired`));return}let n=this.credential?.token;if(!n){console.error(`no token specified`);return}let r=e.model||`s2-pro`,i={text:t,callback_url:Me};e.reference_id&&(i.reference_id=e.reference_id),e.format&&(i.format=e.format),e.prosody&&Object.keys(e.prosody).length>0&&(i.prosody=e.prosody),T.info(this.$t(`fish.message.startingTask`)),E(`fish`,ee.generateTts(i,{token:n,model:r})).then(()=>{T.success(this.$t(`fish.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?T.error(this.$t(`fish.message.usedUp`)):T.error(this.$t(`fish.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}}),Pe={class:`flex flex-col h-full`},Fe={class:`flex-1 min-h-0`};function Ie(n,i,a,o,s,u){let f=l(`tab-switcher`),p=l(`config-panel`),m=l(`recent-panel`),h=l(`layout`);return c(),e(h,null,{config:d(()=>[t(`div`,Pe,[r(f),t(`div`,Fe,[r(p,{onGenerate:n.onGenerate},null,8,[`onGenerate`])])])]),result:d(()=>[r(m,{ref:`recentPanel`,loading:n.loadingMore,onReachTop:n.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Le=w(Ne,[[`render`,Ie]]);export{Le as default};
@@ -1 +0,0 @@
1
- var e={"nodeList.title":{message:`裝置`,description:`Coding Bridge 裝置清單標題`},"nodeList.refresh":{message:`重新整理`,description:`重新整理裝置清單`},"nodeList.pair":{message:`配對裝置`,description:`開啟配對對話框`},"nodeList.empty":{message:`尚未配對任何裝置。`,description:`裝置清單為空時的提示`},"nodeList.pairFirst":{message:`配對第一台裝置`,description:`空狀態下的配對按鈕`},"nodeList.remove":{message:`移除`,description:`移除裝置`},"nodeList.removeConfirm":{message:`移除裝置「{name}」?移除後需要重新配對。`,description:`移除裝置確認`},"nodeList.removeSuccess":{message:`裝置已移除。`,description:`移除裝置成功提示`},"nodeList.removeFailed":{message:`移除裝置失敗。`,description:`移除裝置失敗提示`},"status.online":{message:`線上`,description:`裝置線上狀態`},"status.offline":{message:`離線`,description:`裝置離線狀態`},"connection.disconnected":{message:`已斷線`,description:`中繼連線已斷線`},"connection.connecting":{message:`連線中…`,description:`中繼連線中`},"connection.connected":{message:`已連線`,description:`中繼已連線`},"connection.error":{message:`連線錯誤`,description:`中繼連線錯誤`},"pair.title":{message:`配對裝置`,description:`配對對話框標題`},"pair.intro":{message:`在你的電腦上執行 Coding Bridge 代理程式,然後在此輸入配對碼即可從網頁端控制它。`,description:`配對對話框介紹`},"pair.step1":{message:`安裝代理程式(需要 Python 3.10+):`,description:`配對步驟 1`},"pair.step2":{message:`啟動並依提示操作:`,description:`配對步驟 2`},"pair.step3":{message:`輸入下方顯示的配對碼。`,description:`配對步驟 3`},"pair.codePlaceholder":{message:`配對碼`,description:`配對碼輸入框佔位符`},"pair.claim":{message:`配對裝置`,description:`配對確認按鈕`},"pair.success":{message:`裝置「{name}」已配對。`,description:`配對成功提示`},"pair.invalidCode":{message:`配對碼無效或已過期。`,description:`配對碼無效錯誤`},"pair.usedCode":{message:`此配對碼已被使用。`,description:`配對碼已使用錯誤`},"pair.failed":{message:`配對裝置失敗。`,description:`配對通用錯誤`},"permission.title":{message:`需要授權`,description:`授權對話框標題`},"permission.subtitle":{message:`代理程式請求使用工具,核准後繼續。`,description:`授權對話框副標題`},"permission.deny":{message:`拒絕`,description:`拒絕工具授權`},"permission.allow":{message:`允許`,description:`允許工具授權`},"session.noDevice":{message:`選擇一台裝置開始編碼。`,description:`未選擇裝置時的佔位提示`},"session.newSession":{message:`新工作階段`,description:`開始新工作階段`},"session.deviceOffline":{message:`此裝置已離線。請在該裝置上啟動 Coding Bridge 代理程式後繼續。`,description:`裝置離線警告`},"session.startHint":{message:`傳送一則訊息以在此裝置上開始工作階段。`,description:`空白記錄提示`},"session.cwdPlaceholder":{message:`工作目錄(選填)`,description:`工作目錄輸入框佔位符`},"session.modelPlaceholder":{message:`模型(選填)`,description:`模型輸入框佔位符`},"session.promptPlaceholder":{message:`向代理程式傳送訊息…`,description:`提示詞輸入框佔位符`},"session.send":{message:`傳送`,description:`傳送提示詞按鈕`},"session.enterHint":{message:`Enter 傳送,Shift+Enter 換行。`,description:`輸入框鍵盤提示`},"transcript.turnFailed":{message:`執行失敗`,description:`回合結果失敗標籤`},"transcript.turnDone":{message:`完成`,description:`回合結果完成標籤`},"history.button":{message:`歷史會話`,description:`Open the conversation history drawer`},"history.title":{message:`歷史會話`,description:`History drawer title`},"history.intro":{message:`此裝置上的 Claude Code 與 Codex 歷史會話。`,description:`History drawer intro`},"history.refresh":{message:`重新整理`,description:`Reload the history list`},"history.loading":{message:`正在載入歷史…`,description:`History loading message`},"history.empty":{message:`此裝置上找不到歷史會話。`,description:`Empty history message`},"history.messages":{message:`{count} 則訊息`,description:`History item message count`},"history.readonly":{message:`此 Codex 會話為唯讀,無法繼續。開始新會話以繼續編碼。`,description:`Read-only replay notice`},"history.resumeHint":{message:`傳送訊息將在裝置上接續此會話。`,description:`Resume composer hint`},"history.claudeLabel":{message:`Claude 歷史`,description:`Replayed Claude session label`},"history.codexLabel":{message:`Codex 歷史(唯讀)`,description:`Replayed Codex session label`},"session.permissionModeLabel":{message:`權限模式`,description:`Permission-mode selector label`},"session.permissionModeDefault":{message:`預設(每次詢問)`,description:`Permission mode: ask before each tool use`},"session.permissionModeAcceptEdits":{message:`自動接受修改`,description:`Permission mode: auto-accept file edits`},"session.permissionModePlan":{message:`規劃模式(唯讀)`,description:`Permission mode: read-only planning`},"session.permissionModeBypass":{message:`略過所有權限`,description:`Permission mode: bypass all permission prompts`},"session.providerLabel":{message:`後端`,description:`Agent backend selector label`},"session.providerClaude":{message:`Claude Code`,description:`Backend option: Claude Code`},"session.providerCodex":{message:`Codex`,description:`Backend option: Codex`},"session.providerUnavailable":{message:`(未安裝)`,description:`Suffix shown next to a backend whose CLI is not installed on the node`},"session.providerUnavailableHint":{message:`{name} 未安裝在此裝置上。`,description:`Composer hint shown when the selected backend is not installed on the node`},"session.effortLabel":{message:`推理強度`,description:`Reasoning-effort selector label`},"session.effortDefault":{message:`預設`,description:`Reasoning effort: backend default`},"session.effortLow":{message:`低`,description:`Reasoning effort: low`},"session.effortMedium":{message:`中`,description:`Reasoning effort: medium`},"session.effortHigh":{message:`高`,description:`Reasoning effort: high`},"session.effortMax":{message:`最高`,description:`Reasoning effort: maximum (Claude only)`},"directory.title":{message:`選擇工作目錄`,description:`Working-directory picker dialog title`},"directory.choose":{message:`使用此目錄`,description:`Button: select the current directory`},"directory.up":{message:`上層目錄`,description:`Button: go to the parent directory`},"directory.refresh":{message:`重新整理`,description:`Button: reload the current directory`},"directory.loading":{message:`正在載入…`,description:`Directory listing loading hint`},"directory.empty":{message:`此目錄為空。`,description:`Empty directory hint`},"directory.truncated":{message:`僅顯示前 1000 項。`,description:`Hint shown when the listing was truncated`},"session.attachImage":{message:`新增圖片`,description:`Attach image button title`},"session.removeImage":{message:`移除圖片`,description:`Remove attached image button title`},"session.imageAlt":{message:`附加的圖片`,description:`Attached image thumbnail alt text`},"session.imageTooLarge":{message:`圖片過大,單張請控制在 12 MB 以內。`,description:`Warning shown when an image exceeds the size limit`},"session.imageLimit":{message:`最多可附加 {count} 張圖片。`,description:`Warning shown when exceeding the max number of images`},"session.modelDefault":{message:`Default model`,description:`Default model`},"session.cwdDefault":{message:`Default directory`,description:`Default directory`},"session.settings":{message:`Session settings`,description:`Session settings`},"session.settingsLocked":{message:`Settings are locked for this session`,description:`Settings are locked for this session`},"session.attachFile":{message:`Attach file`,description:`Attach file`},"session.attachmentImageAlt":{message:`Attached image`,description:`Attached image`},"session.removeAttachment":{message:`Remove attachment`,description:`Remove attachment`},"session.uploadingAttachment":{message:`Uploading attachments…`,description:`Uploading attachments…`},"session.attachmentTooLarge":{message:`File is too large; keep each under 50 MB.`,description:`File is too large; keep each under 50 MB.`},"session.attachmentLimit":{message:`You can attach up to {count} files.`,description:`You can attach up to {count} files.`},"session.attachmentUploadError":{message:`Failed to upload attachment.`,description:`Failed to upload attachment.`},"notice.slashUnavailable":{message:`/{command} 是互動式指令,無法在遠端工作階段中執行。`,description:`Notice shown when a slash command can't run in a remote session`},"notice.slashCodexUnsupported":{message:`/{command} 在遠端工作階段中暫不支援 Codex。`,description:`Notice shown when a Codex slash command isn't supported remotely`}};export{e as default};
@@ -1 +0,0 @@
1
- var e={"nodeList.title":{message:`Devices`,description:`Coding Bridge device list title`},"nodeList.refresh":{message:`Refresh`,description:`Refresh the device list`},"nodeList.pair":{message:`Pair device`,description:`Open the pairing dialog`},"nodeList.empty":{message:`No devices paired yet.`,description:`Empty device list message`},"nodeList.pairFirst":{message:`Pair your first device`,description:`Empty-state pairing button`},"nodeList.remove":{message:`Remove`,description:`Remove a device`},"nodeList.removeConfirm":{message:`Remove device "{name}"? It will need to be paired again.`,description:`Device removal confirmation`},"nodeList.removeSuccess":{message:`Device removed.`,description:`Device removed toast`},"nodeList.removeFailed":{message:`Failed to remove device.`,description:`Device removal error toast`},"status.online":{message:`Online`,description:`Device online status`},"status.offline":{message:`Offline`,description:`Device offline status`},"connection.disconnected":{message:`Disconnected`,description:`Relay connection disconnected`},"connection.connecting":{message:`Connecting…`,description:`Relay connection connecting`},"connection.connected":{message:`Connected`,description:`Relay connection connected`},"connection.error":{message:`Connection error`,description:`Relay connection error`},"pair.title":{message:`Pair a device`,description:`Pairing dialog title`},"pair.intro":{message:`Run the Coding Bridge agent on your computer, then enter its pairing code here to control it from the web.`,description:`Pairing dialog intro`},"pair.step1":{message:`Install the agent (requires Python 3.10+):`,description:`Pairing step 1`},"pair.step2":{message:`Start it and follow the prompt:`,description:`Pairing step 2`},"pair.step3":{message:`Enter the pairing code it shows below.`,description:`Pairing step 3`},"pair.codePlaceholder":{message:`Pairing code`,description:`Pairing code input placeholder`},"pair.claim":{message:`Pair device`,description:`Pairing confirm button`},"pair.success":{message:`Device "{name}" paired.`,description:`Pairing success toast`},"pair.invalidCode":{message:`Invalid or expired pairing code.`,description:`Pairing invalid code error`},"pair.usedCode":{message:`This pairing code has already been used.`,description:`Pairing used code error`},"pair.failed":{message:`Failed to pair device.`,description:`Pairing generic error`},"permission.title":{message:`Permission required`,description:`Permission dialog title`},"permission.subtitle":{message:`The agent wants to use a tool. Approve to continue.`,description:`Permission dialog subtitle`},"permission.deny":{message:`Deny`,description:`Deny a tool permission`},"permission.allow":{message:`Allow`,description:`Allow a tool permission`},"session.noDevice":{message:`Select a device to start coding.`,description:`No device selected placeholder`},"session.newSession":{message:`New session`,description:`Start a new session`},"session.deviceOffline":{message:`This device is offline. Start the Coding Bridge agent on it to continue.`,description:`Device offline warning`},"session.startHint":{message:`Send a message to start a session on this device.`,description:`Empty transcript hint`},"session.cwdPlaceholder":{message:`Working directory (optional)`,description:`Working directory input placeholder`},"session.modelPlaceholder":{message:`Model (optional)`,description:`Model input placeholder`},"session.promptPlaceholder":{message:`Send a message to the agent…`,description:`Prompt input placeholder`},"session.send":{message:`Send`,description:`Send prompt button`},"session.enterHint":{message:`Enter to send, Shift+Enter for a new line.`,description:`Composer keyboard hint`},"transcript.turnFailed":{message:`Turn failed`,description:`Turn result failed label`},"transcript.turnDone":{message:`Done`,description:`Turn result done label`},"history.button":{message:`Historial`,description:`Open the conversation history drawer`},"history.title":{message:`Historial de conversaciones`,description:`History drawer title`},"history.intro":{message:`Sesiones anteriores de Claude Code y Codex en este dispositivo.`,description:`History drawer intro`},"history.refresh":{message:`Actualizar`,description:`Reload the history list`},"history.loading":{message:`Cargando historial…`,description:`History loading message`},"history.empty":{message:`No se encontró historial en este dispositivo.`,description:`Empty history message`},"history.messages":{message:`{count} mensajes`,description:`History item message count`},"history.readonly":{message:`Esta conversación de Codex es de solo lectura y no se puede continuar. Inicia una nueva sesión para seguir programando.`,description:`Read-only replay notice`},"history.resumeHint":{message:`Enviar un mensaje reanudará esta conversación en el dispositivo.`,description:`Resume composer hint`},"history.claudeLabel":{message:`Historial de Claude`,description:`Replayed Claude session label`},"history.codexLabel":{message:`Historial de Codex (solo lectura)`,description:`Replayed Codex session label`},"session.permissionModeLabel":{message:`Modo de permisos`,description:`Permission-mode selector label`},"session.permissionModeDefault":{message:`Predeterminado (preguntar cada vez)`,description:`Permission mode: ask before each tool use`},"session.permissionModeAcceptEdits":{message:`Aceptar cambios automáticamente`,description:`Permission mode: auto-accept file edits`},"session.permissionModePlan":{message:`Modo de planificación (solo lectura)`,description:`Permission mode: read-only planning`},"session.permissionModeBypass":{message:`Omitir todos los permisos`,description:`Permission mode: bypass all permission prompts`},"session.providerLabel":{message:`Backend`,description:`Agent backend selector label`},"session.providerClaude":{message:`Claude Code`,description:`Backend option: Claude Code`},"session.providerCodex":{message:`Codex`,description:`Backend option: Codex`},"session.providerUnavailable":{message:`(no instalado)`,description:`Suffix shown next to a backend whose CLI is not installed on the node`},"session.providerUnavailableHint":{message:`{name} no está instalado en este dispositivo.`,description:`Composer hint shown when the selected backend is not installed on the node`},"session.effortLabel":{message:`Esfuerzo de razonamiento`,description:`Reasoning-effort selector label`},"session.effortDefault":{message:`Predeterminado`,description:`Reasoning effort: backend default`},"session.effortLow":{message:`Bajo`,description:`Reasoning effort: low`},"session.effortMedium":{message:`Medio`,description:`Reasoning effort: medium`},"session.effortHigh":{message:`Alto`,description:`Reasoning effort: high`},"session.effortMax":{message:`Máximo`,description:`Reasoning effort: maximum (Claude only)`},"directory.title":{message:`Elegir directorio de trabajo`,description:`Working-directory picker dialog title`},"directory.choose":{message:`Usar este directorio`,description:`Button: select the current directory`},"directory.up":{message:`Directorio superior`,description:`Button: go to the parent directory`},"directory.refresh":{message:`Actualizar`,description:`Button: reload the current directory`},"directory.loading":{message:`Cargando…`,description:`Directory listing loading hint`},"directory.empty":{message:`Este directorio está vacío.`,description:`Empty directory hint`},"directory.truncated":{message:`Mostrando las primeras 1000 entradas.`,description:`Hint shown when the listing was truncated`},"session.attachImage":{message:`Adjuntar imagen`,description:`Attach image button title`},"session.removeImage":{message:`Quitar imagen`,description:`Remove attached image button title`},"session.imageAlt":{message:`Imagen adjunta`,description:`Attached image thumbnail alt text`},"session.imageTooLarge":{message:`La imagen es demasiado grande; mantén cada una por debajo de 12 MB.`,description:`Warning shown when an image exceeds the size limit`},"session.imageLimit":{message:`Puedes adjuntar hasta {count} imágenes.`,description:`Warning shown when exceeding the max number of images`},"session.modelDefault":{message:`Default model`,description:`Default model`},"session.cwdDefault":{message:`Default directory`,description:`Default directory`},"session.settings":{message:`Session settings`,description:`Session settings`},"session.settingsLocked":{message:`Settings are locked for this session`,description:`Settings are locked for this session`},"session.attachFile":{message:`Attach file`,description:`Attach file`},"session.attachmentImageAlt":{message:`Attached image`,description:`Attached image`},"session.removeAttachment":{message:`Remove attachment`,description:`Remove attachment`},"session.uploadingAttachment":{message:`Uploading attachments…`,description:`Uploading attachments…`},"session.attachmentTooLarge":{message:`File is too large; keep each under 50 MB.`,description:`File is too large; keep each under 50 MB.`},"session.attachmentLimit":{message:`You can attach up to {count} files.`,description:`You can attach up to {count} files.`},"session.attachmentUploadError":{message:`Failed to upload attachment.`,description:`Failed to upload attachment.`},"notice.slashUnavailable":{message:`/{command} es un comando interactivo y no puede ejecutarse en una sesión remota.`,description:`Notice shown when a slash command can't run in a remote session`},"notice.slashCodexUnsupported":{message:`/{command} no está disponible para Codex en una sesión remota.`,description:`Notice shown when a Codex slash command isn't supported remotely`}};export{e as default};
@@ -1 +0,0 @@
1
- var e={"nodeList.title":{message:`Devices`,description:`Coding Bridge device list title`},"nodeList.refresh":{message:`Refresh`,description:`Refresh the device list`},"nodeList.pair":{message:`Pair device`,description:`Open the pairing dialog`},"nodeList.empty":{message:`No devices paired yet.`,description:`Empty device list message`},"nodeList.pairFirst":{message:`Pair your first device`,description:`Empty-state pairing button`},"nodeList.remove":{message:`Remove`,description:`Remove a device`},"nodeList.removeConfirm":{message:`Remove device "{name}"? It will need to be paired again.`,description:`Device removal confirmation`},"nodeList.removeSuccess":{message:`Device removed.`,description:`Device removed toast`},"nodeList.removeFailed":{message:`Failed to remove device.`,description:`Device removal error toast`},"status.online":{message:`Online`,description:`Device online status`},"status.offline":{message:`Offline`,description:`Device offline status`},"connection.disconnected":{message:`Disconnected`,description:`Relay connection disconnected`},"connection.connecting":{message:`Connecting…`,description:`Relay connection connecting`},"connection.connected":{message:`Connected`,description:`Relay connection connected`},"connection.error":{message:`Connection error`,description:`Relay connection error`},"pair.title":{message:`Pair a device`,description:`Pairing dialog title`},"pair.intro":{message:`Run the Coding Bridge agent on your computer, then enter its pairing code here to control it from the web.`,description:`Pairing dialog intro`},"pair.step1":{message:`Install the agent (requires Python 3.10+):`,description:`Pairing step 1`},"pair.step2":{message:`Start it and follow the prompt:`,description:`Pairing step 2`},"pair.step3":{message:`Enter the pairing code it shows below.`,description:`Pairing step 3`},"pair.codePlaceholder":{message:`Pairing code`,description:`Pairing code input placeholder`},"pair.claim":{message:`Pair device`,description:`Pairing confirm button`},"pair.success":{message:`Device "{name}" paired.`,description:`Pairing success toast`},"pair.invalidCode":{message:`Invalid or expired pairing code.`,description:`Pairing invalid code error`},"pair.usedCode":{message:`This pairing code has already been used.`,description:`Pairing used code error`},"pair.failed":{message:`Failed to pair device.`,description:`Pairing generic error`},"permission.title":{message:`Permission required`,description:`Permission dialog title`},"permission.subtitle":{message:`The agent wants to use a tool. Approve to continue.`,description:`Permission dialog subtitle`},"permission.deny":{message:`Deny`,description:`Deny a tool permission`},"permission.allow":{message:`Allow`,description:`Allow a tool permission`},"session.noDevice":{message:`Select a device to start coding.`,description:`No device selected placeholder`},"session.newSession":{message:`New session`,description:`Start a new session`},"session.deviceOffline":{message:`This device is offline. Start the Coding Bridge agent on it to continue.`,description:`Device offline warning`},"session.startHint":{message:`Send a message to start a session on this device.`,description:`Empty transcript hint`},"session.cwdPlaceholder":{message:`Working directory (optional)`,description:`Working directory input placeholder`},"session.modelPlaceholder":{message:`Model (optional)`,description:`Model input placeholder`},"session.promptPlaceholder":{message:`Send a message to the agent…`,description:`Prompt input placeholder`},"session.send":{message:`Send`,description:`Send prompt button`},"session.enterHint":{message:`Enter to send, Shift+Enter for a new line.`,description:`Composer keyboard hint`},"transcript.turnFailed":{message:`Turn failed`,description:`Turn result failed label`},"transcript.turnDone":{message:`Done`,description:`Turn result done label`},"history.button":{message:`السجل`,description:`Open the conversation history drawer`},"history.title":{message:`سجل المحادثات`,description:`History drawer title`},"history.intro":{message:`جلسات Claude Code وCodex السابقة على هذا الجهاز.`,description:`History drawer intro`},"history.refresh":{message:`تحديث`,description:`Reload the history list`},"history.loading":{message:`جارٍ تحميل السجل…`,description:`History loading message`},"history.empty":{message:`لا يوجد سجل على هذا الجهاز.`,description:`Empty history message`},"history.messages":{message:`{count} رسالة`,description:`History item message count`},"history.readonly":{message:`محادثة Codex هذه للقراءة فقط ولا يمكن متابعتها. ابدأ جلسة جديدة لمواصلة البرمجة.`,description:`Read-only replay notice`},"history.resumeHint":{message:`سيؤدي إرسال رسالة إلى استئناف هذه المحادثة على الجهاز.`,description:`Resume composer hint`},"history.claudeLabel":{message:`سجل Claude`,description:`Replayed Claude session label`},"history.codexLabel":{message:`سجل Codex (للقراءة فقط)`,description:`Replayed Codex session label`},"session.permissionModeLabel":{message:`وضع الأذونات`,description:`Permission-mode selector label`},"session.permissionModeDefault":{message:`افتراضي (السؤال في كل مرة)`,description:`Permission mode: ask before each tool use`},"session.permissionModeAcceptEdits":{message:`قبول التعديلات تلقائيًا`,description:`Permission mode: auto-accept file edits`},"session.permissionModePlan":{message:`وضع التخطيط (للقراءة فقط)`,description:`Permission mode: read-only planning`},"session.permissionModeBypass":{message:`تجاوز كل الأذونات`,description:`Permission mode: bypass all permission prompts`},"session.providerLabel":{message:`الخلفية`,description:`Agent backend selector label`},"session.providerClaude":{message:`Claude Code`,description:`Backend option: Claude Code`},"session.providerCodex":{message:`Codex`,description:`Backend option: Codex`},"session.providerUnavailable":{message:`(غير مثبّت)`,description:`Suffix shown next to a backend whose CLI is not installed on the node`},"session.providerUnavailableHint":{message:`‏{name} غير مثبّت على هذا الجهاز.`,description:`Composer hint shown when the selected backend is not installed on the node`},"session.effortLabel":{message:`مستوى الاستدلال`,description:`Reasoning-effort selector label`},"session.effortDefault":{message:`افتراضي`,description:`Reasoning effort: backend default`},"session.effortLow":{message:`منخفض`,description:`Reasoning effort: low`},"session.effortMedium":{message:`متوسط`,description:`Reasoning effort: medium`},"session.effortHigh":{message:`مرتفع`,description:`Reasoning effort: high`},"session.effortMax":{message:`أقصى`,description:`Reasoning effort: maximum (Claude only)`},"directory.title":{message:`اختر دليل العمل`,description:`Working-directory picker dialog title`},"directory.choose":{message:`استخدم هذا الدليل`,description:`Button: select the current directory`},"directory.up":{message:`الدليل الأصل`,description:`Button: go to the parent directory`},"directory.refresh":{message:`تحديث`,description:`Button: reload the current directory`},"directory.loading":{message:`جارٍ التحميل…`,description:`Directory listing loading hint`},"directory.empty":{message:`هذا الدليل فارغ.`,description:`Empty directory hint`},"directory.truncated":{message:`عرض أول 1000 عنصر.`,description:`Hint shown when the listing was truncated`},"session.attachImage":{message:`إرفاق صورة`,description:`Attach image button title`},"session.removeImage":{message:`إزالة الصورة`,description:`Remove attached image button title`},"session.imageAlt":{message:`الصورة المرفقة`,description:`Attached image thumbnail alt text`},"session.imageTooLarge":{message:`الصورة كبيرة جدًا؛ يجب أن تكون كل صورة أقل من 12 ميغابايت.`,description:`Warning shown when an image exceeds the size limit`},"session.imageLimit":{message:`يمكنك إرفاق ما يصل إلى {count} صورة.`,description:`Warning shown when exceeding the max number of images`},"session.modelDefault":{message:`Default model`,description:`Default model`},"session.cwdDefault":{message:`Default directory`,description:`Default directory`},"session.settings":{message:`Session settings`,description:`Session settings`},"session.settingsLocked":{message:`Settings are locked for this session`,description:`Settings are locked for this session`},"session.attachFile":{message:`Attach file`,description:`Attach file`},"session.attachmentImageAlt":{message:`Attached image`,description:`Attached image`},"session.removeAttachment":{message:`Remove attachment`,description:`Remove attachment`},"session.uploadingAttachment":{message:`Uploading attachments…`,description:`Uploading attachments…`},"session.attachmentTooLarge":{message:`File is too large; keep each under 50 MB.`,description:`File is too large; keep each under 50 MB.`},"session.attachmentLimit":{message:`You can attach up to {count} files.`,description:`You can attach up to {count} files.`},"session.attachmentUploadError":{message:`Failed to upload attachment.`,description:`Failed to upload attachment.`},"notice.slashUnavailable":{message:`‏/{command} أمر تفاعلي ولا يمكن تشغيله في جلسة عن بُعد.`,description:`Notice shown when a slash command can't run in a remote session`},"notice.slashCodexUnsupported":{message:`‏/{command} غير متاح لـ Codex في جلسة عن بُعد.`,description:`Notice shown when a Codex slash command isn't supported remotely`}};export{e as default};
@@ -1 +0,0 @@
1
- var e={"nodeList.title":{message:`Devices`,description:`Coding Bridge device list title`},"nodeList.refresh":{message:`Refresh`,description:`Refresh the device list`},"nodeList.pair":{message:`Pair device`,description:`Open the pairing dialog`},"nodeList.empty":{message:`No devices paired yet.`,description:`Empty device list message`},"nodeList.pairFirst":{message:`Pair your first device`,description:`Empty-state pairing button`},"nodeList.remove":{message:`Remove`,description:`Remove a device`},"nodeList.removeConfirm":{message:`Remove device "{name}"? It will need to be paired again.`,description:`Device removal confirmation`},"nodeList.removeSuccess":{message:`Device removed.`,description:`Device removed toast`},"nodeList.removeFailed":{message:`Failed to remove device.`,description:`Device removal error toast`},"status.online":{message:`Online`,description:`Device online status`},"status.offline":{message:`Offline`,description:`Device offline status`},"connection.disconnected":{message:`Disconnected`,description:`Relay connection disconnected`},"connection.connecting":{message:`Connecting…`,description:`Relay connection connecting`},"connection.connected":{message:`Connected`,description:`Relay connection connected`},"connection.error":{message:`Connection error`,description:`Relay connection error`},"pair.title":{message:`Pair a device`,description:`Pairing dialog title`},"pair.intro":{message:`Run the Coding Bridge agent on your computer, then enter its pairing code here to control it from the web.`,description:`Pairing dialog intro`},"pair.step1":{message:`Install the agent (requires Python 3.10+):`,description:`Pairing step 1`},"pair.step2":{message:`Start it and follow the prompt:`,description:`Pairing step 2`},"pair.step3":{message:`Enter the pairing code it shows below.`,description:`Pairing step 3`},"pair.codePlaceholder":{message:`Pairing code`,description:`Pairing code input placeholder`},"pair.claim":{message:`Pair device`,description:`Pairing confirm button`},"pair.success":{message:`Device "{name}" paired.`,description:`Pairing success toast`},"pair.invalidCode":{message:`Invalid or expired pairing code.`,description:`Pairing invalid code error`},"pair.usedCode":{message:`This pairing code has already been used.`,description:`Pairing used code error`},"pair.failed":{message:`Failed to pair device.`,description:`Pairing generic error`},"permission.title":{message:`Permission required`,description:`Permission dialog title`},"permission.subtitle":{message:`The agent wants to use a tool. Approve to continue.`,description:`Permission dialog subtitle`},"permission.deny":{message:`Deny`,description:`Deny a tool permission`},"permission.allow":{message:`Allow`,description:`Allow a tool permission`},"session.noDevice":{message:`Select a device to start coding.`,description:`No device selected placeholder`},"session.newSession":{message:`New session`,description:`Start a new session`},"session.deviceOffline":{message:`This device is offline. Start the Coding Bridge agent on it to continue.`,description:`Device offline warning`},"session.startHint":{message:`Send a message to start a session on this device.`,description:`Empty transcript hint`},"session.cwdPlaceholder":{message:`Working directory (optional)`,description:`Working directory input placeholder`},"session.modelPlaceholder":{message:`Model (optional)`,description:`Model input placeholder`},"session.promptPlaceholder":{message:`Send a message to the agent…`,description:`Prompt input placeholder`},"session.send":{message:`Send`,description:`Send prompt button`},"session.enterHint":{message:`Enter to send, Shift+Enter for a new line.`,description:`Composer keyboard hint`},"transcript.turnFailed":{message:`Turn failed`,description:`Turn result failed label`},"transcript.turnDone":{message:`Done`,description:`Turn result done label`},"history.button":{message:`Verlauf`,description:`Open the conversation history drawer`},"history.title":{message:`Konversationsverlauf`,description:`History drawer title`},"history.intro":{message:`Frühere Claude-Code- und Codex-Sitzungen auf diesem Gerät.`,description:`History drawer intro`},"history.refresh":{message:`Aktualisieren`,description:`Reload the history list`},"history.loading":{message:`Verlauf wird geladen…`,description:`History loading message`},"history.empty":{message:`Kein Verlauf auf diesem Gerät gefunden.`,description:`Empty history message`},"history.messages":{message:`{count} Nachrichten`,description:`History item message count`},"history.readonly":{message:`Diese Codex-Konversation ist schreibgeschützt und kann nicht fortgesetzt werden. Starte eine neue Sitzung, um weiterzuarbeiten.`,description:`Read-only replay notice`},"history.resumeHint":{message:`Eine Nachricht setzt diese Konversation auf dem Gerät fort.`,description:`Resume composer hint`},"history.claudeLabel":{message:`Claude-Verlauf`,description:`Replayed Claude session label`},"history.codexLabel":{message:`Codex-Verlauf (schreibgeschützt)`,description:`Replayed Codex session label`},"session.permissionModeLabel":{message:`Berechtigungsmodus`,description:`Permission-mode selector label`},"session.permissionModeDefault":{message:`Standard (jedes Mal fragen)`,description:`Permission mode: ask before each tool use`},"session.permissionModeAcceptEdits":{message:`Änderungen automatisch akzeptieren`,description:`Permission mode: auto-accept file edits`},"session.permissionModePlan":{message:`Planungsmodus (schreibgeschützt)`,description:`Permission mode: read-only planning`},"session.permissionModeBypass":{message:`Alle Berechtigungen umgehen`,description:`Permission mode: bypass all permission prompts`},"session.providerLabel":{message:`Backend`,description:`Agent backend selector label`},"session.providerClaude":{message:`Claude Code`,description:`Backend option: Claude Code`},"session.providerCodex":{message:`Codex`,description:`Backend option: Codex`},"session.providerUnavailable":{message:`(nicht installiert)`,description:`Suffix shown next to a backend whose CLI is not installed on the node`},"session.providerUnavailableHint":{message:`{name} ist auf diesem Gerät nicht installiert.`,description:`Composer hint shown when the selected backend is not installed on the node`},"session.effortLabel":{message:`Denkaufwand`,description:`Reasoning-effort selector label`},"session.effortDefault":{message:`Standard`,description:`Reasoning effort: backend default`},"session.effortLow":{message:`Niedrig`,description:`Reasoning effort: low`},"session.effortMedium":{message:`Mittel`,description:`Reasoning effort: medium`},"session.effortHigh":{message:`Hoch`,description:`Reasoning effort: high`},"session.effortMax":{message:`Maximal`,description:`Reasoning effort: maximum (Claude only)`},"directory.title":{message:`Arbeitsverzeichnis wählen`,description:`Working-directory picker dialog title`},"directory.choose":{message:`Dieses Verzeichnis verwenden`,description:`Button: select the current directory`},"directory.up":{message:`Übergeordnetes Verzeichnis`,description:`Button: go to the parent directory`},"directory.refresh":{message:`Aktualisieren`,description:`Button: reload the current directory`},"directory.loading":{message:`Wird geladen…`,description:`Directory listing loading hint`},"directory.empty":{message:`Dieses Verzeichnis ist leer.`,description:`Empty directory hint`},"directory.truncated":{message:`Die ersten 1000 Einträge werden angezeigt.`,description:`Hint shown when the listing was truncated`},"session.attachImage":{message:`Bild anhängen`,description:`Attach image button title`},"session.removeImage":{message:`Bild entfernen`,description:`Remove attached image button title`},"session.imageAlt":{message:`Angehängtes Bild`,description:`Attached image thumbnail alt text`},"session.imageTooLarge":{message:`Bild ist zu groß; halte jedes unter 12 MB.`,description:`Warning shown when an image exceeds the size limit`},"session.imageLimit":{message:`Du kannst bis zu {count} Bilder anhängen.`,description:`Warning shown when exceeding the max number of images`},"session.modelDefault":{message:`Default model`,description:`Default model`},"session.cwdDefault":{message:`Default directory`,description:`Default directory`},"session.settings":{message:`Session settings`,description:`Session settings`},"session.settingsLocked":{message:`Settings are locked for this session`,description:`Settings are locked for this session`},"session.attachFile":{message:`Attach file`,description:`Attach file`},"session.attachmentImageAlt":{message:`Attached image`,description:`Attached image`},"session.removeAttachment":{message:`Remove attachment`,description:`Remove attachment`},"session.uploadingAttachment":{message:`Uploading attachments…`,description:`Uploading attachments…`},"session.attachmentTooLarge":{message:`File is too large; keep each under 50 MB.`,description:`File is too large; keep each under 50 MB.`},"session.attachmentLimit":{message:`You can attach up to {count} files.`,description:`You can attach up to {count} files.`},"session.attachmentUploadError":{message:`Failed to upload attachment.`,description:`Failed to upload attachment.`},"notice.slashUnavailable":{message:`/{command} ist ein interaktiver Befehl und kann in einer Remote-Sitzung nicht ausgeführt werden.`,description:`Notice shown when a slash command can't run in a remote session`},"notice.slashCodexUnsupported":{message:`/{command} ist für Codex in einer Remote-Sitzung nicht verfügbar.`,description:`Notice shown when a Codex slash command isn't supported remotely`}};export{e as default};
@@ -1 +0,0 @@
1
- var e={"nodeList.title":{message:`Devices`,description:`Coding Bridge device list title`},"nodeList.refresh":{message:`Refresh`,description:`Refresh the device list`},"nodeList.pair":{message:`Pair device`,description:`Open the pairing dialog`},"nodeList.empty":{message:`No devices paired yet.`,description:`Empty device list message`},"nodeList.pairFirst":{message:`Pair your first device`,description:`Empty-state pairing button`},"nodeList.remove":{message:`Remove`,description:`Remove a device`},"nodeList.removeConfirm":{message:`Remove device "{name}"? It will need to be paired again.`,description:`Device removal confirmation`},"nodeList.removeSuccess":{message:`Device removed.`,description:`Device removed toast`},"nodeList.removeFailed":{message:`Failed to remove device.`,description:`Device removal error toast`},"status.online":{message:`Online`,description:`Device online status`},"status.offline":{message:`Offline`,description:`Device offline status`},"connection.disconnected":{message:`Disconnected`,description:`Relay connection disconnected`},"connection.connecting":{message:`Connecting…`,description:`Relay connection connecting`},"connection.connected":{message:`Connected`,description:`Relay connection connected`},"connection.error":{message:`Connection error`,description:`Relay connection error`},"pair.title":{message:`Pair a device`,description:`Pairing dialog title`},"pair.intro":{message:`Run the Coding Bridge agent on your computer, then enter its pairing code here to control it from the web.`,description:`Pairing dialog intro`},"pair.step1":{message:`Install the agent (requires Python 3.10+):`,description:`Pairing step 1`},"pair.step2":{message:`Start it and follow the prompt:`,description:`Pairing step 2`},"pair.step3":{message:`Enter the pairing code it shows below.`,description:`Pairing step 3`},"pair.codePlaceholder":{message:`Pairing code`,description:`Pairing code input placeholder`},"pair.claim":{message:`Pair device`,description:`Pairing confirm button`},"pair.success":{message:`Device "{name}" paired.`,description:`Pairing success toast`},"pair.invalidCode":{message:`Invalid or expired pairing code.`,description:`Pairing invalid code error`},"pair.usedCode":{message:`This pairing code has already been used.`,description:`Pairing used code error`},"pair.failed":{message:`Failed to pair device.`,description:`Pairing generic error`},"permission.title":{message:`Permission required`,description:`Permission dialog title`},"permission.subtitle":{message:`The agent wants to use a tool. Approve to continue.`,description:`Permission dialog subtitle`},"permission.deny":{message:`Deny`,description:`Deny a tool permission`},"permission.allow":{message:`Allow`,description:`Allow a tool permission`},"session.noDevice":{message:`Select a device to start coding.`,description:`No device selected placeholder`},"session.newSession":{message:`New session`,description:`Start a new session`},"session.deviceOffline":{message:`This device is offline. Start the Coding Bridge agent on it to continue.`,description:`Device offline warning`},"session.startHint":{message:`Send a message to start a session on this device.`,description:`Empty transcript hint`},"session.cwdPlaceholder":{message:`Working directory (optional)`,description:`Working directory input placeholder`},"session.modelPlaceholder":{message:`Model (optional)`,description:`Model input placeholder`},"session.promptPlaceholder":{message:`Send a message to the agent…`,description:`Prompt input placeholder`},"session.send":{message:`Send`,description:`Send prompt button`},"session.enterHint":{message:`Enter to send, Shift+Enter for a new line.`,description:`Composer keyboard hint`},"transcript.turnFailed":{message:`Turn failed`,description:`Turn result failed label`},"transcript.turnDone":{message:`Done`,description:`Turn result done label`},"history.button":{message:`Historia`,description:`Open the conversation history drawer`},"history.title":{message:`Historia rozmów`,description:`History drawer title`},"history.intro":{message:`Poprzednie sesje Claude Code i Codex na tym urządzeniu.`,description:`History drawer intro`},"history.refresh":{message:`Odśwież`,description:`Reload the history list`},"history.loading":{message:`Ładowanie historii…`,description:`History loading message`},"history.empty":{message:`Nie znaleziono historii na tym urządzeniu.`,description:`Empty history message`},"history.messages":{message:`Wiadomości: {count}`,description:`History item message count`},"history.readonly":{message:`Ta rozmowa Codex jest tylko do odczytu i nie można jej kontynuować. Rozpocznij nową sesję, aby kontynuować kodowanie.`,description:`Read-only replay notice`},"history.resumeHint":{message:`Wysłanie wiadomości wznowi tę rozmowę na urządzeniu.`,description:`Resume composer hint`},"history.claudeLabel":{message:`Historia Claude`,description:`Replayed Claude session label`},"history.codexLabel":{message:`Historia Codex (tylko do odczytu)`,description:`Replayed Codex session label`},"session.permissionModeLabel":{message:`Tryb uprawnień`,description:`Permission-mode selector label`},"session.permissionModeDefault":{message:`Domyślny (pytaj za każdym razem)`,description:`Permission mode: ask before each tool use`},"session.permissionModeAcceptEdits":{message:`Automatycznie akceptuj zmiany`,description:`Permission mode: auto-accept file edits`},"session.permissionModePlan":{message:`Tryb planowania (tylko do odczytu)`,description:`Permission mode: read-only planning`},"session.permissionModeBypass":{message:`Pomiń wszystkie uprawnienia`,description:`Permission mode: bypass all permission prompts`},"session.providerLabel":{message:`Backend`,description:`Agent backend selector label`},"session.providerClaude":{message:`Claude Code`,description:`Backend option: Claude Code`},"session.providerCodex":{message:`Codex`,description:`Backend option: Codex`},"session.providerUnavailable":{message:`(niezainstalowane)`,description:`Suffix shown next to a backend whose CLI is not installed on the node`},"session.providerUnavailableHint":{message:`{name} nie jest zainstalowany na tym urządzeniu.`,description:`Composer hint shown when the selected backend is not installed on the node`},"session.effortLabel":{message:`Wysiłek rozumowania`,description:`Reasoning-effort selector label`},"session.effortDefault":{message:`Domyślny`,description:`Reasoning effort: backend default`},"session.effortLow":{message:`Niski`,description:`Reasoning effort: low`},"session.effortMedium":{message:`Średni`,description:`Reasoning effort: medium`},"session.effortHigh":{message:`Wysoki`,description:`Reasoning effort: high`},"session.effortMax":{message:`Maksymalny`,description:`Reasoning effort: maximum (Claude only)`},"directory.title":{message:`Wybierz katalog roboczy`,description:`Working-directory picker dialog title`},"directory.choose":{message:`Użyj tego katalogu`,description:`Button: select the current directory`},"directory.up":{message:`Katalog nadrzędny`,description:`Button: go to the parent directory`},"directory.refresh":{message:`Odśwież`,description:`Button: reload the current directory`},"directory.loading":{message:`Ładowanie…`,description:`Directory listing loading hint`},"directory.empty":{message:`Ten katalog jest pusty.`,description:`Empty directory hint`},"directory.truncated":{message:`Wyświetlono pierwsze 1000 pozycji.`,description:`Hint shown when the listing was truncated`},"session.attachImage":{message:`Załącz obraz`,description:`Attach image button title`},"session.removeImage":{message:`Usuń obraz`,description:`Remove attached image button title`},"session.imageAlt":{message:`Załączony obraz`,description:`Attached image thumbnail alt text`},"session.imageTooLarge":{message:`Obraz jest za duży; każdy powinien mieć mniej niż 12 MB.`,description:`Warning shown when an image exceeds the size limit`},"session.imageLimit":{message:`Możesz załączyć maksymalnie {count} obrazów.`,description:`Warning shown when exceeding the max number of images`},"session.modelDefault":{message:`Default model`,description:`Default model`},"session.cwdDefault":{message:`Default directory`,description:`Default directory`},"session.settings":{message:`Session settings`,description:`Session settings`},"session.settingsLocked":{message:`Settings are locked for this session`,description:`Settings are locked for this session`},"session.attachFile":{message:`Attach file`,description:`Attach file`},"session.attachmentImageAlt":{message:`Attached image`,description:`Attached image`},"session.removeAttachment":{message:`Remove attachment`,description:`Remove attachment`},"session.uploadingAttachment":{message:`Uploading attachments…`,description:`Uploading attachments…`},"session.attachmentTooLarge":{message:`File is too large; keep each under 50 MB.`,description:`File is too large; keep each under 50 MB.`},"session.attachmentLimit":{message:`You can attach up to {count} files.`,description:`You can attach up to {count} files.`},"session.attachmentUploadError":{message:`Failed to upload attachment.`,description:`Failed to upload attachment.`},"notice.slashUnavailable":{message:`/{command} to polecenie interaktywne i nie może działać w sesji zdalnej.`,description:`Notice shown when a slash command can't run in a remote session`},"notice.slashCodexUnsupported":{message:`/{command} nie jest dostępne dla Codex w sesji zdalnej.`,description:`Notice shown when a Codex slash command isn't supported remotely`}};export{e as default};