@acedatacloud/nexior 3.329.16 → 3.329.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ApiCodeButton-B4AbprcE.js → ApiCodeButton-B_Fbr2Mf.js} +1 -1
- package/dist/assets/{Artifacts-PhyjpCtJ.js → Artifacts-Dgm9kOc2.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-gej1HInv.js → AskUserQuestionCard-nIx1rQLr.js} +1 -1
- package/dist/assets/{AudioPreview-BSZwbHFC.js → AudioPreview-Cwb7ScZ0.js} +1 -1
- package/dist/assets/{Auth-wrbtTe49.js → Auth-QQ9fP4BN.js} +1 -1
- package/dist/assets/{Bare-CJW0KY7n.js → Bare-DPry7kjn.js} +1 -1
- package/dist/assets/{BotPlaceholder-ClF3L6UZ.js → BotPlaceholder-TFPpOTC5.js} +1 -1
- package/dist/assets/{BottomFooter-DMeMSGST.js → BottomFooter-D2Usc-nq.js} +1 -1
- package/dist/assets/{Callback-ZCx6v2Qm.js → Callback-DKpKq7pt.js} +1 -1
- package/dist/assets/{CodeSnippet-BLx5PNoE.js → CodeSnippet-B78At6QW.js} +1 -1
- package/dist/assets/{Console--3BSnjhd.js → Console-kv7g8WNJ.js} +1 -1
- package/dist/assets/{Consumption-DoSnOpCh.js → Consumption-B-_J3ARX.js} +1 -1
- package/dist/assets/{Conversation-otwyTC3G.js → Conversation-CDxI_n0V.js} +1 -1
- package/dist/assets/{Conversation-CyHqOxgu.js → Conversation-s39MqcNB.js} +1 -1
- package/dist/assets/{CopyToClipboard-BovNTELl.js → CopyToClipboard-SOk0OfUA.js} +1 -1
- package/dist/assets/{Detail-Bw3B_wFT.js → Detail-Cfr4qEpF.js} +2 -2
- package/dist/assets/{Extra-m-UX_HKW.js → Extra-BJnZDwju.js} +1 -1
- package/dist/assets/{FilePreview-Ce20lKHh.js → FilePreview-DRvbLc-w.js} +1 -1
- package/dist/assets/{Hailuo-DJdgVTZk.js → Hailuo-CvuDcDBC.js} +1 -1
- package/dist/assets/{History-D9ucrqH3.js → History-CeBrfSh-.js} +1 -1
- package/dist/assets/{ImagePreview-BKDkeMuD.js → ImagePreview-BJg6GpnM.js} +1 -1
- package/dist/assets/{ImageWrapper-CJPUt9fO.js → ImageWrapper-Bp7J2Kyr.js} +1 -1
- package/dist/assets/{Index-F-k_Gtdn.js → Index-2968jdfD.js} +1 -1
- package/dist/assets/{Index-DZaSDeRC.css → Index-82dxEr85.css} +1 -1
- package/dist/assets/{Index-BzfDCKvB.js → Index-B10waoOW.js} +1 -1
- package/dist/assets/{Index-BJ2uTn7f.js → Index-B4P1zEB8.js} +1 -1
- package/dist/assets/{Index-ClXholKq.js → Index-BGCjJNXK.js} +1 -1
- package/dist/assets/{Index-CNjhG1xg.js → Index-BHjxjHGA.js} +1 -1
- package/dist/assets/{Index-DtFRbU0N.js → Index-BNEbwL-S.js} +1 -1
- package/dist/assets/{Index-DAr6f-_O.js → Index-BacG1KNs.js} +1 -1
- package/dist/assets/{Index-Jqt2yQvt.js → Index-Blcd_NMV.js} +1 -1
- package/dist/assets/{Index-CARRGZlZ.js → Index-BoMNGQRN.js} +1 -1
- package/dist/assets/{Index-FmpcU_Ri.js → Index-BrtHEfhp.js} +1 -1
- package/dist/assets/{Index-CPaFzSUd.js → Index-BtaiLrlN.js} +1 -1
- package/dist/assets/{Index-DsB34PP1.js → Index-C0ygQSu-.js} +1 -1
- package/dist/assets/{Index-BzMJicqQ.js → Index-C6RJIok4.js} +1 -1
- package/dist/assets/{Index-BGlgGMXY.js → Index-CGTVcpLh.js} +1 -1
- package/dist/assets/{Index-rzXksBpy.js → Index-CH_v6Dc3.js} +1 -1
- package/dist/assets/{Index-DSiWRGHv.js → Index-COMompjz.js} +1 -1
- package/dist/assets/{Index-DtmVV4ES.js → Index-CVCPKHkj.js} +1 -1
- package/dist/assets/{Index-CKOUb2hk.js → Index-CreyroBE.js} +1 -1
- package/dist/assets/{Index-C_pwE0Yp.js → Index-DEvf1MPs.js} +1 -1
- package/dist/assets/{Index-CBON_aOb.js → Index-DMdxWwMd.js} +1 -1
- package/dist/assets/{Index-C8_SKL-4.js → Index-DcyU3JBz.js} +1 -1
- package/dist/assets/{Index-p-m_XsAg.js → Index-DdqQWAcI.js} +1 -1
- package/dist/assets/{Index-s53Hc8JB.js → Index-DlLN51-Q.js} +1 -1
- package/dist/assets/{Index-DcBVIIXz.js → Index-DnA15bCY.js} +1 -1
- package/dist/assets/{Index-BSPdlju8.js → Index-DqZkyVHt.js} +1 -1
- package/dist/assets/{Index-Cu5n9kJn.js → Index-Dr-oTweF.js} +1 -1
- package/dist/assets/{Index-DeYagwk6.js → Index-DyMozBxf.js} +1 -1
- package/dist/assets/{Index-wVuMpc_H.js → Index-tIXJcg4X.js} +1 -1
- package/dist/assets/{Index-GEIDO90j.js → Index-zPzhvhg9.js} +1 -1
- package/dist/assets/{Invitees-BlbDmUXN.js → Invitees-CsuLEVVx.js} +1 -1
- package/dist/assets/{List-CUwZEDHu.js → List-CKi4YFq-.js} +1 -1
- package/dist/assets/{List-DkCLGYMJ.js → List-Crz3Is5D.js} +1 -1
- package/dist/assets/{List-CY1N3ILM.js → List-bSrP1cTj.js} +1 -1
- package/dist/assets/{LocalTools-CMxoLA7U.js → LocalTools-BwYNkCFA.js} +1 -1
- package/dist/assets/{LocalTools-z8jtbr5O.js → LocalTools-o7EWU2Uf.js} +1 -1
- package/dist/assets/{Main-D1328AkQ.js → Main-DudYMzsE.js} +1 -1
- package/dist/assets/{Message-BtxG96K4.js → Message-CvC69gZL.js} +1 -1
- package/dist/assets/{Model-D54rLtLP.js → Model-B7gMomyD.js} +1 -1
- package/dist/assets/{Navigator-DuFxlRAw.js → Navigator-Brxg7zUQ.js} +3 -3
- package/dist/assets/{NotFound-CmF6ZwZt.js → NotFound-DhnB3uW1.js} +1 -1
- package/dist/assets/{Pay-CKNhqbmz.js → Pay-CZFt8w7T.js} +1 -1
- package/dist/assets/{Player-DI8pLNuE.js → Player-meEpIyyU.js} +1 -1
- package/dist/assets/{PromptTextarea-BpckscxC.js → PromptTextarea-CqrfR04T.js} +1 -1
- package/dist/assets/{RealtimeCall-CGy7ZxhI.js → RealtimeCall-DPgXvnk-.js} +1 -1
- package/dist/assets/{ScheduledTasks-DUrJ69M5.js → ScheduledTasks-BD2EiwWX.js} +1 -1
- package/dist/assets/{Status-CHAGfb_i.js → Status-tjI9ia1o.js} +1 -1
- package/dist/assets/{Subscribe-cI8uUXfb.js → Subscribe-B6li-4PP.js} +1 -1
- package/dist/assets/{TabSwitcher-XjtjYDRZ.js → TabSwitcher-CfcbdXSN.js} +1 -1
- package/dist/assets/{Tts-Cl3Ic91o.js → Tts-BculNGDV.js} +1 -1
- package/dist/assets/{VideoPlayer-DG7NZuWz.js → VideoPlayer-DlmdRAid.js} +1 -1
- package/dist/assets/{alert--fOgAzyp.js → alert-Be4RiVE7.js} +1 -1
- package/dist/assets/{avatar-BXGv6zGv.js → avatar-7W9CtA1g.js} +1 -1
- package/dist/assets/{basic--Jaf95DS.js → basic-Dki1Ggy9.js} +1 -1
- package/dist/assets/{chat-DbQzoeiN.js → chat-DdZlkDzh.js} +1 -1
- package/dist/assets/{codingBridge-BD51ayKI.js → codingBridge-B9D1N-eE.js} +1 -1
- package/dist/assets/{codingBridgeNotify-B_LfJogk.js → codingBridgeNotify-BfCUpopl.js} +2 -2
- package/dist/assets/{collapse-B2P7gr8-.js → collapse-CdfDTVKX.js} +1 -1
- package/dist/assets/{createTaskActions-BaE6E9Kr.js → createTaskActions-CW7_Ar5F.js} +1 -1
- package/dist/assets/{date-picker-CUsRrFGr.js → date-picker-QWWj3YBF.js} +1 -1
- package/dist/assets/{digitalhuman-DCfYw1cL.js → digitalhuman--CvWis8w.js} +1 -1
- package/dist/assets/{drawer-CZMqTsUy.js → drawer-QVnlp-9l.js} +1 -1
- package/dist/assets/{dropdown-BBawqoPC.js → dropdown-UFkdtFBz.js} +1 -1
- package/dist/assets/{dropdown-QxLSlPQh.js → dropdown-bhP6II8i.js} +1 -1
- package/dist/assets/{esm-BZuX_Fyl.js → esm-B09J_eTi.js} +1 -1
- package/dist/assets/{esm-DrQEXzOh.js → esm-B0PyI9kB.js} +1 -1
- package/dist/assets/esm-B86wq0wb.js +1 -0
- package/dist/assets/{esm-ByN3pv2U.js → esm-B_DIAu_B.js} +2 -2
- package/dist/assets/{esm-sR7mbXpp.js → esm-C7frXp1U.js} +3 -3
- package/dist/assets/{esm-B-IdJIQl.js → esm-DELPJsEG.js} +1 -1
- package/dist/assets/{esm-CFgtBr1r.js → esm-xdmXFcbu.js} +2 -2
- package/dist/assets/{fish-wuJzVy-R.js → fish-BW-T79KL.js} +1 -1
- package/dist/assets/{flux-BajN9vCH.js → flux-Cmhhyqbi.js} +1 -1
- package/dist/assets/{grokvideo-CEadYeuZ.js → grokvideo-C0r0MjYk.js} +1 -1
- package/dist/assets/{hailuo-BZE9nS_n.js → hailuo-B3cXIyO2.js} +1 -1
- package/dist/assets/{index-DHGr0qfr.js → index-0RhdvXdP.js} +3 -3
- package/dist/assets/{index.browser.esm-K9JZkjg8.js → index.browser.esm-BiF3H-ZA.js} +1 -1
- package/dist/assets/{index.es-J-PBjzcR.js → index.es-RNUZL6kj.js} +1 -1
- package/dist/assets/{input-number-DcS9Bx33.js → input-number-DYt3_8iT.js} +1 -1
- package/dist/assets/{kling-B2rPSLOo.js → kling-DNLi30sJ.js} +1 -1
- package/dist/assets/{luma-BCu9MMAZ.js → luma-CqlkwAbO.js} +1 -1
- package/dist/assets/{maestro-qo4uPl6x.js → maestro-BFMOKxaB.js} +1 -1
- package/dist/assets/{midjourney-DsoKv-1p.js → midjourney-CmIbN0v8.js} +1 -1
- package/dist/assets/{mobileLocalExec-D3sozPgv.js → mobileLocalExec-DMXSy_q6.js} +2 -2
- package/dist/assets/{nanobanana-DRYIuuVI.js → nanobanana-BnNIiYvx.js} +1 -1
- package/dist/assets/{omni-UYuMATIw.js → omni-DTrrwnkX.js} +1 -1
- package/dist/assets/{openaiimage-LY_8QKWs.js → openaiimage-ChQc6QYF.js} +1 -1
- package/dist/assets/{pagination-DCFtt8SX.js → pagination-CZQpIiuE.js} +1 -1
- package/dist/assets/{pagination-ChSSHmgO.js → pagination-DJfdZUpV.js} +1 -1
- package/dist/assets/{pika-yIxZbMZX.js → pika-Cj0oRjGu.js} +1 -1
- package/dist/assets/{pixverse-oTCUOx_0.js → pixverse-D5h5Zh7I.js} +1 -1
- package/dist/assets/{popover-DBSUmqsP.js → popover-mn1EGoMV.js} +1 -1
- package/dist/assets/{producer-DBxzblcL.js → producer-z55o2FRT.js} +1 -1
- package/dist/assets/{qrart-B1nZNo_9.js → qrart-BkyhiFKS.js} +1 -1
- package/dist/assets/{realtime-CpuHRnMw.js → realtime-ZZETevKY.js} +1 -1
- package/dist/assets/{row-CoYwxMjN.js → row-B6TzCjFU.js} +1 -1
- package/dist/assets/{seedance-D1W8OuKj.js → seedance-3yLZRCsm.js} +1 -1
- package/dist/assets/{seedream-BWFXgRu_.js → seedream-CQR_3Rit.js} +1 -1
- package/dist/assets/{select-Dl8tgFjL.js → select-C9BBGK_W.js} +1 -1
- package/dist/assets/{serp-BXd__tcu.js → serp-qa_OoSnT.js} +1 -1
- package/dist/assets/{slider-CKn9N3dl.js → slider-2iZQO2Zw.js} +1 -1
- package/dist/assets/{solana-wallets-CWi7yIKW.js → solana-wallets-BU7AjRYO.js} +2 -2
- package/dist/assets/{solana-wallets-vue-DrFKw32L.js → solana-wallets-vue-C1sHxP0w.js} +1 -1
- package/dist/assets/{sora-B-T8syCN.js → sora-DQLLbgO-.js} +1 -1
- package/dist/assets/{suno-CaPg5wI3.js → suno-Bvx0DyV2.js} +1 -1
- package/dist/assets/{switch-DcEkrwHo.js → switch-U1rSTqNM.js} +1 -1
- package/dist/assets/{table-1P1mzhi4.js → table-BtPnfCav.js} +1 -1
- package/dist/assets/{tabs-DtAZ3so9.js → tabs-DL9XtawR.js} +1 -1
- package/dist/assets/{time-picker-VghfSWRJ.js → time-picker-BgAS6tqz.js} +1 -1
- package/dist/assets/{tooltip-BY0D7YKq.js → tooltip-bsBfzZxe.js} +1 -1
- package/dist/assets/{upload-gI1Lxhu7.js → upload-ByBAXUSx.js} +1 -1
- package/dist/assets/{veo-CfVto-d5.js → veo-CmtbDgTh.js} +1 -1
- package/dist/assets/{wan-bBEoiM8z.js → wan-KXcZ7KHX.js} +1 -1
- package/dist/assets/{web-CjKTM_kC.js → web-BSkNTnEY.js} +1 -1
- package/dist/assets/{web-Dkf3rM2x.js → web-Dt7gi5-p.js} +1 -1
- package/dist/assets/{web-ByPN4P1G.js → web-DtZc6wm0.js} +1 -1
- package/dist/assets/{web-BJ4_Hr_r.js → web-Dy5tWTbz.js} +1 -1
- package/dist/assets/{web-D51lKmXr.js → web-p6rGA-Dw.js} +1 -1
- package/dist/assets/{webextrator-B0U-wvh0.js → webextrator-DslrqETr.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/esm-BAoWV04N.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Jt as t,L as n,M as r,N as i,at as a,tt as o,z as s}from"./vendor-chart-Dw-P17PN.js";import{J as c}from"./index-
|
|
1
|
+
import{A as e,Jt as t,L as n,M as r,N as i,at as a,tt as o,z as s}from"./vendor-chart-Dw-P17PN.js";import{J as c}from"./index-0RhdvXdP.js";import{t as l}from"./index.es-RNUZL6kj.js";var u=s({name:`NotFound`,components:{FontAwesomeIcon:l},computed:{path(){return this.$route?.fullPath||``}},mounted(){let e=document.querySelector(`meta[name="robots"]`);e||(e=document.createElement(`meta`),e.setAttribute(`name`,`robots`),document.head.appendChild(e)),e.setAttribute(`content`,`noindex, nofollow`)},beforeUnmount(){let e=document.querySelector(`meta[name="robots"]`);e&&e.setAttribute(`content`,`index, follow`)},methods:{goHome(){this.$router.push(`/`)},goBack(){window.history.length>1?this.$router.back():this.$router.push(`/`)}}}),d={class:`not-found`},f={class:`content`},p={class:`eyebrow`},m={class:`title`},h={class:`subtitle`},g={class:`actions`},_={key:0,class:`path`},v={class:`path__label`},y={class:`path__value`};function b(s,c,l,u,b,x){let S=a(`font-awesome-icon`);return o(),i(`div`,d,[c[3]||=e(`div`,{class:`glow`,"aria-hidden":`true`},null,-1),e(`main`,f,[e(`p`,p,t(s.$t(`common.message.notFoundEyebrow`)),1),c[2]||=e(`div`,{class:`code`,"aria-hidden":`true`},`404`,-1),e(`h1`,m,t(s.$t(`common.title.notFound`)),1),e(`p`,h,t(s.$t(`common.message.notFound`)),1),e(`div`,g,[e(`button`,{class:`btn btn--primary`,onClick:c[0]||=(...e)=>s.goHome&&s.goHome(...e)},[n(S,{icon:`fa-solid fa-house`}),e(`span`,null,t(s.$t(`common.button.backToHome`)),1)]),e(`button`,{class:`btn btn--ghost`,onClick:c[1]||=(...e)=>s.goBack&&s.goBack(...e)},[n(S,{icon:`fa-solid fa-arrow-left`}),e(`span`,null,t(s.$t(`common.button.goBack`)),1)])]),s.path?(o(),i(`div`,_,[e(`span`,v,t(s.$t(`common.message.notFoundPath`)),1),e(`code`,y,t(s.path),1)])):r(``,!0)])])}var x=c(u,[[`render`,b],[`__scopeId`,`data-v-41538014`]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,tt as d,z as f}from"./vendor-chart-Dw-P17PN.js";import{t as p}from"./alert--fOgAzyp.js";import{t as m}from"./card-D-4S-l7a.js";import{n as h,t as g}from"./row-CoYwxMjN.js";import{i as _,n as v,r as y,t as b}from"./wechat-CRgDcu8w.js";import{t as x}from"./divider-BNWJAaA2.js";import{t as S}from"./skeleton-CoheJz5x.js";import{Ei as C,Ii as w,J as T,Ji as E,Vi as D,Xi as O,hn as k,ki as A,mi as j,pn as ee,rn as te,yr as M}from"./index-DHGr0qfr.js";import{t as N}from"./CopyToClipboard-BovNTELl.js";var P=f({name:`PublicWechatPayDialog`,components:{ElDialog:D,ElButton:O,QrCode:te,ElRow:g,ElCol:h},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],data(){return{copied:!1,copiedTimer:void 0}},computed:{isMobileOutsideWechat(){return v()&&!b()},isMobileInsideWechat(){return v()&&b()},dialogWidth(){return this.isMobileOutsideWechat||this.isMobileInsideWechat?`90%`:`500px`}},unmounted(){this.copiedTimer&&clearTimeout(this.copiedTimer)},methods:{async onCopyLink(){let e=typeof window<`u`?window.location.href:``;if(!e)return;let t=!1;try{t=await k(e,{debug:!1})}catch{t=!1}t?(this.copied=!0,this.copiedTimer&&clearTimeout(this.copiedTimer),this.copiedTimer=window.setTimeout(()=>{this.copied=!1},2e3)):w.error(String(this.$t(`common.message.copyFailed`)||`Copy failed`))}}}),F={key:0,class:`wechat-pay-mobile text-center py-[20px] px-[10px]`},I={class:`text-[14px] mb-3 leading-relaxed`},L={class:`text-[12px] text-gray-500 mb-4 leading-relaxed`},R={key:1,class:`wechat-pay-longpress text-center py-[20px] px-[10px]`},z={class:`text-[14px] mb-4 leading-relaxed`},B={class:`paycode wechat`},V={class:`help-text block bg-[#00c800] text-white text-[14px] h-[35px] w-[240px] text-center leading-[35px] mt-[10px] mx-auto`};function H(t,s,f,p,m,h){let g=c(`qr-code`),_=c(`el-button`),v=c(`el-col`),y=c(`el-row`),b=c(`el-dialog`);return d(),l(b,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:t.dialogWidth,center:``,onClose:s[0]||=e=>t.$emit(`hide`)},{default:u(()=>[t.isMobileOutsideWechat?(d(),o(`div`,F,[e(`p`,I,r(t.$t(`order.message.wechatPayMobileScanTip`)),1),t.order?.pay_url?(d(),l(g,{key:0,value:t.order?.pay_url,size:220,class:`qrcode m-auto mb-3`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0),e(`p`,L,r(t.$t(`order.message.wechatPayMobileHint`)),1),i(_,{size:`default`,round:``,class:`w-[220px]`,onClick:t.onCopyLink},{default:u(()=>[n(r(t.copied?t.$t(`common.message.copied`):t.$t(`order.button.copyPayLink`)),1)]),_:1},8,[`onClick`])])):t.isMobileInsideWechat?(d(),o(`div`,R,[e(`p`,z,r(t.$t(`order.message.wechatPayLongPressTip`)),1),t.order?.pay_url?(d(),l(g,{key:0,value:t.order?.pay_url,size:240,class:`qrcode mx-auto`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0)])):(d(),l(y,{key:2,class:`paycodes py-[30px] w-[500px] mx-auto`},{default:u(()=>[i(v,{span:12},{default:u(()=>[e(`div`,B,[t.order?.pay_url?(d(),l(g,{key:0,value:t.order?.pay_url,size:200,class:`qrcode m-auto w-[200px] h-[200px]`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0),e(`p`,V,r(t.$t(`order.message.wechatPayHelp`)),1)])]),_:1}),i(v,{span:12},{default:u(()=>[...s[1]||=[e(`div`,{class:`help-img`},[e(`img`,{src:`https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg`})],-1)]]),_:1})]),_:1}))]),_:1},8,[`model-value`,`title`,`width`])}var U=T(P,[[`render`,H]]),W=f({name:`PublicStripePayDialog`,components:{ElDialog:D},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],watch:{visible:{handler(e){e&&this.order?.pay_url&&window.open(this.order.pay_url,`_blank`)}}}}),G={class:`text-center`};function K(t,n,i,a,o,s){let f=c(`el-dialog`);return d(),l(f,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:`500px`,center:``,onClose:n[0]||=e=>t.$emit(`hide`)},{default:u(()=>[e(`p`,G,r(t.$t(`order.message.buyInExternalUrl`)),1)]),_:1},8,[`model-value`,`title`])}var q=T(W,[[`render`,K]]),ne=f({name:`PublicAlipayPayDialog`,components:{ElDialog:D},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],watch:{visible:{handler(e){e&&this.order?.pay_url&&window.open(this.order.pay_url,`_blank`)}}}}),J={class:`text-center`};function Y(t,n,i,a,o,s){let f=c(`el-dialog`);return d(),l(f,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:`500px`,center:``,onClose:n[0]||=e=>t.$emit(`hide`)},{default:u(()=>[e(`p`,J,r(t.$t(`order.message.buyInExternalUrl`)),1)]),_:1},8,[`model-value`,`title`])}var X=T(ne,[[`render`,Y]]),Z=7e3,re=2e3,Q=function(e){return e.WechatPay=`WechatPay`,e.Stripe=`Stripe`,e.AliPay=`AliPay`,e}(Q||{}),ie=f({name:`OrderPublicPay`,components:{ElButton:O,ElRow:g,ElCol:h,ElCard:m,ElSkeleton:S,ElDivider:x,ElAlert:p,ElDescriptions:y,ElDescriptionsItem:_,ElTag:E,PublicWechatPay:U,PublicStripePay:q,PublicAlipayPay:X,CopyToClipboard:N},data(){return{PayWay:Q,OrderState:j,payWay:`WechatPay`,order:void 0,loading:!1,paying:!1,prepaying:!1}},computed:{id(){return this.$route.params?.id?.toString()??``},showPayment(){return!A()}},watch:{paying(e){e?this.startOrderPolling(re):this.stopOrderPolling()}},created(){this._orderRefreshTimer=void 0},mounted(){this.onFetchData()},beforeUnmount(){this.stopOrderPolling()},methods:{getPriceString:ee,payWayLabel(e){return{WechatPay:this.$t(`order.title.wechatPay`),Stripe:this.$t(`order.title.stripe`),AliPay:this.$t(`order.title.aliPay`)}[e]||e},onFetchData(){this.id&&(this.loading=!0,M.get(this.id).then(({data:e})=>{this.order=e,e?.pay_way&&e.pay_way in Q&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.order=void 0,this.loading=!1}))},startOrderPolling(e=0){this.stopOrderPolling();let t=async()=>{try{let{data:e}=await M.get(this.id);if(this.order=e,e?.state===j.PAID||e?.state===j.FINISHED||e?.state===j.FAILED||e?.state===j.EXPIRED){this.paying=!1,this.stopOrderPolling();return}}catch{}this.paying&&(this._orderRefreshTimer=window.setTimeout(t,Z))};this._orderRefreshTimer=window.setTimeout(t,e)},stopOrderPolling(){let e=this._orderRefreshTimer;e&&(clearTimeout(e),this._orderRefreshTimer=void 0)},onRepay(){this.paying=!0},onPay(){if(!this.id)return;this.prepaying=!0;let e={pay_way:this.payWay};this.payWay===`AliPay`&&(e.surface=C()),M.pay(this.id,e).then(({data:e})=>{this.prepaying=!1,e?.id&&(this.order=e),this.order&&this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),ae={class:`title`},oe={key:0,class:`pt-5`},se={key:1,class:`pt-10 text-center`},ce={key:2,class:`order`},le={key:0,class:`price current unfree`},ue={key:1,class:`price free`},de={key:0,class:`payways mb-6`},fe={class:`payname`},pe={class:`payname`},$={class:`payname`},me={key:1},he={key:2};function ge(f,p,m,h,g,_){let v=c(`el-col`),y=c(`el-row`),b=c(`el-skeleton`),x=c(`el-alert`),S=c(`copy-to-clipboard`),C=c(`el-descriptions-item`),w=c(`el-tag`),T=c(`el-descriptions`),E=c(`el-divider`),D=c(`el-button`),O=c(`el-card`),k=c(`public-wechat-pay`),A=c(`public-stripe-pay`),j=c(`public-alipay-pay`);return d(),o(s,null,[i(y,{class:`wrapper`},{default:u(()=>[i(v,{span:24},{default:u(()=>[i(y,null,{default:u(()=>[i(v,{span:24},{default:u(()=>[e(`h2`,ae,r(f.$t(`order.title.info`)),1)]),_:1})]),_:1}),i(y,{class:`panel`},{default:u(()=>[i(v,{span:24},{default:u(()=>[i(O,{shadow:`hover`},{default:u(()=>[i(y,null,{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[f.loading?(d(),o(`div`,oe,[i(b,{animated:``})])):f.order?(d(),o(`div`,ce,[i(T,{column:1},{default:u(()=>[i(C,{label:f.$t(`order.field.id`)},{default:u(()=>[e(`span`,null,r(f.order.id),1),f.order.id?(d(),l(S,{key:0,content:f.order.id,class:`inline-block`},null,8,[`content`])):a(``,!0)]),_:1},8,[`label`]),i(C,{label:f.$t(`order.field.description`)},{default:u(()=>[n(r(f.order.description),1)]),_:1},8,[`label`]),f.order.pay_way?(d(),l(C,{key:0,label:f.$t(`order.field.payWay`)},{default:u(()=>[i(w,{type:`info`,effect:`dark`,round:``,size:`small`},{default:u(()=>[n(r(f.payWayLabel(f.order.pay_way)),1)]),_:1})]),_:1},8,[`label`])):a(``,!0),i(C,{label:f.$t(`order.field.createdAt`)},{default:u(()=>[n(r(f.$dayjs.format(f.order.created_at||``)),1)]),_:1},8,[`label`]),i(C,{label:f.$t(`order.field.price`)},{default:u(()=>[f.order.price&&f.order.price>0?(d(),o(`span`,le,r(f.getPriceString({value:f.order.price})),1)):(d(),o(`span`,ue,r(f.$t(`order.message.free`)),1))]),_:1},8,[`label`])]),_:1})])):(d(),o(`div`,se,[i(x,{title:f.$t(`order.message.publicPayNotFound`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]))]),_:1})]),_:1}),f.order?.state===f.OrderState.PAID||f.order?.state===f.OrderState.FINISHED?(d(),l(y,{key:0,class:`mb-5`},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),i(x,{title:f.$t(`order.message.paidSuccessfully`),type:`success`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.EXPIRED?(d(),l(y,{key:1,class:`mb-5`},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),i(x,{title:f.$t(`order.message.orderExpired`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.FAILED?(d(),l(y,{key:2,class:`mb-5`},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),i(x,{title:f.$t(`order.state.failed`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.PENDING&&f.showPayment?(d(),l(y,{key:3},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),!f.order.pay_way&&f.order.price&&f.order.price>0?(d(),o(`div`,de,[e(`div`,{class:t({payway:!0,wechatpay:!0,active:f.payWay===f.PayWay.WechatPay}),onClick:p[0]||=e=>f.payWay=f.PayWay.WechatPay},[p[6]||=e(`span`,{class:`payicon wechatpay`},null,-1),e(`span`,fe,r(f.$t(`order.title.wechatPay`)),1)],2),e(`div`,{class:t({payway:!0,alipay:!0,active:f.payWay===f.PayWay.AliPay}),onClick:p[1]||=e=>f.payWay=f.PayWay.AliPay},[p[7]||=e(`span`,{class:`payicon alipay`},null,-1),e(`span`,pe,r(f.$t(`order.title.aliPay`)),1)],2),e(`div`,{class:t({payway:!0,stripe:!0,active:f.payWay===f.PayWay.Stripe}),onClick:p[2]||=e=>f.payWay=f.PayWay.Stripe},[p[8]||=e(`span`,{class:`payicon stripe`},null,-1),e(`span`,$,r(f.$t(`order.title.stripe`)),1)],2)])):a(``,!0),f.order.pay_way?(d(),o(`div`,he,[i(D,{type:`primary`,round:``,size:`large`,class:`btn-repay`,onClick:f.onRepay},{default:u(()=>[n(r(f.$t(`common.button.repay`)),1)]),_:1},8,[`onClick`])])):(d(),o(`div`,me,[i(D,{loading:f.prepaying,round:``,type:`primary`,size:`large`,class:`btn-pay`,onClick:f.onPay},{default:u(()=>[n(r(f.$t(`common.button.pay`)),1)]),_:1},8,[`loading`,`onClick`])]))]),_:1})]),_:1})):a(``,!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f.order&&f.payWay===f.PayWay.WechatPay?(d(),l(k,{key:0,order:f.order,visible:f.paying,onHide:p[3]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0),f.order&&f.payWay===f.PayWay.Stripe?(d(),l(A,{key:1,order:f.order,visible:f.paying,onHide:p[4]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0),f.order&&f.payWay===f.PayWay.AliPay?(d(),l(j,{key:2,order:f.order,visible:f.paying,onHide:p[5]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0)],64)}var _e=T(ie,[[`render`,ge],[`__scopeId`,`data-v-ffd3ba40`]]);export{_e as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,tt as d,z as f}from"./vendor-chart-Dw-P17PN.js";import{t as p}from"./alert-Be4RiVE7.js";import{t as m}from"./card-D-4S-l7a.js";import{n as h,t as g}from"./row-B6TzCjFU.js";import{i as _,n as v,r as y,t as b}from"./wechat-CRgDcu8w.js";import{t as x}from"./divider-BNWJAaA2.js";import{t as S}from"./skeleton-CoheJz5x.js";import{Ei as C,Ii as w,J as T,Ji as E,Vi as D,Xi as O,hn as k,ki as A,mi as j,pn as ee,rn as te,yr as M}from"./index-0RhdvXdP.js";import{t as N}from"./CopyToClipboard-SOk0OfUA.js";var P=f({name:`PublicWechatPayDialog`,components:{ElDialog:D,ElButton:O,QrCode:te,ElRow:g,ElCol:h},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],data(){return{copied:!1,copiedTimer:void 0}},computed:{isMobileOutsideWechat(){return v()&&!b()},isMobileInsideWechat(){return v()&&b()},dialogWidth(){return this.isMobileOutsideWechat||this.isMobileInsideWechat?`90%`:`500px`}},unmounted(){this.copiedTimer&&clearTimeout(this.copiedTimer)},methods:{async onCopyLink(){let e=typeof window<`u`?window.location.href:``;if(!e)return;let t=!1;try{t=await k(e,{debug:!1})}catch{t=!1}t?(this.copied=!0,this.copiedTimer&&clearTimeout(this.copiedTimer),this.copiedTimer=window.setTimeout(()=>{this.copied=!1},2e3)):w.error(String(this.$t(`common.message.copyFailed`)||`Copy failed`))}}}),F={key:0,class:`wechat-pay-mobile text-center py-[20px] px-[10px]`},I={class:`text-[14px] mb-3 leading-relaxed`},L={class:`text-[12px] text-gray-500 mb-4 leading-relaxed`},R={key:1,class:`wechat-pay-longpress text-center py-[20px] px-[10px]`},z={class:`text-[14px] mb-4 leading-relaxed`},B={class:`paycode wechat`},V={class:`help-text block bg-[#00c800] text-white text-[14px] h-[35px] w-[240px] text-center leading-[35px] mt-[10px] mx-auto`};function H(t,s,f,p,m,h){let g=c(`qr-code`),_=c(`el-button`),v=c(`el-col`),y=c(`el-row`),b=c(`el-dialog`);return d(),l(b,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:t.dialogWidth,center:``,onClose:s[0]||=e=>t.$emit(`hide`)},{default:u(()=>[t.isMobileOutsideWechat?(d(),o(`div`,F,[e(`p`,I,r(t.$t(`order.message.wechatPayMobileScanTip`)),1),t.order?.pay_url?(d(),l(g,{key:0,value:t.order?.pay_url,size:220,class:`qrcode m-auto mb-3`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0),e(`p`,L,r(t.$t(`order.message.wechatPayMobileHint`)),1),i(_,{size:`default`,round:``,class:`w-[220px]`,onClick:t.onCopyLink},{default:u(()=>[n(r(t.copied?t.$t(`common.message.copied`):t.$t(`order.button.copyPayLink`)),1)]),_:1},8,[`onClick`])])):t.isMobileInsideWechat?(d(),o(`div`,R,[e(`p`,z,r(t.$t(`order.message.wechatPayLongPressTip`)),1),t.order?.pay_url?(d(),l(g,{key:0,value:t.order?.pay_url,size:240,class:`qrcode mx-auto`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0)])):(d(),l(y,{key:2,class:`paycodes py-[30px] w-[500px] mx-auto`},{default:u(()=>[i(v,{span:12},{default:u(()=>[e(`div`,B,[t.order?.pay_url?(d(),l(g,{key:0,value:t.order?.pay_url,size:200,class:`qrcode m-auto w-[200px] h-[200px]`,type:`image/png`,color:{dark:`#000000`,light:`#ffffff`}},null,8,[`value`])):a(``,!0),e(`p`,V,r(t.$t(`order.message.wechatPayHelp`)),1)])]),_:1}),i(v,{span:12},{default:u(()=>[...s[1]||=[e(`div`,{class:`help-img`},[e(`img`,{src:`https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg`})],-1)]]),_:1})]),_:1}))]),_:1},8,[`model-value`,`title`,`width`])}var U=T(P,[[`render`,H]]),W=f({name:`PublicStripePayDialog`,components:{ElDialog:D},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],watch:{visible:{handler(e){e&&this.order?.pay_url&&window.open(this.order.pay_url,`_blank`)}}}}),G={class:`text-center`};function K(t,n,i,a,o,s){let f=c(`el-dialog`);return d(),l(f,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:`500px`,center:``,onClose:n[0]||=e=>t.$emit(`hide`)},{default:u(()=>[e(`p`,G,r(t.$t(`order.message.buyInExternalUrl`)),1)]),_:1},8,[`model-value`,`title`])}var q=T(W,[[`render`,K]]),ne=f({name:`PublicAlipayPayDialog`,components:{ElDialog:D},props:{order:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:[`hide`],watch:{visible:{handler(e){e&&this.order?.pay_url&&window.open(this.order.pay_url,`_blank`)}}}}),J={class:`text-center`};function Y(t,n,i,a,o,s){let f=c(`el-dialog`);return d(),l(f,{"model-value":t.visible,title:t.$t(`application.title.buyService`),width:`500px`,center:``,onClose:n[0]||=e=>t.$emit(`hide`)},{default:u(()=>[e(`p`,J,r(t.$t(`order.message.buyInExternalUrl`)),1)]),_:1},8,[`model-value`,`title`])}var X=T(ne,[[`render`,Y]]),Z=7e3,re=2e3,Q=function(e){return e.WechatPay=`WechatPay`,e.Stripe=`Stripe`,e.AliPay=`AliPay`,e}(Q||{}),ie=f({name:`OrderPublicPay`,components:{ElButton:O,ElRow:g,ElCol:h,ElCard:m,ElSkeleton:S,ElDivider:x,ElAlert:p,ElDescriptions:y,ElDescriptionsItem:_,ElTag:E,PublicWechatPay:U,PublicStripePay:q,PublicAlipayPay:X,CopyToClipboard:N},data(){return{PayWay:Q,OrderState:j,payWay:`WechatPay`,order:void 0,loading:!1,paying:!1,prepaying:!1}},computed:{id(){return this.$route.params?.id?.toString()??``},showPayment(){return!A()}},watch:{paying(e){e?this.startOrderPolling(re):this.stopOrderPolling()}},created(){this._orderRefreshTimer=void 0},mounted(){this.onFetchData()},beforeUnmount(){this.stopOrderPolling()},methods:{getPriceString:ee,payWayLabel(e){return{WechatPay:this.$t(`order.title.wechatPay`),Stripe:this.$t(`order.title.stripe`),AliPay:this.$t(`order.title.aliPay`)}[e]||e},onFetchData(){this.id&&(this.loading=!0,M.get(this.id).then(({data:e})=>{this.order=e,e?.pay_way&&e.pay_way in Q&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.order=void 0,this.loading=!1}))},startOrderPolling(e=0){this.stopOrderPolling();let t=async()=>{try{let{data:e}=await M.get(this.id);if(this.order=e,e?.state===j.PAID||e?.state===j.FINISHED||e?.state===j.FAILED||e?.state===j.EXPIRED){this.paying=!1,this.stopOrderPolling();return}}catch{}this.paying&&(this._orderRefreshTimer=window.setTimeout(t,Z))};this._orderRefreshTimer=window.setTimeout(t,e)},stopOrderPolling(){let e=this._orderRefreshTimer;e&&(clearTimeout(e),this._orderRefreshTimer=void 0)},onRepay(){this.paying=!0},onPay(){if(!this.id)return;this.prepaying=!0;let e={pay_way:this.payWay};this.payWay===`AliPay`&&(e.surface=C()),M.pay(this.id,e).then(({data:e})=>{this.prepaying=!1,e?.id&&(this.order=e),this.order&&this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),ae={class:`title`},oe={key:0,class:`pt-5`},se={key:1,class:`pt-10 text-center`},ce={key:2,class:`order`},le={key:0,class:`price current unfree`},ue={key:1,class:`price free`},de={key:0,class:`payways mb-6`},fe={class:`payname`},pe={class:`payname`},$={class:`payname`},me={key:1},he={key:2};function ge(f,p,m,h,g,_){let v=c(`el-col`),y=c(`el-row`),b=c(`el-skeleton`),x=c(`el-alert`),S=c(`copy-to-clipboard`),C=c(`el-descriptions-item`),w=c(`el-tag`),T=c(`el-descriptions`),E=c(`el-divider`),D=c(`el-button`),O=c(`el-card`),k=c(`public-wechat-pay`),A=c(`public-stripe-pay`),j=c(`public-alipay-pay`);return d(),o(s,null,[i(y,{class:`wrapper`},{default:u(()=>[i(v,{span:24},{default:u(()=>[i(y,null,{default:u(()=>[i(v,{span:24},{default:u(()=>[e(`h2`,ae,r(f.$t(`order.title.info`)),1)]),_:1})]),_:1}),i(y,{class:`panel`},{default:u(()=>[i(v,{span:24},{default:u(()=>[i(O,{shadow:`hover`},{default:u(()=>[i(y,null,{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[f.loading?(d(),o(`div`,oe,[i(b,{animated:``})])):f.order?(d(),o(`div`,ce,[i(T,{column:1},{default:u(()=>[i(C,{label:f.$t(`order.field.id`)},{default:u(()=>[e(`span`,null,r(f.order.id),1),f.order.id?(d(),l(S,{key:0,content:f.order.id,class:`inline-block`},null,8,[`content`])):a(``,!0)]),_:1},8,[`label`]),i(C,{label:f.$t(`order.field.description`)},{default:u(()=>[n(r(f.order.description),1)]),_:1},8,[`label`]),f.order.pay_way?(d(),l(C,{key:0,label:f.$t(`order.field.payWay`)},{default:u(()=>[i(w,{type:`info`,effect:`dark`,round:``,size:`small`},{default:u(()=>[n(r(f.payWayLabel(f.order.pay_way)),1)]),_:1})]),_:1},8,[`label`])):a(``,!0),i(C,{label:f.$t(`order.field.createdAt`)},{default:u(()=>[n(r(f.$dayjs.format(f.order.created_at||``)),1)]),_:1},8,[`label`]),i(C,{label:f.$t(`order.field.price`)},{default:u(()=>[f.order.price&&f.order.price>0?(d(),o(`span`,le,r(f.getPriceString({value:f.order.price})),1)):(d(),o(`span`,ue,r(f.$t(`order.message.free`)),1))]),_:1},8,[`label`])]),_:1})])):(d(),o(`div`,se,[i(x,{title:f.$t(`order.message.publicPayNotFound`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]))]),_:1})]),_:1}),f.order?.state===f.OrderState.PAID||f.order?.state===f.OrderState.FINISHED?(d(),l(y,{key:0,class:`mb-5`},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),i(x,{title:f.$t(`order.message.paidSuccessfully`),type:`success`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.EXPIRED?(d(),l(y,{key:1,class:`mb-5`},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),i(x,{title:f.$t(`order.message.orderExpired`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.FAILED?(d(),l(y,{key:2,class:`mb-5`},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),i(x,{title:f.$t(`order.state.failed`),type:`error`,"show-icon":``,closable:!1},null,8,[`title`])]),_:1})]),_:1})):a(``,!0),f.order?.state===f.OrderState.PENDING&&f.showPayment?(d(),l(y,{key:3},{default:u(()=>[i(v,{xs:{span:22,offset:1},sm:{span:16,offset:4}},{default:u(()=>[i(E,{"border-style":`dashed`}),!f.order.pay_way&&f.order.price&&f.order.price>0?(d(),o(`div`,de,[e(`div`,{class:t({payway:!0,wechatpay:!0,active:f.payWay===f.PayWay.WechatPay}),onClick:p[0]||=e=>f.payWay=f.PayWay.WechatPay},[p[6]||=e(`span`,{class:`payicon wechatpay`},null,-1),e(`span`,fe,r(f.$t(`order.title.wechatPay`)),1)],2),e(`div`,{class:t({payway:!0,alipay:!0,active:f.payWay===f.PayWay.AliPay}),onClick:p[1]||=e=>f.payWay=f.PayWay.AliPay},[p[7]||=e(`span`,{class:`payicon alipay`},null,-1),e(`span`,pe,r(f.$t(`order.title.aliPay`)),1)],2),e(`div`,{class:t({payway:!0,stripe:!0,active:f.payWay===f.PayWay.Stripe}),onClick:p[2]||=e=>f.payWay=f.PayWay.Stripe},[p[8]||=e(`span`,{class:`payicon stripe`},null,-1),e(`span`,$,r(f.$t(`order.title.stripe`)),1)],2)])):a(``,!0),f.order.pay_way?(d(),o(`div`,he,[i(D,{type:`primary`,round:``,size:`large`,class:`btn-repay`,onClick:f.onRepay},{default:u(()=>[n(r(f.$t(`common.button.repay`)),1)]),_:1},8,[`onClick`])])):(d(),o(`div`,me,[i(D,{loading:f.prepaying,round:``,type:`primary`,size:`large`,class:`btn-pay`,onClick:f.onPay},{default:u(()=>[n(r(f.$t(`common.button.pay`)),1)]),_:1},8,[`loading`,`onClick`])]))]),_:1})]),_:1})):a(``,!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f.order&&f.payWay===f.PayWay.WechatPay?(d(),l(k,{key:0,order:f.order,visible:f.paying,onHide:p[3]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0),f.order&&f.payWay===f.PayWay.Stripe?(d(),l(A,{key:1,order:f.order,visible:f.paying,onHide:p[4]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0),f.order&&f.payWay===f.PayWay.AliPay?(d(),l(j,{key:2,order:f.order,visible:f.paying,onHide:p[5]||=e=>f.paying=!1},null,8,[`order`,`visible`])):a(``,!0)],64)}var _e=T(ie,[[`render`,ge],[`__scopeId`,`data-v-ffd3ba40`]]);export{_e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime--c01j_DQ.js";import{A as t,Gt as n,Jt as r,L as i,M as a,Mt as o,N as s,U as c,Y as l,ft as u,j as d,k as f,mt as p,nt as m,st as h,tt as g,yt as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{t as y}from"./popover-DBSUmqsP.js";import{t as b}from"./slider-CKn9N3dl.js";import{Ci as x}from"./index-DHGr0qfr.js";function S(e){let t=Math.floor(e)%60;e=Math.floor(e/60);let n=e%60,r=n<10?`0${n}`:n,i=t<10?`0${t}`:t;return r+`:`+i}var C=e(((e,t)=>{(function(t,n){typeof define==`function`&&define.amd?define([],n):e===void 0?(n(),t.FileSaver={exports:{}}.exports):n()})(e,function(){function e(e,t){return t===void 0?t={autoBom:!1}:typeof t!=`object`&&(console.warn(`Deprecated: Expected third argument to be a object`),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function r(e){var t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{var t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=a.saveAs||(typeof window!=`object`||window!==a?function(){}:`download`in HTMLAnchorElement.prototype&&!o?function(e,t,o){var s=a.URL||a.webkitURL,c=document.createElement(`a`);t=t||e.name||`download`,c.download=t,c.rel=`noopener`,typeof e==`string`?(c.href=e,c.origin===location.origin?i(c):r(c.href)?n(e,t,o):i(c,c.target=`_blank`)):(c.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:`msSaveOrOpenBlob`in navigator?function(t,a,o){if(a=a||t.name||`download`,typeof t!=`string`)navigator.msSaveOrOpenBlob(e(t,o),a);else if(r(t))n(t,a,o);else{var s=document.createElement(`a`);s.href=t,s.target=`_blank`,setTimeout(function(){i(s)})}}:function(e,t,r,i){if(i||=open(``,`_blank`),i&&(i.document.title=i.document.body.innerText=`downloading...`),typeof e==`string`)return n(e,t,r);var s=e.type===`application/octet-stream`,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||o)&&typeof FileReader<`u`){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,f=d.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout(function(){d.revokeObjectURL(f)},4e4)}});a.saveAs=s.saveAs=s,t!==void 0&&(t.exports=s)})})),w=Symbol(`AudioNamespace`),T=Symbol(`AudioQueue`),E=()=>{let e=c(w);if(!e)throw Error(`[player] useAudioNamespace() must be called inside <Player namespace="suno|producer">`);return e},D=e=>{let t=e??E(),n=x(),r=f({get:()=>n.state[t].audio,set:e=>n.commit(`${t}/setAudio`,e)}),i=e=>{n.commit(`${t}/setAudio`,{...n.state[t].audio,...e})},a=e=>{n.dispatch(`${t}/setAudio`,{...n.state[t].audio,...e})},o=e=>f({get:()=>n.state[t].audio?.[e],set:t=>i({[e]:t})}),s=c(T,void 0),l=f(()=>{let e=s?.value;if(e&&e.length)return e;let r=n.state[t]?.tasks?.items??[],i=[];for(let e of r)for(let t of e?.response?.data??[])t?.audio_url&&i.push(t);return i}),u=f(()=>{let e=n.state[t].audio?.id;return l.value.findIndex(t=>t.id===e)});return{namespace:t,store:n,audio:r,field:o,patchAudio:i,dispatchAudio:a,tracks:l,currentIndex:u,playAdjacent:e=>{let r=u.value;if(r===-1)return;let i=l.value[r+e];i&&n.dispatch(`${t}/setAudio`,{...n.state[t].audio,...i,progress:0,state:`playing`})}}},O={class:`player-slider`},k=v({__name:`PlayerSlider`,setup(e){let{field:t,dispatchAudio:n}=D(),r=t(`progress`),a=t(`duration`),c=()=>{},l=e=>n({progress:Array.isArray(e)?e[0]:e});return(e,t)=>(g(),s(`div`,O,[i(o(b),{modelValue:o(r),"onUpdate:modelValue":t[0]||=e=>_(r)?r.value=e:null,"show-tooltip":!1,min:0,max:o(a),onChange:l,onInput:c},null,8,[`modelValue`,`max`])]))}}),A={class:`flex player-song`},j=[`src`],M={class:`ml-2 text-xs flex flex-col justify-between`},N={class:`w-52 2xl:w-96 cursor-pointer truncate`},P={class:`flex`},F={class:`ml-2 text-dc`},I=v({__name:`PlayerSong`,setup(e){let{audio:n,patchAudio:i}=D(),a=null,c=null,d=()=>{if(a){try{a.pause()}catch{}a.src=``,a=null}c&&=(c.abort(),null)};return u(n,(e,t)=>{if(e?.audio_url!==t?.audio_url){if(d(),!e?.audio_url)return;let t=new Audio(e.audio_url);a=t,c=new AbortController;let{signal:n}=c;e.state===`playing`?t.play().catch(()=>{}):t.pause(),t.addEventListener(`loadedmetadata`,()=>{t.currentTime=0},{signal:n}),t.addEventListener(`timeupdate`,()=>{i({progress:t.currentTime})},{signal:n}),i({object:t})}else e?.progress!==t?.progress&&e?.object&&Math.abs(e.progress-e.object.currentTime)>2?e.object.currentTime=e.progress:e?.state!==t?.state&&e?.object&&(e.state===`playing`?e.object.play().catch(()=>{}):e.object.pause());e?.volume!==t?.volume&&e?.object&&(e.object.volume=e.volume/100)}),l(d),(e,i)=>(g(),s(`div`,A,[t(`img`,{alt:``,class:`w-11 h-11 rounded`,src:o(n)?.image_url||o(`/assets/disk-XFRmVAfp.png`)},null,8,j),t(`div`,M,[t(`div`,N,[t(`div`,P,[t(`span`,null,r(o(n)?.title||`Music`),1),t(`span`,F,`- `+r(o(n)?.style||`SmallRuralDog`),1)])])])]))}}),L={class:`flex justify-end items-center gap-x-2.5`},R={class:`text-xs`},z=v({__name:`PlayerAction`,setup(e){let{field:n}=D(),i=n(`progress`),a=n(`duration`);return(e,n)=>(g(),s(`div`,L,[t(`span`,R,r(o(S)(o(i)))+` / `+r(o(S)(o(a))),1)]))}}),B={size:`1em`,strokeWidth:4,strokeLinecap:`round`,strokeLinejoin:`round`,rtl:!1,theme:`outline`,colors:{outline:{fill:`#333`,background:`transparent`},filled:{fill:`#333`,background:`#FFF`},twoTone:{fill:`#333`,twoTone:`#2F88FF`},multiColor:{outStrokeColor:`#333`,outFillColor:`#2F88FF`,innerStrokeColor:`#FFF`,innerFillColor:`#43CCF8`}},prefix:`i`};function V(){return`icon-`+((1+Math.random())*4294967296|0).toString(16).substring(1)}function H(e,t,n){var r=typeof t.fill==`string`?[t.fill]:t.fill||[],i=[];switch(t.theme||n.theme){case`outline`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(`none`),i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(`none`);break;case`filled`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(`#FFF`),i.push(`#FFF`);break;case`two-tone`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[1]==`string`?r[1]:n.colors.twoTone.twoTone),i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[1]==`string`?r[1]:n.colors.twoTone.twoTone);break;case`multi-color`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[1]==`string`?r[1]:n.colors.multiColor.outFillColor),i.push(typeof r[2]==`string`?r[2]:n.colors.multiColor.innerStrokeColor),i.push(typeof r[3]==`string`?r[3]:n.colors.multiColor.innerFillColor);break}return{size:t.size||n.size,strokeWidth:t.strokeWidth||n.strokeWidth,strokeLinecap:t.strokeLinecap||n.strokeLinecap,strokeLinejoin:t.strokeLinejoin||n.strokeLinejoin,colors:i,id:e}}var ee=Symbol(`icon-context`);function U(e,t,n){return{name:`icon-`+e,props:[`size`,`strokeWidth`,`strokeLinecap`,`strokeLinejoin`,`theme`,`fill`,`spin`],setup:function(r){var a=V(),o=c(ee,B);return function(){var s=r.size,c=r.strokeWidth,l=r.strokeLinecap,u=r.strokeLinejoin,d=r.theme,f=r.fill,p=r.spin,m=H(a,{size:s,strokeWidth:c,strokeLinecap:l,strokeLinejoin:u,theme:d,fill:f},o),h=[o.prefix+`-icon`];return h.push(o.prefix+`-icon-`+e),t&&o.rtl&&h.push(o.prefix+`-icon-rtl`),p&&h.push(o.prefix+`-icon-spin`),i(`span`,{class:h.join(` `)},[n(m)])}}}}var W=U(`go-end`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M14 12L26 24L14 36`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M34 12V36`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),G=U(`go-start`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M34 36L22 24L34 12`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M14 12V36`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),K=U(`pause-one`,!1,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z`,fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M19 18V30`,stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M29 18V30`,stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),q=U(`play`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z`,fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M20 24V17.0718L26 20.5359L32 24L26 27.4641L20 30.9282V24Z`,fill:e.colors[3],stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),J=U(`volume-small`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z`,fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),Y=v({__name:`IconPark`,props:{icon:{type:[Object,Function]},theme:{},size:{},spin:{type:Boolean},fill:{},strokeLinecap:{},strokeLinejoin:{},strokeWidth:{}},setup(e){return(t,n)=>(g(),d(h(e.icon),{theme:e.theme,size:e.size,spin:e.spin,fill:e.fill,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,"stroke-width":e.strokeWidth},null,8,[`theme`,`size`,`spin`,`fill`,`stroke-linecap`,`stroke-linejoin`,`stroke-width`]))}}),X={class:`player-volume flex flex-col items-center pt-2`},Z={class:`text-sm mt-3`},Q=v({__name:`PlayerVolumeSlider`,setup(e){let{namespace:n,store:a,field:c}=D(),l=c(`volume`),u=c(`muted`),d=e=>a.dispatch(`${n}/setVolume`,Array.isArray(e)?e[0]:e);return(e,n)=>(g(),s(`div`,X,[i(o(b),{modelValue:o(l),"onUpdate:modelValue":n[0]||=e=>_(l)?l.value=e:null,vertical:``,height:`100px`,"show-tooltip":!1,max:100,min:0,size:`small`,disabled:o(u),onInput:d},null,8,[`modelValue`,`disabled`]),t(`div`,Z,r(o(l)),1)]))}}),$={class:`flex items-center justify-center gap-x-3`},te=v({__name:`PlayerController`,setup(e){let{audio:t,dispatchAudio:r,tracks:c,currentIndex:l,playAdjacent:u}=D(),m=f(()=>c.value.length>1),h=f(()=>l.value>0),_=f(()=>l.value!==-1&&l.value<c.value.length-1),v=()=>r({state:t.value?.state===`playing`?`paused`:`playing`});return(e,r)=>(g(),s(`div`,$,[m.value?(g(),d(Y,{key:0,icon:o(G),size:`22`,theme:`filled`,class:n([`cursor-pointer transition-opacity`,h.value?`text-[var(--el-text-color-regular)]`:`opacity-30 cursor-not-allowed`]),onClick:r[0]||=e=>h.value&&o(u)(-1)},null,8,[`icon`,`class`])):a(``,!0),i(Y,{icon:o(t)?.state===`playing`?o(K):o(q),size:`45`,theme:`filled`,class:`text-[var(--el-color-primary)] cursor-pointer`,onClick:v},null,8,[`icon`]),m.value?(g(),d(Y,{key:1,icon:o(W),size:`22`,theme:`filled`,class:n([`cursor-pointer transition-opacity`,_.value?`text-[var(--el-text-color-regular)]`:`opacity-30 cursor-not-allowed`]),onClick:r[1]||=e=>_.value&&o(u)(1)},null,8,[`icon`,`class`])):a(``,!0),i(o(y),{placement:`top`,width:`50px`,trigger:`click`},{reference:p(()=>[i(Y,{icon:o(J),size:`20`,"stroke-width":2,class:`cursor-pointer`},null,8,[`icon`])]),default:p(()=>[i(Q)]),_:1})]))}}),ne={class:`flex flex-col items-stretch h-20`},re={class:`flex grow px-5 items-center`},ie={class:`flex-1`},ae={class:`flex-1`},oe={class:`flex-1`},se=v({__name:`Player`,props:{namespace:{},tracks:{}},setup(e){let n=e;return m(w,n.namespace),m(T,f(()=>n.tracks??[])),(e,n)=>(g(),s(`div`,ne,[i(k),t(`div`,re,[t(`div`,ie,[i(I)]),t(`div`,ae,[i(te)]),t(`div`,oe,[i(z)])])]))}});export{C as n,S as r,se as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime--c01j_DQ.js";import{A as t,Gt as n,Jt as r,L as i,M as a,Mt as o,N as s,U as c,Y as l,ft as u,j as d,k as f,mt as p,nt as m,st as h,tt as g,yt as _,z as v}from"./vendor-chart-Dw-P17PN.js";import{t as y}from"./popover-mn1EGoMV.js";import{t as b}from"./slider-2iZQO2Zw.js";import{Ci as x}from"./index-0RhdvXdP.js";function S(e){let t=Math.floor(e)%60;e=Math.floor(e/60);let n=e%60,r=n<10?`0${n}`:n,i=t<10?`0${t}`:t;return r+`:`+i}var C=e(((e,t)=>{(function(t,n){typeof define==`function`&&define.amd?define([],n):e===void 0?(n(),t.FileSaver={exports:{}}.exports):n()})(e,function(){function e(e,t){return t===void 0?t={autoBom:!1}:typeof t!=`object`&&(console.warn(`Deprecated: Expected third argument to be a object`),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function r(e){var t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{var t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=a.saveAs||(typeof window!=`object`||window!==a?function(){}:`download`in HTMLAnchorElement.prototype&&!o?function(e,t,o){var s=a.URL||a.webkitURL,c=document.createElement(`a`);t=t||e.name||`download`,c.download=t,c.rel=`noopener`,typeof e==`string`?(c.href=e,c.origin===location.origin?i(c):r(c.href)?n(e,t,o):i(c,c.target=`_blank`)):(c.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:`msSaveOrOpenBlob`in navigator?function(t,a,o){if(a=a||t.name||`download`,typeof t!=`string`)navigator.msSaveOrOpenBlob(e(t,o),a);else if(r(t))n(t,a,o);else{var s=document.createElement(`a`);s.href=t,s.target=`_blank`,setTimeout(function(){i(s)})}}:function(e,t,r,i){if(i||=open(``,`_blank`),i&&(i.document.title=i.document.body.innerText=`downloading...`),typeof e==`string`)return n(e,t,r);var s=e.type===`application/octet-stream`,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||o)&&typeof FileReader<`u`){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,f=d.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout(function(){d.revokeObjectURL(f)},4e4)}});a.saveAs=s.saveAs=s,t!==void 0&&(t.exports=s)})})),w=Symbol(`AudioNamespace`),T=Symbol(`AudioQueue`),E=()=>{let e=c(w);if(!e)throw Error(`[player] useAudioNamespace() must be called inside <Player namespace="suno|producer">`);return e},D=e=>{let t=e??E(),n=x(),r=f({get:()=>n.state[t].audio,set:e=>n.commit(`${t}/setAudio`,e)}),i=e=>{n.commit(`${t}/setAudio`,{...n.state[t].audio,...e})},a=e=>{n.dispatch(`${t}/setAudio`,{...n.state[t].audio,...e})},o=e=>f({get:()=>n.state[t].audio?.[e],set:t=>i({[e]:t})}),s=c(T,void 0),l=f(()=>{let e=s?.value;if(e&&e.length)return e;let r=n.state[t]?.tasks?.items??[],i=[];for(let e of r)for(let t of e?.response?.data??[])t?.audio_url&&i.push(t);return i}),u=f(()=>{let e=n.state[t].audio?.id;return l.value.findIndex(t=>t.id===e)});return{namespace:t,store:n,audio:r,field:o,patchAudio:i,dispatchAudio:a,tracks:l,currentIndex:u,playAdjacent:e=>{let r=u.value;if(r===-1)return;let i=l.value[r+e];i&&n.dispatch(`${t}/setAudio`,{...n.state[t].audio,...i,progress:0,state:`playing`})}}},O={class:`player-slider`},k=v({__name:`PlayerSlider`,setup(e){let{field:t,dispatchAudio:n}=D(),r=t(`progress`),a=t(`duration`),c=()=>{},l=e=>n({progress:Array.isArray(e)?e[0]:e});return(e,t)=>(g(),s(`div`,O,[i(o(b),{modelValue:o(r),"onUpdate:modelValue":t[0]||=e=>_(r)?r.value=e:null,"show-tooltip":!1,min:0,max:o(a),onChange:l,onInput:c},null,8,[`modelValue`,`max`])]))}}),A={class:`flex player-song`},j=[`src`],M={class:`ml-2 text-xs flex flex-col justify-between`},N={class:`w-52 2xl:w-96 cursor-pointer truncate`},P={class:`flex`},F={class:`ml-2 text-dc`},I=v({__name:`PlayerSong`,setup(e){let{audio:n,patchAudio:i}=D(),a=null,c=null,d=()=>{if(a){try{a.pause()}catch{}a.src=``,a=null}c&&=(c.abort(),null)};return u(n,(e,t)=>{if(e?.audio_url!==t?.audio_url){if(d(),!e?.audio_url)return;let t=new Audio(e.audio_url);a=t,c=new AbortController;let{signal:n}=c;e.state===`playing`?t.play().catch(()=>{}):t.pause(),t.addEventListener(`loadedmetadata`,()=>{t.currentTime=0},{signal:n}),t.addEventListener(`timeupdate`,()=>{i({progress:t.currentTime})},{signal:n}),i({object:t})}else e?.progress!==t?.progress&&e?.object&&Math.abs(e.progress-e.object.currentTime)>2?e.object.currentTime=e.progress:e?.state!==t?.state&&e?.object&&(e.state===`playing`?e.object.play().catch(()=>{}):e.object.pause());e?.volume!==t?.volume&&e?.object&&(e.object.volume=e.volume/100)}),l(d),(e,i)=>(g(),s(`div`,A,[t(`img`,{alt:``,class:`w-11 h-11 rounded`,src:o(n)?.image_url||o(`/assets/disk-XFRmVAfp.png`)},null,8,j),t(`div`,M,[t(`div`,N,[t(`div`,P,[t(`span`,null,r(o(n)?.title||`Music`),1),t(`span`,F,`- `+r(o(n)?.style||`SmallRuralDog`),1)])])])]))}}),L={class:`flex justify-end items-center gap-x-2.5`},R={class:`text-xs`},z=v({__name:`PlayerAction`,setup(e){let{field:n}=D(),i=n(`progress`),a=n(`duration`);return(e,n)=>(g(),s(`div`,L,[t(`span`,R,r(o(S)(o(i)))+` / `+r(o(S)(o(a))),1)]))}}),B={size:`1em`,strokeWidth:4,strokeLinecap:`round`,strokeLinejoin:`round`,rtl:!1,theme:`outline`,colors:{outline:{fill:`#333`,background:`transparent`},filled:{fill:`#333`,background:`#FFF`},twoTone:{fill:`#333`,twoTone:`#2F88FF`},multiColor:{outStrokeColor:`#333`,outFillColor:`#2F88FF`,innerStrokeColor:`#FFF`,innerFillColor:`#43CCF8`}},prefix:`i`};function V(){return`icon-`+((1+Math.random())*4294967296|0).toString(16).substring(1)}function H(e,t,n){var r=typeof t.fill==`string`?[t.fill]:t.fill||[],i=[];switch(t.theme||n.theme){case`outline`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(`none`),i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(`none`);break;case`filled`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(`#FFF`),i.push(`#FFF`);break;case`two-tone`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[1]==`string`?r[1]:n.colors.twoTone.twoTone),i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[1]==`string`?r[1]:n.colors.twoTone.twoTone);break;case`multi-color`:i.push(typeof r[0]==`string`?r[0]:`currentColor`),i.push(typeof r[1]==`string`?r[1]:n.colors.multiColor.outFillColor),i.push(typeof r[2]==`string`?r[2]:n.colors.multiColor.innerStrokeColor),i.push(typeof r[3]==`string`?r[3]:n.colors.multiColor.innerFillColor);break}return{size:t.size||n.size,strokeWidth:t.strokeWidth||n.strokeWidth,strokeLinecap:t.strokeLinecap||n.strokeLinecap,strokeLinejoin:t.strokeLinejoin||n.strokeLinejoin,colors:i,id:e}}var ee=Symbol(`icon-context`);function U(e,t,n){return{name:`icon-`+e,props:[`size`,`strokeWidth`,`strokeLinecap`,`strokeLinejoin`,`theme`,`fill`,`spin`],setup:function(r){var a=V(),o=c(ee,B);return function(){var s=r.size,c=r.strokeWidth,l=r.strokeLinecap,u=r.strokeLinejoin,d=r.theme,f=r.fill,p=r.spin,m=H(a,{size:s,strokeWidth:c,strokeLinecap:l,strokeLinejoin:u,theme:d,fill:f},o),h=[o.prefix+`-icon`];return h.push(o.prefix+`-icon-`+e),t&&o.rtl&&h.push(o.prefix+`-icon-rtl`),p&&h.push(o.prefix+`-icon-spin`),i(`span`,{class:h.join(` `)},[n(m)])}}}}var W=U(`go-end`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M14 12L26 24L14 36`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M34 12V36`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),G=U(`go-start`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M34 36L22 24L34 12`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M14 12V36`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),K=U(`pause-one`,!1,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z`,fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M19 18V30`,stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M29 18V30`,stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),q=U(`play`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z`,fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M20 24V17.0718L26 20.5359L32 24L26 27.4641L20 30.9282V24Z`,fill:e.colors[3],stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),J=U(`volume-small`,!0,function(e){return i(`svg`,{width:e.size,height:e.size,viewBox:`0 0 48 48`,fill:`none`},[i(`path`,{d:`M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z`,fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),i(`path`,{d:`M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33`,stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),Y=v({__name:`IconPark`,props:{icon:{type:[Object,Function]},theme:{},size:{},spin:{type:Boolean},fill:{},strokeLinecap:{},strokeLinejoin:{},strokeWidth:{}},setup(e){return(t,n)=>(g(),d(h(e.icon),{theme:e.theme,size:e.size,spin:e.spin,fill:e.fill,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,"stroke-width":e.strokeWidth},null,8,[`theme`,`size`,`spin`,`fill`,`stroke-linecap`,`stroke-linejoin`,`stroke-width`]))}}),X={class:`player-volume flex flex-col items-center pt-2`},Z={class:`text-sm mt-3`},Q=v({__name:`PlayerVolumeSlider`,setup(e){let{namespace:n,store:a,field:c}=D(),l=c(`volume`),u=c(`muted`),d=e=>a.dispatch(`${n}/setVolume`,Array.isArray(e)?e[0]:e);return(e,n)=>(g(),s(`div`,X,[i(o(b),{modelValue:o(l),"onUpdate:modelValue":n[0]||=e=>_(l)?l.value=e:null,vertical:``,height:`100px`,"show-tooltip":!1,max:100,min:0,size:`small`,disabled:o(u),onInput:d},null,8,[`modelValue`,`disabled`]),t(`div`,Z,r(o(l)),1)]))}}),$={class:`flex items-center justify-center gap-x-3`},te=v({__name:`PlayerController`,setup(e){let{audio:t,dispatchAudio:r,tracks:c,currentIndex:l,playAdjacent:u}=D(),m=f(()=>c.value.length>1),h=f(()=>l.value>0),_=f(()=>l.value!==-1&&l.value<c.value.length-1),v=()=>r({state:t.value?.state===`playing`?`paused`:`playing`});return(e,r)=>(g(),s(`div`,$,[m.value?(g(),d(Y,{key:0,icon:o(G),size:`22`,theme:`filled`,class:n([`cursor-pointer transition-opacity`,h.value?`text-[var(--el-text-color-regular)]`:`opacity-30 cursor-not-allowed`]),onClick:r[0]||=e=>h.value&&o(u)(-1)},null,8,[`icon`,`class`])):a(``,!0),i(Y,{icon:o(t)?.state===`playing`?o(K):o(q),size:`45`,theme:`filled`,class:`text-[var(--el-color-primary)] cursor-pointer`,onClick:v},null,8,[`icon`]),m.value?(g(),d(Y,{key:1,icon:o(W),size:`22`,theme:`filled`,class:n([`cursor-pointer transition-opacity`,_.value?`text-[var(--el-text-color-regular)]`:`opacity-30 cursor-not-allowed`]),onClick:r[1]||=e=>_.value&&o(u)(1)},null,8,[`icon`,`class`])):a(``,!0),i(o(y),{placement:`top`,width:`50px`,trigger:`click`},{reference:p(()=>[i(Y,{icon:o(J),size:`20`,"stroke-width":2,class:`cursor-pointer`},null,8,[`icon`])]),default:p(()=>[i(Q)]),_:1})]))}}),ne={class:`flex flex-col items-stretch h-20`},re={class:`flex grow px-5 items-center`},ie={class:`flex-1`},ae={class:`flex-1`},oe={class:`flex-1`},se=v({__name:`Player`,props:{namespace:{},tracks:{}},setup(e){let n=e;return m(w,n.namespace),m(T,f(()=>n.tracks??[])),(e,n)=>(g(),s(`div`,ne,[i(k),t(`div`,re,[t(`div`,ie,[i(I)]),t(`div`,ae,[i(te)]),t(`div`,oe,[i(z)])])]))}});export{C as n,S as r,se as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,M as i,N as a,at as o,it as s,j as c,mt as l,tt as u,z as d}from"./vendor-chart-Dw-P17PN.js";import{t as f}from"./tooltip-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,M as i,N as a,at as o,it as s,j as c,mt as l,tt as u,z as d}from"./vendor-chart-Dw-P17PN.js";import{t as f}from"./tooltip-bsBfzZxe.js";import{J as p,Vi as m,Xi as h,aa as g}from"./index-0RhdvXdP.js";import{t as _}from"./index.es-RNUZL6kj.js";import{a as v}from"./pagination-DJfdZUpV.js";var y=d({name:`PromptTextarea`,components:{ElInput:g,ElButton:h,ElTooltip:f,ElDialog:m,FontAwesomeIcon:_,InfoIcon:v},props:{modelValue:{type:String,default:``},title:{type:String,required:!0},info:{type:String,default:``},placeholder:{type:String,default:``},minRows:{type:Number,default:4},maxRows:{type:Number,default:12},maxlength:{type:Number,default:0},expandable:{type:Boolean,default:!0},dialogTitle:{type:String,default:``}},emits:[`update:modelValue`,`expand`],data(){return{expanded:!1}},computed:{text:{get(){return this.modelValue??``},set(e){this.$emit(`update:modelValue`,e)}},hasMaxlength(){return typeof this.maxlength==`number`&&this.maxlength>0},effectiveMaxlength(){return this.hasMaxlength?this.maxlength:void 0}},methods:{onExpand(){this.expanded=!0,this.$emit(`expand`)}}}),b={class:`prompt-textarea`},x={class:`header`},S={class:`title font-bold`},C={class:`actions`};function w(d,f,p,m,h,g){let _=o(`info-icon`),v=o(`font-awesome-icon`),y=o(`el-button`),w=o(`el-tooltip`),T=o(`el-input`),E=o(`el-dialog`);return u(),a(`div`,b,[e(`div`,x,[e(`h2`,S,n(d.title),1),e(`div`,C,[s(d.$slots,`actions`,{},void 0,!0),d.info?(u(),c(_,{key:0,content:d.info},null,8,[`content`])):i(``,!0),d.expandable?(u(),c(w,{key:1,content:d.$t(`common.button.expand`),placement:`top`},{default:l(()=>[r(y,{size:`small`,circle:``,class:`expand-btn`,onClick:d.onExpand},{default:l(()=>[r(v,{icon:`fa-solid fa-expand`})]),_:1},8,[`onClick`])]),_:1},8,[`content`])):i(``,!0)])]),s(d.$slots,`before`,{},void 0,!0),r(T,{modelValue:d.text,"onUpdate:modelValue":f[0]||=e=>d.text=e,type:`textarea`,class:`textarea`,autosize:{minRows:d.minRows,maxRows:d.maxRows},resize:`vertical`,placeholder:d.placeholder,maxlength:d.effectiveMaxlength,"show-word-limit":d.hasMaxlength},null,8,[`modelValue`,`autosize`,`placeholder`,`maxlength`,`show-word-limit`]),s(d.$slots,`after`,{},void 0,!0),d.expandable?(u(),c(E,{key:0,modelValue:d.expanded,"onUpdate:modelValue":f[3]||=e=>d.expanded=e,title:d.dialogTitle||d.title,width:`720px`,top:`5vh`,"close-on-click-modal":!1,class:`prompt-expand-dialog`,"append-to-body":``},{footer:l(()=>[r(y,{type:`primary`,onClick:f[2]||=e=>d.expanded=!1},{default:l(()=>[t(n(d.$t(`common.button.confirm`)),1)]),_:1})]),default:l(()=>[r(T,{modelValue:d.text,"onUpdate:modelValue":f[1]||=e=>d.text=e,type:`textarea`,autosize:{minRows:14,maxRows:28},placeholder:d.placeholder,maxlength:d.effectiveMaxlength,"show-word-limit":d.hasMaxlength,autofocus:``},null,8,[`modelValue`,`placeholder`,`maxlength`,`show-word-limit`])]),_:1},8,[`modelValue`,`title`])):i(``,!0)])}var T=p(y,[[`render`,w],[`__scopeId`,`data-v-8f4be1c1`]]);export{T as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,Gt as n,Jt as r,L as i,M as a,N as o,T as s,at as c,mt as l,p as u,qt as d,rt as f,tt as p,z as m}from"./vendor-chart-Dw-P17PN.js";import{Di as h,Oi as g,ia as _,ji as v,ki as y}from"./constants-DWe-ziJf.js";import{J as b,nt as x}from"./index-DHGr0qfr.js";import{t as S}from"./index.es-J-PBjzcR.js";var C=class{token;model;handlers;voice;ws;audioCtx;micStream;micNode;workletNode;analyser;levelRaf=0;running=!1;playHead=0;activeSources=[];disposed=!1;suppressAudio=!1;aiResponding=!1;constructor(e,t,n,r=g){this.token=e,this.model=t,this.handlers=n,this.voice=r}get isRunning(){return this.running}async start(){this.handlers.onStatus?.(`connecting`);let e=window.AudioContext||window.webkitAudioContext;if(this.audioCtx=new e({sampleRate:y}),await this.audioCtx.audioWorklet.addModule(`/recorder-worklet.js`),this.disposed||(this.micStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.disposed))return this.teardownAudio();this.micNode=this.audioCtx.createMediaStreamSource(this.micStream),this.workletNode=new AudioWorkletNode(this.audioCtx,`recorder-processor`),this.micNode.connect(this.workletNode),this.analyser=this.audioCtx.createAnalyser(),this.analyser.fftSize=256,this.micNode.connect(this.analyser),this.startLevelLoop();let t=this.audioCtx.createGain();t.gain.value=0,this.workletNode.connect(t).connect(this.audioCtx.destination);let n=`${_}?model=${encodeURIComponent(this.model)}&voice=${encodeURIComponent(this.voice)}`;this.ws=new WebSocket(n,[`realtime`,`acedata-token.${this.token}`]),this.ws.onopen=()=>{if(this.disposed){this.ws?.close();return}this.running=!0,this.handlers.onStatus?.(`connected`)},this.ws.onclose=()=>{this.handlers.onStatus?.(`disconnected`),this.teardownAudio(),this.running=!1},this.ws.onerror=()=>this.handlers.onStatus?.(`error`),this.ws.onmessage=e=>this.onServerEvent(e),this.workletNode.port.onmessage=e=>{!this.ws||this.ws.readyState!==WebSocket.OPEN||this.ws.send(JSON.stringify({type:`input_audio_buffer.append`,audio:w(e.data)}))}}setMuted(e){this.micStream?.getAudioTracks().forEach(t=>t.enabled=!e)}startLevelLoop(){let e=new Uint8Array(this.analyser?this.analyser.fftSize:0),t=0,n=()=>{if(this.disposed||!this.analyser)return;this.analyser.getByteTimeDomainData(e);let r=0;for(let t=0;t<e.length;t++){let n=(e[t]-128)/128;r+=n*n}let i=Math.sqrt(r/e.length),a=Math.min(1,i*3.4);t=t*.82+a*.18,this.handlers.onAudioLevel?.(t),this.levelRaf=requestAnimationFrame(n)};this.levelRaf=requestAnimationFrame(n)}stop(){this.disposed=!0,this.ws&&(this.ws.readyState===WebSocket.OPEN||this.ws.readyState===WebSocket.CONNECTING)&&this.ws.close(),this.teardownAudio(),this.running=!1,this.handlers.onStatus?.(`disconnected`)}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}onServerEvent(e){let t;try{t=JSON.parse(e.data)}catch{return}switch(t.type){case`session.created`:case`session.updated`:break;case`input_audio_buffer.speech_started`:this.stopPlayback(),this.aiResponding&&this.send({type:`response.cancel`}),this.suppressAudio=!0,this.handlers.onUserSpeechStarted?.();break;case`conversation.item.input_audio_transcription.completed`:this.handlers.onUserTranscript?.(t.transcript||``);break;case`response.created`:this.aiResponding=!0,this.suppressAudio=!1,this.handlers.onAiResponseStart?.();break;case`response.done`:this.aiResponding=!1;break;case`response.output_audio.delta`:case`response.audio.delta`:t.delta&&!this.suppressAudio&&this.enqueuePcm16(t.delta);break;case`response.output_audio_transcript.delta`:case`response.audio_transcript.delta`:t.delta&&this.handlers.onAiTranscriptDelta?.(t.delta);break;case`error`:{let e=t.error||{},n=String(e.code||``),r=String(e.message||``);if(n===`response_cancel_not_active`||/no active response/i.test(r))break;this.handlers.onError?.(r||`realtime error`);break}default:break}}enqueuePcm16(e){if(!this.audioCtx)return;let t=T(e),n=new Int16Array(t);if(n.length===0)return;let r=new Float32Array(n.length);for(let e=0;e<n.length;e++)r[e]=n[e]/32768;let i=this.audioCtx.createBuffer(1,r.length,y);i.getChannelData(0).set(r);let a=this.audioCtx.createBufferSource();a.buffer=i,a.connect(this.audioCtx.destination),this.analyser&&a.connect(this.analyser);let o=this.audioCtx.currentTime;this.playHead<o&&(this.playHead=o+.02),a.start(this.playHead),this.playHead+=i.duration,this.activeSources.push(a),a.onended=()=>{this.activeSources=this.activeSources.filter(e=>e!==a)}}stopPlayback(){for(let e of this.activeSources)try{e.onended=null,e.stop()}catch{}this.activeSources=[],this.playHead=0}teardownAudio(){try{this.levelRaf&&cancelAnimationFrame(this.levelRaf),this.workletNode&&(this.workletNode.port.onmessage=null),this.micStream&&this.micStream.getTracks().forEach(e=>e.stop()),this.stopPlayback(),this.audioCtx&&this.audioCtx.close()}catch{}this.levelRaf=0,this.handlers.onAudioLevel?.(0),this.micStream=this.micNode=this.workletNode=this.audioCtx=this.analyser=void 0}};function w(e){let t=new Uint8Array(e),n=``,r=32768;for(let e=0;e<t.length;e+=r)n+=String.fromCharCode.apply(null,Array.from(t.subarray(e,e+r)));return btoa(n)}function T(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}var E=`nexior.realtime.voice`,D=m({name:`RealtimeCall`,components:{FontAwesomeIcon:S},data(){return{client:void 0,status:`disconnected`,connecting:!1,provisioning:!0,running:!1,aiSpeaking:!1,userText:``,aiText:``,errorMsg:``,level:0,muted:!1,captionsOn:!1,showInfo:!1,voice:g,voices:[...v],voiceMenuOpen:!1,callSeq:0}},computed:{token(){return this.$store.state.realtime?.credential?.token},canCall(){return!!this.token},modelName(){return h},orbScale(){return 1+this.level*.16},haloStyle(){let e=this.running?this.level:0;return{transform:`scale(${1+e*.7})`,opacity:`${.16+e*.5}`}},orbClass(){return{speaking:this.aiSpeaking,live:this.running,idle:!this.running}},captionText(){return this.aiText?this.aiText:this.running&&!this.userText?this.$t(`realtime.listening`):``},stageText(){return this.errorMsg?this.errorMsg:this.provisioning||this.connecting?this.$t(`realtime.status.connecting`):this.running?this.aiSpeaking?this.$t(`realtime.speaking`):this.$t(`realtime.listening`):this.$t(`realtime.start`)},voiceLabel(){return this.labelOf(this.voice)}},async mounted(){try{let e=localStorage.getItem(E);e&&this.voices.includes(e)&&(this.voice=e)}catch{}this.voices.includes(this.voice)||(this.voice=g),this.provisioning=!0;try{await this.$store.dispatch(`realtime/init`)}finally{this.provisioning=!1}this.canCall&&this.startCall()},beforeUnmount(){this.client?.stop()},methods:{async startCall(){if(!this.token||this.connecting||this.running)return;let e=++this.callSeq,t=()=>e===this.callSeq;this.errorMsg=``,this.userText=``,this.aiText=``,this.connecting=!0;let n=new C(this.token,h,{onStatus:e=>{t()&&(this.status=e,this.running=e===`connecting`||e===`connected`,(e===`connected`||e===`disconnected`||e===`error`)&&(this.connecting=!1),this.running||(this.level=0))},onUserSpeechStarted:()=>{t()&&(this.aiSpeaking=!1,this.errorMsg=``)},onUserTranscript:e=>{t()&&(this.userText=e)},onAiResponseStart:()=>{t()&&(this.aiText=``,this.aiSpeaking=!0,this.errorMsg=``)},onAiTranscriptDelta:e=>{t()&&(this.aiText+=e)},onAudioLevel:e=>{t()&&(this.level=e)},onError:e=>{t()&&(this.errorMsg=e)}},this.voice);this.client=n;try{if(await n.start(),!t()||this.client!==n)return;n.setMuted(this.muted)}catch(e){if(n.stop(),!t()||this.client!==n)return;this.connecting=!1,this.running=!1,this.errorMsg=e?.message||this.$t(`realtime.startFailed`)}},toggleMute(){this.muted=!this.muted,this.client?.setMuted(this.muted)},toggleCaptions(){this.captionsOn=!this.captionsOn},labelOf(e){let t=e||`alloy`;return t.charAt(0).toUpperCase()+t.slice(1)},selectVoice(e){if(this.voiceMenuOpen=!1,e!==this.voice){this.voice=e;try{localStorage.setItem(E,e)}catch{}(this.running||this.connecting)&&this.reconnect()}},reconnect(){let e=this.client;this.client=void 0,this.callSeq++,this.running=!1,this.connecting=!1,this.aiSpeaking=!1,this.level=0,this.userText=``,this.aiText=``,this.errorMsg=``,e?.stop(),this.$nextTick(()=>this.startCall())},onOrbTap(){!this.running&&!this.connecting&&this.startCall()},endCall(){this.client?.stop(),this.running=!1,this.aiSpeaking=!1,this.level=0,this.goBack()},goBack(){this.client?.stop(),this.$router.push({name:x})}}}),O={class:`rtc-top`},k={class:`rtc-top-left`},A=[`title`],j={class:`voice-pick`},M={class:`voice-name`},N={key:0,class:`voice-menu`},P=[`onClick`],F={class:`rtc-top-right`},I=[`title`],L=[`title`],R={class:`rtc-stage`},z={key:0,class:`rtc-info`},B={key:0,class:`rtc-captions`},V={key:0,class:`cap user`},H={class:`cap ai`},U={class:`rtc-controls`},W=[`title`],G=[`title`],K=[`title`];function q(m,h,g,_,v,y){let b=c(`font-awesome-icon`);return p(),o(`div`,{class:n([`rtc`,{"is-captions":m.captionsOn,"is-live":m.running}])},[e(`header`,O,[e(`div`,k,[e(`button`,{class:`ic`,title:m.$t(`realtime.title`),onClick:h[0]||=(...e)=>m.goBack&&m.goBack(...e)},[i(b,{icon:`fa-solid fa-chevron-down`})],8,A),e(`div`,j,[e(`button`,{class:n([`voice-chip`,{on:m.voiceMenuOpen}]),onClick:h[1]||=t(e=>m.voiceMenuOpen=!m.voiceMenuOpen,[`stop`])},[e(`span`,M,r(m.voiceLabel),1),i(b,{icon:`fa-solid fa-chevron-down`,class:`voice-caret`})],2),m.voiceMenuOpen?(p(),o(`ul`,N,[(p(!0),o(s,null,f(m.voices,e=>(p(),o(`li`,{key:e,class:n({sel:e===m.voice}),onClick:t=>m.selectVoice(e)},r(m.labelOf(e)),11,P))),128))])):a(``,!0)])]),e(`div`,F,[e(`button`,{class:n([`ic`,{on:m.showInfo}]),title:m.$t(`realtime.title`),onClick:h[2]||=e=>m.showInfo=!m.showInfo},[i(b,{icon:`fa-solid fa-circle-info`})],10,I),e(`button`,{class:n([`ic`,{on:m.captionsOn}]),title:m.$t(`realtime.captions`),onClick:h[3]||=(...e)=>m.toggleCaptions&&m.toggleCaptions(...e)},[i(b,{icon:`fa-solid fa-closed-captioning`})],10,L)])]),m.voiceMenuOpen?(p(),o(`div`,{key:0,class:`voice-backdrop`,onClick:h[4]||=e=>m.voiceMenuOpen=!1})):a(``,!0),e(`main`,R,[e(`div`,{class:`orb-stage`,onClick:h[5]||=(...e)=>m.onOrbTap&&m.onOrbTap(...e)},[e(`div`,{class:`orb-halo`,style:d(m.haloStyle)},null,4),e(`div`,{class:n([`orb-breathe`,{paused:!m.running}])},[e(`div`,{class:n([`orb`,m.orbClass]),style:d({transform:`scale(${m.orbScale})`})},[...h[9]||=[e(`span`,{class:`cloud c1`},null,-1),e(`span`,{class:`cloud c2`},null,-1),e(`span`,{class:`cloud c3`},null,-1),e(`span`,{class:`sheen`},null,-1)]],6)],2)]),i(u,{name:`fade`},{default:l(()=>[m.showInfo&&!m.captionsOn?(p(),o(`p`,z,r(m.modelName),1)):a(``,!0)]),_:1}),m.captionsOn?(p(),o(`div`,B,[m.userText?(p(),o(`p`,V,r(m.userText),1)):a(``,!0),e(`p`,H,r(m.captionText),1)])):(p(),o(`p`,{key:1,class:n([`rtc-status`,{err:!!m.errorMsg}])},r(m.stageText),3))]),e(`footer`,U,[e(`button`,{class:n([`ctl`,{active:m.muted}]),title:m.muted?m.$t(`realtime.unmute`):m.$t(`realtime.mute`),onClick:h[6]||=(...e)=>m.toggleMute&&m.toggleMute(...e)},[i(b,{icon:m.muted?`fa-solid fa-microphone-slash`:`fa-solid fa-microphone`},null,8,[`icon`])],10,W),e(`button`,{class:n([`ctl`,{active:m.captionsOn}]),title:m.$t(`realtime.captions`),onClick:h[7]||=(...e)=>m.toggleCaptions&&m.toggleCaptions(...e)},[i(b,{icon:`fa-solid fa-closed-captioning`})],10,G),e(`button`,{class:`ctl end`,title:m.$t(`realtime.end`),onClick:h[8]||=(...e)=>m.endCall&&m.endCall(...e)},[i(b,{icon:`fa-solid fa-xmark`})],8,K)])],2)}var J=b(D,[[`render`,q],[`__scopeId`,`data-v-35b8d53d`]]);export{J as default};
|
|
1
|
+
import{A as e,C as t,Gt as n,Jt as r,L as i,M as a,N as o,T as s,at as c,mt as l,p as u,qt as d,rt as f,tt as p,z as m}from"./vendor-chart-Dw-P17PN.js";import{Di as h,Oi as g,ia as _,ji as v,ki as y}from"./constants-DWe-ziJf.js";import{J as b,nt as x}from"./index-0RhdvXdP.js";import{t as S}from"./index.es-RNUZL6kj.js";var C=class{token;model;handlers;voice;ws;audioCtx;micStream;micNode;workletNode;analyser;levelRaf=0;running=!1;playHead=0;activeSources=[];disposed=!1;suppressAudio=!1;aiResponding=!1;constructor(e,t,n,r=g){this.token=e,this.model=t,this.handlers=n,this.voice=r}get isRunning(){return this.running}async start(){this.handlers.onStatus?.(`connecting`);let e=window.AudioContext||window.webkitAudioContext;if(this.audioCtx=new e({sampleRate:y}),await this.audioCtx.audioWorklet.addModule(`/recorder-worklet.js`),this.disposed||(this.micStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.disposed))return this.teardownAudio();this.micNode=this.audioCtx.createMediaStreamSource(this.micStream),this.workletNode=new AudioWorkletNode(this.audioCtx,`recorder-processor`),this.micNode.connect(this.workletNode),this.analyser=this.audioCtx.createAnalyser(),this.analyser.fftSize=256,this.micNode.connect(this.analyser),this.startLevelLoop();let t=this.audioCtx.createGain();t.gain.value=0,this.workletNode.connect(t).connect(this.audioCtx.destination);let n=`${_}?model=${encodeURIComponent(this.model)}&voice=${encodeURIComponent(this.voice)}`;this.ws=new WebSocket(n,[`realtime`,`acedata-token.${this.token}`]),this.ws.onopen=()=>{if(this.disposed){this.ws?.close();return}this.running=!0,this.handlers.onStatus?.(`connected`)},this.ws.onclose=()=>{this.handlers.onStatus?.(`disconnected`),this.teardownAudio(),this.running=!1},this.ws.onerror=()=>this.handlers.onStatus?.(`error`),this.ws.onmessage=e=>this.onServerEvent(e),this.workletNode.port.onmessage=e=>{!this.ws||this.ws.readyState!==WebSocket.OPEN||this.ws.send(JSON.stringify({type:`input_audio_buffer.append`,audio:w(e.data)}))}}setMuted(e){this.micStream?.getAudioTracks().forEach(t=>t.enabled=!e)}startLevelLoop(){let e=new Uint8Array(this.analyser?this.analyser.fftSize:0),t=0,n=()=>{if(this.disposed||!this.analyser)return;this.analyser.getByteTimeDomainData(e);let r=0;for(let t=0;t<e.length;t++){let n=(e[t]-128)/128;r+=n*n}let i=Math.sqrt(r/e.length),a=Math.min(1,i*3.4);t=t*.82+a*.18,this.handlers.onAudioLevel?.(t),this.levelRaf=requestAnimationFrame(n)};this.levelRaf=requestAnimationFrame(n)}stop(){this.disposed=!0,this.ws&&(this.ws.readyState===WebSocket.OPEN||this.ws.readyState===WebSocket.CONNECTING)&&this.ws.close(),this.teardownAudio(),this.running=!1,this.handlers.onStatus?.(`disconnected`)}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}onServerEvent(e){let t;try{t=JSON.parse(e.data)}catch{return}switch(t.type){case`session.created`:case`session.updated`:break;case`input_audio_buffer.speech_started`:this.stopPlayback(),this.aiResponding&&this.send({type:`response.cancel`}),this.suppressAudio=!0,this.handlers.onUserSpeechStarted?.();break;case`conversation.item.input_audio_transcription.completed`:this.handlers.onUserTranscript?.(t.transcript||``);break;case`response.created`:this.aiResponding=!0,this.suppressAudio=!1,this.handlers.onAiResponseStart?.();break;case`response.done`:this.aiResponding=!1;break;case`response.output_audio.delta`:case`response.audio.delta`:t.delta&&!this.suppressAudio&&this.enqueuePcm16(t.delta);break;case`response.output_audio_transcript.delta`:case`response.audio_transcript.delta`:t.delta&&this.handlers.onAiTranscriptDelta?.(t.delta);break;case`error`:{let e=t.error||{},n=String(e.code||``),r=String(e.message||``);if(n===`response_cancel_not_active`||/no active response/i.test(r))break;this.handlers.onError?.(r||`realtime error`);break}default:break}}enqueuePcm16(e){if(!this.audioCtx)return;let t=T(e),n=new Int16Array(t);if(n.length===0)return;let r=new Float32Array(n.length);for(let e=0;e<n.length;e++)r[e]=n[e]/32768;let i=this.audioCtx.createBuffer(1,r.length,y);i.getChannelData(0).set(r);let a=this.audioCtx.createBufferSource();a.buffer=i,a.connect(this.audioCtx.destination),this.analyser&&a.connect(this.analyser);let o=this.audioCtx.currentTime;this.playHead<o&&(this.playHead=o+.02),a.start(this.playHead),this.playHead+=i.duration,this.activeSources.push(a),a.onended=()=>{this.activeSources=this.activeSources.filter(e=>e!==a)}}stopPlayback(){for(let e of this.activeSources)try{e.onended=null,e.stop()}catch{}this.activeSources=[],this.playHead=0}teardownAudio(){try{this.levelRaf&&cancelAnimationFrame(this.levelRaf),this.workletNode&&(this.workletNode.port.onmessage=null),this.micStream&&this.micStream.getTracks().forEach(e=>e.stop()),this.stopPlayback(),this.audioCtx&&this.audioCtx.close()}catch{}this.levelRaf=0,this.handlers.onAudioLevel?.(0),this.micStream=this.micNode=this.workletNode=this.audioCtx=this.analyser=void 0}};function w(e){let t=new Uint8Array(e),n=``,r=32768;for(let e=0;e<t.length;e+=r)n+=String.fromCharCode.apply(null,Array.from(t.subarray(e,e+r)));return btoa(n)}function T(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}var E=`nexior.realtime.voice`,D=m({name:`RealtimeCall`,components:{FontAwesomeIcon:S},data(){return{client:void 0,status:`disconnected`,connecting:!1,provisioning:!0,running:!1,aiSpeaking:!1,userText:``,aiText:``,errorMsg:``,level:0,muted:!1,captionsOn:!1,showInfo:!1,voice:g,voices:[...v],voiceMenuOpen:!1,callSeq:0}},computed:{token(){return this.$store.state.realtime?.credential?.token},canCall(){return!!this.token},modelName(){return h},orbScale(){return 1+this.level*.16},haloStyle(){let e=this.running?this.level:0;return{transform:`scale(${1+e*.7})`,opacity:`${.16+e*.5}`}},orbClass(){return{speaking:this.aiSpeaking,live:this.running,idle:!this.running}},captionText(){return this.aiText?this.aiText:this.running&&!this.userText?this.$t(`realtime.listening`):``},stageText(){return this.errorMsg?this.errorMsg:this.provisioning||this.connecting?this.$t(`realtime.status.connecting`):this.running?this.aiSpeaking?this.$t(`realtime.speaking`):this.$t(`realtime.listening`):this.$t(`realtime.start`)},voiceLabel(){return this.labelOf(this.voice)}},async mounted(){try{let e=localStorage.getItem(E);e&&this.voices.includes(e)&&(this.voice=e)}catch{}this.voices.includes(this.voice)||(this.voice=g),this.provisioning=!0;try{await this.$store.dispatch(`realtime/init`)}finally{this.provisioning=!1}this.canCall&&this.startCall()},beforeUnmount(){this.client?.stop()},methods:{async startCall(){if(!this.token||this.connecting||this.running)return;let e=++this.callSeq,t=()=>e===this.callSeq;this.errorMsg=``,this.userText=``,this.aiText=``,this.connecting=!0;let n=new C(this.token,h,{onStatus:e=>{t()&&(this.status=e,this.running=e===`connecting`||e===`connected`,(e===`connected`||e===`disconnected`||e===`error`)&&(this.connecting=!1),this.running||(this.level=0))},onUserSpeechStarted:()=>{t()&&(this.aiSpeaking=!1,this.errorMsg=``)},onUserTranscript:e=>{t()&&(this.userText=e)},onAiResponseStart:()=>{t()&&(this.aiText=``,this.aiSpeaking=!0,this.errorMsg=``)},onAiTranscriptDelta:e=>{t()&&(this.aiText+=e)},onAudioLevel:e=>{t()&&(this.level=e)},onError:e=>{t()&&(this.errorMsg=e)}},this.voice);this.client=n;try{if(await n.start(),!t()||this.client!==n)return;n.setMuted(this.muted)}catch(e){if(n.stop(),!t()||this.client!==n)return;this.connecting=!1,this.running=!1,this.errorMsg=e?.message||this.$t(`realtime.startFailed`)}},toggleMute(){this.muted=!this.muted,this.client?.setMuted(this.muted)},toggleCaptions(){this.captionsOn=!this.captionsOn},labelOf(e){let t=e||`alloy`;return t.charAt(0).toUpperCase()+t.slice(1)},selectVoice(e){if(this.voiceMenuOpen=!1,e!==this.voice){this.voice=e;try{localStorage.setItem(E,e)}catch{}(this.running||this.connecting)&&this.reconnect()}},reconnect(){let e=this.client;this.client=void 0,this.callSeq++,this.running=!1,this.connecting=!1,this.aiSpeaking=!1,this.level=0,this.userText=``,this.aiText=``,this.errorMsg=``,e?.stop(),this.$nextTick(()=>this.startCall())},onOrbTap(){!this.running&&!this.connecting&&this.startCall()},endCall(){this.client?.stop(),this.running=!1,this.aiSpeaking=!1,this.level=0,this.goBack()},goBack(){this.client?.stop(),this.$router.push({name:x})}}}),O={class:`rtc-top`},k={class:`rtc-top-left`},A=[`title`],j={class:`voice-pick`},M={class:`voice-name`},N={key:0,class:`voice-menu`},P=[`onClick`],F={class:`rtc-top-right`},I=[`title`],L=[`title`],R={class:`rtc-stage`},z={key:0,class:`rtc-info`},B={key:0,class:`rtc-captions`},V={key:0,class:`cap user`},H={class:`cap ai`},U={class:`rtc-controls`},W=[`title`],G=[`title`],K=[`title`];function q(m,h,g,_,v,y){let b=c(`font-awesome-icon`);return p(),o(`div`,{class:n([`rtc`,{"is-captions":m.captionsOn,"is-live":m.running}])},[e(`header`,O,[e(`div`,k,[e(`button`,{class:`ic`,title:m.$t(`realtime.title`),onClick:h[0]||=(...e)=>m.goBack&&m.goBack(...e)},[i(b,{icon:`fa-solid fa-chevron-down`})],8,A),e(`div`,j,[e(`button`,{class:n([`voice-chip`,{on:m.voiceMenuOpen}]),onClick:h[1]||=t(e=>m.voiceMenuOpen=!m.voiceMenuOpen,[`stop`])},[e(`span`,M,r(m.voiceLabel),1),i(b,{icon:`fa-solid fa-chevron-down`,class:`voice-caret`})],2),m.voiceMenuOpen?(p(),o(`ul`,N,[(p(!0),o(s,null,f(m.voices,e=>(p(),o(`li`,{key:e,class:n({sel:e===m.voice}),onClick:t=>m.selectVoice(e)},r(m.labelOf(e)),11,P))),128))])):a(``,!0)])]),e(`div`,F,[e(`button`,{class:n([`ic`,{on:m.showInfo}]),title:m.$t(`realtime.title`),onClick:h[2]||=e=>m.showInfo=!m.showInfo},[i(b,{icon:`fa-solid fa-circle-info`})],10,I),e(`button`,{class:n([`ic`,{on:m.captionsOn}]),title:m.$t(`realtime.captions`),onClick:h[3]||=(...e)=>m.toggleCaptions&&m.toggleCaptions(...e)},[i(b,{icon:`fa-solid fa-closed-captioning`})],10,L)])]),m.voiceMenuOpen?(p(),o(`div`,{key:0,class:`voice-backdrop`,onClick:h[4]||=e=>m.voiceMenuOpen=!1})):a(``,!0),e(`main`,R,[e(`div`,{class:`orb-stage`,onClick:h[5]||=(...e)=>m.onOrbTap&&m.onOrbTap(...e)},[e(`div`,{class:`orb-halo`,style:d(m.haloStyle)},null,4),e(`div`,{class:n([`orb-breathe`,{paused:!m.running}])},[e(`div`,{class:n([`orb`,m.orbClass]),style:d({transform:`scale(${m.orbScale})`})},[...h[9]||=[e(`span`,{class:`cloud c1`},null,-1),e(`span`,{class:`cloud c2`},null,-1),e(`span`,{class:`cloud c3`},null,-1),e(`span`,{class:`sheen`},null,-1)]],6)],2)]),i(u,{name:`fade`},{default:l(()=>[m.showInfo&&!m.captionsOn?(p(),o(`p`,z,r(m.modelName),1)):a(``,!0)]),_:1}),m.captionsOn?(p(),o(`div`,B,[m.userText?(p(),o(`p`,V,r(m.userText),1)):a(``,!0),e(`p`,H,r(m.captionText),1)])):(p(),o(`p`,{key:1,class:n([`rtc-status`,{err:!!m.errorMsg}])},r(m.stageText),3))]),e(`footer`,U,[e(`button`,{class:n([`ctl`,{active:m.muted}]),title:m.muted?m.$t(`realtime.unmute`):m.$t(`realtime.mute`),onClick:h[6]||=(...e)=>m.toggleMute&&m.toggleMute(...e)},[i(b,{icon:m.muted?`fa-solid fa-microphone-slash`:`fa-solid fa-microphone`},null,8,[`icon`])],10,W),e(`button`,{class:n([`ctl`,{active:m.captionsOn}]),title:m.$t(`realtime.captions`),onClick:h[7]||=(...e)=>m.toggleCaptions&&m.toggleCaptions(...e)},[i(b,{icon:`fa-solid fa-closed-captioning`})],10,G),e(`button`,{class:`ctl end`,title:m.$t(`realtime.end`),onClick:h[8]||=(...e)=>m.endCall&&m.endCall(...e)},[i(b,{icon:`fa-solid fa-xmark`})],8,K)])],2)}var J=b(D,[[`render`,q],[`__scopeId`,`data-v-35b8d53d`]]);export{J as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,H as r,I as i,Jt as a,L as o,M as s,N as c,S as l,T as u,U as d,at as f,j as p,k as ee,mt as m,rt as h,tt as g,z as te}from"./vendor-chart-Dw-P17PN.js";import{n as ne,r as _,t as v}from"./select-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,H as r,I as i,Jt as a,L as o,M as s,N as c,S as l,T as u,U as d,at as f,j as p,k as ee,mt as m,rt as h,tt as g,z as te}from"./vendor-chart-Dw-P17PN.js";import{n as ne,r as _,t as v}from"./select-C9BBGK_W.js";import{t as y}from"./time-picker-BgAS6tqz.js";import{n as b,t as x}from"./form-C5xVtXwR.js";import{t as S}from"./tooltip-bsBfzZxe.js";import{t as C}from"./card-D-4S-l7a.js";import{r as w,t as T}from"./radio-Bj0tEwH8.js";import{t as E}from"./drawer-QVnlp-9l.js";import{t as D}from"./empty-xCRn_5sX.js";import{t as O}from"./input-number-DYt3_8iT.js";import{t as k}from"./pagination-CZQpIiuE.js";import{t as A}from"./skeleton-CoheJz5x.js";import{t as j}from"./switch-U1rSTqNM.js";import{t as M}from"./vendor-axios-Ck2ffRoh.js";import{Pi as N,Qi as P,qi as F}from"./constants-DWe-ziJf.js";import{Fi as I,Ii as L,J as R,Ji as z,Sn as B,Vi as V,Xi as H,aa as re}from"./index-0RhdvXdP.js";import{t as ie}from"./index.es-RNUZL6kj.js";var U=e=>e===``,ae=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),W=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),oe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),se=e=>{let t=oe(e);return t.charAt(0).toUpperCase()+t.slice(1)},G={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},K=Symbol(`lucide-icons`);function ce(){return d(K,{})}var le=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s,color:c,...l},{slots:u})=>{let{size:d,color:f,strokeWidth:p=2,absoluteStrokeWidth:m=!1,class:h=``}=ce(),g=ee(()=>{let e=U(n)||U(i)||n===!0||i===!0||m===!0,t=a||o||p||G[`stroke-width`];return e?Number(t)*24/Number(s??d??G.width):t});return r(`svg`,{...G,...l,width:s??d??G.width,height:s??d??G.height,stroke:c??f??G.stroke,"stroke-width":g.value,class:ae(`lucide`,h,...e?[`lucide-${W(se(e))}-icon`,`lucide-${W(e)}`]:[`lucide-icon`])},[...t.map(e=>r(...e)),...u.default?[u.default()]:[]])},q=(e,t)=>(n,{slots:i,attrs:a})=>r(le,{...a,...n,iconNode:t,name:e},i.default?{default:i.default}:void 0),ue=q(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),de=q(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),fe=q(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),pe=q(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);function J(e){let t=B();return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,...t?{"x-site-origin":t}:{}}}var Y=`${P}/aichat2/scheduled-tasks`;function me(e){let t=e?.response?.data;return t?.error===`skill_not_active`?t.detail??{kind:`skill`,slug:``,reason:`not_active`}:null}var X=new class{async listTasks(e){let{data:t}=await M.post(Y,{action:`retrieve_batch`},{headers:J(e)});return t?.items??[]}async createTask(e,t,n=!1){let{data:r}=await M.post(Y,{action:`create`,...t,...n?{force:!0}:{}},{headers:J(e)});return r}async updateTask(e,t,n,r=!1){let{data:i}=await M.post(Y,{action:`update`,id:t,...n,...r?{force:!0}:{}},{headers:J(e)});return i}async deleteTask(e,t){await M.post(Y,{action:`delete`,id:t},{headers:J(e)})}async triggerTask(e,t){let{data:n}=await M.post(Y,{action:`trigger`,id:t},{headers:J(e)});return n??{}}async listRuns(e,t){let{data:n}=await M.post(Y,{action:`retrieve_runs`,id:t},{headers:J(e)});return n?.items??[]}async listAuthorizableSkills(e){let{data:t}=await M.post(Y,{action:`retrieve_authorizable_skills`},{headers:J(e)});return t?.items??[]}async listAuthorizableCapabilities(e){let{data:t}=await M.post(Y,{action:`retrieve_authorizable_skills`},{headers:J(e)});return{skills:t?.skills??t?.items??[],mcp_servers:t?.mcp_servers??[]}}},Z=Intl.DateTimeFormat().resolvedOptions().timeZone||`Asia/Shanghai`,Q=50,he=te({name:`ScheduledTasks`,components:{FontAwesomeIcon:ie,AddIcon:de,DeleteIcon:pe,EditIcon:ue,RefreshIcon:fe,ElButton:H,ElCard:C,ElSkeleton:A,ElEmpty:D,ElSwitch:j,ElTag:z,ElTooltip:S,ElDrawer:E,ElDialog:V,ElForm:x,ElFormItem:b,ElInput:re,ElSelect:_,ElOption:v,ElOptionGroup:ne,ElRadioGroup:w,ElRadio:T,ElTimePicker:y,ElInputNumber:O,Pagination:k},data(){return{tasks:[],runs:[],loading:!1,runsLoading:!1,skillsLoading:!1,saving:!1,showCreateDialog:!1,showRunHistory:!1,selectedTask:null,editingTask:null,authorizableSkills:[],authorizableMcpServers:[],triggeringId:``,weekdays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],page:1,pageSize:6,runPage:1,runPageSize:8,form:this.emptyForm()}},computed:{token(){return this.$store.state.chat?.credential?.token},modelGroups(){let e=this.$store.state.site?.features??{};return N.filter(t=>e[t.name]?.enabled!==!1).map(e=>({...e,models:e.models.filter(e=>e.enabled!==!1)})).filter(e=>e.models.length>0)},pagedTasks(){let e=(this.page-1)*this.pageSize;return this.tasks.slice(e,e+this.pageSize)},pagedRuns(){let e=(this.runPage-1)*this.runPageSize;return this.runs.slice(e,e+this.runPageSize)},intervalMax(){return this.form.intervalUnit===`minute`?1440:this.form.intervalUnit===`hour`?720:365},schedulePreview(){try{return this.humanizeSchedule(this.buildSchedule())}catch{return``}}},async mounted(){await this.loadTasks()},methods:{emptyForm(){return{name:``,question:``,model:F,scheduleType:`daily`,intervalValue:4,intervalUnit:`hour`,hourlyMinute:0,dailyTime:`09:00`,weekday:1,cronExpr:`0 9 * * *`,authorizedSkills:[],authorizedMcpServers:[],maxTurns:Q}},deriveName(e){let t=(e||``).trim().split(`
|
|
2
2
|
`)[0].trim();return t.length>40?`${t.slice(0,40)}…`:t||`Scheduled Task`},async loadTasks(){if(this.token){this.loading=!0;try{this.tasks=await X.listTasks(this.token);let e=Math.max(1,Math.ceil(this.tasks.length/this.pageSize));this.page>e&&(this.page=e)}catch{L.error(this.$t(`chat.scheduledTasks.loadError`))}finally{this.loading=!1}}},async selectTask(e){this.selectedTask=e,this.showRunHistory=!0,this.runPage=1,this.runsLoading=!0;try{this.runs=await X.listRuns(this.token,e.id)}finally{this.runsLoading=!1}},onPageChange(e){this.page=e},onRunPageChange(e){this.runPage=e},openCreate(){this.saving||(this.editingTask=null,this.form=this.emptyForm(),this.showCreateDialog=!0)},closeTaskDialog(){this.saving||(this.showCreateDialog=!1)},openEdit(e){this.editingTask=e;let t=e.schedule,n=`cron`,r=4,i=`hour`,a=0,o=`09:00`,s=`0 9 * * *`,c=1;if(t.type===`cron`){s=t.cron;let[e,r,i,l,u]=t.cron.split(/\s+/),d=e=>/^\d+$/.test(e);i===`*`&&l===`*`&&u===`*`&&r===`*`&&d(e)?(n=`hourly`,a=Number(e)):i===`*`&&l===`*`&&u===`*`&&d(r)&&d(e)?(n=`daily`,o=`${r.padStart(2,`0`)}:${e.padStart(2,`0`)}`):i===`*`&&l===`*`&&d(u)&&d(r)&&d(e)&&(n=`weekly`,c=Number(u),o=`${r.padStart(2,`0`)}:${e.padStart(2,`0`)}`)}else if(t.type===`interval`){n=`interval`;let e=t.interval_seconds;e%86400==0?(i=`day`,r=e/86400):e%3600==0?(i=`hour`,r=e/3600):(i=`minute`,r=Math.max(1,Math.round(e/60)))}this.form={name:e.name,question:e.template.question,model:e.template.model,scheduleType:n,intervalValue:r,intervalUnit:i,hourlyMinute:a,dailyTime:o,weekday:c,cronExpr:s,authorizedSkills:(e.unattended_policy?.mode===`allow_selected`||e.unattended_policy?.mode===`allow_selected_skills`)&&e.unattended_policy.allowed_skills||[],authorizedMcpServers:(e.unattended_policy?.mode===`allow_selected`||e.unattended_policy?.mode===`allow_selected_skills`)&&e.unattended_policy.allowed_mcp_servers||[],maxTurns:e.template.max_turns??Q},this.showCreateDialog=!0,this.loadAuthorizableSkills()},buildSchedule(){let{scheduleType:e,intervalValue:t,intervalUnit:n,hourlyMinute:r,dailyTime:i,weekday:a,cronExpr:o}=this.form;if(e===`interval`)return{type:`interval`,interval_seconds:Math.max(60,Math.round(t)*(n===`day`?86400:n===`hour`?3600:60)),tz:Z};if(e===`hourly`)return{type:`cron`,cron:`${Math.min(59,Math.max(0,Math.round(r)))} * * * *`,tz:Z};if(e===`daily`){let[e,t]=i.split(`:`);return{type:`cron`,cron:`${t} ${e} * * *`,tz:Z}}if(e===`weekly`){let[e,t]=i.split(`:`);return{type:`cron`,cron:`${t} ${e} * * ${a}`,tz:Z}}return{type:`cron`,cron:o,tz:Z}},async saveTask(){if(!this.form.question.trim()){L.warning(this.$t(`chat.scheduledTasks.form.required`));return}if(this.form.authorizedSkills.length>0||this.form.authorizedMcpServers.length>0)try{await I.confirm(this.authorizationConfirmText(),this.$t(`chat.scheduledTasks.form.skillsConfirmTitle`),{type:`warning`,confirmButtonText:this.$t(`common.button.confirm`),cancelButtonText:this.$t(`common.button.cancel`)})}catch{return}let e=[...this.form.authorizedSkills],t=[...this.form.authorizedMcpServers],n={name:this.form.name.trim()||this.deriveName(this.form.question),schedule:this.buildSchedule(),template:{model:this.form.model,question:this.form.question,skills:e,mcp_servers:t,max_turns:this.form.maxTurns},unattended_policy:e.length||t.length?{mode:`allow_selected`,allowed_skills:e,allowed_mcp_servers:t}:{mode:`deny_all`,allowed_skills:[],allowed_mcp_servers:[]}};await this.submitTask(n,!1)},async submitTask(e,t){this.saving=!0;let n=null;try{if(this.editingTask){let n=this.editingTask.id,r=await X.updateTask(this.token,n,e,t),i=this.tasks.findIndex(e=>e.id===n);i!==-1&&(this.tasks[i]=r)}else{let n=await X.createTask(this.token,e,t);this.tasks=[n,...this.tasks],this.page=1}L.success(this.$t(`chat.scheduledTasks.create`)+` OK`),this.showCreateDialog=!1,this.editingTask=null,this.form=this.emptyForm()}catch(e){n=t?null:me(e),n||L.error(this.$t(`chat.scheduledTasks.loadError`))}finally{this.saving=!1}n&&await this.confirmForceSkill(n)&&await this.submitTask(e,!0)},async confirmForceSkill(e){let t=this.capabilityLabel(e.slug);try{return await I.confirm(this.$t(`chat.scheduledTasks.form.skillNotActiveMessage`,{name:t}),this.$t(`chat.scheduledTasks.form.skillNotActiveTitle`),{type:`warning`,confirmButtonText:this.$t(`chat.scheduledTasks.form.skillNotActiveForce`),cancelButtonText:this.$t(`common.button.cancel`)}),!0}catch{return!1}},capabilityLabel(e){let t=this.authorizableSkills.find(t=>t.slug===e);if(t)return t.name||t.slug;let n=this.authorizableMcpServers.find(t=>t.slug===e);return n?n.name||n.slug:e},async loadAuthorizableSkills(e=!1){if(!(!this.token||this.skillsLoading||!e&&(this.authorizableSkills.length||this.authorizableMcpServers.length))){this.skillsLoading=!0;try{let e=await X.listAuthorizableCapabilities(this.token);this.authorizableSkills=e.skills,this.authorizableMcpServers=e.mcp_servers}catch{L.error(this.$t(`chat.scheduledTasks.loadError`))}finally{this.skillsLoading=!1}}},onSkillSelectVisible(e){e&&this.loadAuthorizableSkills(!0)},skillLabel(e){return e.name||e.slug},mcpServerLabel(e){return e.name||e.slug},authorizationConfirmText(){let e=new Set(this.form.authorizedSkills),t=new Set(this.form.authorizedMcpServers),n=this.authorizableSkills.filter(t=>e.has(t.slug)).map(e=>this.skillLabel(e)),r=this.authorizableMcpServers.filter(e=>t.has(e.slug)).map(e=>this.mcpServerLabel(e));return this.$t(`chat.scheduledTasks.form.skillsConfirm`,{count:e.size+t.size,skills:[...n,...r].length?[...n,...r].join(`, `):[...Array.from(e),...Array.from(t)].join(`, `)})},async toggleState(e,t){let n=this.tasks.findIndex(t=>t.id===e.id),r=t?`enabled`:`disabled`;n!==-1&&(this.tasks[n]={...e,state:r});try{let t=await X.updateTask(this.token,e.id,{state:r});n!==-1&&(this.tasks[n]=t)}catch{n!==-1&&(this.tasks[n]={...e,state:e.state}),L.error(this.$t(`chat.scheduledTasks.loadError`))}},async triggerNow(e){if(!this.triggeringId){this.triggeringId=e.id;try{await X.triggerTask(this.token,e.id),L.success(this.$t(`chat.scheduledTasks.triggerSuccess`)),this.showRunHistory&&this.selectedTask?.id===e.id&&(this.runs=await X.listRuns(this.token,e.id),this.runPage=1)}catch{L.error(this.$t(`chat.scheduledTasks.triggerError`))}finally{this.triggeringId=``}}},async confirmDelete(e){await I.confirm(this.$t(`chat.scheduledTasks.deleteConfirm`,{name:e.name}),{type:`warning`});try{await X.deleteTask(this.token,e.id),this.tasks=this.tasks.filter(t=>t.id!==e.id);let t=Math.max(1,Math.ceil(this.tasks.length/this.pageSize));this.page>t&&(this.page=t)}catch{L.error(this.$t(`chat.scheduledTasks.loadError`))}},openRun(e){if(!e.conversation_id)return;let t=this.modelGroups.map(e=>e.name),n=e.conversation_model_group,r=this.$store.state.chat?.modelGroup?.name||`chatgpt`,i=n&&(t.length===0||t.includes(n))?n:r;this.$router.push(`/${i}/conversations/${e.conversation_id}`)},stateTagType(e){return e===`enabled`?`success`:e===`error`?`danger`:`info`},runTagType(e){return e===`success`?`success`:e===`failed`?`danger`:`warning`},runErrorText(e){if(e.error_message)return e.error_message;let t=e.error_code;return t?this.errorCodeText(t):``},errorCodeText(e){let t=`chat.scheduledTasks.run.reason.${e}`;return this.$te(t)?this.$t(t):e.replace(/_/g,` `)},humanizeSchedule(e){let t=(e,t)=>this.$t(`chat.scheduledTasks.humanize.${e}`,t??{});if(e.type===`interval`){let n=e.interval_seconds;return n%86400==0?t(`everyNDays`,{n:n/86400}):n%3600==0?t(`everyNHours`,{n:n/3600}):t(`everyNMinutes`,{n:Math.round(n/60)})}if(e.type===`cron`){let[n,r,i,a,o]=e.cron.split(/\s+/),s=e=>/^\d+$/.test(e);if(i===`*`&&a===`*`&&o===`*`&&r===`*`&&s(n))return t(`hourlyAtMinute`,{n:Number(n)});let c=s(r)&&s(n)?`${r.padStart(2,`0`)}:${n.padStart(2,`0`)}`:``;return c&&i===`*`&&a===`*`&&o===`*`?t(`dailyAt`,{time:c}):c&&i===`*`&&a===`*`&&s(o)?t(`weeklyAt`,{weekday:this.weekdays[Number(o)]??o,time:c}):t(`cronRaw`,{cron:e.cron})}return t(`once`,{time:new Date(e.at*1e3).toLocaleString()})},scheduleLabel(e){return this.humanizeSchedule(e)},formatTime(e){return new Date(e*1e3).toLocaleString()}}}),ge={class:`scheduled-tasks`},_e={class:`inner`},ve={class:`header`},ye={class:`title`},be={class:`task-list`},xe={class:`task-top`},Se={class:`task-name`},Ce={class:`task-meta`},we={class:`meta-chip`},Te={class:`meta-chip`},Ee={class:`task-prompt`},De={key:0,class:`task-last-output`},Oe={class:`task-footer`},ke={class:`run-count`},Ae={key:0,class:`error-hint`},je={class:`open-hint`},Me={key:0,class:`pager`},Ne={key:0,class:`run-context`},Pe={class:`run-context-meta`},Fe={class:`run-context-prompt`},Ie={key:3,class:`run-list`},Le=[`tabindex`,`role`,`onClick`,`onKeydown`],Re={class:`run-body`},ze={class:`run-line`},Be={class:`run-title`},Ve={key:0,class:`run-preview`},He={class:`run-sub`},Ue={class:`run-time`},We=[`title`],Ge={class:`run-action`},Ke={key:1,class:`run-noconv`},qe={key:4,class:`pager run-pager`},Je={class:`hint`},$={key:0,class:`schedule-preview`},Ye={class:`hint`},Xe={class:`hint`},Ze={class:`jitter-hint`},Qe={class:`hint`},$e={class:`skill-option`},et={class:`skill-option-name`},tt={key:0,class:`skill-option-missing`},nt={class:`hint`},rt={class:`hint`},it={class:`hint`};function at(r,d,ee,te,ne,_){let v=f(`add-icon`),y=f(`el-button`),b=f(`el-skeleton`),x=f(`el-empty`),S=f(`el-switch`),C=f(`font-awesome-icon`),w=f(`el-tooltip`),T=f(`edit-icon`),E=f(`delete-icon`),D=f(`el-tag`),O=f(`refresh-icon`),k=f(`el-card`),A=f(`pagination`),j=f(`el-drawer`),M=f(`el-input`),N=f(`el-form-item`),P=f(`el-option`),F=f(`el-option-group`),I=f(`el-select`),L=f(`el-radio`),R=f(`el-radio-group`),z=f(`el-input-number`),B=f(`el-time-picker`),V=f(`el-form`),H=f(`el-dialog`);return g(),c(`div`,ge,[e(`div`,_e,[e(`div`,ve,[e(`h2`,ye,a(r.$t(`chat.scheduledTasks.title`)),1),o(y,{type:`primary`,round:``,disabled:r.saving,onClick:r.openCreate},{default:m(()=>[o(v,{size:16,class:`icon`,"aria-hidden":`true`}),i(` `+a(r.$t(`chat.scheduledTasks.create`)),1)]),_:1},8,[`disabled`,`onClick`])]),r.loading?(g(),p(b,{key:0,rows:4,animated:``,class:`loading-block`})):r.tasks.length?(g(),c(u,{key:2},[e(`div`,be,[(g(!0),c(u,null,h(r.pagedTasks,n=>(g(),p(k,{key:n.id,class:`task-card`,shadow:`hover`,onClick:e=>r.selectTask(n)},{default:m(()=>[e(`div`,xe,[e(`div`,Se,a(n.name),1),e(`div`,{class:`task-actions`,onClick:d[0]||=t(()=>{},[`stop`])},[o(S,{"model-value":n.state===`enabled`,onChange:e=>r.toggleState(n,e===!0)},null,8,[`model-value`,`onChange`]),o(w,{content:r.$t(`chat.scheduledTasks.triggerNow`),placement:`top`},{default:m(()=>[o(y,{text:``,class:`icon-action`,loading:r.triggeringId===n.id,onClick:e=>r.triggerNow(n)},{default:m(()=>[r.triggeringId===n.id?s(``,!0):(g(),p(C,{key:0,icon:`fa-solid fa-play`}))]),_:2},1032,[`loading`,`onClick`])]),_:2},1032,[`content`]),o(w,{content:r.$t(`common.button.edit`),placement:`top`},{default:m(()=>[o(y,{text:``,class:`icon-action`,"aria-label":r.$t(`common.button.edit`),onClick:e=>r.openEdit(n)},{default:m(()=>[o(T,{size:16,"aria-hidden":`true`})]),_:1},8,[`aria-label`,`onClick`])]),_:2},1032,[`content`]),o(w,{content:r.$t(`common.button.delete`),placement:`top`},{default:m(()=>[o(y,{text:``,type:`danger`,class:`icon-action`,"aria-label":r.$t(`common.button.delete`),onClick:e=>r.confirmDelete(n)},{default:m(()=>[o(E,{size:16,"aria-hidden":`true`})]),_:1},8,[`aria-label`,`onClick`])]),_:2},1032,[`content`])])]),e(`div`,Ce,[o(D,{size:`small`,type:r.stateTagType(n.state),effect:`dark`,round:``},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.state.${n.state}`)),1)]),_:2},1032,[`type`]),e(`span`,we,[o(C,{icon:`fa-solid fa-clock`,class:`meta-icon`}),i(` `+a(r.scheduleLabel(n.schedule)),1)]),e(`span`,Te,[o(C,{icon:`fa-solid fa-brain`,class:`meta-icon`}),i(` `+a(n.template.model),1)])]),e(`div`,Ee,a(n.template.question),1),n.last_output_snippet?(g(),c(`div`,De,a(n.last_output_snippet),1)):s(``,!0),e(`div`,Oe,[e(`span`,ke,[o(O,{size:16,class:`footer-icon`,"aria-hidden":`true`}),i(` `+a(r.$t(`chat.scheduledTasks.runCount`,{count:n.run_count})),1)]),n.last_error?(g(),c(`span`,Ae,a(r.errorCodeText(n.last_error)),1)):s(``,!0),e(`span`,je,[i(a(r.$t(`chat.scheduledTasks.viewRuns`))+` `,1),o(C,{icon:`fa-solid fa-chevron-right`})])])]),_:2},1032,[`onClick`]))),128))]),r.tasks.length>r.pageSize?(g(),c(`div`,Me,[o(A,{"current-page":r.page,"page-size":r.pageSize,total:r.tasks.length,onChange:r.onPageChange},null,8,[`current-page`,`page-size`,`total`,`onChange`])])):s(``,!0)],64)):(g(),p(x,{key:1,description:r.$t(`chat.scheduledTasks.empty`),class:`empty`},null,8,[`description`]))]),o(j,{modelValue:r.showRunHistory,"onUpdate:modelValue":d[1]||=e=>r.showRunHistory=e,title:r.selectedTask?.name,direction:`rtl`,size:`min(560px, 92vw)`,class:`run-history-drawer`},{default:m(()=>[r.selectedTask?(g(),c(`div`,Ne,[e(`div`,Pe,[e(`span`,null,a(r.scheduleLabel(r.selectedTask.schedule)),1),e(`span`,null,a(r.selectedTask.template.model),1),e(`span`,null,a(r.$t(`chat.scheduledTasks.runCount`,{count:r.selectedTask.run_count})),1)]),e(`div`,Fe,a(r.selectedTask.template.question),1)])):s(``,!0),r.runsLoading?(g(),p(b,{key:1,rows:3,animated:``})):r.runs.length?(g(),c(`div`,Ie,[(g(!0),c(u,null,h(r.pagedRuns,u=>(g(),c(`div`,{key:u.id,class:n([`run-item`,{clickable:!!u.conversation_id}]),tabindex:u.conversation_id?0:-1,role:u.conversation_id?`button`:void 0,onClick:e=>r.openRun(u),onKeydown:[l(e=>r.openRun(u),[`enter`]),l(t(e=>r.openRun(u),[`prevent`]),[`space`])]},[e(`div`,Re,[e(`div`,ze,[e(`span`,Be,a(u.conversation_title||r.formatTime(u.scheduled_at)),1),o(D,{size:`small`,type:r.runTagType(u.status),effect:`dark`,round:``,class:`run-tag`},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.run.${u.status}`)),1)]),_:2},1032,[`type`])]),u.conversation_preview?(g(),c(`div`,Ve,a(u.conversation_preview),1)):s(``,!0),e(`div`,He,[e(`span`,Ue,a(r.formatTime(u.scheduled_at)),1),u.error_code||u.error_message?(g(),c(`span`,{key:0,class:`run-error`,title:r.runErrorText(u)},a(r.runErrorText(u)),9,We)):s(``,!0)])]),e(`div`,Ge,[u.conversation_id?(g(),p(C,{key:0,icon:`fa-solid fa-chevron-right`,class:`run-arrow`})):(g(),c(`span`,Ke,a(r.$t(`chat.scheduledTasks.noConversation`)),1))])],42,Le))),128))])):(g(),p(x,{key:2,description:r.$t(`chat.scheduledTasks.noRuns`)},null,8,[`description`])),!r.runsLoading&&r.runs.length>r.runPageSize?(g(),c(`div`,qe,[o(A,{"current-page":r.runPage,"page-size":r.runPageSize,total:r.runs.length,onChange:r.onRunPageChange},null,8,[`current-page`,`page-size`,`total`,`onChange`])])):s(``,!0)]),_:1},8,[`modelValue`,`title`]),o(H,{modelValue:r.showCreateDialog,"onUpdate:modelValue":d[16]||=e=>r.showCreateDialog=e,title:r.editingTask?r.$t(`chat.scheduledTasks.edit`):r.$t(`chat.scheduledTasks.create`),width:`540px`,"close-on-click-modal":!1,"close-on-press-escape":!r.saving,"show-close":!r.saving,class:`scheduled-task-dialog`},{footer:m(()=>[o(y,{disabled:r.saving,onClick:r.closeTaskDialog},{default:m(()=>[i(a(r.$t(`common.button.cancel`)),1)]),_:1},8,[`disabled`,`onClick`]),o(y,{type:`primary`,loading:r.saving,onClick:r.saveTask},{default:m(()=>[i(a(r.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`,`onClick`])]),default:m(()=>[o(V,{model:r.form,"label-width":`92px`},{default:m(()=>[o(N,{label:r.$t(`chat.scheduledTasks.form.name`)},{default:m(()=>[o(M,{modelValue:r.form.name,"onUpdate:modelValue":d[2]||=e=>r.form.name=e,placeholder:r.$t(`chat.scheduledTasks.form.namePlaceholder`),maxlength:`80`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`label`]),o(N,{label:r.$t(`chat.scheduledTasks.form.prompt`),required:``},{default:m(()=>[o(M,{modelValue:r.form.question,"onUpdate:modelValue":d[3]||=e=>r.form.question=e,type:`textarea`,rows:6,placeholder:r.$t(`chat.scheduledTasks.form.promptPlaceholder`)},null,8,[`modelValue`,`placeholder`]),e(`div`,Je,a(r.$t(`chat.scheduledTasks.form.promptHint`)),1)]),_:1},8,[`label`]),o(N,{label:r.$t(`chat.scheduledTasks.form.model`)},{default:m(()=>[o(I,{modelValue:r.form.model,"onUpdate:modelValue":d[4]||=e=>r.form.model=e,style:{width:`100%`},filterable:``},{default:m(()=>[(g(!0),c(u,null,h(r.modelGroups,e=>(g(),p(F,{key:e.name,label:e.getDisplayName()},{default:m(()=>[(g(!0),c(u,null,h(e.models,e=>(g(),p(P,{key:e.name,label:e.getDisplayName(),value:e.name},null,8,[`label`,`value`]))),128))]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),o(N,{label:r.$t(`chat.scheduledTasks.form.schedule`)},{default:m(()=>[o(R,{modelValue:r.form.scheduleType,"onUpdate:modelValue":d[5]||=e=>r.form.scheduleType=e},{default:m(()=>[o(L,{value:`interval`},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.scheduleType.interval`)),1)]),_:1}),o(L,{value:`hourly`},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.scheduleType.hourly`)),1)]),_:1}),o(L,{value:`daily`},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.scheduleType.daily`)),1)]),_:1}),o(L,{value:`weekly`},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.scheduleType.weekly`)),1)]),_:1}),o(L,{value:`cron`},{default:m(()=>[i(a(r.$t(`chat.scheduledTasks.scheduleType.cron`)),1)]),_:1})]),_:1},8,[`modelValue`]),r.schedulePreview?(g(),c(`div`,$,[o(C,{icon:`fa-solid fa-clock`,class:`preview-icon`}),i(` `+a(r.$t(`chat.scheduledTasks.form.schedulePreview`,{text:r.schedulePreview})),1)])):s(``,!0)]),_:1},8,[`label`]),r.form.scheduleType===`interval`?(g(),p(N,{key:0,label:r.$t(`chat.scheduledTasks.scheduleType.interval`)},{default:m(()=>[o(z,{modelValue:r.form.intervalValue,"onUpdate:modelValue":d[6]||=e=>r.form.intervalValue=e,min:1,max:r.intervalMax,step:1,"controls-position":`right`},null,8,[`modelValue`,`max`]),o(I,{modelValue:r.form.intervalUnit,"onUpdate:modelValue":d[7]||=e=>r.form.intervalUnit=e,style:{width:`110px`,"margin-left":`8px`}},{default:m(()=>[o(P,{label:r.$t(`chat.scheduledTasks.form.intervalUnit.minute`),value:`minute`},null,8,[`label`]),o(P,{label:r.$t(`chat.scheduledTasks.form.intervalUnit.hour`),value:`hour`},null,8,[`label`]),o(P,{label:r.$t(`chat.scheduledTasks.form.intervalUnit.day`),value:`day`},null,8,[`label`])]),_:1},8,[`modelValue`]),e(`div`,Ye,a(r.$t(`chat.scheduledTasks.form.intervalHint`)),1)]),_:1},8,[`label`])):s(``,!0),r.form.scheduleType===`hourly`?(g(),p(N,{key:1,label:r.$t(`chat.scheduledTasks.form.hourlyMinute`)},{default:m(()=>[o(z,{modelValue:r.form.hourlyMinute,"onUpdate:modelValue":d[8]||=e=>r.form.hourlyMinute=e,min:0,max:59,step:1,"controls-position":`right`},null,8,[`modelValue`]),e(`div`,Xe,a(r.$t(`chat.scheduledTasks.form.hourlyMinuteHint`)),1)]),_:1},8,[`label`])):s(``,!0),r.form.scheduleType===`daily`?(g(),p(N,{key:2,label:r.$t(`chat.scheduledTasks.form.time`)},{default:m(()=>[o(B,{modelValue:r.form.dailyTime,"onUpdate:modelValue":d[9]||=e=>r.form.dailyTime=e,format:`HH:mm`,"value-format":`HH:mm`},null,8,[`modelValue`]),e(`span`,Ze,a(r.$t(`chat.scheduledTasks.jitterHint`)),1)]),_:1},8,[`label`])):s(``,!0),r.form.scheduleType===`weekly`?(g(),p(N,{key:3,label:r.$t(`chat.scheduledTasks.form.weekday`)},{default:m(()=>[o(I,{modelValue:r.form.weekday,"onUpdate:modelValue":d[10]||=e=>r.form.weekday=e,style:{width:`120px`}},{default:m(()=>[(g(!0),c(u,null,h(r.weekdays,(e,t)=>(g(),p(P,{key:t,label:e,value:t},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),o(B,{modelValue:r.form.dailyTime,"onUpdate:modelValue":d[11]||=e=>r.form.dailyTime=e,format:`HH:mm`,"value-format":`HH:mm`,style:{"margin-left":`8px`}},null,8,[`modelValue`])]),_:1},8,[`label`])):s(``,!0),r.form.scheduleType===`cron`?(g(),p(N,{key:4,label:r.$t(`chat.scheduledTasks.form.cron`)},{default:m(()=>[o(M,{modelValue:r.form.cronExpr,"onUpdate:modelValue":d[12]||=e=>r.form.cronExpr=e,placeholder:`0 9 * * *`},null,8,[`modelValue`]),e(`div`,Qe,a(r.$t(`chat.scheduledTasks.form.cronHint`)),1)]),_:1},8,[`label`])):s(``,!0),o(N,{label:r.$t(`chat.scheduledTasks.form.skills`)},{default:m(()=>[o(I,{modelValue:r.form.authorizedSkills,"onUpdate:modelValue":d[13]||=e=>r.form.authorizedSkills=e,style:{width:`100%`},multiple:``,filterable:``,"collapse-tags":``,"collapse-tags-tooltip":``,loading:r.skillsLoading,placeholder:r.$t(`chat.scheduledTasks.form.skillsPlaceholder`),onVisibleChange:r.onSkillSelectVisible},{default:m(()=>[(g(!0),c(u,null,h(r.authorizableSkills,t=>(g(),p(P,{key:t.slug,label:r.skillLabel(t),value:t.slug,disabled:!t.connected},{default:m(()=>[e(`div`,$e,[e(`span`,et,a(r.skillLabel(t)),1),t.connected?s(``,!0):(g(),c(`span`,tt,a(r.$t(`chat.scheduledTasks.form.skillMissing`)),1))])]),_:2},1032,[`label`,`value`,`disabled`]))),128))]),_:1},8,[`modelValue`,`loading`,`placeholder`,`onVisibleChange`]),e(`div`,nt,a(r.$t(`chat.scheduledTasks.form.skillsHint`)),1)]),_:1},8,[`label`]),o(N,{label:r.$t(`chat.scheduledTasks.form.mcpServers`)},{default:m(()=>[o(I,{modelValue:r.form.authorizedMcpServers,"onUpdate:modelValue":d[14]||=e=>r.form.authorizedMcpServers=e,style:{width:`100%`},multiple:``,filterable:``,"collapse-tags":``,"collapse-tags-tooltip":``,loading:r.skillsLoading,placeholder:r.$t(`chat.scheduledTasks.form.mcpServersPlaceholder`),onVisibleChange:r.onSkillSelectVisible},{default:m(()=>[(g(!0),c(u,null,h(r.authorizableMcpServers,e=>(g(),p(P,{key:e.slug,label:r.mcpServerLabel(e),value:e.slug},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`loading`,`placeholder`,`onVisibleChange`]),e(`div`,rt,a(r.$t(`chat.scheduledTasks.form.mcpServersHint`)),1)]),_:1},8,[`label`]),o(N,{label:r.$t(`chat.scheduledTasks.form.maxTurns`)},{default:m(()=>[o(z,{modelValue:r.form.maxTurns,"onUpdate:modelValue":d[15]||=e=>r.form.maxTurns=e,min:1,max:50,step:1,"controls-position":`right`},null,8,[`modelValue`]),e(`div`,it,a(r.$t(`chat.scheduledTasks.form.maxTurnsHint`)),1)]),_:1},8,[`label`])]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`,`close-on-press-escape`,`show-close`])])}var ot=R(he,[[`render`,at],[`__scopeId`,`data-v-91f8db27`]]);export{ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,j as u,mt as d,rt as f,tt as p,z as m}from"./vendor-chart-Dw-P17PN.js";import{b as h,nt as g}from"./use-deprecated-B-uvyrTL.js";import{J as _,Mi as v,Pn as y,Vi as b,Xi as x,bi as S,ct as C,ki as w,mt as T}from"./index-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,j as u,mt as d,rt as f,tt as p,z as m}from"./vendor-chart-Dw-P17PN.js";import{b as h,nt as g}from"./use-deprecated-B-uvyrTL.js";import{J as _,Mi as v,Pn as y,Vi as b,Xi as x,bi as S,ct as C,ki as w,mt as T}from"./index-0RhdvXdP.js";import{t as E}from"./index.es-RNUZL6kj.js";import{t as D}from"./CopyToClipboard-SOk0OfUA.js";var O=m({name:`ApplicationInfo`,components:{FontAwesomeIcon:E,ElButton:x,Check:h,ElIcon:g,CopyToClipboard:D},props:{application:{type:Object,required:!0},showType:{type:Boolean,default:!1},showId:{type:Boolean,default:!1}},emits:[`buy`,`usage`],computed:{showPayment(){return y(this.$store.getters.site)?!1:!w()||this.application?.scope===`Global`?!0:(this.application?.packages||[]).some(e=>e?.metadata?.apple_product_id)},remainingAmountText(){let e=Number(this.application?.remaining_amount??0);return!Number.isFinite(e)||e<0?`0.00`:e.toFixed(2)}}}),k={class:`flex flex-col min-w-0`},A={key:0,class:`app-id-row`},j={class:`icon !mb-0 flex-shrink-0`},M={class:`app-id-line`},N={class:`app-id-label`},P={class:`app-id-value`},F={key:1,class:`icon`},I={class:`text-left`},L={class:`description`},ee={key:0},R={key:1},z={class:`value`},B={class:`description2`},V={key:0},H={key:1},U={class:`actions`};function W(n,c,f,m,h,g){let _=l(`check`),v=l(`el-icon`),y=l(`font-awesome-icon`),b=l(`copy-to-clipboard`),x=l(`el-tag`),S=l(`el-button`);return p(),s(`div`,null,[e(`div`,k,[a(v,{class:`check`},{default:d(()=>[a(_)]),_:1}),n.showId?(p(),s(`div`,A,[e(`div`,j,[a(y,{icon:`fa-solid fa-wallet`})]),e(`div`,M,[e(`span`,N,i(n.$t(`application.field.id`))+`:`,1),e(`span`,P,i(n.application.id),1),n.application.id?(p(),u(b,{key:0,content:n.application.id,class:`copy-small`},null,8,[`content`])):o(``,!0)])])):(p(),s(`div`,F,[a(y,{icon:`fa-solid fa-wallet`})])),e(`div`,I,[e(`p`,L,[n.application.service?(p(),s(`span`,R,i(n.$t(`application.title.applicationBalance`,{service:n.application.service?.title})),1)):(p(),s(`span`,ee,i(n.$t(`application.title.globalBalance`)),1)),n.application.role===`grantee`?(p(),u(x,{key:2,class:`shared-badge`,size:`small`,type:`warning`,effect:`dark`,round:``},{default:d(()=>[r(i(n.$t(`application.badge.shared`)),1)]),_:1})):o(``,!0)]),e(`p`,z,i(n.remainingAmountText)+` `+i(n.$t(`service.unit.`+(n.application?.service?.unit||`credit`)+`s`)),1),e(`p`,B,[n.application.type===`Period`?(p(),s(`span`,V,i(n.$t(`application.field.expiredAt`))+`: `+i(n.$dayjs.format(n.application.expired_at)),1)):(p(),s(`span`,H,i(n.$t(`application.message.neverExpire`)),1))])])]),e(`div`,U,[a(S,{size:`small`,round:``,onClick:c[0]||=t(e=>n.$emit(`usage`,n.application),[`stop`])},{default:d(()=>[a(y,{icon:`fa-solid fa-chart-line`,class:`mr-1 text-[11px]`}),r(` `+i(n.$t(`application.button.usage`)),1)]),_:1}),n.showPayment?(p(),u(S,{key:0,type:`primary`,round:``,size:`small`,onClick:c[1]||=t(e=>n.$emit(`buy`,n.application),[`stop`])},{default:d(()=>[a(y,{icon:`fa-solid fa-coins`,class:`mr-1 text-[11px]`}),r(` `+i(n.$t(`application.button.buyMore`)),1)]),_:1})):o(``,!0)])])}var G=m({name:`ApplicationStatus`,components:{ElDialog:b,FontAwesomeIcon:E,ApplicationInfo:_(O,[[`render`,W],[`__scopeId`,`data-v-0bb158b3`]])},props:{application:{type:Object,required:!0},applications:{type:Array,default:void 0},service:{type:Object,required:!0}},emits:[`select`],data(){return{visible:!1,applicationType:S}},computed:{authenticated(){return!!this.$store.state.token.access},user(){return this.$store.state.user},balanceAmount(){return Number(this.application?.remaining_amount??0)},balanceUnit(){let e=`service.unit.${this.application?.service?.unit||`credit`}`+(this.balanceAmount===1?``:`s`);return this.$t(e)},balanceText(){let e=this.balanceAmount;return Number.isFinite(e)?e>=1e3?Math.round(e).toLocaleString():e>=100?e.toFixed(1):e.toFixed(2):`0`},balanceTitle(){return`${this.balanceText} ${this.balanceUnit}`}},methods:{onGoUsage(e){let t={name:T,query:{application_id:e.id}};if(v()){this.visible=!1,this.$router.push(t);return}window.open(this.$router.resolve(t).href,`_blank`)},onBuyMore(e){let t={name:C,params:{id:e.id}};if(v()){this.visible=!1,this.$router.push(t);return}window.open(this.$router.resolve(t).href,`_blank`)},onSelectApplication(e){this.$emit(`select`,e)}}}),K={class:`status`},q={key:0},J={class:`text-center mb-4`},Y={class:`flex flex-col gap-4 mb-6 overflow-y-auto`},X=[`title`],Z={class:`entry-amount`},Q={class:`entry-unit`};function $(t,r,m,h,g,_){let v=l(`application-info`),y=l(`el-dialog`),b=l(`font-awesome-icon`);return p(),s(`div`,K,[a(y,{modelValue:t.visible,"onUpdate:modelValue":r[0]||=e=>t.visible=e,class:`mt-12`,width:`450px`},{default:d(()=>[t.application?(p(),s(`div`,q,[e(`p`,J,i(t.$t(`application.message.applicationSelection`)),1),e(`div`,Y,[(p(!0),s(c,null,f(t.applications,(e,r)=>(p(),u(v,{key:r,class:n({item:!0,active:t.application?.id===e.id}),application:e,"show-id":``,onClick:n=>t.onSelectApplication(e),onUsage:n=>t.onGoUsage(e),onBuy:n=>t.onBuyMore(e)},null,8,[`class`,`application`,`onClick`,`onUsage`,`onBuy`]))),128))])])):o(``,!0)]),_:1},8,[`modelValue`]),e(`button`,{type:`button`,class:`entry`,title:t.balanceTitle,onClick:r[1]||=e=>t.visible=!0},[a(b,{icon:`fa-solid fa-wallet`,class:`entry-icon`}),e(`span`,Z,i(t.balanceText),1),e(`span`,Q,i(t.balanceUnit),1)],8,X)])}var te=_(G,[[`render`,$],[`__scopeId`,`data-v-81732bd2`]]);export{te as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./card-D-4S-l7a.js";import{n as h,t as g}from"./row-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{t as m}from"./card-D-4S-l7a.js";import{n as h,t as g}from"./row-B6TzCjFU.js";import{t as _}from"./empty-xCRn_5sX.js";import{t as v}from"./skeleton-CoheJz5x.js";import{An as y,Ii as b,J as x,Ji as S,Lr as C,On as w,Pn as T,Xi as E,bi as D,ct as O,dt as k,ki as A,kr as j,lt as M,mr as N,pn as P,xi as F,yr as I}from"./index-0RhdvXdP.js";import{t as L}from"./index.es-RNUZL6kj.js";var R=p({name:`ConsoleSubscriptionBuy`,components:{ElSkeleton:v,ElRow:g,ElTag:S,ElCol:h,ElCard:m,ElEmpty:_,FontAwesomeIcon:L,ElButton:E},data(){return{application:void 0,application2:void 0,type:D.PERIOD,services:[],loading:!1,loadFailed:!1,creating:!1,subscription:void 0}},computed:{site(){return this.$store.getters.site},applicationId(){return this.$route.params?.id?.toString()},showPayment(){return!A()},effectiveMarkupRatio(){return y(this.application2,this.site)},pricingAvailable(){return this.effectiveMarkupRatio!==void 0},subscriptions(){let e=[{name:`WEEK`,label:this.$t(`console.subscription.weekly`),description:this.$t(`console.subscription.weekly.description`),duration:10080*60},{name:`MONTH`,label:this.$t(`console.subscription.monthly`),description:this.$t(`console.subscription.monthly.description`),duration:720*60*60},{name:`YEAR`,tag:this.$t(`console.button.suggested`),label:this.$t(`console.subscription.yearly`),description:this.$t(`console.subscription.yearly.description`),duration:365*24*60*60}];for(let t of e){console.log(`item`,t);let e=this.getPackages(t.duration);console.log(`pkgs`,e),t.available=e.length>0&&this.effectiveMarkupRatio!==void 0,t.available&&(t.price=w(e.reduce((e,t)=>e+t.price,0),this.effectiveMarkupRatio));for(let n of e)t.benefits||=[],t.benefits.push({enabled:!0,content:`${n?.service?.title} - ${n.amount} `+this.$t(`service.unit.`+n?.service?.unit+`s`)});t.benefits?.push({enabled:t.name!==`WEEK`,content:this.$t(`console.message.benefit1`)}),t.benefits?.push({enabled:t.name!==`WEEK`,content:this.$t(`console.message.benefit2`)})}return e},service(){return this.application?.service},serviceIds(){return!this.application||!this.application.service?[]:[this.application.service.id]}},async mounted(){if(T(this.$store.getters.site)){this.$router.replace({name:M});return}await this.onInitialize()},methods:{async onInitialize(){this.loading=!0,this.loadFailed=!1;try{await this.onFetchApplication(),await this.onFetchApplication2(),await this.onCreateApplications(),this.subscription=this.subscriptions.find(e=>e.available)}catch{this.loadFailed=!0}finally{this.loading=!1}},getPriceString:P,onBuyExtra(){this.$router.push({name:O,params:{id:this.applicationId}})},getPackages(e){let t=[];if(!this.service)return[];let n=[this.service].sort((e,t)=>this.serviceIds.indexOf(e.id)-this.serviceIds.indexOf(t.id));for(let r of n){let n=r.packages?.find(t=>t.type===F.PERIOD&&t.duration===e);n&&t.push({...n,service:r})}return t},async onCreateApplications(){let e=[];if(this.application2||e.push(this.application?.service?.id),e.length>0){for(let t of e)await j.create({service_id:t,type:D.PERIOD});await this.onFetchApplication2()}},onChangeType(){console.log(`onChangeType`,this.type),this.$router.push({name:O,params:this.$route.params})},async onFetchServices(){let{data:e}=await N.getAll({id:this.serviceIds});this.services=e.items,console.debug(`services`,this.services)},async onFetchApplication(){let{data:e}=await j.get(this.applicationId);this.application=e,console.debug(`application`,this.application)},async onFetchApplication2(){let{data:e}=await j.getAll({limit:100,offset:0,user_id:this.$store.getters.user.id,ordering:`-created_at`,service_id:this.serviceIds,type:D.PERIOD});this.application2=e.items?.[0],console.debug(`application2`,this.application2)},onCreateOrder(e){let t=this.getPackages(e.duration);if(!(!this.pricingAvailable||!e.available||t.length===0)){if(this.subscription=e,this.creating=!0,!this.application2||!this.application2.id){b.error(this.$t(`console.message.applicationNotFound`)),this.creating=!1;return}C(`payment_initiated`,{service:this.service?.alias,action:`subscribe`,duration:e.duration}),I.create({application_ids:[this.application2.id],package_ids:t.map(e=>e.id),description:this.service?.title+` - `+e.label}).then(({data:e})=>{this.creating=!1,this.$router.push({name:k,params:{id:e.id}})}).catch(e=>{b.error(this.$t(`order.message.createFailed`)),this.creating=!1,C(`payment_failed`,{service:this.service?.alias,action:`subscribe`,error:e?.response?.data?.error?.message??String(e)})})}}}}),z={class:`title`},B={class:`introduction`},V={key:1,class:`text-center`},H={class:`name`},U={class:`price`},W={key:1,class:`text-[var(--el-text-color-secondary)]`},G={class:`description`},K={class:`benefits`},q={class:`operations`},J={key:3,class:`extra`};function Y(p,m,h,g,_,v){let y=c(`el-col`),b=c(`el-row`),x=c(`el-empty`),S=c(`el-skeleton`),C=c(`el-button`),w=c(`el-tag`),T=c(`font-awesome-icon`),E=c(`el-card`);return f(),l(b,{class:`panel`},{default:u(()=>[i(y,{span:24},{default:u(()=>[i(b,null,{default:u(()=>[i(y,{span:24},{default:u(()=>[e(`h2`,z,r(p.$t(`common.title.buyMore`)),1)]),_:1})]),_:1}),i(b,null,{default:u(()=>[i(y,{span:24},{default:u(()=>[i(E,{shadow:`hover`,class:`card`},{default:u(()=>[i(b,null,{default:u(()=>[p.showPayment?(f(),l(y,{key:1,class:`max-w-4xl mx-auto`},{default:u(()=>[e(`p`,B,r(p.$t(`console.subscription.title`)),1),p.loading?(f(),l(S,{key:0})):p.loadFailed?(f(),o(`div`,V,[i(x,{description:p.$t(`common.message.noData`)},null,8,[`description`]),i(C,{type:`primary`,round:``,onClick:p.onInitialize},{default:u(()=>[n(r(p.$t(`common.button.refresh`)),1)]),_:1},8,[`onClick`])])):(f(),l(b,{key:2,gutter:15,class:`subscriptions`},{default:u(()=>[(f(!0),o(s,null,d(p.subscriptions,(c,m)=>(f(),l(y,{key:m,xs:24,md:24/(p.subscriptions?.length||4)},{default:u(()=>[i(E,{shadow:`hover`,class:t({subscription:!0,active:p.subscription?.name===c.name,disabled:!c.available}),onClick:e=>c.available&&(p.subscription=c)},{default:u(()=>[e(`h4`,H,[n(r(c.label)+` `,1),c.tag?(f(),l(w,{key:0,type:`warning`},{default:u(()=>[n(r(c.tag),1)]),_:2},1024)):a(``,!0)]),e(`h2`,U,[c.price===void 0?(f(),o(`span`,W,r(p.$t(`common.message.noData`)),1)):(f(),o(s,{key:0},[n(r(p.getPriceString({value:c.price})),1)],64))]),e(`p`,G,r(c.description),1),e(`div`,K,[(f(!0),o(s,null,d(c.benefits,(t,n)=>(f(),o(`div`,{key:n,class:`benefit`},[t.enabled?(f(),l(T,{key:0,icon:`fa-solid fa-check`,class:`icon icon-check`})):(f(),l(T,{key:1,icon:`fa-solid fa-xmark`,class:`icon icon-xmark`})),e(`span`,null,r(t.content),1)]))),128))]),e(`div`,q,[p.showPayment?(f(),l(C,{key:0,class:`btn btn-subscribe`,type:p.subscription?.name===c?.name?`primary`:``,disabled:!c.available,round:``,onClick:e=>p.onCreateOrder(c)},{default:u(()=>[n(r(p.$t(`common.button.buy`)),1)]),_:1},8,[`type`,`disabled`,`onClick`])):a(``,!0)])]),_:2},1032,[`class`,`onClick`])]),_:2},1032,[`md`]))),128))]),_:1})),!p.loading&&!p.loadFailed&&p.showPayment?(f(),o(`div`,J,[e(`span`,null,r(p.$t(`console.message.doNotWantSubscribe`)),1),i(C,{type:`primary`,class:`btn btn-extra`,round:``,size:`small`,onClick:p.onBuyExtra},{default:u(()=>[n(r(p.$t(`console.message.buyExtra`)),1)]),_:1},8,[`onClick`])])):a(``,!0)]),_:1})):(f(),l(y,{key:0,class:`max-w-4xl mx-auto`},{default:u(()=>[i(x,{description:p.$t(`common.message.noData`)},null,8,[`description`])]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var X=x(R,[[`render`,Y],[`__scopeId`,`data-v-114b65ad`]]);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{L as e,at as t,j as n,mt as r,tt as i,z as a}from"./vendor-chart-Dw-P17PN.js";import{n as o,t as s}from"./tabs-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{L as e,at as t,j as n,mt as r,tt as i,z as a}from"./vendor-chart-Dw-P17PN.js";import{n as o,t as s}from"./tabs-DL9XtawR.js";import{Ct as c,J as l,St as u}from"./index-0RhdvXdP.js";var d=a({name:`FishTabSwitcher`,components:{ElTabs:o,ElTabPane:s},data(){return{ROUTE_FISH_TTS_INDEX:c,ROUTE_FISH_MODEL_INDEX:u}},computed:{active(){return(this.$route?.name||``)===`fish-model-index`?u:c}},methods:{onUpdate(e){let t=String(e);t!==this.active&&this.$router.push({name:t})}}});function f(a,o,s,c,l,u){let d=t(`el-tab-pane`),f=t(`el-tabs`);return i(),n(f,{"model-value":a.active,class:`fish-tabs`,stretch:``,"onUpdate:modelValue":a.onUpdate},{default:r(()=>[e(d,{label:a.$t(`fish.tab.tts`),name:a.ROUTE_FISH_TTS_INDEX},null,8,[`label`,`name`]),e(d,{label:a.$t(`fish.tab.model`),name:a.ROUTE_FISH_MODEL_INDEX},null,8,[`label`,`name`])]),_:1},8,[`model-value`,`onUpdate:modelValue`])}var p=l(d,[[`render`,f],[`__scopeId`,`data-v-11790655`]]);export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{r as m,t as h}from"./select-Dl8tgFjL.js";import{t as g}from"./alert--fOgAzyp.js";import{t as _}from"./slider-CKn9N3dl.js";import{ct as v,dt as y}from"./constants-DWe-ziJf.js";import{Ii as b,Ir as x,J as S,Rn as C,Si as w,Xi as T,fn as ee,ln as te,sn as E,xn as D}from"./index-DHGr0qfr.js";import{t as O}from"./index.es-J-PBjzcR.js";import{t as k}from"./CopyToClipboard-BovNTELl.js";import{t as A}from"./Consumption-DoSnOpCh.js";import{n as j,r as M,t as N}from"./pagination-ChSSHmgO.js";import{t as P}from"./ApiCodeButton-B4AbprcE.js";import{t as F}from"./BotPlaceholder-ClF3L6UZ.js";import{t as I}from"./Hailuo-DJdgVTZk.js";import{t as L}from"./TabSwitcher-XjtjYDRZ.js";import{t as R}from"./PromptTextarea-BpckscxC.js";var z=p({name:`FishTextInput`,components:{PromptTextarea:R},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 B(e,t,n,r,i,a){let o=c(`prompt-textarea`);return f(),l(o,{modelValue:e.text,"onUpdate:modelValue":t[0]||=t=>e.text=t,title:e.$t(`fish.name.text`),info:e.$t(`fish.description.text`),placeholder:e.$t(`fish.placeholder.text`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var V=S(z,[[`render`,B]]),H=p({name:`FishModelSelector`,components:{ElSelect:m,ElOption:h},computed:{options(){return[{value:y,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||=v}}),U={class:`field`},W={class:`title font-bold`};function G(t,n,a,p,m,h){let g=c(`el-option`),_=c(`el-select`);return f(),o(`div`,U,[e(`h2`,W,r(t.$t(`fish.name.model`)),1),i(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`fish.placeholder.select`)},{default:u(()=>[(f(!0),o(s,null,d(t.options,e=>(f(),l(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var K=S(H,[[`render`,G],[`__scopeId`,`data-v-9702e6d3`]]),q=p({name:`FishVoicePicker`,components:{ElSelect:m,ElOption:h},computed:{loading(){return this.$store.state.fish?.status?.getApplications===w.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`)}}}}),J={class:`field`},Y={class:`title font-bold`};function X(t,n,a,p,m,h){let g=c(`el-option`),_=c(`el-select`);return f(),o(`div`,J,[e(`h2`,Y,r(t.$t(`fish.name.voice`)),1),i(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`fish.placeholder.voice`),clearable:``,filterable:``,loading:t.loading,"no-data-text":t.$t(`fish.message.noVoices`)},{default:u(()=>[(f(!0),o(s,null,d(t.displayOptions,e=>(f(),l(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`loading`,`no-data-text`])])}var Z=p({name:`FishConfigPanel`,components:{ElButton:T,ElSlider:_,FontAwesomeIcon:O,TextInput:V,ModelSelector:K,VoicePicker:S(q,[[`render`,X],[`__scopeId`,`data-v-ac9e3a92`]]),Consumption:A},emits:[`generate`],computed:{config(){return this.$store.state.fish?.config},consumption(){return ee(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`)}}}),Q={class:`flex flex-col h-full`},ne={class:`flex-1 overflow-y-auto p-5`},re={class:`field mb-2`},ie={class:`title font-bold`},ae={class:`flex flex-col items-center justify-center px-5 pb-5`};function oe(t,a,s,l,d,p){let m=c(`text-input`),h=c(`model-selector`),g=c(`voice-picker`),_=c(`el-slider`),v=c(`consumption`),y=c(`font-awesome-icon`),b=c(`el-button`);return f(),o(`div`,Q,[e(`div`,ne,[i(m,{class:`mb-4`}),i(h,{class:`mb-4`}),i(g,{class:`mb-4`}),e(`div`,re,[e(`h2`,ie,r(t.$t(`fish.name.speed`)),1),i(_,{modelValue:t.speed,"onUpdate:modelValue":a[0]||=e=>t.speed=e,min:.5,max:2,step:.1,class:`value`,"show-input":``},null,8,[`modelValue`])])]),e(`div`,ae,[i(v,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),i(b,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:u(()=>[i(y,{icon:`fa-solid fa-magic`,class:`mr-2`}),n(` `+r(t.$t(`fish.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var se=S(Z,[[`render`,oe],[`__scopeId`,`data-v-1ccd36ba`]]),ce=p({name:`FishTaskPreview`,components:{CopyToClipboard:k,FontAwesomeIcon:O,ElAlert:g,ElButton:T,ApiCodeButton:P},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`)}}}),le={class:`preview`},ue={class:`left`},de={class:`main`},fe={class:`bot`},pe={class:`datetime`},me={class:`info`},he={key:0,class:`prompt mt-2`},ge={key:0},_e={key:0,class:`content`},ve=[`src`],ye={class:`operations mt-2`},be={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},xe={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Se={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ce={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},we={key:1,class:`content`},Te={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Ee(s,l,d,p,m,h){let g=c(`capability-presentation`),_=c(`el-button`),v=c(`api-code-button`),y=c(`font-awesome-icon`),b=c(`copy-to-clipboard`),x=c(`el-alert`);return f(),o(`div`,le,[e(`div`,ue,[i(g,{capability:`fish`,part:`avatar`,class:`avatar`})]),e(`div`,de,[e(`div`,fe,[i(g,{capability:`fish`,part:`name`}),e(`span`,pe,r(s.$dayjs.format(``+new Date(parseFloat((s.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,me,[s.prompt?(f(),o(`p`,he,[n(r(s.prompt)+` `,1),s.modelValue?.response?a(``,!0):(f(),o(`span`,ge,` - (`+r(s.$t(`fish.status.pending`))+`) `,1))])):a(``,!0)]),s.audioUrl?(f(),o(`div`,_e,[e(`audio`,{src:s.audioUrl,controls:``,preload:`metadata`,class:`w-full mb-3`},null,8,ve),e(`div`,ye,[i(_,{type:`info`,size:`small`,class:`mb-2`,onClick:l[0]||=t(e=>s.onDownload(s.audioUrl),[`stop`])},{default:u(()=>[n(r(s.$t(`fish.button.download`)),1)]),_:1}),i(v,{path:`/fish/tts`,body:s.modelValue?.request},null,8,[`body`])]),i(x,{closable:!1,class:`mt-2 success`},{default:u(()=>[s.modelValue?.request?.model?(f(),o(`p`,be,[i(y,{icon:`fa-solid fa-microchip`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.model`))+`: `+r(s.modelValue?.request?.model),1)])):a(``,!0),s.modelValue?.request?.reference_id?(f(),o(`p`,xe,[i(y,{icon:`fa-solid fa-microphone`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.referenceId`))+`: `+r(s.modelValue?.request?.reference_id)+` `,1),i(b,{content:s.modelValue?.request?.reference_id},null,8,[`content`])])):a(``,!0),e(`p`,Se,[i(y,{icon:`fa-solid fa-magic`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.taskId`))+`: `+r(s.modelValue?.id)+` `,1),i(b,{content:s.modelValue?.id},null,8,[`content`])]),s.modelValue?.elapsed?(f(),o(`p`,Ce,[i(y,{icon:`fa-solid fa-clock`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.elapsed`))+`: `+r(s.modelValue?.elapsed?.toFixed(2))+`s `,1)])):a(``,!0)]),_:1})])):(f(),o(`div`,we,[i(x,{closable:!1,class:`info`},{default:u(()=>[e(`p`,Te,[i(y,{icon:`fa-solid fa-magic`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.taskId`))+`: `+r(s.modelValue?.id)+` `,1),i(b,{content:s.modelValue?.id},null,8,[`content`])])]),_:1})]))])])}var De=p({name:`FishRecentPanel`,components:{TaskPreview:S(ce,[[`render`,Ee],[`__scopeId`,`data-v-dfb246ac`]]),BotPlaceholder:F,NoTasks:M,ScrollList:j},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?.()}}}),$={key:0},Oe={key:2,class:`w-full h-full flex items-center justify-center`};function ke(e,t,n,r,p,m){let h=c(`bot-placeholder`),g=c(`task-preview`),_=c(`scroll-list`),v=c(`no-tasks`);return f(),o(s,null,[e.tasks?.items===void 0?(f(),o(`div`,$,[i(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(f(),l(_,{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:u(()=>[(f(!0),o(s,null,d(e.tasks?.items,e=>(f(),l(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):a(``,!0),e.tasks?.items?.length===0?(f(),o(`div`,Oe,[i(v)])):a(``,!0)],64)}var Ae=p({name:`FishTtsIndex`,components:{ConfigPanel:se,Layout:I,RecentPanel:S(De,[[`render`,ke]]),TabSwitcher:L},mixins:[te],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.fish?.status?.getApplications===w.Request},tasksLoading(){return this.$store.state.fish?.status?.getTasks===w.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 N({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(!E(this.uploadTracker,e=>this.$t(e),e=>b.warning(e)))return;let e=this.config??{},t=e.text?.trim();if(!t){b.warning(this.$t(`fish.message.textRequired`));return}if(!D())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}let r=e.model||`s2-pro`,i={text:t,async:!0};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),b.info(this.$t(`fish.message.startingTask`)),x(`fish`,C.generateTts(i,{token:n,model:r})).then(()=>{b.success(this.$t(`fish.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?b.error(this.$t(`fish.message.usedUp`)):b.error(this.$t(`fish.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}}),je={class:`flex flex-col h-full`},Me={class:`flex-1 min-h-0`};function Ne(t,n,r,a,o,s){let d=c(`tab-switcher`),p=c(`config-panel`),m=c(`recent-panel`),h=c(`layout`);return f(),l(h,null,{config:u(()=>[e(`div`,je,[i(d),e(`div`,Me,[i(p,{onGenerate:t.onGenerate},null,8,[`onGenerate`])])])]),result:u(()=>[i(m,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Pe=S(Ae,[[`render`,Ne]]);export{Pe as default};
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,I as n,Jt as r,L as i,M as a,N as o,T as s,at as c,j as l,mt as u,rt as d,tt as f,z as p}from"./vendor-chart-Dw-P17PN.js";import{r as m,t as h}from"./select-C9BBGK_W.js";import{t as g}from"./alert-Be4RiVE7.js";import{t as _}from"./slider-2iZQO2Zw.js";import{ct as v,dt as y}from"./constants-DWe-ziJf.js";import{Ii as b,Ir as x,J as S,Rn as C,Si as w,Xi as T,fn as ee,ln as te,sn as E,xn as D}from"./index-0RhdvXdP.js";import{t as O}from"./index.es-RNUZL6kj.js";import{t as k}from"./CopyToClipboard-SOk0OfUA.js";import{t as A}from"./Consumption-B-_J3ARX.js";import{n as j,r as M,t as N}from"./pagination-DJfdZUpV.js";import{t as P}from"./ApiCodeButton-B_Fbr2Mf.js";import{t as F}from"./BotPlaceholder-TFPpOTC5.js";import{t as I}from"./Hailuo-CvuDcDBC.js";import{t as L}from"./TabSwitcher-CfcbdXSN.js";import{t as R}from"./PromptTextarea-CqrfR04T.js";var z=p({name:`FishTextInput`,components:{PromptTextarea:R},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 B(e,t,n,r,i,a){let o=c(`prompt-textarea`);return f(),l(o,{modelValue:e.text,"onUpdate:modelValue":t[0]||=t=>e.text=t,title:e.$t(`fish.name.text`),info:e.$t(`fish.description.text`),placeholder:e.$t(`fish.placeholder.text`)},null,8,[`modelValue`,`title`,`info`,`placeholder`])}var V=S(z,[[`render`,B]]),H=p({name:`FishModelSelector`,components:{ElSelect:m,ElOption:h},computed:{options(){return[{value:y,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||=v}}),U={class:`field`},W={class:`title font-bold`};function G(t,n,a,p,m,h){let g=c(`el-option`),_=c(`el-select`);return f(),o(`div`,U,[e(`h2`,W,r(t.$t(`fish.name.model`)),1),i(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`fish.placeholder.select`)},{default:u(()=>[(f(!0),o(s,null,d(t.options,e=>(f(),l(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`])])}var K=S(H,[[`render`,G],[`__scopeId`,`data-v-9702e6d3`]]),q=p({name:`FishVoicePicker`,components:{ElSelect:m,ElOption:h},computed:{loading(){return this.$store.state.fish?.status?.getApplications===w.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`)}}}}),J={class:`field`},Y={class:`title font-bold`};function X(t,n,a,p,m,h){let g=c(`el-option`),_=c(`el-select`);return f(),o(`div`,J,[e(`h2`,Y,r(t.$t(`fish.name.voice`)),1),i(_,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`value`,placeholder:t.$t(`fish.placeholder.voice`),clearable:``,filterable:``,loading:t.loading,"no-data-text":t.$t(`fish.message.noVoices`)},{default:u(()=>[(f(!0),o(s,null,d(t.displayOptions,e=>(f(),l(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`placeholder`,`loading`,`no-data-text`])])}var Z=p({name:`FishConfigPanel`,components:{ElButton:T,ElSlider:_,FontAwesomeIcon:O,TextInput:V,ModelSelector:K,VoicePicker:S(q,[[`render`,X],[`__scopeId`,`data-v-ac9e3a92`]]),Consumption:A},emits:[`generate`],computed:{config(){return this.$store.state.fish?.config},consumption(){return ee(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`)}}}),Q={class:`flex flex-col h-full`},ne={class:`flex-1 overflow-y-auto p-5`},re={class:`field mb-2`},ie={class:`title font-bold`},ae={class:`flex flex-col items-center justify-center px-5 pb-5`};function oe(t,a,s,l,d,p){let m=c(`text-input`),h=c(`model-selector`),g=c(`voice-picker`),_=c(`el-slider`),v=c(`consumption`),y=c(`font-awesome-icon`),b=c(`el-button`);return f(),o(`div`,Q,[e(`div`,ne,[i(m,{class:`mb-4`}),i(h,{class:`mb-4`}),i(g,{class:`mb-4`}),e(`div`,re,[e(`h2`,ie,r(t.$t(`fish.name.speed`)),1),i(_,{modelValue:t.speed,"onUpdate:modelValue":a[0]||=e=>t.speed=e,min:.5,max:2,step:.1,class:`value`,"show-input":``},null,8,[`modelValue`])])]),e(`div`,ae,[i(v,{value:t.consumption,service:t.service},null,8,[`value`,`service`]),i(b,{type:`primary`,class:`btn w-full`,round:``,disabled:!t.canGenerate,onClick:t.onGenerate},{default:u(()=>[i(y,{icon:`fa-solid fa-magic`,class:`mr-2`}),n(` `+r(t.$t(`fish.button.generate`)),1)]),_:1},8,[`disabled`,`onClick`])])])}var se=S(Z,[[`render`,oe],[`__scopeId`,`data-v-1ccd36ba`]]),ce=p({name:`FishTaskPreview`,components:{CopyToClipboard:k,FontAwesomeIcon:O,ElAlert:g,ElButton:T,ApiCodeButton:P},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`)}}}),le={class:`preview`},ue={class:`left`},de={class:`main`},fe={class:`bot`},pe={class:`datetime`},me={class:`info`},he={key:0,class:`prompt mt-2`},ge={key:0},_e={key:0,class:`content`},ve=[`src`],ye={class:`operations mt-2`},be={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},xe={key:1,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Se={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},Ce={key:2,class:`text-[var(--el-text-color-regular)] text-xs mb-0`},we={key:1,class:`content`},Te={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function Ee(s,l,d,p,m,h){let g=c(`capability-presentation`),_=c(`el-button`),v=c(`api-code-button`),y=c(`font-awesome-icon`),b=c(`copy-to-clipboard`),x=c(`el-alert`);return f(),o(`div`,le,[e(`div`,ue,[i(g,{capability:`fish`,part:`avatar`,class:`avatar`})]),e(`div`,de,[e(`div`,fe,[i(g,{capability:`fish`,part:`name`}),e(`span`,pe,r(s.$dayjs.format(``+new Date(parseFloat((s.modelValue?.created_at||``).toString())*1e3))),1)]),e(`div`,me,[s.prompt?(f(),o(`p`,he,[n(r(s.prompt)+` `,1),s.modelValue?.response?a(``,!0):(f(),o(`span`,ge,` - (`+r(s.$t(`fish.status.pending`))+`) `,1))])):a(``,!0)]),s.audioUrl?(f(),o(`div`,_e,[e(`audio`,{src:s.audioUrl,controls:``,preload:`metadata`,class:`w-full mb-3`},null,8,ve),e(`div`,ye,[i(_,{type:`info`,size:`small`,class:`mb-2`,onClick:l[0]||=t(e=>s.onDownload(s.audioUrl),[`stop`])},{default:u(()=>[n(r(s.$t(`fish.button.download`)),1)]),_:1}),i(v,{path:`/fish/tts`,body:s.modelValue?.request},null,8,[`body`])]),i(x,{closable:!1,class:`mt-2 success`},{default:u(()=>[s.modelValue?.request?.model?(f(),o(`p`,be,[i(y,{icon:`fa-solid fa-microchip`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.model`))+`: `+r(s.modelValue?.request?.model),1)])):a(``,!0),s.modelValue?.request?.reference_id?(f(),o(`p`,xe,[i(y,{icon:`fa-solid fa-microphone`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.referenceId`))+`: `+r(s.modelValue?.request?.reference_id)+` `,1),i(b,{content:s.modelValue?.request?.reference_id},null,8,[`content`])])):a(``,!0),e(`p`,Se,[i(y,{icon:`fa-solid fa-magic`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.taskId`))+`: `+r(s.modelValue?.id)+` `,1),i(b,{content:s.modelValue?.id},null,8,[`content`])]),s.modelValue?.elapsed?(f(),o(`p`,Ce,[i(y,{icon:`fa-solid fa-clock`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.elapsed`))+`: `+r(s.modelValue?.elapsed?.toFixed(2))+`s `,1)])):a(``,!0)]),_:1})])):(f(),o(`div`,we,[i(x,{closable:!1,class:`info`},{default:u(()=>[e(`p`,Te,[i(y,{icon:`fa-solid fa-magic`,class:`mr-1`}),n(` `+r(s.$t(`fish.name.taskId`))+`: `+r(s.modelValue?.id)+` `,1),i(b,{content:s.modelValue?.id},null,8,[`content`])])]),_:1})]))])])}var De=p({name:`FishRecentPanel`,components:{TaskPreview:S(ce,[[`render`,Ee],[`__scopeId`,`data-v-dfb246ac`]]),BotPlaceholder:F,NoTasks:M,ScrollList:j},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?.()}}}),$={key:0},Oe={key:2,class:`w-full h-full flex items-center justify-center`};function ke(e,t,n,r,p,m){let h=c(`bot-placeholder`),g=c(`task-preview`),_=c(`scroll-list`),v=c(`no-tasks`);return f(),o(s,null,[e.tasks?.items===void 0?(f(),o(`div`,$,[i(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(f(),l(_,{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:u(()=>[(f(!0),o(s,null,d(e.tasks?.items,e=>(f(),l(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):a(``,!0),e.tasks?.items?.length===0?(f(),o(`div`,Oe,[i(v)])):a(``,!0)],64)}var Ae=p({name:`FishTtsIndex`,components:{ConfigPanel:se,Layout:I,RecentPanel:S(De,[[`render`,ke]]),TabSwitcher:L},mixins:[te],inject:[`initialized`],data(){return{task:void 0,job:0,loadingMore:!1,fetchingTasks:!1}},computed:{applicationsLoading(){return this.$store.state.fish?.status?.getApplications===w.Request},tasksLoading(){return this.$store.state.fish?.status?.getTasks===w.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 N({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(!E(this.uploadTracker,e=>this.$t(e),e=>b.warning(e)))return;let e=this.config??{},t=e.text?.trim();if(!t){b.warning(this.$t(`fish.message.textRequired`));return}if(!D())return;let n=this.credential?.token;if(!n){console.error(`no token specified`);return}let r=e.model||`s2-pro`,i={text:t,async:!0};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),b.info(this.$t(`fish.message.startingTask`)),x(`fish`,C.generateTts(i,{token:n,model:r})).then(()=>{b.success(this.$t(`fish.message.startTaskSuccess`))}).catch(e=>{(e?.response?.data)?.error?.code===`used_up`?b.error(this.$t(`fish.message.usedUp`)):b.error(this.$t(`fish.message.startTaskFailed`))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}}),je={class:`flex flex-col h-full`},Me={class:`flex-1 min-h-0`};function Ne(t,n,r,a,o,s){let d=c(`tab-switcher`),p=c(`config-panel`),m=c(`recent-panel`),h=c(`layout`);return f(),l(h,null,{config:u(()=>[e(`div`,je,[i(d),e(`div`,Me,[i(p,{onGenerate:t.onGenerate},null,8,[`onGenerate`])])])]),result:u(()=>[i(m,{ref:`recentPanel`,loading:t.loadingMore,onReachTop:t.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var Pe=S(Ae,[[`render`,Ne]]);export{Pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,M as i,N as a,at as o,j as s,mt as c,tt as l,z as u}from"./vendor-chart-Dw-P17PN.js";import{J as d,Xi as f}from"./index-
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,I as t,Jt as n,L as r,M as i,N as a,at as o,j as s,mt as c,tt as l,z as u}from"./vendor-chart-Dw-P17PN.js";import{J as d,Xi as f}from"./index-0RhdvXdP.js";import{t as p}from"./index.es-RNUZL6kj.js";import{t as m}from"./vue-plyr-wiIKa-zl.js";var h=u({name:`VideoPlayer`,components:{ElButton:f,FontAwesomeIcon:p,VuePlyr:m},props:{src:{type:String,required:!0},options:{type:Object,required:!1,default:()=>({})}},data(){return{failed:!1,mergedOptions:{controls:[`play-large`,`play`,`progress`,`current-time`,`mute`,`volume`,`captions`,`settings`,`pip`,`fullscreen`],iconUrl:`https://cdn.acedata.cloud/7jq4t0.svg`,quality:{default:1080,options:[1080],...this.options.quality},...this.options}}},computed:{safeSrc(){return this.src.trim()}},watch:{safeSrc(){this.failed=!1}},methods:{onError(){this.failed=!0},onOpen(){window.open(this.safeSrc,`_blank`,`noopener,noreferrer`)}}}),g={class:`video max-w-[800px] max-h-[450px] rounded-[15px] overflow-hidden`},_=[`src`],v={key:1,class:`video-fallback`};function y(u,d,f,p,m,h){let y=o(`vue-plyr`),b=o(`font-awesome-icon`),x=o(`el-button`);return l(),a(`div`,g,[!u.failed&&u.safeSrc?(l(),s(y,{key:u.safeSrc,options:u.mergedOptions},{default:c(()=>[e(`video`,{controls:``,playsinline:``,preload:`metadata`,class:`w-full h-full aspect-[16/9]`,onError:d[0]||=(...e)=>u.onError&&u.onError(...e)},[e(`source`,{size:`1080`,src:u.safeSrc,type:`video/mp4`},null,8,_)],32)]),_:1},8,[`options`])):u.safeSrc?(l(),a(`div`,v,[r(x,{type:`primary`,round:``,onClick:u.onOpen},{default:c(()=>[r(b,{icon:`fa-solid fa-up-right-from-square`,class:`mr-2`}),t(` `+n(u.$t(`common.button.download`)),1)]),_:1},8,[`onClick`])])):i(``,!0)])}var b=d(h,[[`render`,y],[`__scopeId`,`data-v-39c4a118`]]);export{b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,Mt as o,N as s,Ot as c,T as l,ht as u,it as d,j as f,k as p,mt as m,p as h,st as g,tt as _,ut as v,wt as y,x as b,z as x}from"./vendor-chart-Dw-P17PN.js";import{a as S,c as C,t as w}from"./install-Cn-SLM3u.js";import{n as T,u as E}from"./runtime-BTM7t9of.js";import{Pt as D,d as O,f as k,nt as A,ut as j}from"./use-deprecated-B-uvyrTL.js";import{d as M,u as N}from"./tooltip-
|
|
1
|
+
import{A as e,Gt as t,I as n,Jt as r,L as i,M as a,Mt as o,N as s,Ot as c,T as l,ht as u,it as d,j as f,k as p,mt as m,p as h,st as g,tt as _,ut as v,wt as y,x as b,z as x}from"./vendor-chart-Dw-P17PN.js";import{a as S,c as C,t as w}from"./install-Cn-SLM3u.js";import{n as T,u as E}from"./runtime-BTM7t9of.js";import{Pt as D,d as O,f as k,nt as A,ut as j}from"./use-deprecated-B-uvyrTL.js";import{d as M,u as N}from"./tooltip-bsBfzZxe.js";var P=T({title:{type:String,default:``},description:{type:String,default:``},type:{type:String,values:j(k),default:`info`},closable:{type:Boolean,default:!0},closeText:{type:String,default:``},showIcon:Boolean,center:Boolean,effect:{type:String,values:[`light`,`dark`],default:`light`},...M}),F={open:()=>!0,close:e=>E(e)||e instanceof Event},I=w(S(x({...x({name:`ElAlert`}),props:P,emits:F,setup(x,{emit:S}){let w=x,{Close:T}=O,E=v(),j=C(`alert`),M=y(!1),P=p(()=>k[w.type]),F=p(()=>!!(w.description||E.default)),I=()=>{M.value=!0,S(`open`)},L=e=>{M.value=!1,S(`close`,e)},{onOpen:R,onClose:z}=N({showAfter:c(w,`showAfter`),hideAfter:c(w,`hideAfter`),autoClose:c(w,`autoClose`),open:I,close:L});return D&&R(),(c,p)=>(_(),f(h,{name:o(j).b(`fade`),persisted:``},{default:m(()=>[u(e(`div`,{class:t([o(j).b(),o(j).m(c.type),o(j).is(`center`,c.center),o(j).is(c.effect)]),role:`alert`},[c.showIcon&&(c.$slots.icon||o(P))?(_(),f(o(A),{key:0,class:t([o(j).e(`icon`),{[o(j).is(`big`)]:o(F)}])},{default:m(()=>[d(c.$slots,`icon`,{},()=>[(_(),f(g(o(P))))])]),_:3},8,[`class`])):a(`v-if`,!0),e(`div`,{class:t(o(j).e(`content`))},[c.title||c.$slots.title?(_(),s(`span`,{key:0,class:t([o(j).e(`title`),{"with-description":o(F)}])},[d(c.$slots,`title`,{},()=>[n(r(c.title),1)])],2)):a(`v-if`,!0),o(F)?(_(),s(`p`,{key:1,class:t(o(j).e(`description`))},[d(c.$slots,`default`,{},()=>[n(r(c.description),1)])],2)):a(`v-if`,!0),c.closable?(_(),s(l,{key:2},[c.closeText?(_(),s(`div`,{key:0,class:t([o(j).e(`close-btn`),o(j).is(`customed`)]),onClick:L},r(c.closeText),3)):(_(),f(o(A),{key:1,class:t(o(j).e(`close-btn`)),onClick:o(z)},{default:m(()=>[i(o(T))]),_:1},8,[`class`,`onClick`]))],64)):a(`v-if`,!0)],2)],2),[[b,M.value]])]),_:3},8,[`name`]))}}),[[`__file`,`alert.vue`]]));export{I as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,B as t,G as n,Gt as r,H as i,I as a,Jt as o,K as s,Mt as c,N as l,Ot as u,Q as d,Rt as f,St as p,T as m,U as h,Vt as g,Wt as _,Y as v,ft as y,ht as b,it as x,j as S,k as C,mt as w,nt as T,p as E,pt as D,tt as O,wt as k,x as ee,z as A}from"./vendor-chart-Dw-P17PN.js";import{a as j,c as M,i as N,t as P}from"./install-Cn-SLM3u.js";import{c as te,d as F,n as I,r as L,u as R}from"./runtime-BTM7t9of.js";import{At as ne,Ct as z,R as B,_ as re,h as ie,m as V,nt as ae,ot as H,rt as U,st as W,wt as G,zt as oe}from"./use-deprecated-B-uvyrTL.js";import{t as se}from"./tooltip-BY0D7YKq.js";import{r as K}from"./aria-8oQuUBWy.js";import{n as ce}from"./vnode-tCZAUc1D.js";import{t as q}from"./click-outside-CPwvCpQu.js";import{t as le}from"./collapse-transition-BUGXhx7B.js";import{J,Qi as Y,na as X,ua as ue}from"./index-DHGr0qfr.js";var de=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll(`li`),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){let e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener(`keydown`,t=>{let n=!1;switch(t.code){case X.down:this.gotoSubIndex(this.subIndex+1),n=!0;break;case X.up:this.gotoSubIndex(this.subIndex-1),n=!0;break;case X.tab:K(e,`mouseleave`);break;case X.enter:case X.numpadEnter:case X.space:n=!0,t.currentTarget.click();break}return n&&(t.preventDefault(),t.stopPropagation()),!1})})}},fe=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute(`tabindex`,`0`);let t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new de(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener(`keydown`,e=>{let t=!1;switch(e.code){case X.down:K(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break;case X.up:K(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break;case X.tab:K(e.currentTarget,`mouseleave`);break;case X.enter:case X.numpadEnter:case X.space:t=!0,e.currentTarget.click();break}t&&e.preventDefault()})}},pe=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){let t=this.domNode.childNodes;Array.from(t).forEach(t=>{t.nodeType===1&&new fe(t,e)})}},me=j(A({...A({name:`ElMenuCollapseTransition`}),setup(e){let t=M(`menu`),r={onBeforeEnter:e=>e.style.opacity=`0.2`,onEnter(e,n){U(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=`1`,n()},onAfterEnter(e){W(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=``},onBeforeLeave(e){e.dataset||={},H(e,t.m(`collapse`))?(W(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),U(e,t.m(`collapse`))):(U(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),W(e,t.m(`collapse`))),e.style.width=`${e.scrollWidth}px`,e.style.overflow=`hidden`},onLeave(e){U(e,`horizontal-collapse-transition`),e.style.width=`${e.dataset.scrollWidth}px`}};return(e,t)=>(O(),S(E,n({mode:`out-in`},c(r)),{default:w(()=>[x(e.$slots,`default`)]),_:3},16))}}),[[`__file`,`menu-collapse-transition.vue`]]);function he(e,t){let n=C(()=>{let n=e.parent,r=[t.value];for(;n.type.name!==`ElMenu`;)n.props.index&&r.unshift(n.props.index),n=n.parent;return r});return{parentMenu:C(()=>{let t=e.parent;for(;t&&![`ElMenu`,`ElSubMenu`].includes(t.type.name);)t=t.parent;return t}),indexPath:n}}function ge(e){return C(()=>{let t=e.backgroundColor;return t?new Y(t).shade(20).toString():``})}var _e=(e,t)=>{let n=M(`menu`);return C(()=>n.cssVarBlock({"text-color":e.textColor||``,"hover-text-color":e.textColor||``,"bg-color":e.backgroundColor||``,"hover-bg-color":ge(e).value||``,"active-color":e.activeTextColor||``,level:`${t}`}))},Z=`rootMenu`,Q=`subMenu:`,ve=I({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:V},expandOpenIcon:{type:V},collapseCloseIcon:{type:V},collapseOpenIcon:{type:V}}),ye=`ElSubMenu`,be=A({name:ye,props:ve,setup(e,{slots:n,expose:r}){let a=t(),{indexPath:o,parentMenu:s}=he(a,C(()=>e.index)),c=M(`menu`),l=M(`sub-menu`),u=h(Z);u||G(ye,`can not inject root menu`);let f=h(`${Q}${s.value.uid}`);f||G(ye,`can not inject sub menu`);let g=k({}),x=k({}),S,w=k(!1),E=k(),D=k(),O=C(()=>L.value===`horizontal`&&j.value?`bottom-start`:`right-start`),A=C(()=>L.value===`horizontal`&&j.value||L.value===`vertical`&&!u.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?F.value?e.expandOpenIcon:e.expandCloseIcon:ie:e.collapseCloseIcon&&e.collapseOpenIcon?F.value?e.collapseOpenIcon:e.collapseCloseIcon:re),j=C(()=>f.level===0),N=C(()=>{let t=e.teleported;return R(t)?j.value:t}),P=C(()=>u.props.collapse?`${c.namespace.value}-zoom-in-left`:`${c.namespace.value}-zoom-in-top`),te=C(()=>L.value===`horizontal`&&j.value?[`bottom-start`,`bottom-end`,`top-start`,`top-end`,`right-start`,`left-start`]:[`right-start`,`right`,`right-end`,`left-start`,`bottom-start`,`bottom-end`,`top-start`,`top-end`]),F=C(()=>u.openedMenus.includes(e.index)),I=C(()=>[...Object.values(g.value),...Object.values(x.value)].some(({active:e})=>e)),L=C(()=>u.props.mode),ne=C(()=>u.props.persistent),z=p({index:e.index,indexPath:o,active:I}),B=_e(u.props,f.level+1),V=C(()=>e.popperOffset??u.props.popperOffset),H=C(()=>e.popperClass??u.props.popperClass),U=C(()=>e.showTimeout??u.props.showTimeout),W=C(()=>e.hideTimeout??u.props.hideTimeout),K=()=>(D.value?.popperRef?.popperInstanceRef)?.destroy(),ce=e=>{e||K()},q=()=>{u.props.menuTrigger===`hover`&&u.props.mode===`horizontal`||u.props.collapse&&u.props.mode===`vertical`||e.disabled||u.handleSubMenuClick({index:e.index,indexPath:o.value,active:I.value})},J=(t,n=U.value)=>{var r;if(t.type!==`focus`){if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`||e.disabled){f.mouseInChild.value=!0;return}f.mouseInChild.value=!0,S?.(),{stop:S}=oe(()=>{u.openMenu(e.index,o.value)},n),N.value&&((r=s.value.vnode.el)==null||r.dispatchEvent(new MouseEvent(`mouseenter`)))}},Y=(t=!1)=>{var n;if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`){f.mouseInChild.value=!1;return}S?.(),f.mouseInChild.value=!1,{stop:S}=oe(()=>!w.value&&u.closeMenu(e.index,o.value),W.value),N.value&&t&&((n=f.handleMouseleave)==null||n.call(f,!0))};return y(()=>u.props.collapse,e=>ce(!!e)),T(`${Q}${a.uid}`,{addSubMenu:e=>{x.value[e.index]=e},removeSubMenu:e=>{delete x.value[e.index]},handleMouseleave:Y,mouseInChild:w,level:f.level+1}),r({opened:F}),d(()=>{u.addSubMenu(z),f.addSubMenu(z)}),v(()=>{f.removeSubMenu(z),u.removeSubMenu(z)}),()=>{let t=[n.title?.call(n),i(ae,{class:l.e(`icon-arrow`),style:{transform:F.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&u.props.collapse?`none`:`rotateZ(180deg)`:`none`}},{default:()=>_(A.value)?i(a.appContext.components[A.value]):i(A.value)})],r=u.isMenuPopup?i(se,{ref:D,visible:F.value,effect:`light`,pure:!0,offset:V.value,showArrow:!1,persistent:ne.value,popperClass:H.value,placement:O.value,teleported:N.value,fallbackPlacements:te.value,transition:P.value,gpuAcceleration:!1},{content:()=>i(`div`,{class:[c.m(L.value),c.m(`popup-container`),H.value],onMouseenter:e=>J(e,100),onMouseleave:()=>Y(!0),onFocus:e=>J(e,100)},[i(`ul`,{class:[c.b(),c.m(`popup`),c.m(`popup-${O.value}`)],style:B.value},[n.default?.call(n)])]),default:()=>i(`div`,{class:l.e(`title`),onClick:q},t)}):i(m,{},[i(`div`,{class:l.e(`title`),ref:E,onClick:q},t),i(le,{},{default:()=>b(i(`ul`,{role:`menu`,class:[c.b(),c.m(`inline`)],style:B.value},[n.default?.call(n)]),[[ee,F.value]])})]);return i(`li`,{class:[l.b(),l.is(`active`,I.value),l.is(`opened`,F.value),l.is(`disabled`,e.disabled)],role:`menuitem`,ariaHaspopup:!0,ariaExpanded:F.value,onMouseenter:J,onMouseleave:()=>Y(),onFocus:J},[r])}}}),xe=I({mode:{type:String,values:[`horizontal`,`vertical`],default:`vertical`},defaultActive:{type:String,default:``},defaultOpeneds:{type:L(Array),default:()=>ue([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:[`hover`,`click`],default:`hover`},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:V,default:()=>B},popperEffect:{type:L(String),default:`dark`},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),Se=e=>f(e)&&e.every(e=>_(e)),Ce=A({name:`ElMenu`,props:xe,emits:{close:(e,t)=>_(e)&&Se(t),open:(e,t)=>_(e)&&Se(t),select:(e,t,n,r)=>_(e)&&Se(t)&&g(n)&&(R(r)||r instanceof Promise)},setup(e,{emit:n,slots:r,expose:a}){let o=t(),c=o.appContext.config.globalProperties.$router,l=k(),u=M(`menu`),f=M(`sub-menu`),m=k(-1),h=k(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=k(e.defaultActive),_=k({}),v=k({}),x=C(()=>e.mode===`horizontal`||e.mode===`vertical`&&e.collapse),S=()=>{let t=g.value&&_.value[g.value];!t||e.mode===`horizontal`||e.collapse||t.indexPath.forEach(e=>{let t=v.value[e];t&&w(e,t.indexPath)})},w=(t,r)=>{h.value.includes(t)||(e.uniqueOpened&&(h.value=h.value.filter(e=>r.includes(e))),h.value.push(t),n(`open`,t,r))},E=e=>{let t=h.value.indexOf(e);t!==-1&&h.value.splice(t,1)},O=(e,t)=>{E(e),n(`close`,e,t)},ee=({index:e,indexPath:t})=>{h.value.includes(e)?O(e,t):w(e,t)},A=t=>{(e.mode===`horizontal`||e.collapse)&&(h.value=[]);let{index:r,indexPath:i}=t;if(!(F(r)||F(i)))if(e.router&&c){let e=t.route||r,a=c.push(e).then(e=>(e||(g.value=r),e));n(`select`,r,i,{index:r,indexPath:i,route:e},a)}else g.value=r,n(`select`,r,i,{index:r,indexPath:i})},j=t=>{let n=_.value;g.value=(n[t]||g.value&&n[g.value]||n[e.defaultActive])?.index??t},N=e=>{let t=getComputedStyle(e),n=Number.parseInt(t.marginLeft,10),r=Number.parseInt(t.marginRight,10);return e.offsetWidth+n+r||0},P=()=>{if(!l.value)return-1;let e=Array.from(l.value?.childNodes??[]).filter(e=>e.nodeName!==`#text`||e.nodeValue),t=getComputedStyle(l.value),n=Number.parseInt(t.paddingLeft,10),r=Number.parseInt(t.paddingRight,10),i=l.value.clientWidth-n-r,a=0,o=0;return e.forEach((e,t)=>{e.nodeName!==`#comment`&&(a+=N(e),a<=i-64&&(o=t+1))}),o===e.length?-1:o},te=e=>v.value[e].indexPath,I=(e,t=33.34)=>{let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e()},t)}},L=!0,R=()=>{if(m.value===P())return;let e=()=>{m.value=-1,s(()=>{m.value=P()})};L?e():I(e)(),L=!1};y(()=>e.defaultActive,e=>{_.value[e]||(g.value=``),j(e)}),y(()=>e.collapse,e=>{e&&(h.value=[])}),y(_.value,S);let z;D(()=>{e.mode===`horizontal`&&e.ellipsis?z=ne(l,R).stop:z?.()});let B=k(!1);{let t=e=>{v.value[e.index]=e},n=e=>{delete v.value[e.index]};T(Z,p({props:e,openedMenus:h,items:_,subMenus:v,activeIndex:g,isMenuPopup:x,addMenuItem:e=>{_.value[e.index]=e},removeMenuItem:e=>{delete _.value[e.index]},addSubMenu:t,removeSubMenu:n,openMenu:w,closeMenu:O,handleMenuItemClick:A,handleSubMenuClick:ee})),T(`${Q}${o.uid}`,{addSubMenu:t,removeSubMenu:n,mouseInChild:B,level:0})}d(()=>{e.mode===`horizontal`&&new pe(o.vnode.el,u.namespace.value)}),a({open:e=>{let{indexPath:t}=v.value[e];t.forEach(e=>w(e,t))},close:E,updateActiveIndex:j,handleResize:R});let re=_e(e,0);return()=>{let t=r.default?.call(r)??[],a=[];if(e.mode===`horizontal`&&l.value){let n=ce(t),r=m.value===-1?n:n.slice(0,m.value),o=m.value===-1?[]:n.slice(m.value);o?.length&&e.ellipsis&&(t=r,a.push(i(be,{index:`sub-menu-more`,class:f.e(`hide-arrow`),popperOffset:e.popperOffset},{title:()=>i(ae,{class:f.e(`icon-more`)},{default:()=>i(e.ellipsisIcon)}),default:()=>o})))}let o=e.closeOnClickOutside?[[q,()=>{h.value.length&&(B.value||(h.value.forEach(e=>n(`close`,e,te(e))),h.value=[]))}]]:[],s=b(i(`ul`,{key:String(e.collapse),role:`menubar`,ref:l,style:re.value,class:{[u.b()]:!0,[u.m(e.mode)]:!0,[u.m(`collapse`)]:e.collapse}},[...t,...a]),o);return e.collapseTransition&&e.mode===`vertical`?i(me,()=>s):s}}}),we=I({index:{type:L([String,null]),default:null},route:{type:L([String,Object])},disabled:Boolean}),Te={click:e=>_(e.index)&&f(e.indexPath)},$=`ElMenuItem`,Ee=j(A({...A({name:$}),props:we,emits:Te,setup(n,{expose:i,emit:a}){let o=n;te(o.index)&&z($,`Missing required prop: "index"`);let s=t(),f=h(Z),g=M(`menu`),_=M(`menu-item`);f||G($,`can not inject root menu`);let{parentMenu:y,indexPath:b}=he(s,u(o,`index`)),T=h(`${Q}${y.value.uid}`);T||G($,`can not inject sub menu`);let E=C(()=>o.index===f.activeIndex),D=p({index:o.index,indexPath:b,active:E}),k=()=>{o.disabled||(f.handleMenuItemClick({index:o.index,indexPath:b.value,route:o.route}),a(`click`,D))};return d(()=>{T.addSubMenu(D),f.addMenuItem(D)}),v(()=>{T.removeSubMenu(D),f.removeMenuItem(D)}),i({parentMenu:y,rootMenu:f,active:E,nsMenu:g,nsMenuItem:_,handleClick:k}),(t,n)=>(O(),l(`li`,{class:r([c(_).b(),c(_).is(`active`,c(E)),c(_).is(`disabled`,t.disabled)]),role:`menuitem`,tabindex:`-1`,onClick:k},[c(y).type.name===`ElMenu`&&c(f).props.collapse&&t.$slots.title?(O(),S(c(se),{key:0,effect:c(f).props.popperEffect,placement:`right`,"fallback-placements":[`left`],persistent:c(f).props.persistent},{content:w(()=>[x(t.$slots,`title`)]),default:w(()=>[e(`div`,{class:r(c(g).be(`tooltip`,`trigger`))},[x(t.$slots,`default`)],2)]),_:3},8,[`effect`,`persistent`])):(O(),l(m,{key:1},[x(t.$slots,`default`),x(t.$slots,`title`)],64))],2))}}),[[`__file`,`menu-item.vue`]]),De={title:String},Oe=j(A({...A({name:`ElMenuItemGroup`}),props:De,setup(t){let n=M(`menu-item-group`);return(t,i)=>(O(),l(`li`,{class:r(c(n).b())},[e(`div`,{class:r(c(n).e(`title`))},[t.$slots.title?x(t.$slots,`title`,{key:1}):(O(),l(m,{key:0},[a(o(t.title),1)],64))],2),e(`ul`,null,[x(t.$slots,`default`)])],2))}}),[[`__file`,`menu-item-group.vue`]]),ke=P(Ce,{MenuItem:Ee,MenuItemGroup:Oe,SubMenu:be}),Ae=N(Ee);N(Oe);var je=N(be),Me=A({props:{collapsed:{type:Boolean,default:!1}},emits:[`click`],computed:{siteTitle(){return this.$store.state.site?.title||`AceData`},url(){let e=this.$store.state.site,t=`https://platform.acedata.cloud/favicon.ico`;return this.collapsed?e?.favicon||e?.logo||t:e?.logo||e?.favicon||t}}}),Ne=[`aria-label`],Pe=[`src`,`alt`];function Fe(t,n,r,i,a,o){return O(),l(`button`,{type:`button`,class:`brand-logo`,"aria-label":t.siteTitle,onClick:n[0]||=e=>t.$emit(`click`)},[e(`img`,{src:t.url,class:`brand-logo__image`,alt:t.siteTitle},null,8,Pe)],8,Ne)}var Ie=J(Me,[[`render`,Fe],[`__scopeId`,`data-v-c9ca5791`]]),Le=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAMFBMVEX///+3t7f4+Pi8vLzAwMDExMTS0tLIyMjk5OTz8/PY2NjOzs7u7u7d3d3p6enh4eFVKkJDAAAIfUlEQVR4nNVd15akOAylyRRQ9f9/O02BZJtgBQszfR/2zPahsJCvguVUFJYop35ux66pq6r6+fn9T910bTv3U2najBXK9zw2PxE07fz+n0Qf+raOyetL3g9PS7vgzRUYULfvZyXuR5nAgLF/SuK3UuJN7gf0PbyErDiieuU1zKmLyFJ3Y9u+vmh//V9dXT/b5VN3f+HbFq82nGivHH6999Vv8rC7P+NFzfBlF56xvl/sEy1Xbc8mZ9m3R7bcrO0jl+vXJH7J0YY78UvYKNuDjpWNTQd9tzd5ks9ePUm92u877WMlp4dhR+Y2OYkYdh3XmKclc9iATVwoXyFLZouXIobuBpEXlK+QcYbK7gOF2NpMaN2Vmfdr71LGirAbW5N3lr4F1rckC0GQbQw6cqrM1XACvzOr5EjT+2q+L24Vk6/sRGL7no6t5un9eQE+7JG4r+wk3+e9iGfXwzyeZHLjzDGFt0fEBB564ymOeRwzCg8dHaZ9kx8NZGZ8+UyOv0bSW3o9q5Tac5+0luajjGfqpsT2krIuTeaKZGQf4UUIKpx6xFbo2nGD9HSlpJZAGfSQILVjV02Z4CQsJhD2UdbcJ/dwyRfpNvozwaLo4q/0nMhLIrMThJSZZ4EhiJd6Ugti43SvzCTlPKnZmUNZMV+u4cYKwp85XlfcTBi/s6Z+MZ2LxADhGZzUDU9m5zjIr0woQhLxasAHWS7E9TgZU/Z1EBEIjbzxQYYxOudOxu73qTBcUGEaIzqD1hi96W6JTgzRoDSI/UhmITP7yUPFSYqaagD1R4wJkP8VnT8nTwVQqnauN06QjvtCvYt2IL3Zm/Uk9jjDz0RmMLggwx3SOuIUSniGpJv3bAJo1SAFr9mKH8aI+LqkI0RFtoIh9/L76Cc8GLCDoxxSjyAHgxxFYSEzJ18Ggly4YHQHnCQ2LRoCGINXQirim0JYUJpDatf/p24PP4mVwSblSg6MEhDGuzNVg6J5o8nEvAPAGZiAfk5MDRXNqxcmx/AVHPMprx8G1TEHwOzqTByseTgoDRxYDT6akSh9YSMzr6aLidOeTGCj3EqDkdC8GU9Q9c6voYlyJzxy0sOxOnRs8C3sQpSR92DOO4EDCXkAzoA935bPTy8AIgTBCIIyvyZsExF/uM2Byfk9A7VafuksfdyygFmJcc35NZ7tT5xUYMNwJYcI/FouGP7xOyT1YBOh+aVcsCHHBWCHZHLTxOfxF6ZA8HP82P7ASv4BJj5PMNMO/g3+H9ghqrtnGm4hIJLAd7byVxg5asGCA+AH2N2meYHvKPxZmQRIGtyMaOMweC/ZXJJJdJE0CF27Bm0oK8kWLKSWHxeILB8s7xN8gmxFi0VIFAkNqd5KiI3S7JBqJ7Ssycb70vAL2LAofMiE9hkBrQvX4OTXNLS4eGpwA8KlaxaGKHOy4OWWcSVoXSZz9ohYYLaxpB8bv4V2aFGeFiYOvqTb74V2mHkQ8IXjBKhMuKrMJIoLOQlmVGIiIlyPmXdguwJ6d8J/CZ1H0m4iB1Gr4D569HjCZalPaNoxeWtd5jKf4TRkpy30syh3KbLXPVZsWdIIQUK6dO8Jl+dkbUB6GfRranwIWx3hUzeVi5fRmggtDA6b/dWO3ELkLiF4QldqoXOPxhe8QOjt57LUpXhguGUhtEUFUtq9EBzUQluQWrphIV1oA1JLm0R6VFqh0z21eH30XmjFdofbF14dgC5PG1zS0w9pjuYFF2UYL9KHiXJGYhhXJkwLEk1RvrEMZVWmpgvSVC1XtEtNlYOAL1JYrdESOg3lcGtFQsVGs+Nu++msHdiu0BNEQQ5vYKssIWxQx3JNc1AqnbTFmg3qSoKmYz0mb//S7QDU1k5Vdu+VSnUFyA3aBES1ca9zkqb4PPVQUUVG74OVRfUNSqencXh+UR1sUnfqgy6+qLrVn75QThRt0I26VG0FU4dbRNfE1ULpqVVBIZBTN/kJ0PBDxY6QEbpp5v27JFCxI5xm1k3oIxT+Q+Wowgl93dIJhHzqVrW5erd0QrdIxUE8wFXxcL9IBXSlSRcLuSnq3NR+OZBq4ZWD1FXr8sn9wivVEjcPwtVuKtd6XOKmWUzoQeY/dCczHBcTKpZtnr2QB104gN70ukm+QNaHzBJV7DhbIAt/040ERMMXnbUDAwOtgvZVsUo0KaCi9Omib/SCqleKhE7KSsNIIt7IkFXoi40MSBrNO28X+ooHOKxWqPpuoVHRh7FDo3+pyHsorOZyG5R0w5kPUZmJffYFIrLhTLi1DzFJT0X+aWaZ3JGtfcJNlCvesTOuIpAcLBrdRIms5g4s+jFlM0PFPYY6ul1VtDG4PJzwqQHnGGpKKlA1fVKN0VqxX31Tx1DjOTBXaRFvs3vaWdkniPIEF3hdGgEmxpev0VpeHNf8ZuiROMBhet0hMch9qkogR2wXbeSojHI22jd5ifp1cLbY9dHB8NWhJCbOgkYzBxpFzxH3wu74F++ro8ckWsM7a5l7/IuzVnAxJX1MojGQ3shHslKCPPimY+b+jYfmU0qONPIOj5rzK9lDi33OyQttVpEaglXXMFoabQVmqny3QxaBW4opM3o4CtwDJazWGZtAUMi12ONkAtGMrNGS/1QI5yb+CxciLmc8EwoDKEokefK6CBKPRf47Mj/MEIujvv+MzA/6kKQLCR7y18q5Y8AjiWryrR1T9uwp/RqJ3YUdGWBxYUeR2RzN7gThn6ifCrtLaA7X/dwG4xtusvg+24uVihzKtr/Cqrh7OFPdcVlYcXItmyHS7x67ROwyxxTceAHegqsLHVOQ4WLH00sdE5DhUsev2IbaznR95gKrCnDGi0oXDOmTRrmvhP3i712+u+LvXXO84u9dKL2Cf3V33X7+i6u7N/y5S9IdvOvoF0G/19GP9tfR/wPQ21eEI8clLwAAAABJRU5ErkJggg==`;export{je as a,Ae as i,Ie as n,ke as r,Le as t};
|
|
1
|
+
import{A as e,B as t,G as n,Gt as r,H as i,I as a,Jt as o,K as s,Mt as c,N as l,Ot as u,Q as d,Rt as f,St as p,T as m,U as h,Vt as g,Wt as _,Y as v,ft as y,ht as b,it as x,j as S,k as C,mt as w,nt as T,p as E,pt as D,tt as O,wt as k,x as ee,z as A}from"./vendor-chart-Dw-P17PN.js";import{a as j,c as M,i as N,t as P}from"./install-Cn-SLM3u.js";import{c as te,d as F,n as I,r as L,u as R}from"./runtime-BTM7t9of.js";import{At as ne,Ct as z,R as B,_ as re,h as ie,m as V,nt as ae,ot as H,rt as U,st as W,wt as G,zt as oe}from"./use-deprecated-B-uvyrTL.js";import{t as se}from"./tooltip-bsBfzZxe.js";import{r as K}from"./aria-8oQuUBWy.js";import{n as ce}from"./vnode-tCZAUc1D.js";import{t as q}from"./click-outside-CPwvCpQu.js";import{t as le}from"./collapse-transition-BUGXhx7B.js";import{J,Qi as Y,na as X,ua as ue}from"./index-0RhdvXdP.js";var de=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll(`li`),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){let e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener(`keydown`,t=>{let n=!1;switch(t.code){case X.down:this.gotoSubIndex(this.subIndex+1),n=!0;break;case X.up:this.gotoSubIndex(this.subIndex-1),n=!0;break;case X.tab:K(e,`mouseleave`);break;case X.enter:case X.numpadEnter:case X.space:n=!0,t.currentTarget.click();break}return n&&(t.preventDefault(),t.stopPropagation()),!1})})}},fe=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute(`tabindex`,`0`);let t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new de(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener(`keydown`,e=>{let t=!1;switch(e.code){case X.down:K(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break;case X.up:K(e.currentTarget,`mouseenter`),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break;case X.tab:K(e.currentTarget,`mouseleave`);break;case X.enter:case X.numpadEnter:case X.space:t=!0,e.currentTarget.click();break}t&&e.preventDefault()})}},pe=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){let t=this.domNode.childNodes;Array.from(t).forEach(t=>{t.nodeType===1&&new fe(t,e)})}},me=j(A({...A({name:`ElMenuCollapseTransition`}),setup(e){let t=M(`menu`),r={onBeforeEnter:e=>e.style.opacity=`0.2`,onEnter(e,n){U(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=`1`,n()},onAfterEnter(e){W(e,`${t.namespace.value}-opacity-transition`),e.style.opacity=``},onBeforeLeave(e){e.dataset||={},H(e,t.m(`collapse`))?(W(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),U(e,t.m(`collapse`))):(U(e,t.m(`collapse`)),e.dataset.oldOverflow=e.style.overflow,e.dataset.scrollWidth=e.clientWidth.toString(),W(e,t.m(`collapse`))),e.style.width=`${e.scrollWidth}px`,e.style.overflow=`hidden`},onLeave(e){U(e,`horizontal-collapse-transition`),e.style.width=`${e.dataset.scrollWidth}px`}};return(e,t)=>(O(),S(E,n({mode:`out-in`},c(r)),{default:w(()=>[x(e.$slots,`default`)]),_:3},16))}}),[[`__file`,`menu-collapse-transition.vue`]]);function he(e,t){let n=C(()=>{let n=e.parent,r=[t.value];for(;n.type.name!==`ElMenu`;)n.props.index&&r.unshift(n.props.index),n=n.parent;return r});return{parentMenu:C(()=>{let t=e.parent;for(;t&&![`ElMenu`,`ElSubMenu`].includes(t.type.name);)t=t.parent;return t}),indexPath:n}}function ge(e){return C(()=>{let t=e.backgroundColor;return t?new Y(t).shade(20).toString():``})}var _e=(e,t)=>{let n=M(`menu`);return C(()=>n.cssVarBlock({"text-color":e.textColor||``,"hover-text-color":e.textColor||``,"bg-color":e.backgroundColor||``,"hover-bg-color":ge(e).value||``,"active-color":e.activeTextColor||``,level:`${t}`}))},Z=`rootMenu`,Q=`subMenu:`,ve=I({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:V},expandOpenIcon:{type:V},collapseCloseIcon:{type:V},collapseOpenIcon:{type:V}}),ye=`ElSubMenu`,be=A({name:ye,props:ve,setup(e,{slots:n,expose:r}){let a=t(),{indexPath:o,parentMenu:s}=he(a,C(()=>e.index)),c=M(`menu`),l=M(`sub-menu`),u=h(Z);u||G(ye,`can not inject root menu`);let f=h(`${Q}${s.value.uid}`);f||G(ye,`can not inject sub menu`);let g=k({}),x=k({}),S,w=k(!1),E=k(),D=k(),O=C(()=>L.value===`horizontal`&&j.value?`bottom-start`:`right-start`),A=C(()=>L.value===`horizontal`&&j.value||L.value===`vertical`&&!u.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?F.value?e.expandOpenIcon:e.expandCloseIcon:ie:e.collapseCloseIcon&&e.collapseOpenIcon?F.value?e.collapseOpenIcon:e.collapseCloseIcon:re),j=C(()=>f.level===0),N=C(()=>{let t=e.teleported;return R(t)?j.value:t}),P=C(()=>u.props.collapse?`${c.namespace.value}-zoom-in-left`:`${c.namespace.value}-zoom-in-top`),te=C(()=>L.value===`horizontal`&&j.value?[`bottom-start`,`bottom-end`,`top-start`,`top-end`,`right-start`,`left-start`]:[`right-start`,`right`,`right-end`,`left-start`,`bottom-start`,`bottom-end`,`top-start`,`top-end`]),F=C(()=>u.openedMenus.includes(e.index)),I=C(()=>[...Object.values(g.value),...Object.values(x.value)].some(({active:e})=>e)),L=C(()=>u.props.mode),ne=C(()=>u.props.persistent),z=p({index:e.index,indexPath:o,active:I}),B=_e(u.props,f.level+1),V=C(()=>e.popperOffset??u.props.popperOffset),H=C(()=>e.popperClass??u.props.popperClass),U=C(()=>e.showTimeout??u.props.showTimeout),W=C(()=>e.hideTimeout??u.props.hideTimeout),K=()=>(D.value?.popperRef?.popperInstanceRef)?.destroy(),ce=e=>{e||K()},q=()=>{u.props.menuTrigger===`hover`&&u.props.mode===`horizontal`||u.props.collapse&&u.props.mode===`vertical`||e.disabled||u.handleSubMenuClick({index:e.index,indexPath:o.value,active:I.value})},J=(t,n=U.value)=>{var r;if(t.type!==`focus`){if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`||e.disabled){f.mouseInChild.value=!0;return}f.mouseInChild.value=!0,S?.(),{stop:S}=oe(()=>{u.openMenu(e.index,o.value)},n),N.value&&((r=s.value.vnode.el)==null||r.dispatchEvent(new MouseEvent(`mouseenter`)))}},Y=(t=!1)=>{var n;if(u.props.menuTrigger===`click`&&u.props.mode===`horizontal`||!u.props.collapse&&u.props.mode===`vertical`){f.mouseInChild.value=!1;return}S?.(),f.mouseInChild.value=!1,{stop:S}=oe(()=>!w.value&&u.closeMenu(e.index,o.value),W.value),N.value&&t&&((n=f.handleMouseleave)==null||n.call(f,!0))};return y(()=>u.props.collapse,e=>ce(!!e)),T(`${Q}${a.uid}`,{addSubMenu:e=>{x.value[e.index]=e},removeSubMenu:e=>{delete x.value[e.index]},handleMouseleave:Y,mouseInChild:w,level:f.level+1}),r({opened:F}),d(()=>{u.addSubMenu(z),f.addSubMenu(z)}),v(()=>{f.removeSubMenu(z),u.removeSubMenu(z)}),()=>{let t=[n.title?.call(n),i(ae,{class:l.e(`icon-arrow`),style:{transform:F.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&u.props.collapse?`none`:`rotateZ(180deg)`:`none`}},{default:()=>_(A.value)?i(a.appContext.components[A.value]):i(A.value)})],r=u.isMenuPopup?i(se,{ref:D,visible:F.value,effect:`light`,pure:!0,offset:V.value,showArrow:!1,persistent:ne.value,popperClass:H.value,placement:O.value,teleported:N.value,fallbackPlacements:te.value,transition:P.value,gpuAcceleration:!1},{content:()=>i(`div`,{class:[c.m(L.value),c.m(`popup-container`),H.value],onMouseenter:e=>J(e,100),onMouseleave:()=>Y(!0),onFocus:e=>J(e,100)},[i(`ul`,{class:[c.b(),c.m(`popup`),c.m(`popup-${O.value}`)],style:B.value},[n.default?.call(n)])]),default:()=>i(`div`,{class:l.e(`title`),onClick:q},t)}):i(m,{},[i(`div`,{class:l.e(`title`),ref:E,onClick:q},t),i(le,{},{default:()=>b(i(`ul`,{role:`menu`,class:[c.b(),c.m(`inline`)],style:B.value},[n.default?.call(n)]),[[ee,F.value]])})]);return i(`li`,{class:[l.b(),l.is(`active`,I.value),l.is(`opened`,F.value),l.is(`disabled`,e.disabled)],role:`menuitem`,ariaHaspopup:!0,ariaExpanded:F.value,onMouseenter:J,onMouseleave:()=>Y(),onFocus:J},[r])}}}),xe=I({mode:{type:String,values:[`horizontal`,`vertical`],default:`vertical`},defaultActive:{type:String,default:``},defaultOpeneds:{type:L(Array),default:()=>ue([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:[`hover`,`click`],default:`hover`},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:V,default:()=>B},popperEffect:{type:L(String),default:`dark`},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),Se=e=>f(e)&&e.every(e=>_(e)),Ce=A({name:`ElMenu`,props:xe,emits:{close:(e,t)=>_(e)&&Se(t),open:(e,t)=>_(e)&&Se(t),select:(e,t,n,r)=>_(e)&&Se(t)&&g(n)&&(R(r)||r instanceof Promise)},setup(e,{emit:n,slots:r,expose:a}){let o=t(),c=o.appContext.config.globalProperties.$router,l=k(),u=M(`menu`),f=M(`sub-menu`),m=k(-1),h=k(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=k(e.defaultActive),_=k({}),v=k({}),x=C(()=>e.mode===`horizontal`||e.mode===`vertical`&&e.collapse),S=()=>{let t=g.value&&_.value[g.value];!t||e.mode===`horizontal`||e.collapse||t.indexPath.forEach(e=>{let t=v.value[e];t&&w(e,t.indexPath)})},w=(t,r)=>{h.value.includes(t)||(e.uniqueOpened&&(h.value=h.value.filter(e=>r.includes(e))),h.value.push(t),n(`open`,t,r))},E=e=>{let t=h.value.indexOf(e);t!==-1&&h.value.splice(t,1)},O=(e,t)=>{E(e),n(`close`,e,t)},ee=({index:e,indexPath:t})=>{h.value.includes(e)?O(e,t):w(e,t)},A=t=>{(e.mode===`horizontal`||e.collapse)&&(h.value=[]);let{index:r,indexPath:i}=t;if(!(F(r)||F(i)))if(e.router&&c){let e=t.route||r,a=c.push(e).then(e=>(e||(g.value=r),e));n(`select`,r,i,{index:r,indexPath:i,route:e},a)}else g.value=r,n(`select`,r,i,{index:r,indexPath:i})},j=t=>{let n=_.value;g.value=(n[t]||g.value&&n[g.value]||n[e.defaultActive])?.index??t},N=e=>{let t=getComputedStyle(e),n=Number.parseInt(t.marginLeft,10),r=Number.parseInt(t.marginRight,10);return e.offsetWidth+n+r||0},P=()=>{if(!l.value)return-1;let e=Array.from(l.value?.childNodes??[]).filter(e=>e.nodeName!==`#text`||e.nodeValue),t=getComputedStyle(l.value),n=Number.parseInt(t.paddingLeft,10),r=Number.parseInt(t.paddingRight,10),i=l.value.clientWidth-n-r,a=0,o=0;return e.forEach((e,t)=>{e.nodeName!==`#comment`&&(a+=N(e),a<=i-64&&(o=t+1))}),o===e.length?-1:o},te=e=>v.value[e].indexPath,I=(e,t=33.34)=>{let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e()},t)}},L=!0,R=()=>{if(m.value===P())return;let e=()=>{m.value=-1,s(()=>{m.value=P()})};L?e():I(e)(),L=!1};y(()=>e.defaultActive,e=>{_.value[e]||(g.value=``),j(e)}),y(()=>e.collapse,e=>{e&&(h.value=[])}),y(_.value,S);let z;D(()=>{e.mode===`horizontal`&&e.ellipsis?z=ne(l,R).stop:z?.()});let B=k(!1);{let t=e=>{v.value[e.index]=e},n=e=>{delete v.value[e.index]};T(Z,p({props:e,openedMenus:h,items:_,subMenus:v,activeIndex:g,isMenuPopup:x,addMenuItem:e=>{_.value[e.index]=e},removeMenuItem:e=>{delete _.value[e.index]},addSubMenu:t,removeSubMenu:n,openMenu:w,closeMenu:O,handleMenuItemClick:A,handleSubMenuClick:ee})),T(`${Q}${o.uid}`,{addSubMenu:t,removeSubMenu:n,mouseInChild:B,level:0})}d(()=>{e.mode===`horizontal`&&new pe(o.vnode.el,u.namespace.value)}),a({open:e=>{let{indexPath:t}=v.value[e];t.forEach(e=>w(e,t))},close:E,updateActiveIndex:j,handleResize:R});let re=_e(e,0);return()=>{let t=r.default?.call(r)??[],a=[];if(e.mode===`horizontal`&&l.value){let n=ce(t),r=m.value===-1?n:n.slice(0,m.value),o=m.value===-1?[]:n.slice(m.value);o?.length&&e.ellipsis&&(t=r,a.push(i(be,{index:`sub-menu-more`,class:f.e(`hide-arrow`),popperOffset:e.popperOffset},{title:()=>i(ae,{class:f.e(`icon-more`)},{default:()=>i(e.ellipsisIcon)}),default:()=>o})))}let o=e.closeOnClickOutside?[[q,()=>{h.value.length&&(B.value||(h.value.forEach(e=>n(`close`,e,te(e))),h.value=[]))}]]:[],s=b(i(`ul`,{key:String(e.collapse),role:`menubar`,ref:l,style:re.value,class:{[u.b()]:!0,[u.m(e.mode)]:!0,[u.m(`collapse`)]:e.collapse}},[...t,...a]),o);return e.collapseTransition&&e.mode===`vertical`?i(me,()=>s):s}}}),we=I({index:{type:L([String,null]),default:null},route:{type:L([String,Object])},disabled:Boolean}),Te={click:e=>_(e.index)&&f(e.indexPath)},$=`ElMenuItem`,Ee=j(A({...A({name:$}),props:we,emits:Te,setup(n,{expose:i,emit:a}){let o=n;te(o.index)&&z($,`Missing required prop: "index"`);let s=t(),f=h(Z),g=M(`menu`),_=M(`menu-item`);f||G($,`can not inject root menu`);let{parentMenu:y,indexPath:b}=he(s,u(o,`index`)),T=h(`${Q}${y.value.uid}`);T||G($,`can not inject sub menu`);let E=C(()=>o.index===f.activeIndex),D=p({index:o.index,indexPath:b,active:E}),k=()=>{o.disabled||(f.handleMenuItemClick({index:o.index,indexPath:b.value,route:o.route}),a(`click`,D))};return d(()=>{T.addSubMenu(D),f.addMenuItem(D)}),v(()=>{T.removeSubMenu(D),f.removeMenuItem(D)}),i({parentMenu:y,rootMenu:f,active:E,nsMenu:g,nsMenuItem:_,handleClick:k}),(t,n)=>(O(),l(`li`,{class:r([c(_).b(),c(_).is(`active`,c(E)),c(_).is(`disabled`,t.disabled)]),role:`menuitem`,tabindex:`-1`,onClick:k},[c(y).type.name===`ElMenu`&&c(f).props.collapse&&t.$slots.title?(O(),S(c(se),{key:0,effect:c(f).props.popperEffect,placement:`right`,"fallback-placements":[`left`],persistent:c(f).props.persistent},{content:w(()=>[x(t.$slots,`title`)]),default:w(()=>[e(`div`,{class:r(c(g).be(`tooltip`,`trigger`))},[x(t.$slots,`default`)],2)]),_:3},8,[`effect`,`persistent`])):(O(),l(m,{key:1},[x(t.$slots,`default`),x(t.$slots,`title`)],64))],2))}}),[[`__file`,`menu-item.vue`]]),De={title:String},Oe=j(A({...A({name:`ElMenuItemGroup`}),props:De,setup(t){let n=M(`menu-item-group`);return(t,i)=>(O(),l(`li`,{class:r(c(n).b())},[e(`div`,{class:r(c(n).e(`title`))},[t.$slots.title?x(t.$slots,`title`,{key:1}):(O(),l(m,{key:0},[a(o(t.title),1)],64))],2),e(`ul`,null,[x(t.$slots,`default`)])],2))}}),[[`__file`,`menu-item-group.vue`]]),ke=P(Ce,{MenuItem:Ee,MenuItemGroup:Oe,SubMenu:be}),Ae=N(Ee);N(Oe);var je=N(be),Me=A({props:{collapsed:{type:Boolean,default:!1}},emits:[`click`],computed:{siteTitle(){return this.$store.state.site?.title||`AceData`},url(){let e=this.$store.state.site,t=`https://platform.acedata.cloud/favicon.ico`;return this.collapsed?e?.favicon||e?.logo||t:e?.logo||e?.favicon||t}}}),Ne=[`aria-label`],Pe=[`src`,`alt`];function Fe(t,n,r,i,a,o){return O(),l(`button`,{type:`button`,class:`brand-logo`,"aria-label":t.siteTitle,onClick:n[0]||=e=>t.$emit(`click`)},[e(`img`,{src:t.url,class:`brand-logo__image`,alt:t.siteTitle},null,8,Pe)],8,Ne)}var Ie=J(Me,[[`render`,Fe],[`__scopeId`,`data-v-c9ca5791`]]),Le=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAMFBMVEX///+3t7f4+Pi8vLzAwMDExMTS0tLIyMjk5OTz8/PY2NjOzs7u7u7d3d3p6enh4eFVKkJDAAAIfUlEQVR4nNVd15akOAylyRRQ9f9/O02BZJtgBQszfR/2zPahsJCvguVUFJYop35ux66pq6r6+fn9T910bTv3U2najBXK9zw2PxE07fz+n0Qf+raOyetL3g9PS7vgzRUYULfvZyXuR5nAgLF/SuK3UuJN7gf0PbyErDiieuU1zKmLyFJ3Y9u+vmh//V9dXT/b5VN3f+HbFq82nGivHH6999Vv8rC7P+NFzfBlF56xvl/sEy1Xbc8mZ9m3R7bcrO0jl+vXJH7J0YY78UvYKNuDjpWNTQd9tzd5ks9ePUm92u877WMlp4dhR+Y2OYkYdh3XmKclc9iATVwoXyFLZouXIobuBpEXlK+QcYbK7gOF2NpMaN2Vmfdr71LGirAbW5N3lr4F1rckC0GQbQw6cqrM1XACvzOr5EjT+2q+L24Vk6/sRGL7no6t5un9eQE+7JG4r+wk3+e9iGfXwzyeZHLjzDGFt0fEBB564ymOeRwzCg8dHaZ9kx8NZGZ8+UyOv0bSW3o9q5Tac5+0luajjGfqpsT2krIuTeaKZGQf4UUIKpx6xFbo2nGD9HSlpJZAGfSQILVjV02Z4CQsJhD2UdbcJ/dwyRfpNvozwaLo4q/0nMhLIrMThJSZZ4EhiJd6Ugti43SvzCTlPKnZmUNZMV+u4cYKwp85XlfcTBi/s6Z+MZ2LxADhGZzUDU9m5zjIr0woQhLxasAHWS7E9TgZU/Z1EBEIjbzxQYYxOudOxu73qTBcUGEaIzqD1hi96W6JTgzRoDSI/UhmITP7yUPFSYqaagD1R4wJkP8VnT8nTwVQqnauN06QjvtCvYt2IL3Zm/Uk9jjDz0RmMLggwx3SOuIUSniGpJv3bAJo1SAFr9mKH8aI+LqkI0RFtoIh9/L76Cc8GLCDoxxSjyAHgxxFYSEzJ18Ggly4YHQHnCQ2LRoCGINXQirim0JYUJpDatf/p24PP4mVwSblSg6MEhDGuzNVg6J5o8nEvAPAGZiAfk5MDRXNqxcmx/AVHPMprx8G1TEHwOzqTByseTgoDRxYDT6akSh9YSMzr6aLidOeTGCj3EqDkdC8GU9Q9c6voYlyJzxy0sOxOnRs8C3sQpSR92DOO4EDCXkAzoA935bPTy8AIgTBCIIyvyZsExF/uM2Byfk9A7VafuksfdyygFmJcc35NZ7tT5xUYMNwJYcI/FouGP7xOyT1YBOh+aVcsCHHBWCHZHLTxOfxF6ZA8HP82P7ASv4BJj5PMNMO/g3+H9ghqrtnGm4hIJLAd7byVxg5asGCA+AH2N2meYHvKPxZmQRIGtyMaOMweC/ZXJJJdJE0CF27Bm0oK8kWLKSWHxeILB8s7xN8gmxFi0VIFAkNqd5KiI3S7JBqJ7Ssycb70vAL2LAofMiE9hkBrQvX4OTXNLS4eGpwA8KlaxaGKHOy4OWWcSVoXSZz9ohYYLaxpB8bv4V2aFGeFiYOvqTb74V2mHkQ8IXjBKhMuKrMJIoLOQlmVGIiIlyPmXdguwJ6d8J/CZ1H0m4iB1Gr4D569HjCZalPaNoxeWtd5jKf4TRkpy30syh3KbLXPVZsWdIIQUK6dO8Jl+dkbUB6GfRranwIWx3hUzeVi5fRmggtDA6b/dWO3ELkLiF4QldqoXOPxhe8QOjt57LUpXhguGUhtEUFUtq9EBzUQluQWrphIV1oA1JLm0R6VFqh0z21eH30XmjFdofbF14dgC5PG1zS0w9pjuYFF2UYL9KHiXJGYhhXJkwLEk1RvrEMZVWmpgvSVC1XtEtNlYOAL1JYrdESOg3lcGtFQsVGs+Nu++msHdiu0BNEQQ5vYKssIWxQx3JNc1AqnbTFmg3qSoKmYz0mb//S7QDU1k5Vdu+VSnUFyA3aBES1ca9zkqb4PPVQUUVG74OVRfUNSqencXh+UR1sUnfqgy6+qLrVn75QThRt0I26VG0FU4dbRNfE1ULpqVVBIZBTN/kJ0PBDxY6QEbpp5v27JFCxI5xm1k3oIxT+Q+Wowgl93dIJhHzqVrW5erd0QrdIxUE8wFXxcL9IBXSlSRcLuSnq3NR+OZBq4ZWD1FXr8sn9wivVEjcPwtVuKtd6XOKmWUzoQeY/dCczHBcTKpZtnr2QB104gN70ukm+QNaHzBJV7DhbIAt/040ERMMXnbUDAwOtgvZVsUo0KaCi9Omib/SCqleKhE7KSsNIIt7IkFXoi40MSBrNO28X+ooHOKxWqPpuoVHRh7FDo3+pyHsorOZyG5R0w5kPUZmJffYFIrLhTLi1DzFJT0X+aWaZ3JGtfcJNlCvesTOuIpAcLBrdRIms5g4s+jFlM0PFPYY6ul1VtDG4PJzwqQHnGGpKKlA1fVKN0VqxX31Tx1DjOTBXaRFvs3vaWdkniPIEF3hdGgEmxpev0VpeHNf8ZuiROMBhet0hMch9qkogR2wXbeSojHI22jd5ifp1cLbY9dHB8NWhJCbOgkYzBxpFzxH3wu74F++ro8ckWsM7a5l7/IuzVnAxJX1MojGQ3shHslKCPPimY+b+jYfmU0qONPIOj5rzK9lDi33OyQttVpEaglXXMFoabQVmqny3QxaBW4opM3o4CtwDJazWGZtAUMi12ONkAtGMrNGS/1QI5yb+CxciLmc8EwoDKEokefK6CBKPRf47Mj/MEIujvv+MzA/6kKQLCR7y18q5Y8AjiWryrR1T9uwp/RqJ3YUdGWBxYUeR2RzN7gThn6ifCrtLaA7X/dwG4xtusvg+24uVihzKtr/Cqrh7OFPdcVlYcXItmyHS7x67ROwyxxTceAHegqsLHVOQ4WLH00sdE5DhUsev2IbaznR95gKrCnDGi0oXDOmTRrmvhP3i712+u+LvXXO84u9dKL2Cf3V33X7+i6u7N/y5S9IdvOvoF0G/19GP9tfR/wPQ21eEI8clLwAAAABJRU5ErkJggg==`;export{je as a,Ae as i,Ie as n,ke as r,Le as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,t}from"./rolldown-runtime--c01j_DQ.js";import{in as n}from"./index-
|
|
1
|
+
import{o as e,t}from"./rolldown-runtime--c01j_DQ.js";import{in as n}from"./index-0RhdvXdP.js";import{i as r,l as i,n as a,o,t as s}from"./lit-Czpkz5lw.js";import{a as c,i as l,n as u,o as d,r as f,t as p}from"./wui-text-IdpNh4yv.js";import{$ as m,G as h,H as g,J as _,K as v,Q as ee,U as y,W as b,X as x,Y as S,Z as C,a as w,et as te,g as T,i as ne,n as E,p as re,r as D,s as O,u as ie,v as ae}from"./ConstantsUtil-CiJQ7E9o.js";import{n as oe,t as se}from"./ConnectorUtil-BNHqGaBo.js";var ce=i`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
background-color: var(--wui-color-gray-glass-002);
|