comp-hub 0.29.7 → 0.29.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +132 -132
  2. package/bin/cli.js +53 -53
  3. package/bin/lib/commands.js +173 -173
  4. package/bin/lib/constants.js +22 -22
  5. package/bin/lib/http.js +62 -62
  6. package/bin/lib/startup.js +183 -183
  7. package/bin/lib/utils.js +112 -112
  8. package/dist/index.js +1 -1
  9. package/dist/website/container/assets/{index-CfBoiGrX.css → index-BlSriQ8o.css} +1 -1
  10. package/dist/website/container/assets/{index-BeeqGiFl.js → index-rRWp31us.js} +1 -1
  11. package/dist/website/container/index.html +32 -32
  12. package/dist/website/container/js/vue2-sfc-loader.js +260 -260
  13. package/dist/website/container/js/vue3-sfc-loader.js +289 -289
  14. package/dist/website/item/assets/index-CDQboxOq.css +1 -0
  15. package/dist/website/item/assets/{index-D3VEpySe.js → index-DIJTHUc5.js} +3 -3
  16. package/dist/website/item/index.html +30 -30
  17. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CSa_pS0b.js +1 -0
  18. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-BCEeHWp0.js +1 -0
  19. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-B9sbaztP.js +1 -0
  20. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-I_B9sBtb.js +1 -0
  21. package/dist/website/main/assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-vaWJXLBi.js +1 -0
  22. package/dist/website/main/assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-Brp0esZx.js +1 -0
  23. package/dist/website/main/assets/PanelBackground.vue_vue_type_script_setup_true_lang-Dp5z6Iw1.js +1 -0
  24. package/dist/website/main/assets/cloud-upload-DRSmr6Qo.js +1 -0
  25. package/dist/website/main/assets/core-YKf42450.js +3 -0
  26. package/dist/website/main/assets/{el-table-column-BaabKDRF.js → el-table-column-B36K2Har.js} +1 -1
  27. package/dist/website/main/assets/home-rounded--9AAXiZb.js +1 -0
  28. package/dist/website/main/assets/index-BHVQkNA2.js +1 -0
  29. package/dist/website/main/assets/index-BV4gqPW9.js +1 -0
  30. package/dist/website/main/assets/{index-9ejOpPXc.js → index-BW8vDkye.js} +3 -3
  31. package/dist/website/main/assets/index-BXjslBXB.js +1 -0
  32. package/dist/website/main/assets/index-BmnVYsjU.js +1 -0
  33. package/dist/website/main/assets/index-C-RbFIGY.js +1 -0
  34. package/dist/website/main/assets/index-C-elMysi.js +1 -0
  35. package/dist/website/main/assets/index-CCE8UKEc.js +1 -0
  36. package/dist/website/main/assets/index-CJu9086M.js +2 -0
  37. package/dist/website/main/assets/index-CN4epH6N.js +1 -0
  38. package/dist/website/main/assets/{index-CyPExloz.css → index-CRFJskzu.css} +1 -1
  39. package/dist/website/main/assets/index-CTk2LB3W.js +1 -0
  40. package/dist/website/main/assets/index-CWZwdzIK.js +1 -0
  41. package/dist/website/main/assets/index-CYRE55Ch.js +1 -0
  42. package/dist/website/main/assets/index-CYvMpsAk.js +1 -0
  43. package/dist/website/main/assets/index-CdGhZYup.js +1 -0
  44. package/dist/website/main/assets/index-CfYP0TVV.js +1 -0
  45. package/dist/website/main/assets/index-D-zBzPPy.css +1 -0
  46. package/dist/website/main/assets/index-D2HIFwH2.js +1 -0
  47. package/dist/website/main/assets/index-D8FvfjtO.js +1 -0
  48. package/dist/website/main/assets/index-DGeSXL3t.js +1 -0
  49. package/dist/website/main/assets/index-DW1TR3IW.js +1 -0
  50. package/dist/website/main/assets/index-DhAkucE9.js +1 -0
  51. package/dist/website/main/assets/index-Dl_h7vrN.js +2 -0
  52. package/dist/website/main/assets/index-DpHwEP_B.js +1 -0
  53. package/dist/website/main/assets/{index-CpXbVBP2.js → index-Ds4AosT0.js} +5 -5
  54. package/dist/website/main/assets/index-DwBDz4RR.js +1 -0
  55. package/dist/website/main/assets/{index-Cl0SK7oa.css → index-DxyEzkir.css} +1 -1
  56. package/dist/website/main/assets/index-EHIrsqSu.js +1 -0
  57. package/dist/website/main/assets/index-FFTkVbVX.css +1 -0
  58. package/dist/website/main/assets/index-M80Ed-Pb.js +1 -0
  59. package/dist/website/main/assets/index-Mryq8zw5.js +5 -0
  60. package/dist/website/main/assets/index-PeLBbpUx.js +1 -0
  61. package/dist/website/main/assets/index-QX7WDOzk.js +1 -0
  62. package/dist/website/main/assets/{index-C8unIZll.css → index-WO9Mrc8w.css} +1 -1
  63. package/dist/website/main/assets/index-qAhDQceU.js +1 -0
  64. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BfK34NCv.js +1 -0
  65. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DjS3Q9-g.js +1 -0
  66. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DtekInbn.js +1 -0
  67. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-RkEocesH.js +1 -0
  68. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-XpLtazGO.js +2 -0
  69. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-m8-lu9dQ.js +1 -0
  70. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-t5Qr3Cck.js +1 -0
  71. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-D39LYnj3.js → index.vue_vue_type_style_index_0_lang-B-Okzh4k.js} +1 -1
  72. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-BCmjNfvt.js +6 -0
  73. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-CTWQlkPh.js +1 -0
  74. package/dist/website/main/assets/kid-star-DWSbAoDk.js +1 -0
  75. package/dist/website/main/assets/md5-BVscxO09.js +1 -0
  76. package/dist/website/main/assets/settings-DyQPsIIk.js +1 -0
  77. package/dist/website/main/assets/supervised-user-circle-BzCVjgAw.js +1 -0
  78. package/dist/website/main/assets/sync-saved-locally-rounded-Dm232VG8.js +1 -0
  79. package/dist/website/main/assets/terminal-Cpm-3gfc.js +1 -0
  80. package/dist/website/main/assets/useCacheOssStore-BUYcRp33.js +1 -0
  81. package/dist/website/main/assets/{useCompEditStore-DCFM66C4.js → useCompEditStore-CCV6awON.js} +2 -2
  82. package/dist/website/main/assets/{useCompEditStore-DfjsDbzX.css → useCompEditStore-CxnuC31d.css} +1 -1
  83. package/dist/website/main/assets/useCompMetaLocalStore-ke8aERqo.js +1 -0
  84. package/dist/website/main/assets/useKeyword-BWlKaVGC.js +1 -0
  85. package/dist/website/main/assets/useMessage-DGNISOif.js +1 -0
  86. package/dist/website/main/assets/{useTeamHeaders-kxuE8Q8s.js → useTeamHeaders-CXV6avPM.js} +1 -1
  87. package/dist/website/main/assets/useVscodeOpen-W9IOZ_u_.js +1 -0
  88. package/dist/website/main/assets/{vendor-core-B1hRUZR_.js → vendor-core-BHu_Iam8.js} +1 -1
  89. package/dist/website/main/assets/{vendor-ui-CMQTpMsc.js → vendor-ui-Lm7VJSSH.js} +2 -2
  90. package/dist/website/main/assets/{vendor-xterm-mNFjEaKn.js → vendor-xterm-DbWxaMay.js} +1 -1
  91. package/dist/website/main/index.html +4 -4
  92. package/package.json +45 -45
  93. package/dist/website/item/assets/index-BZnlGnqP.css +0 -1
  94. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-sJqw3hBL.js +0 -1
  95. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js +0 -1
  96. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js +0 -1
  97. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-CPSb3doF.js +0 -1
  98. package/dist/website/main/assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js +0 -1
  99. package/dist/website/main/assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js +0 -1
  100. package/dist/website/main/assets/PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js +0 -1
  101. package/dist/website/main/assets/cloud-upload-BZUdgCdI.js +0 -1
  102. package/dist/website/main/assets/core-CduF1cve.js +0 -3
  103. package/dist/website/main/assets/home-rounded-CAKszmlU.js +0 -1
  104. package/dist/website/main/assets/index-B2G95uaY.js +0 -1
  105. package/dist/website/main/assets/index-BI1iHj1p.js +0 -2
  106. package/dist/website/main/assets/index-BerOWbR5.js +0 -1
  107. package/dist/website/main/assets/index-Bg2Ll1MS.js +0 -1
  108. package/dist/website/main/assets/index-Bk2GHNDj.js +0 -1
  109. package/dist/website/main/assets/index-Bn9djJ1D.js +0 -1
  110. package/dist/website/main/assets/index-BoBZsqw_.js +0 -1
  111. package/dist/website/main/assets/index-Bth_SWAt.css +0 -1
  112. package/dist/website/main/assets/index-BvkOcMzw.js +0 -1
  113. package/dist/website/main/assets/index-BzJsbiup.js +0 -1
  114. package/dist/website/main/assets/index-C-ssDsWy.js +0 -1
  115. package/dist/website/main/assets/index-C4QJD9AO.js +0 -1
  116. package/dist/website/main/assets/index-CSqRH-KQ.js +0 -1
  117. package/dist/website/main/assets/index-CUiK2qn1.js +0 -1
  118. package/dist/website/main/assets/index-CZwZuk3-.js +0 -1
  119. package/dist/website/main/assets/index-ChEH9AoP.js +0 -1
  120. package/dist/website/main/assets/index-D4G87Mom.js +0 -1
  121. package/dist/website/main/assets/index-D6J3GPPV.js +0 -1
  122. package/dist/website/main/assets/index-DDnVu2nK.js +0 -1
  123. package/dist/website/main/assets/index-DJ4AvgpT.css +0 -1
  124. package/dist/website/main/assets/index-DL5xk_C7.js +0 -1
  125. package/dist/website/main/assets/index-DLWhyZSM.js +0 -2
  126. package/dist/website/main/assets/index-DO0i9je3.js +0 -5
  127. package/dist/website/main/assets/index-DYjUv_9s.js +0 -1
  128. package/dist/website/main/assets/index-De1XOjmk.js +0 -1
  129. package/dist/website/main/assets/index-DmCMPHi-.js +0 -1
  130. package/dist/website/main/assets/index-Dmk2WbAD.js +0 -1
  131. package/dist/website/main/assets/index-DryBDQGT.js +0 -1
  132. package/dist/website/main/assets/index-Dy_awGYi.js +0 -1
  133. package/dist/website/main/assets/index-QDcOlnTv.js +0 -1
  134. package/dist/website/main/assets/index-evWJEs_J.js +0 -1
  135. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js +0 -1
  136. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BHRL6G5S.js +0 -1
  137. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CKf4glow.js +0 -1
  138. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CVAkHJvA.js +0 -1
  139. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Cnaq7WZP.js +0 -1
  140. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js +0 -2
  141. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-qqOG6j-E.js +0 -1
  142. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-Cm4wH59u.js +0 -6
  143. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-D2h7hdt0.js +0 -1
  144. package/dist/website/main/assets/kid-star-FcmIH9T1.js +0 -1
  145. package/dist/website/main/assets/md5-DEHaPvGx.js +0 -1
  146. package/dist/website/main/assets/settings-DST6rYZI.js +0 -1
  147. package/dist/website/main/assets/supervised-user-circle-5toxzbuX.js +0 -1
  148. package/dist/website/main/assets/sync-saved-locally-rounded-ekj1nT7F.js +0 -1
  149. package/dist/website/main/assets/terminal-CiPichiX.js +0 -1
  150. package/dist/website/main/assets/useCacheOssStore-D1ihuvZi.js +0 -1
  151. package/dist/website/main/assets/useCompMetaLocalStore-CnMRn13T.js +0 -1
  152. package/dist/website/main/assets/useKeyword-2O8Qbig-.js +0 -1
  153. package/dist/website/main/assets/useMessage-C_SU5QaN.js +0 -1
  154. package/dist/website/main/assets/useVscodeOpen-CA_im4Vj.js +0 -1
@@ -1 +0,0 @@
1
- import{N as F,ao as G,s as S,v as H,Q,aj as b,D as q,az as W,aA as Z,aB as ee,G as te,C as ae,H as oe}from"./vendor-ui-CMQTpMsc.js";import{t as B,b as k,e as v,v as ne}from"./index-CpXbVBP2.js";/* empty css */import{I,aA as g,O as m,P as h,R as s,a1 as i,u as e,a2 as n,H as Y,af as j,m as P,Q as $,Y as o,a0 as N,aG as z,ak as L,Z as se,ar as le,a as R,aD as ce,$ as J,aJ as me,aC as de,f as ie}from"./vendor-core-B1hRUZR_.js";/* empty css */import{_ as U}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js";import{_ as ue}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import{_ as _e}from"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";const re={class:"size-full p-[10px]"},pe={class:"text-center mt-[30px] text-lg font-medium"},fe={class:"text-sm"},Ee=I({__name:"CreateTeamDesc",setup(A){const{t}=g(),r={CREATE:5,JOIN:5,MEMBER:5,COMP:30},a=P(()=>[t("team.descItem1"),t("team.descItem2",{count:r.CREATE}),t("team.descItem3",{count:r.JOIN}),t("team.descItem4",{count:r.MEMBER}),t("team.descItem5",{count:r.COMP}),t("team.descItem6")]);return(p,f)=>{const d=F;return m(),h("div",re,[s("div",pe,i(e(t)("team.descTitle")),1),n(d),s("ul",fe,[(m(!0),h(Y,null,j(a.value,u=>(m(),h("li",{key:u,class:"break-all m-[10px] leading-relaxed"},i(u),1))),128))])])}}}),Te={class:"flex items-center justify-between mb-4"},ve={class:"text-xl flex-1 font-semibold text-center"},xe={class:"space-y-2 text-sm"},he={class:"flex"},Ae={class:"text-right"},ye={class:"font-mono"},Ce={class:"flex"},$e={class:"text-right"},Me={class:"mt-6"},Ie=I({__name:"TeamItem",props:{teamDetail:{type:Object,default:()=>({})}},emits:["apply"],setup(A){const{t}=g(),r=A,a=P(()=>({...r.teamDetail?.creatorId}));return(p,f)=>{const d=S,u=G;return m(),$(u,{"body-class":"!p-0",class:"max-w-xl mx-auto mt-8 p-6"},{default:o(()=>[s("div",Te,[s("h2",ve,i(A.teamDetail.name),1)]),s("div",xe,[s("div",he,[s("span",Ae,i(e(t)("team.code"))+":",1),s("span",ye,i(A.teamDetail.code),1)]),s("div",Ce,[s("span",$e,i(e(t)("team.creator"))+":",1),s("span",null,i(a.value.nickname||a.value.account),1)])]),s("div",Me,[n(e(U),null,{default:o(({instance:E,loading:_})=>[n(d,{loading:_,type:"primary",class:"w-full",onClick:c=>p.$emit("apply",E)},{default:o(()=>[N(i(e(t)("team.applyJoinTeam")),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})}}}),ge={class:"size-full flex flex-col"},be={class:"text-xl font-bold mb-[10px]"},Pe={class:"size-full flex-1"},Re=I({__name:"TeamJoin",emits:["close"],setup(A,{emit:t}){const r=t,{t:a}=g(),p=z(),f=B(),d=R(""),u=R([]);function E(c){if(!d.value){b.error(a("team.pleaseInputTeamCode"));return}u.value=[],c.start(),k.v1Team.teamcontrollerFindbycode({code:d.value}).then(l=>{u.value=l.data?.teams||[]}).finally(()=>{c.end()})}function _(c,l){if(!l._id){b.error(a("team.teamIdNotExist"));return}c.start(),k.v1Team.teamcontrollerJoin({teamId:l._id}).then(y=>{const{team:T,message:M}=y.data;T?(f.addJoinedTeam(T),b.success(a("team.joinSuccess")),r("close"),p.push({name:"team",params:{teamId:T?._id}})):M&&b.success(M)}).finally(()=>{c.end()})}return(c,l)=>{const y=L("Icon"),T=S,M=Q,O=H;return m(),h("div",ge,[s("h2",be,i(e(a)("team.fillTeamCode")),1),n(e(U),null,{default:o(({instance:V,loading:w})=>[se((m(),h("div",Pe,[n(M,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=x=>d.value=x),placeholder:e(a)("team.fillTeamCode"),onKeyup:le(x=>E(V),["enter"])},{append:o(()=>[n(T,{onClick:x=>E(V)},{default:o(()=>[n(y,{icon:"material-symbols:search-rounded"})]),_:1},8,["onClick"])]),_:2},1032,["modelValue","placeholder","onKeyup"]),n(e(ue),{isEmpty:u.value.length===0&&!w},{default:o(()=>[(m(!0),h(Y,null,j(u.value,x=>(m(),h("div",{key:x._id},[n(Ie,{teamDetail:x,onApply:D=>_(D,x)},null,8,["teamDetail","onApply"])]))),128))]),_:1},8,["isEmpty"])])),[[O,w]])]),_:1})])}}}),Ne=I({__name:"TeamCreateConfig",props:{modelValue:{type:Object,default:()=>({})},modelModifiers:{}},emits:["update:modelValue"],setup(A){const{t}=g(),r=ce(A,"modelValue"),a={MIN:2,MAX:10},p=P(()=>({submitBtn:!1,form:{labelWidth:"auto"}})),f=R({name:"",isApplyNeedAudit:!0}),d=P(()=>[{type:"input",field:"name",title:t("team.teamName"),value:"",props:{placeholder:t("team.pleaseInputTeamName")},validate:[{required:!0,message:t("team.pleaseInputTeamName"),trigger:"blur"},{min:a.MIN,max:a.MAX,message:t("team.charLength",{min:a.MIN,max:a.MAX}),trigger:"blur"}]},{type:"switch",field:"isApplyNeedAudit",title:t("team.applyAudit"),value:!0}]);function u(E,_){r.value={...r.value,[E]:_}}return(E,_)=>{const c=L("form-create");return m(),$(c,{modelValue:f.value,"onUpdate:modelValue":_[0]||(_[0]=l=>f.value=l),rule:d.value,option:p.value,onChange:u},null,8,["modelValue","rule","option"])}}}),ke={class:"size-full flex flex-col"},Oe={class:"text-xl font-bold mb-[10px]"},Ve={class:"flex justify-end gap-[10px] mt-auto"},we=I({__name:"TeamCreate",emits:["close"],setup(A,{emit:t}){const r=t,{t:a}=g(),p=z(),f=B(),d=R({name:"",isApplyNeedAudit:!0});function u(E){if(!d.value.name){b.error(a("team.pleaseInputTeamName"));return}E.start(),k.v1Team.teamcontrollerCreate({name:d.value.name,isApplyNeedAudit:d.value.isApplyNeedAudit}).then(_=>{const c=_.data;c&&f.addCreatedTeam(c),b.success(a("team.createSuccess")),r("close"),p.push({name:"team",params:{teamId:c?._id}})}).finally(()=>{E.end()})}return(E,_)=>{const c=S;return m(),h("div",ke,[s("h2",Oe,i(e(a)("team.fillTeamName")),1),n(Ne,{modelValue:d.value,"onUpdate:modelValue":_[0]||(_[0]=l=>d.value=l),class:"mt-[10px]"},null,8,["modelValue"]),s("div",Ve,[n(e(U),null,{default:o(({instance:l,loading:y})=>[n(c,{loading:y,type:"primary",onClick:T=>u(l)},{default:o(()=>[N(i(e(a)("common.confirm")),1)]),_:1},8,["loading","onClick"])]),_:1})])])}}}),De={class:"h-[50vh] flex gap-[5px]"},Je={class:"w-[380px]"},Ye={class:"flex-1 flex flex-col"},je=I({__name:"index",setup(A,{expose:t}){const{t:r}=g(),a=R(!1),p=R(""),f=P(()=>p.value===v.TEAM_OPERATE_TYPE_CREATE?r("team.create"):r("team.join"));function d(_){p.value=_,a.value=!0}function u(){a.value=!1}function E(){p.value=""}return t({open:d,close:u}),(_,c)=>(m(),$(e(_e),{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=l=>a.value=l),title:f.value,width:"50%","show-close":"",onClose:E},{default:o(()=>[s("div",De,[s("div",Je,[n(e(Ee))]),s("div",Ye,[p.value===e(v).TEAM_OPERATE_TYPE_CREATE?(m(),$(we,{key:0,onClose:u})):p.value===e(v).TEAM_OPERATE_TYPE_JOIN?(m(),$(Re,{key:1,onClose:u})):J("",!0)])])]),_:1},8,["modelValue","title"]))}}),Se={class:"flex flex-col gap-[10px]"},Be={class:"flex items-center justify-between pl-[26px] pr-[20px]"},ze=["title"],Le={class:"flex-1"},Ue=["title"],Ke={class:"truncate"},Xe=["title"],Fe={class:"truncate"},Ge={class:"truncate"},ot=I({__name:"index",setup(A){const{t}=g(),r=z(),a=me(),p=ne(),f=B(),d=de("teamManageDialog"),u=P(()=>a.path),E=l=>{d.value?.open(l)},_=l=>{l===v.TEAM_OPERATE_TYPE_JOIN?k.v1Team.teamcontrollerJoined().then(y=>{const{teams:T=[]}=y.data||{};f.setJoinedTeams(T)}):l===v.TEAM_OPERATE_TYPE_CREATE&&k.v1Team.teamcontrollerCreated().then(y=>{const{teams:T=[]}=y.data||{};f.setCreatedTeams(T)})},c=l=>{r.push({path:`/team/${l._id}`})};return ie(()=>{_(v.TEAM_OPERATE_TYPE_JOIN),_(v.TEAM_OPERATE_TYPE_CREATE)}),(l,y)=>{const T=L("Icon"),M=q,O=Z,V=W,w=ee,x=ae,D=te,K=oe;return m(),h("div",Se,[s("div",Be,[e(p).collapse?J("",!0):(m(),h("span",{key:0,title:e(t)("team.space"),class:"truncate font-medium text-[16px]"},i(e(t)("team.space")),9,ze)),n(w,{onCommand:E},{dropdown:o(()=>[n(V,null,{default:o(()=>[n(O,{command:e(v).TEAM_OPERATE_TYPE_JOIN},{default:o(()=>[N(i(e(t)("team.join")),1)]),_:1},8,["command"]),n(O,{command:e(v).TEAM_OPERATE_TYPE_CREATE},{default:o(()=>[N(i(e(t)("team.create")),1)]),_:1},8,["command"])]),_:1})]),default:o(()=>[n(M,{class:"cursor-pointer"},{default:o(()=>[n(T,{icon:"material-symbols:more-horiz"})]),_:1})]),_:1})]),s("div",Le,[n(K,{class:"w-full dark:!bg-gray-800",collapse:e(p).collapse,"default-active":u.value},{default:o(()=>[n(D,{index:e(v).TEAM_OPERATE_TYPE_JOIN},{title:o(()=>[n(M,null,{default:o(()=>[n(T,{icon:"material-symbols:group-add-rounded"})]),_:1}),s("span",{class:"truncate",title:e(t)("team.joinedTeam")},i(e(t)("team.joinedTeam")),9,Ue)]),default:o(()=>[e(f).joinedTeams.length===0?(m(),$(x,{key:0,index:`${e(v).TEAM_OPERATE_TYPE_JOIN}-none`,disabled:""},{default:o(()=>[s("span",Ke,i(e(t)("team.noJoined")),1)]),_:1},8,["index"])):J("",!0),(m(!0),h(Y,null,j(e(f).joinedTeams,C=>(m(),$(x,{key:C._id,index:`/team/${C._id}`,onClick:X=>c(C)},{default:o(()=>[N(i(C.name),1)]),_:2},1032,["index","onClick"]))),128))]),_:1},8,["index"]),n(D,{index:e(v).TEAM_OPERATE_TYPE_CREATE},{title:o(()=>[n(M,null,{default:o(()=>[n(T,{icon:"material-symbols:group"})]),_:1}),s("span",{class:"truncate",title:e(t)("team.myTeam")},i(e(t)("team.myTeam")),9,Xe)]),default:o(()=>[e(f).createdTeams.length===0?(m(),$(x,{key:0,index:`${e(v).TEAM_OPERATE_TYPE_CREATE}-none`,disabled:""},{default:o(()=>[s("span",Fe,i(e(t)("team.noCreated")),1)]),_:1},8,["index"])):J("",!0),(m(!0),h(Y,null,j(e(f).createdTeams,C=>(m(),$(x,{key:C._id,index:`/team/${C._id}`,onClick:X=>c(C)},{default:o(()=>[s("span",Ge,i(C.name),1)]),_:2},1032,["index","onClick"]))),128))]),_:1},8,["index"])]),_:1},8,["collapse","default-active"])]),n(je,{ref:"teamManageDialog"},null,512)])}}});export{ot as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DmCMPHi-.js","./vendor-ui-CMQTpMsc.js","./vendor-core-B1hRUZR_.js","./index-CpXbVBP2.js","./index-C8unIZll.css","./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js","./index-BoBZsqw_.js","./useCompMetaLocalStore-CnMRn13T.js","./useCacheOssStore-D1ihuvZi.js","./useVscodeOpen-CA_im4Vj.js","./useTeamHeaders-kxuE8Q8s.js","./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js","./useMessage-C_SU5QaN.js","./el-link-CPQZ-olG.css","./useCompEditStore-DCFM66C4.js","./v4-EwEgHOG0.js","./index.vue_vue_type_style_index_0_lang-D39LYnj3.js","./core-CduF1cve.js","./index-Dj51p5I8.css","./PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js","./useCompEditStore-DfjsDbzX.css","./el-card-BAyktVMS.css","./index.vue_vue_type_style_index_0_lang-D2h7hdt0.js","./index-CdWXO9ks.css","./useKeyword-2O8Qbig-.js","./index-CUiK2qn1.js","./index-Dd9Tvz1_.css","./index-CSqRH-KQ.js","./el-table-column-BaabKDRF.js","./el-table-column-B3ZEEuPD.css","./moment-B-YVwB4U.js","./index-Dmk2WbAD.js","./index-Bn9djJ1D.js","./index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js","./index-DOlF0Z_P.css","./index-DYjUv_9s.js","./index-ChEH9AoP.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-sJqw3hBL.js"])))=>i.map(i=>d[i]);
2
- import{_ as ce,B as q,e as P,T as J,b as N,o as L,g as me,r as de,O as pe,k as S}from"./index-CpXbVBP2.js";import{av as ue,D as _e,w as fe,s as W,am as X,ak as ve,aw as he,T as ge,$ as ye,aj as be,ao as Z,ax as we,K as Ce,a as xe,as as Te,F as Ae}from"./vendor-ui-CMQTpMsc.js";import{_ as Ee}from"./el-table-column-BaabKDRF.js";/* empty css */import{_ as ke}from"./index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js";import{I as O,O as g,P as B,R as r,a1 as f,S as G,m as i,ac as Ie,Q as E,u as e,W as ee,Y as s,aD as Le,a2 as a,_ as H,aA as z,am as De,an as $e,a0 as D,aJ as te,E as Y,aC as ae,w as oe,a7 as se,h as Oe,n as Se,aF as ne,a as F,e as j,aG as Me,aP as Re,aQ as Ve,f as Pe,k as Ne,aL as M}from"./vendor-core-B1hRUZR_.js";import{c as Be,a as ze,b as K}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{_ as Ue}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js";import{u as Fe}from"./useKeyword-2O8Qbig-.js";import{d as Ge,I as Q,c as He}from"./useMessage-C_SU5QaN.js";import{u as le}from"./useTeamHeaders-kxuE8Q8s.js";import{I as ie}from"./index-B2G95uaY.js";import{_ as Ke}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import{_ as Ye}from"./BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js";import"./useCacheOssStore-D1ihuvZi.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useVscodeOpen-CA_im4Vj.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";const je={class:"flex items-center justify-center gap-[6px] leading-[15px]"},Qe={class:"text-xs leading-3 align-middle"},qe={class:"inline-block align-middle shrink-0"},Je=O({__name:"UserAvatar",props:{nickname:{type:String,default:""},teamUserNickname:{type:String,default:""}},setup(m){const t=m,o=i(()=>t.teamUserNickname||t.nickname||"--");return(c,w)=>(g(),B("div",je,[r("span",Qe,f(o.value),1),r("div",qe,[G(c.$slots,"avatar",{},void 0,!0)])]))}}),We=ce(Je,[["__scopeId","data-v-99cd7413"]]),Xe=O({__name:"SkeletonContainer",setup(m){const t=Ie();return(o,c)=>(g(),E(e(ue),ee({rows:3,animated:""},e(t)),{default:s(()=>[G(o.$slots,"default")]),template:s(()=>[G(o.$slots,"template")]),_:3},16))}}),Ze='<path class="cdj_y1r7t"/>',et={__name:"grid-view-rounded",props:["width","height"],setup(m){const t={width:24,height:24};return(o,c)=>(g(),E(e(ie),{width:m.width,height:m.height,viewBox:t,content:Ze,fallback:"material-symbols:grid-view-rounded"},null,8,["width","height"]))}},tt='<path class="u2_fvl-wz"/>',at={__name:"view-list",props:["width","height"],setup(m){const t={width:24,height:24};return(o,c)=>(g(),E(e(ie),{width:m.width,height:m.height,viewBox:t,content:tt,fallback:"material-symbols:view-list"},null,8,["width","height"]))}},ot=O({__name:"ViewToggle",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(m){const t=Le(m,"modelValue"),o=i(()=>t.value==="grid"?at:et);function c(){t.value=t.value==="grid"?"list":"grid"}return(w,l)=>(g(),B("div",{class:"flex items-center rounded-sm cursor-pointer",onClick:c},[a(e(_e),{style:{"font-size":"25px"}},{default:s(()=>[(g(),E(H(o.value)))]),_:1})]))}}),st={class:"size-full overflow-hidden"},nt=O({__name:"ViewCompList",props:{data:{type:Array,default:()=>[]},selectedRows:{type:Array,default:()=>[]}},emits:["add-one-comp"],setup(m,{emit:t}){const{t:o}=z(),c=m,w=t,l=i(()=>({data:c.data,column:[{prop:"name",label:o("comp.name"),align:"center"},{prop:"version",label:o("comp.version"),align:"center"},{prop:"isAdd",label:o("team.added"),align:"center",formatter:d=>d.isAdd?o("common.yes"):o("common.no")},{prop:"desc",label:o("common.description"),align:"center",showOverflowTooltip:{popperClass:"table-text-tooltip"}},{slot:"operation",prop:"operation",label:o("common.operation"),align:"center"}],isPagination:!1,autoLoading:!1})),C=(d,p)=>{p.start(),w("add-one-comp",d._id,()=>{p.end()})};return(d,p)=>{const I=W,x=fe;return g(),B("div",st,[a(e(q),{ref:"baseTable",tableConfig:l.value,border:"",stripe:""},{operation:s(({col:T})=>[a(x,De($e(T)),{default:s(({row:u})=>[r("div",null,[a(e(Ue),null,{default:s(({instance:n,loading:_})=>[a(I,{type:"primary",disabled:u.isAdd,loading:_,onClick:$=>C(u,n)},{default:s(()=>[D(f(u.isAdd?e(o)("team.added"):e(o)("common.add")),1)]),_:2},1032,["disabled","loading","onClick"])]),_:2},1024)])]),_:1},16)]),_:1},8,["tableConfig"])])}}}),lt={class:"size-full overflow-hidden"},it=O({__name:"ViewCompGrid",props:{data:{type:Array,default:()=>[]},keyword:{type:String,default:""}},emits:["add-one-comp"],setup(m,{emit:t}){const o=m,c=t,w=Oe(),l=te(),{sendMessageToTargetIframe:C,messageListener:d}=He(),p=Ge(!1,window.__GLOBAL_CONFIG__.subPort),{addListener:I}=d(),x=Be(`${l.path}_${P.SCOPE_ID_TEAM_ADD_MY_COMP}`)();Y(P.PROVIDE_KEY_COMP_LIST_STORE,x);const T=new Map;Y(P.PROVIDE_KEY_CALLBACKS,T);const u=ae("compIframeContainer");Fe(i(()=>o.keyword),u);const n=async()=>{x.renderList([]),await Se(),x.setLoading(!0);const _=ve(o.data);x.renderList(_??[])};return I(Q.ACTION_ADD_COMP_START_LOADING,_=>{c("add-one-comp",_,()=>{u.value?.sendMessageToTargetIframeByCompId($=>{$&&C($,Q.ACTION_ADD_COMP_FINISH_LOADING,"",p)})})}),oe(()=>o.data,()=>n(),{immediate:!0,deep:!0}),se(()=>{x.$reset()}),(_,$)=>{const y=X;return g(),B("div",lt,[a(y,{always:"",wrapClass:"pr-[10px]"},{default:s(()=>[a(ze,{ref:"compIframeContainer",iuid:e(w)?.uid,compType:e(P).IFRAME_ROUTES.CONTAINER.TEAM_ADD},null,8,["iuid","compType"])]),_:1})])}}}),rt={class:"size-full flex flex-col overflow-auto overflow-x-hidden"},ct={class:"flex gap-2 pb-2"},mt=O({__name:"index",setup(m,{expose:t}){const{t:o}=z(),{headers:c,teamId:w}=le(),l=K(w)(),C=F(!1),d=F(""),p=F({data:[],search:{column:[{prop:"keyword",component:j(ge),label:i(()=>o("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:i(()=>o("comp.keywordPlaceholder")),fetchSuggestions:x,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"status",label:i(()=>o("common.status")),component:j(ye),value:"NotAdded",attributes:{style:{width:"120px"},clearable:!0,options:[{label:i(()=>o("team.added")),value:"Added"},{label:i(()=>o("team.notAdded")),value:"NotAdded"}]}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},fetchData:T}),I=i(()=>p.value?.search?.column[0]?.value??"");function x(y,b){if(y.length<=1)return b([]);N.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:y,type:"compMy"},{headers:c}).then(k=>{const{keywords:A=[]}=k.data||{};b(A)})}async function T(y){const b=await N.v1Team.teamcontrollerAddtoteammycomps({...y},{headers:c}),{rows:k,total:A}=b.data||{};p.value.data=k||[],p.value.pagination.total=A||0}function u(){C.value=!0}function n(){C.value=!1}function _(){d.value=d.value??"list"}function $(y,b){N.v1Team.teamcontrollerCopycomp({compIds:[y]},{headers:c}).then(()=>{p.value.data?.forEach(A=>{y===A._id&&(A.isAdd=!0)});const k=l.teamDetail.compCount+1;l.setTeamDetail({...l.teamDetail,compCount:k}),be.success(o("team.addSuccess"))}).finally(b)}return t({open:u,close:n}),(y,b)=>{const k=he;return g(),E(k,{modelValue:C.value,"onUpdate:modelValue":b[1]||(b[1]=A=>C.value=A),title:e(o)("team.addComp"),resizable:"","with-header":!1,size:"50%","append-to-body":"",onOpened:_},{default:s(()=>[r("div",rt,[a(e(q),{tableConfig:p.value},{tableBefore:s(()=>[r("div",ct,[a(e(ot),{modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=A=>d.value=A),class:"ml-auto"},null,8,["modelValue"])])]),table:s(()=>[a(e(J),null,{default:s(()=>[(g(),E(ne,null,[(g(),E(H(d.value==="grid"?it:nt),{data:p.value.data,keyword:I.value,onAddOneComp:$},null,40,["data","keyword"]))],1024))]),_:1})]),_:1},8,["tableConfig"])])]),_:1},8,["modelValue","title"])}}}),dt={class:"size-full overflow-hidden flex items-center gap-6"},pt={class:"flex-shrink-0"},ut={class:"flex flex-1 flex-col gap-3 overflow-hidden"},_t={class:"flex items-center gap-3"},ft={class:"text-xl font-bold"},vt={class:"flex items-center gap-1 rounded-full px-3 py-0.5 text-xs"},ht={class:"flex flex-wrap items-center gap-3"},gt={class:"!flex items-center gap-1"},yt={class:"!flex items-center gap-1"},bt={class:"!flex items-center gap-1"},wt={class:"!flex items-center gap-1"},Ct={class:"!flex items-center gap-1"},xt={class:"flex items-center gap-3 flex-shrink-0"},Tt=O({__name:"index",setup(m){const{t}=z(),o=te(),c=Me(),{teamId:w}=o.params,l=K(w)(),C=ae("teamAddCompDrawer");function d(){C.value?.open()}function p(){c.push({name:"uploadTeam",params:{teamId:w}})}return(I,x)=>{const T=we,u=Ce,n=W,_=Z;return g(),E(_,{"body-class":"!p-0",class:"size-full rounded-sm p-4"},{default:s(()=>[a(e(Xe),{rows:4,loading:e(l).loading},{default:s(()=>[r("div",dt,[r("div",pt,[a(T,{size:64,class:"bg-indigo-100"},{default:s(()=>[a(e(L),{icon:"material-symbols:layers-rounded",class:"text-3xl"})]),_:1})]),r("div",ut,[r("div",_t,[r("h2",ft,f(e(l).teamName),1),r("span",vt,[a(e(L),{icon:"material-symbols:check-circle-rounded",class:"text-green-500"}),D(" "+f(e(l).description),1)])]),r("div",ht,[a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",gt,[a(e(L),{icon:"material-symbols:person-rounded"}),D(" "+f(e(t)("team.creator"))+" ",1),a(e(We),ee(e(l).creator,{teamUserNickname:e(l).creatorNickname}),{avatar:s(()=>[a(ke,{size:15,src:e(l).creator?.avatar},null,8,["src"])]),_:1},16,["teamUserNickname"])])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",yt,[a(e(L),{icon:"material-symbols:tag-rounded"}),D(" "+f(e(t)("team.code"))+" ",1),a(e(Ee),{class:"text-xs",text:e(l).code},null,8,["text"])])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",bt,[a(e(L),{icon:"material-symbols:group-rounded"}),D(" "+f(e(t)("team.member"))+" "+f(e(l).memberCount)+" "+f(e(t)("common.person")),1)])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",wt,[a(e(L),{icon:"material-symbols:widgets-rounded"}),D(" "+f(e(t)("team.compCount"))+" "+f(e(l).compCount)+" "+f(e(t)("common.unit")),1)])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",Ct,[a(e(L),{icon:"material-symbols:download-rounded"}),D(" "+f(e(t)("team.downloadCount"))+" "+f(e(l).totalDownloadCount),1)])]),_:1})]),r("div",xt,[a(n,{class:"!rounded-full !px-5 !py-2 !h-auto",onClick:d},{default:s(()=>[a(e(L),{icon:"material-symbols:format-list-bulleted-rounded",class:"mr-1"}),D(" "+f(e(t)("team.addFromMine")),1)]),_:1}),a(n,{type:"primary",class:"!rounded-full !px-5 !py-2 !h-auto",onClick:p},{default:s(()=>[a(e(L),{icon:"material-symbols:upload-rounded",class:"mr-1"}),D(" "+f(e(t)("comp.upload")),1)]),_:1})])])])]),_:1},8,["loading"]),a(mt,{ref:"teamAddCompDrawer"},null,512)]),_:1})}}}),At={class:"mt-2"},Yt=O({__name:"index",setup(m){const{t}=z(),o=M(()=>S(()=>import("./index-DmCMPHi-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]),import.meta.url)),c=M(()=>S(()=>import("./index-CUiK2qn1.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,27,29,24]),import.meta.url)),w=M(()=>S(()=>import("./index-CSqRH-KQ.js"),__vite__mapDeps([30,1,2,3,4,31,32,5,6,7,8,9,10,11,12,13,14,33,22]),import.meta.url)),l=M(()=>S(()=>import("./index-Dmk2WbAD.js"),__vite__mapDeps([34,1,2,3,4,10,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]),import.meta.url)),C=M(()=>S(()=>import("./index-Bn9djJ1D.js"),__vite__mapDeps([35,1,2,3,4,31,32,5,6,7,8,9,10,11,12,13,14,36,37]),import.meta.url)),d=M(()=>S(()=>import("./index-DYjUv_9s.js"),__vite__mapDeps([38,1,2,3,4,31,32,5,6,7,8,9,10,11,12,13,14,36,37,22]),import.meta.url)),p=M(()=>S(()=>import("./index-ChEH9AoP.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10,11,12,13,14,40,22,24]),import.meta.url)),I=[{label:i(()=>t("team.compLib")),value:"TeamCompList",component:o,visible:()=>!0},{label:i(()=>t("team.groupConfig")),value:"TeamCompGroup",component:c,visible:()=>n.isCreator},{label:i(()=>t("team.compManage")),value:"TeamCompManage",component:w,visible:()=>n.isCreator},{label:i(()=>t("team.myCompList")),value:"TeamMyCompList",component:l,visible:()=>!0},{label:i(()=>t("team.member")),value:"TeamMemberList",component:C,visible:()=>!0},{label:i(()=>t("team.applyList")),value:"TeamApplyList",component:d,visible:()=>n.isCreator},{label:i(()=>t("common.setting")),value:"TeamSet",component:p,visible:()=>!0}],{headers:x,teamId:T}=le(),u=me(),n=K(T)(),_=xe(`${de}-${T}`,I[0]?.value),$=i(()=>Object.keys(n.teamDetail).length===0),y=i(()=>I.filter(v=>v.visible())),b=i(()=>y.value.find(h=>h.value===_.value)?.component||{render:()=>null}),k=async(v,h)=>{if(!n.canSaveCopy)return;const R=v.matched[v.matched.length-1],V=h.matched[h.matched.length-1];if(!(!R||!V)&&(!v.redirectedFrom||R.path===V.path)){const U={confirmButtonText:t("team.leave"),cancelButtonText:t("common.cancel"),type:"warning"};return await Ae.confirm(t("team.unsavedDataLeave"),t("common.info"),U).then(()=>!0).catch(()=>!1)}};function A(v,h){u.addPayLoad(`/team/${v}`,{name:h??""})}return Re(k),Ve(k),Pe(()=>{n.setLoading(!0),N.v1Team.teamcontrollerDetail({headers:x}).then(v=>{const{compIdInLeafNodeMap:h}=v.data;n.setTeamDetail(v.data),n.setSelectedRowsToLeafNodeMap(h||{}),A(T??"",n.teamDetail?.name??"")}).catch(()=>{n.$reset()}).finally(()=>{n.setLoading(!1)})}),oe(_,(v,h)=>{h&&v!==h&&window?.umami?.track(pe.TEAM_TAB_CHANGE,{teamId:T,from:h,to:v})}),se(()=>{n.$reset()}),(v,h)=>{const R=Z,V=Te,U=X;return g(),E(U,{"wrap-class":"team-container p-[10px] pt-0",class:"size-full overflow-x-hidden",always:""},{default:s(()=>[a(e(Ke),{isEmpty:$.value,loading:e(n).loading,emptyDescription:e(t)("team.noTeamInfo")},{default:s(()=>[a(Tt,{class:"mt-[10px]"}),a(R,{"body-class":"!p-0",class:"sticky top-0 w-full z-100 mt-1"},{default:s(()=>[a(e(Ye),{modelValue:e(_),"onUpdate:modelValue":h[0]||(h[0]=re=>Ne(_)?_.value=re:null),options:y.value},null,8,["modelValue","options"])]),_:1}),r("div",At,[a(e(J),null,{default:s(()=>[(g(),E(ne,null,[(g(),E(H(b.value)))],1024))]),_:1})]),a(V,{right:100,bottom:100,target:".team-container"})]),_:1},8,["isEmpty","loading","emptyDescription"])]),_:1})}}});export{Yt as default};
@@ -1,5 +0,0 @@
1
- import{N as T,K as A,am as R,an as V,ao as D}from"./vendor-ui-CMQTpMsc.js";import{c as P,d as G,b as K}from"./index-CpXbVBP2.js";/* empty css *//* empty css */import{_ as q}from"./index.vue_vue_type_script_setup_true_lang-BHRL6G5S.js";import{I as k,O as r,P as u,R as p,a0 as c,m as z,aA as H,a2 as o,u as t,Y as i,a1 as l,$ as w,f as F,ak as Q,H as N,Q as E,af as W,a as Y}from"./vendor-core-B1hRUZR_.js";import{_ as J}from"./CanvasAnimation.vue_vue_type_script_setup_true_lang-CPSb3doF.js";import{H as x}from"./core-CduF1cve.js";function Z(e){const s=e.regex,n={},d={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},d]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},m=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),h={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(f);const _={match:/\\"/},b={className:"string",begin:/'/,end:/'/},S={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},v=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${v.join("|")})`,relevance:10}),C={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},I=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],L=["true","false"],$={match:/(\/[a-z._-]+)+/},B=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],U=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],M=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:I,literal:L,built_in:[...B,...U,"set","shopt",...O,...M]},contains:[g,e.SHEBANG(),C,y,m,h,$,f,_,b,S,n]}}const X={class:"code-container"},j={class:"hljs"},ee=["innerHTML"],te=k({__name:"CodeHighlight",props:{code:{},language:{}},setup(e){x.registerLanguage("bash",Z);const s=e,n=z(()=>s.code?x.highlight(`${s.code}`,{language:s.language}).value:"");return(d,a)=>(r(),u("div",X,[p("pre",j,[a[0]||(a[0]=c(" ",-1)),p("code",{innerHTML:n.value},null,8,ee),a[1]||(a[1]=c(`
2
- `,-1))])]))}}),se={class:"flex items-center gap-[5px]"},ne={key:0},ae={class:"text-sm whitespace-pre-line leading-5"},oe=k({__name:"UpgradeItem",props:{version:{type:String,default:""},desc:{type:String,default:""},latestVersion:{type:String,default:""}},setup(e){const{t:s}=H(),n=e,d=z(()=>n.latestVersion===n.version.replace(/^[^0-9]+/,""));return(a,m)=>(r(),u("div",null,[o(t(T),{"content-position":"center"},{default:i(()=>[p("div",se,[o(t(A),{type:d.value?"primary":"info",round:"",size:"small"},{default:i(()=>[d.value?(r(),u("span",ne,l(t(s)("upgrade.current")),1)):w("",!0),c(" "+l(e.version),1)]),_:1},8,["type"])])]),_:1}),p("p",ae,l(e.desc),1)]))}}),re={class:"relative"},ie={class:"flex items-center gap-[5px]"},ce={key:0,class:"flex items-center justify-center"},le={class:"mb-[10px]"},de=`
3
- # 全局安装最新版本
4
- npm install comp-hub@latest -g
5
- `,Se=k({__name:"index",setup(e){const{t:s}=H(),n=Y([]),d=P(),a=G();return F(async()=>{const m=await K.v1Upgrade.upgradecontrollerLogs();n.value=m.data.rows??[]}),(m,h)=>{const f=Q("router-link"),_=A,b=V,S=T,y=R,v=D;return r(),u("div",re,[o(t(J)),o(v,{"body-class":"!p-0",class:"absolute inset-0 max-w-[1200px] mx-auto overflow-hidden"},{default:i(()=>[o(y,{"wrap-class":"p-[20px]"},{default:i(()=>[p("div",ie,[o(f,{to:"/"},{default:i(()=>[o(q)]),_:1}),o(_,{disableTransitions:"",type:"info",round:"",size:"small"},{default:i(()=>[c(l(t(d).compHubVersion),1)]),_:1})]),t(a).hasUpgrade?w("",!0):(r(),u("div",ce,[o(b,{description:t(s)("upgrade.noUpdate")},null,8,["description"])])),t(a).isUpgrade?(r(),u(N,{key:1},[o(S,{"content-position":"center"},{default:i(()=>[c(l(t(s)("upgrade.updateMethod")),1)]),_:1}),p("div",le,[c(l(t(s)("upgrade.title"))+" ",1),h[0]||(h[0]=p("span",{class:"font-bold"},"comp-hub",-1)),c(" "+l(t(s)("upgrade.openTerminalAndRun")),1)]),t(a).isForceUpgrade?(r(),E(_,{key:0,disableTransitions:"",type:"danger",round:"",size:"small"},{default:i(()=>[c(l(t(s)("upgrade.cannotIgnoreUpdate")),1)]),_:1})):(r(),E(_,{key:1,disableTransitions:"",type:"primary",round:"",size:"small"},{default:i(()=>[c(l(t(s)("upgrade.hasUpdate")),1)]),_:1})),o(t(te),{code:de,language:"bash",class:"mt-1"})],64)):w("",!0),p("div",null,[(r(!0),u(N,null,W(n.value,g=>(r(),E(t(oe),{key:g.version,version:g.version,desc:g.desc,latestVersion:t(a).latestVersion},null,8,["version","desc","latestVersion"]))),128))])]),_:1})]),_:1})])}}});export{Se as default};
@@ -1 +0,0 @@
1
- import{w as $,s as B,K as H,Q as j,aj as S}from"./vendor-ui-CMQTpMsc.js";import{B as w,b as C,O as h}from"./index-CpXbVBP2.js";import"./el-table-column-BaabKDRF.js";import{b as z}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js";import{u as O}from"./useTeamHeaders-kxuE8Q8s.js";import{I as R,aA as Y,O as u,P as d,a2 as o,ae as D,u as s,Y as n,am as T,an as E,a0 as _,a1 as f,a as L,m as p,e as N}from"./vendor-core-B1hRUZR_.js";import{_ as Q}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useCacheOssStore-D1ihuvZi.js";import"./useVscodeOpen-CA_im4Vj.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import"./useMessage-C_SU5QaN.js";const V={class:"size-full"},J={key:0},K={key:1},pa=R({__name:"index",setup(q){const{t:a}=Y(),{headers:v,teamId:g}=O(),I=z(g)(),c=L({data:[],column:[{slot:"avatar",prop:"userId.avatar",label:p(()=>a("user.avatar")),align:"center"},{prop:"userId.account",label:p(()=>a("user.account")),align:"center"},{prop:"userId.nickname",label:p(()=>a("user.nickname")),align:"center",formatter(e){return e.userId.nickname||"--"}},{slot:"operation",prop:"operation",label:p(()=>a("common.operation")),align:"center"}],pagination:{total:0},search:{column:[{prop:"keyword",component:N(j),value:"",autoQuery:!1,attributes:{placeholder:p(()=>`${a("user.account")}/${a("user.nickname")}`)}}]},fixedHeight:!1,fetchData:P});async function P(e){const l=await C.v1Team.teamcontrollerApplylist({...e},{headers:v}),{rows:r,total:t}=l.data||{};c.value.data=r||[],c.value.pagination.total=t||0}function y(e,l,r){r.start(),C.v1Team.teamcontrollerHandleapply({applyId:e._id,isAgree:l},{headers:v}).then(()=>{c.value.data=c.value.data?.map(t=>(t._id===e._id&&(t.status=l?"approved":"rejected"),t)),S.success(a("message.success.operation")),window?.umami?.track(l?h.TEAM_APPLY_ACCEPT:h.TEAM_APPLY_REJECT,{teamId:g,applyId:e._id})}).finally(()=>{r.end()})}return(e,l)=>{const r=$,t=B,x=H;return u(),d("div",V,[o(s(w),{tableConfig:c.value,border:""},D({avatar:n(({col:m})=>[o(r,T(E(m)),{default:n(({row:i})=>[o(M,{src:i.userId.avatar,size:40},null,8,["src"])]),_:1},16)]),_:2},[s(I).isCreator?{name:"operation",fn:n(({col:m})=>[o(r,T(E(m)),{default:n(({row:i})=>[i.status==="pending"?(u(),d("div",J,[o(s(Q),null,{default:n(({instance:b,loading:k})=>[o(t,{type:"danger",loading:k,onClick:A=>y(i,!1,b)},{default:n(()=>[_(f(s(a)("team.reject")),1)]),_:1},8,["loading","onClick"]),o(t,{type:"primary",loading:k,onClick:A=>y(i,!0,b)},{default:n(()=>[_(f(s(a)("team.agree")),1)]),_:1},8,["loading","onClick"])]),_:2},1024)])):(u(),d("div",K,[o(x,{type:"info"},{default:n(()=>[_(f(i.status==="approved"?s(a)("team.approved"):s(a)("team.rejected")),1)]),_:2},1024)]))]),_:1},16)]),key:"0"}:void 0]),1032,["tableConfig"])])}}});export{pa as default};
@@ -1 +0,0 @@
1
- import{a as x,u as C,aj as c}from"./vendor-ui-CMQTpMsc.js";import{y as L,z as w,e as u,A as y,E as D,G as R}from"./index-CpXbVBP2.js";import{I as N,aA as I,aJ as z,a as o,f as B,ak as G,O as f,P as S,Q as $,W as T,$ as V,m as d,n as O}from"./vendor-core-B1hRUZR_.js";const b={class:"size-full"},U=N({__name:"index",emits:["select"],setup(j,{emit:v}){const{locale:m,t:l}=I(),h={zh:"zhCN",en:"en"},p=d(()=>h[m.value]),t=o(null),n=o(!0),_=z(),r=x(`${L}_${_.path}`,""),E=v,g=C(),P=`${D()}/api/v1/vuefinder`,F=new w({baseURL:P,url:{list:"/list"}}),i=o(r.value||u.FILE_MANAGER_DIRNAME),A=d(()=>({selectionMode:"single",driver:F,features:{search:!1,upload:!1,delete:!1,rename:!1,preview:!1,edit:!1,archive:!1,unarchive:!1,newfile:!1,newfolder:!1,fullscreen:!1,download:!1,language:!0,move:!1,copy:!1,history:!1,theme:!1,pinned:!1},contextMenuItems:[...R,{id:"select-folder",title:()=>l("file.select"),action:(a,e)=>{if(e.length>1){c.error(l("file.multiSelect"));return}const{type:s="dir"}=e[0];if(s!=="dir"){c.error(l("file.onlyDir"));return}E("select",e[0])},show:(a,e)=>{const{target:s,items:k}=e;return k.length>1?!1:s?.type==="dir"}}],config:{initialPath:i.value,theme:g.value?"valorite":"silver"}}));function M(a){r.value=a,!a&&t.value&&(n.value=!1,O(()=>{n.value=!0,i.value=u.FILE_MANAGER_DIRNAME,t.value?.refresh()}))}return B(()=>{t.value=y("vueFinder")}),(a,e)=>{const s=G("VueFinder");return f(),S("div",b,[n.value?(f(),$(s,T({key:0,id:"vueFinder",locale:p.value},A.value,{onPathChange:M}),null,16,["locale"])):V("",!0)])}}});export{U as default};
@@ -1 +0,0 @@
1
- import{v as $,T as K,R as G,$ as F,ar as Y,F as H}from"./vendor-ui-CMQTpMsc.js";import{e as c,B as V,b as i,O as y}from"./index-CpXbVBP2.js";import{I as z,h as Q,aA as j,aJ as J,aG as W,E as _,aC as I,a7 as Z,Z as X,u as p,O as q,P as ee,a2 as h,Y as te,a as w,m as n,e as T,n as oe}from"./vendor-core-B1hRUZR_.js";import{c as ae,b as re,a as se}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{c as ne}from"./useCompEditStore-DCFM66C4.js";import{_ as ce}from"./index.vue_vue_type_style_index_0_lang-D2h7hdt0.js";import{u as ie}from"./useTeamHeaders-kxuE8Q8s.js";import{u as le}from"./useKeyword-2O8Qbig-.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useCacheOssStore-D1ihuvZi.js";import"./useVscodeOpen-CA_im4Vj.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import"./useMessage-C_SU5QaN.js";/* empty css */import"./v4-EwEgHOG0.js";import"./index.vue_vue_type_style_index_0_lang-D39LYnj3.js";import"./core-CduF1cve.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js";const pe={class:"size-full overflow-hidden"},Ue=z({__name:"index",setup(me){const S=Q()?.uid,{t:a}=j(),v=J(),O=W(),{headers:m,teamId:u}=ie(),s=ae(`${v.path}_${c.SCOPE_ID_TEAM_COMP_LIST}`)();_(c.PROVIDE_KEY_COMP_LIST_STORE,s);const b=new Map;_(c.PROVIDE_KEY_CALLBACKS,b);const k=ne(v.path,c.DIALOG_TYPE_EDIT)();_(c.PROVIDE_KEY_COMP_EDIT_STORE,k);const E=re(u)(),L=I("compUpdateDialog"),R=I("compIframeContainer"),C=w([]),d=w(!1);async function P(e){d.value=!0;const o=(await i.v1Comp.compcontrollerTags({keyword:e})).data?.rows??[];C.value=o.map(r=>({value:r,label:r})),d.value=!1}const f=w({data:[],search:{column:[{prop:"keyword",component:T(K),label:n(()=>a("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:n(()=>a("comp.keywordPlaceholder")),fetchSuggestions:D,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"group",component:T(G),label:n(()=>a("team.group")),value:"",attributes:{options:n(()=>E.menuGroup),clearable:!0,props:{value:"id",checkStrictly:!0}}},{prop:"tags",component:T(F),label:n(()=>a("comp.tags")),value:[],attributes:{multiple:!0,filterable:!0,remote:!0,clearable:!0,reserveKeyword:!1,defaultFirstOption:!0,placeholder:n(()=>a("comp.pleaseInputTags")),remoteMethod:P,loading:d,options:C,style:"width: 240px"}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:M}),A=n(()=>f.value?.search?.column[0]?.value??"");le(A,R);function D(e,t){if(e.length<=1)return t([]);i.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compTeam"},{headers:m}).then(o=>{const{keywords:r=[]}=o.data||{};t(r)})}async function M(e){s.renderList([]),await oe(),s.setLoading(!0),e.keyword&&window?.umami?.track(y.SEARCH_COMPONENT,{keyword:e.keyword,page:"team"});const{group:t=[]}=e||{};delete e.group,t.length&&window?.umami?.track(y.TEAM_FILTER_GROUP,{teamId:u,group:t});const o=t?.[t.length-1];if(o){let l=E.getSelectedGroupLeafNodes(o);l=l.length===0?[o]:l,e.leafNodeIds=l}const r=await i.v1Team.teamcontrollerTeamcomps({...e,tags:Array.isArray(e.tags)?e.tags.join(","):e.tags||"",scene:"library"},{headers:m}),{rows:g,total:N}=r.data??{};s.renderList(g??[]),f.value.pagination.total=N??0}function U(e){O.push({path:`/previewTeam/${u}/${e}`})}async function x(e){const t=Y.service({fullscreen:!0});try{const o=e,r=await i.v1Team.teamcontrollerCheckcompupdatepermission({compId:o},{headers:m}),{result:g}=r.data||{};if(g==="cannot_update"){H.confirm(a("message.noUpdatePermission"),a("common.info"),{confirmButtonText:a("common.confirm"),cancelButtonText:a("common.cancel"),type:"warning"}).finally(()=>{});return}L.value?.open(o)}finally{t.close()}}function B(e){i.v1Comp.compcontrollerCompdetail({compId:e}).then(t=>{s.updateCompListItemById(e,t.data)})}return Z(()=>{s.$reset()}),(e,t)=>{const o=$;return X((q(),ee("div",pe,[h(p(V),{tableConfig:f.value},{table:te(()=>[h(se,{ref:"compIframeContainer",iuid:p(S),compType:p(c).IFRAME_ROUTES.CONTAINER.TEAM_ALL,onPreview:U,onUpdate:x},null,8,["iuid","compType"])]),_:1},8,["tableConfig"]),h(ce,{ref:"compUpdateDialog",onUpdateSuccess:B},null,512)])),[[o,p(s).loading]])}}});export{Ue as default};
@@ -1 +0,0 @@
1
- import{v as k,T as U,$}from"./vendor-ui-CMQTpMsc.js";import{e as a,B as x,b as p}from"./index-CpXbVBP2.js";import{I as K,aA as Y,aG as B,aJ as F,E as u,aC as T,a7 as N,Z as V,u as l,O as H,P as G,a2 as d,Y as Q,h as j,a as _,m as n,e as C,n as z}from"./vendor-core-B1hRUZR_.js";import{u as J}from"./useTeamHeaders-kxuE8Q8s.js";import{c as W,a as Z}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{c as X}from"./useCompEditStore-DCFM66C4.js";import{_ as q}from"./index.vue_vue_type_style_index_0_lang-D2h7hdt0.js";import{u as ee}from"./useKeyword-2O8Qbig-.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useCacheOssStore-D1ihuvZi.js";import"./useVscodeOpen-CA_im4Vj.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import"./useMessage-C_SU5QaN.js";/* empty css */import"./v4-EwEgHOG0.js";import"./index.vue_vue_type_style_index_0_lang-D39LYnj3.js";import"./core-CduF1cve.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js";const te={class:"size-full"},Se=K({__name:"index",setup(ae){const{t:i}=Y(),v=j(),w=B(),f=F(),{headers:g,teamId:y}=J(),o=W(`${f.path}_${a.SCOPE_ID_TEAM_MY_COMP_LIST}`)();u(a.PROVIDE_KEY_COMP_LIST_STORE,o);const I=X(`${f.path}_${a.SCOPE_ID_TEAM_MY_COMP_UPDATE}`,a.DIALOG_TYPE_EDIT)();u(a.PROVIDE_KEY_COMP_EDIT_STORE,I);const h=new Map;u(a.PROVIDE_KEY_CALLBACKS,h);const O=T("compUpdateDialog"),S=T("compIframeContainer"),E=_([]),m=_(!1);async function M(e){m.value=!0;const r=(await p.v1Comp.compcontrollerTags({keyword:e})).data?.rows??[];E.value=r.map(s=>({value:s,label:s})),m.value=!1}const c=_({data:[],search:{column:[{prop:"keyword",component:C(U),label:n(()=>i("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:n(()=>i("comp.keywordPlaceholder")),fetchSuggestions:D,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"tags",component:C($),label:n(()=>i("comp.tags")),value:[],attributes:{multiple:!0,filterable:!0,remote:!0,clearable:!0,reserveKeyword:!1,defaultFirstOption:!0,placeholder:n(()=>i("comp.pleaseInputTags")),remoteMethod:M,loading:m,options:E,style:"width: 240px"}}]},pagination:{total:0},fixedHeight:!1,autoLoading:!1,fetchData:L}),P=n(()=>c.value?.search?.column[0]?.value??"");ee(P,S);function D(e,t){if(e.length<=1)return t([]);p.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compTeamMy"},{headers:g}).then(r=>{const{keywords:s=[]}=r.data||{};t(s)})}async function L(e){o.renderList([]),await z(),o.setLoading(!0);const t=await p.v1Team.teamcontrollerMyteamcomps({...e,tags:Array.isArray(e.tags)?e.tags.join(","):e.tags||""},{headers:g}),{rows:r,total:s}=t.data??{};o.renderList(r??[]),c.value.pagination.total=s??0}function R(e){w.push({path:`/previewTeam/${y}/${e}`})}async function b(e){O.value?.open(e)}function A(e){p.v1Comp.compcontrollerCompdetail({compId:e}).then(t=>{o.updateCompListItemById(e,t.data)})}return h.set(a.COMP_METHOD_KEY_AFTER_COMP_DEL,()=>{c.value.pagination.total--}),N(()=>{o.$reset()}),(e,t)=>{const r=k;return V((H(),G("div",te,[d(l(x),{tableConfig:c.value,border:""},{table:Q(()=>[d(Z,{ref:"compIframeContainer",iuid:l(v)?.uid,compType:l(a).IFRAME_ROUTES.CONTAINER.TEAM_MINE,onPreview:R,onUpdate:b},null,8,["iuid","compType"])]),_:1},8,["tableConfig"]),d(q,{ref:"compUpdateDialog",onUpdateSuccess:A},null,512)])),[[r,l(o).loading]])}}});export{Se as default};
@@ -1 +0,0 @@
1
- import{v as P,am as A,T as x,$ as K}from"./vendor-ui-CMQTpMsc.js";import{e as s,B as U,b as c,O as B}from"./index-CpXbVBP2.js";import{c as N,a as Y}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{_ as $}from"./index.vue_vue_type_style_index_0_lang-D2h7hdt0.js";import{c as F}from"./useCompEditStore-DCFM66C4.js";import{I as H,aA as V,h as z,aJ as G,aG as Q,E as d,aC as E,a7 as j,Z as J,u as l,O as W,P as Z,a2 as m,Y as h,a as f,m as n,e as C,n as X}from"./vendor-core-B1hRUZR_.js";import{u as q}from"./useKeyword-2O8Qbig-.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useCacheOssStore-D1ihuvZi.js";import"./useVscodeOpen-CA_im4Vj.js";import"./useTeamHeaders-kxuE8Q8s.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import"./useMessage-C_SU5QaN.js";import"./v4-EwEgHOG0.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-D39LYnj3.js";import"./core-CduF1cve.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js";const ee={class:"size-full p-[10px] pr-0"},Ie=H({__name:"index",setup(te){const{t:i}=V(),v=z()?.uid,_=G(),y=Q(),a=N(_.path)();d(s.PROVIDE_KEY_COMP_LIST_STORE,a);const O=F(_.path,s.DIALOG_TYPE_EDIT)();d(s.PROVIDE_KEY_COMP_EDIT_STORE,O);const g=new Map;d(s.PROVIDE_KEY_CALLBACKS,g);const T=E("compUpdateDialog"),I=E("compIframeContainer"),w=f([]),u=f(!1);async function S(e){u.value=!0;const r=(await c.v1Comp.compcontrollerTags({keyword:e})).data?.rows??[];w.value=r.map(o=>({value:o,label:o})),u.value=!1}const p=f({data:[],search:{column:[{prop:"keyword",component:C(x),label:n(()=>i("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:n(()=>i("comp.keywordPlaceholder")),fetchSuggestions:k,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"tags",component:C(K),label:n(()=>i("comp.tags")),value:[],attributes:{multiple:!0,filterable:!0,remote:!0,clearable:!0,reserveKeyword:!1,defaultFirstOption:!0,placeholder:n(()=>i("comp.pleaseInputTags")),remoteMethod:S,loading:u,options:w,style:"width: 240px"}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:R}),b=n(()=>p.value?.search?.column[0]?.value??"");q(b,I);function k(e,t){if(e.length<=1)return t([]);c.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compMy"}).then(r=>{const{keywords:o=[]}=r.data||{};t(o)})}async function R(e){a.renderList([]),await X(),a.setLoading(!0),e.keyword&&window?.umami?.track(B.SEARCH_COMPONENT,{keyword:e.keyword,page:"mine"});const t=await c.v1Comp.compcontrollerMycomps({...e,tags:Array.isArray(e.tags)?e.tags.join(","):e.tags||""}),{rows:r,total:o}=t.data??{};a.renderList(r??[]),p.value.pagination.total=o??0}function L(e){y.push({path:`/preview/${e}`})}async function D(e){T.value?.open(e)}function M(e){c.v1Comp.compcontrollerCompdetail({compId:e}).then(t=>{a.updateCompListItemById(e,t.data)})}return g.set(s.COMP_METHOD_KEY_AFTER_COMP_DEL,()=>{p.value.pagination.total--}),j(()=>{a.$reset()}),(e,t)=>{const r=A,o=P;return J((W(),Z("div",ee,[m(l(U),{tableConfig:p.value},{table:h(()=>[m(r,{always:"",wrapClass:"pr-[10px]"},{default:h(()=>[m(Y,{ref:"compIframeContainer",iuid:l(v),compType:l(s).IFRAME_ROUTES.CONTAINER.MINE,onPreview:L,onUpdate:D},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"]),m($,{ref:"compUpdateDialog",onUpdateSuccess:M},null,512)])),[[o,l(a).loading]])}}});export{Ie as default};
@@ -1 +0,0 @@
1
- import{a as F,T as K,$ as _,v as N,am as U}from"./vendor-ui-CMQTpMsc.js";import{c as B,e as u,h as M,O as h,b as m,B as $,i as v}from"./index-CpXbVBP2.js";import{c as H,a as J}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{I as V,aA as Y,h as z,aJ as Q,aG as j,E as T,aC as W,a as d,m as o,e as f,n as X,a7 as Z,Z as q,u as c,O as ee,P as ae,a2 as g,Y as y}from"./vendor-core-B1hRUZR_.js";import{u as te}from"./useKeyword-2O8Qbig-.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useCacheOssStore-D1ihuvZi.js";import"./useVscodeOpen-CA_im4Vj.js";import"./useTeamHeaders-kxuE8Q8s.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import"./useMessage-C_SU5QaN.js";const oe={class:"size-full p-[10px] pr-0"},ve=V({__name:"index",setup(se){const{t:s}=Y(),C=z()?.uid,E=Q(),S=j(),b=B(),r=H(E.path)();T(u.PROVIDE_KEY_COMP_LIST_STORE,r);const O=new Map;T(u.PROVIDE_KEY_CALLBACKS,O);const l=F(`${M}`,"XTTJ"),k=W("compIframeContainer"),w=d([]),p=d(!1);async function A(e){p.value=!0;const t=(await m.v1Comp.compcontrollerTags({keyword:e})).data?.rows??[];w.value=t.map(a=>({value:a,label:a})),p.value=!1}const L=o(()=>v.DEFAULT_TAG_GROUP.map(e=>({label:s(e.label),value:e.value}))),i=d({data:[],search:{column:[{prop:"keyword",component:f(K),label:o(()=>s("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:o(()=>s("comp.keywordPlaceholder")),fetchSuggestions:x,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"tag",component:f(_),label:o(()=>s("common.filter")),value:l.value,attributes:{options:L,style:"width: 200px",onChange:e=>{l.value=e,window?.umami?.track(h.FILTER_TAG,{tag:e,page:"share"})}}},{prop:"tags",component:f(_),label:o(()=>s("comp.tags")),value:[],attributes:{multiple:!0,filterable:!0,remote:!0,clearable:!0,reserveKeyword:!1,defaultFirstOption:!0,placeholder:o(()=>s("comp.pleaseInputTags")),remoteMethod:A,loading:p,options:w,style:"width: 240px"}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:P}),R=o(()=>i.value?.search?.column[0]?.value??"");te(R,k);function I(e){return e===v.DEFAULT_TAG_GROUP[0].value?JSON.stringify(b?.deps||[]):"[]"}function x(e,n){if(e.length<=1)return n([]);m.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compShare"}).then(t=>{const{keywords:a=[]}=t.data||{};n(a)})}async function P(e){r.renderList([]),await X(),r.setLoading(!0),e.keyword&&window?.umami?.track(h.SEARCH_COMPONENT,{keyword:e.keyword,tag:l.value,page:"share"});const n={...e,deps:I(l.value),tags:Array.isArray(e.tags)?e.tags.join(","):e.tags||""},t=await m.v1Comp.compcontrollerComps({...n}),{rows:a,total:G}=t.data??{};r.renderList(a??[]),i.value.pagination.total=G??0,i.value.data=a??[]}function D(e){S.push({path:`/preview/${e}`})}return Z(()=>{r.$reset()}),(e,n)=>{const t=U,a=N;return q((ee(),ae("div",oe,[g(c($),{tableConfig:i.value},{table:y(()=>[g(t,{always:"",wrapClass:"pr-[10px]"},{default:y(()=>[g(J,{ref:"compIframeContainer",iuid:c(C),compType:c(u).IFRAME_ROUTES.CONTAINER.SHARE,onPreview:D},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"])])),[[a,c(r).loading]])}}});export{ve as default};
@@ -1 +0,0 @@
1
- import{v as I,am as R,T as S,$ as A}from"./vendor-ui-CMQTpMsc.js";import{e as l,B as P,b as m,O as x}from"./index-CpXbVBP2.js";import{c as M,a as K}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";import{I as B,aA as N,h as D,aJ as F,aG as Y,E as _,aC as $,a7 as V,Z as z,u as i,O as H,P as Q,a2 as u,Y as g,a as d,m as r,e as C,n as U}from"./vendor-core-B1hRUZR_.js";import{u as j}from"./useKeyword-2O8Qbig-.js";import"./index-BoBZsqw_.js";import"./useCompMetaLocalStore-CnMRn13T.js";import"./useCacheOssStore-D1ihuvZi.js";import"./useVscodeOpen-CA_im4Vj.js";import"./useTeamHeaders-kxuE8Q8s.js";/* empty css */import"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import"./useMessage-C_SU5QaN.js";const G={class:"size-full p-[10px] pr-0"},pe=B({__name:"index",setup(J){const{t:n}=N(),h=D()?.uid,y=F(),v=Y(),a=M(y.path)();_(l.PROVIDE_KEY_COMP_LIST_STORE,a);const f=new Map;_(l.PROVIDE_KEY_CALLBACKS,f);const E=$("compIframeContainer"),w=d([]),c=d(!1);async function O(e){c.value=!0;const o=(await m.v1Comp.compcontrollerTags({keyword:e})).data?.rows??[];w.value=o.map(t=>({value:t,label:t})),c.value=!1}const p=d({data:[],search:{column:[{prop:"keyword",component:C(S),label:r(()=>n("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:r(()=>n("comp.keywordPlaceholder")),fetchSuggestions:L,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"tags",component:C(A),label:r(()=>n("comp.tags")),value:[],attributes:{multiple:!0,filterable:!0,remote:!0,clearable:!0,reserveKeyword:!1,defaultFirstOption:!0,placeholder:r(()=>n("comp.pleaseInputTags")),remoteMethod:O,loading:c,options:w,style:"width: 240px"}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:b}),T=r(()=>p.value?.search?.column[0]?.value??"");j(T,E);function L(e,s){if(e.length<=1)return s([]);m.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compMyCollect"}).then(o=>{const{keywords:t=[]}=o.data||{};s(t)})}async function b(e){a.renderList([]),await U(),a.setLoading(!0),e.keyword&&window?.umami?.track(x.SEARCH_COMPONENT,{keyword:e.keyword,page:"collect"});const s=await m.v1Comp.compcontrollerCollectedcomps({...e,tags:Array.isArray(e.tags)?e.tags.join(","):e.tags||""}),{rows:o,total:t}=s.data??{};a.renderList(o??[]),p.value.pagination.total=t??0}function k(e){v.push({path:`/preview/${e}`})}return f.set(l.COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT,e=>{a.delCompListById(e)}),V(()=>{a.$reset()}),(e,s)=>{const o=R,t=I;return z((H(),Q("div",G,[u(i(P),{tableConfig:p.value},{table:g(()=>[u(o,{always:"",wrapClass:"pr-[10px]"},{default:g(()=>[u(K,{ref:"compIframeContainer",iuid:i(h),compType:i(l).IFRAME_ROUTES.CONTAINER.COLLECT,onPreview:k},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"])])),[[t,i(a).loading]])}}});export{pe as default};
@@ -1 +0,0 @@
1
- import{K as i}from"./vendor-ui-CMQTpMsc.js";import{c as u,d,_}from"./index-CpXbVBP2.js";import{I as l,aA as m,aG as g,O as f,Q as S,Y as h,R as x,U as C,u as s,a1 as t,m as U}from"./vendor-core-B1hRUZR_.js";const b=l({__name:"index",setup(k){const{t:e}=m(),o=u(),a=d(),r=g(),n=U(()=>a.isUpgrade?e("upgrade.hasUpdate"):e("upgrade.betaVersion"));function c(){r.push({name:"upgrade"})}return(V,y)=>{const p=i;return f(),S(p,{type:"primary",round:"",class:"cursor-pointer","disable-transitions":"",onClick:c},{default:h(()=>[x("span",{class:C({"is-upgrade":s(a).isUpgrade})},t(n.value)+" "+t(s(o).compHubVersion),3)]),_:1})}}}),R=_(b,[["__scopeId","data-v-cb2ac669"]]);export{R as S};
@@ -1 +0,0 @@
1
- import{ax as i}from"./vendor-ui-CMQTpMsc.js";import{n as u}from"./index-CpXbVBP2.js";import{u as l}from"./useCacheOssStore-D1ihuvZi.js";import{I as f,ac as d,w as m,d as h,O as p,Q as x,W as g,u as v,a as _}from"./vendor-core-B1hRUZR_.js";function B(n){const t=document.createElement("canvas"),e=t.getContext("2d");if(!e)return"";t.width=100,t.height=100,e.fillStyle="#fff",e.font="60px serif";const r=e.measureText(n),a=r.width,s=r.actualBoundingBoxAscent+r.actualBoundingBoxDescent,o=(t.width-a)/2,c=(t.height+s)/2-r.actualBoundingBoxDescent;return e.fillText(n,o,c),t.toDataURL()}const S=f({__name:"index",props:{src:{type:String,default:""},text:{type:String,default:""}},setup(n){const t=n,e=l(),r=d(),a=_("");return m(()=>t.text,s=>{!s||t.src||(a.value=B(s))},{immediate:!0}),h(async()=>{if(!t.src)return;const s=e.getCacheUrl(t.src);if(s){a.value=s;return}const o=await u.v1Oss.osscontrollerFilesignurl({objectId:t.src}),{signUrl:c}=o.data;a.value=c,e.setCacheUrl(t.src,c)}),(s,o)=>{const c=i;return p(),x(c,g({class:"border border-gray-400"},v(r),{src:a.value}),null,16,["src"])}}});export{S as _};
@@ -1 +0,0 @@
1
- import{I as a,O as w,P as B,R as e,U as n}from"./vendor-core-B1hRUZR_.js";const l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAA5CAYAAABwDahPAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFxEAABcRAcom8z8AAAZeSURBVGhD3ZpPbxNHGMafd9YJ9GTzCcgHoMWcKiEqG1DBOEnjXJAqVYpziVQ1YJNzqziCXhOi/jkgIQchFZCoklTFiUnVrCWaXh2pd8gnaHypaBzP28PurNezf7w2IY76nDyz69nfM/O+74w3Ad6TJjYKI9lqIan3R9X1jcKI3ucn0jveRWObhRyEzIEpDcJZllR7kVlO6/d1U7Y6lyegzMzLlcxSUb/u1jsbmNgojLSELAKUByHuXGAByaJWySz2ZEDBqzYzHlUyi/nOu9oSekdUTWwURsZe3lppGfwaRAUdniF6np9stZB0wwMAEaaym3Mr7j63+jIwWr1VagmuAzSlX3PgmXoykK0WksTC1PvRxURPBrLVQnLs5e06Ec13zLgSCzDIhhcARxvegSfyjmkryES0JwAYr87mBdgEcF6/BrjhhQ0fbQWiwCv5mYhkYLw6m2cSZd9Zhz88QwAy3EAv8ErKxMR2IYEoBhz4IAXBqzAKUD/wSkSYah4YJkKf0DO8FfsdCcwhK8Ai3w+8I0YdYQZGtwrp3uC16sMCDEP/lqNKZqnIjEd6fxS59wZfAxPbhQRJXtP7HUWBV9dCVMks5ns1oW9svgYOD3gtWsIGwMP6zFLU9a/r6sUEA7v6ruwxMF6dzRMhpfcDQfAq1tXMUwNSLAw3cWbzs/nQc4xSFBMM7A4NtzzHko41ntguJFoH/MZ39gPh223JtHyqKUrrkwv7+tejKLs5t0IEz+6u4NcvL3vG7ViBwwNZ7AteikZL8uXNsbvFfuERsBJh8NANEMi75DoskwceMNLV8W99zzG9qpJZzDMwjQjwcIeQf80nq5p46nwnfGVsoWuy9qqxzbmccaplhsHDbWC0etvsTN4u8CzQYkxXx+55DljHKYJK3ib/7e7uBi+B9c3ReznXWAORAAB50HKBBMF31nkWhjdfBiABAExk19cweKvfTuBH1RsLb7SxBiK7ClHSgUf7IBYADwLu6wMNSsrAeQeeLeggeGbsvY+q069EtlpIRoUHCMTWOfykSJBEIhhe27RYQBKdiNhXEkDMAfTCuxPaWgnB3U+YxymVA3b1CYe3VkCE7ozHLauMRoK3q9OhPsRgZYeQDt+5abkTGsKI9NL1uGSHkA5vwerwDAIknSwDsben65HhWYABz6+iQYoA4MaLb9gLq4dVO7TeQpypTd45EclshRBTrQ0bAA8LnllgGMbAT6FKyoDpDSO9GqmzkgBafCJOolAGJGBGg7dXh4zz157/cCJWgdSHzC939wEj7rsSHXuCfY3F3kHsdLI2OT3QXLDLKMAQa5HhIQDQ2aFmc+DHaseA0eL7HngL1Auvkh00dfXZw1LnkMcrx0Bl8us6d1QjJ1R8KpPVDwgQaP7qs/KRm7hU3s6lyttd/0zrGAAAYir5w9vVR4Nv3yvmrzx9vJYqlxPu8frVJw+3S0KK1ZY0zIsPXoWacJJY6drqkgmmVHR4a3+ww2wPLSr9/sXnfb1qSZW30syxElik1KozqCEl0jszl3yP8R4D11eXRpiN12yvgBdezwlvWzLtMRslNI212vRk1yp1qfxbTjCKgOGauHbISlCDWaR3Zj72mPAYAIBPf/6uBBbzbbjo8J1vNQQkaBeSTEDsQ8IEYgA4CRgJhkgzKElMcQvWC6/GZlCDwR4TvgYA4NPnP5rtpewBXt3vgenW9inh3mc1mCi9M3PBMdGRxG4dGB/kJNNuOLwC8MJbn8Ng9XZXeIApTi0yL37/l5PYgQZqk9P7ApQHqKHDttsuaA2e+4LV2z4TBxGHYMdEoAEA2Lo5UycYacmWiSB4p+0LHwTXre0Dr54FioPQ/c+sALB1c7puCKTB2A2FtwY+Yni1clqb0QCjCPupkZQqlxPG6aE1sJHyhWfxHuD1iSIA2INEbmf2XB29GFC68tPTIktRAlH86OD9YNuFQN3PwPrwv8187c4FZ2/p2QAApJ48GRGHQysgYW08oXB6W8Hp7TB47BEh/8eXH3pea/ZlQCn1eDUNUInYSPUGq7eD4GkPLVHamT0XeDR5JwNKqfKvSQiRZ0aenB9FQbB62wdeYl2yWPnzq4+C/1vA1pEYcCtVriYlRI6Y0gwjSUzxbvCSUQOMuiCYxj8w3THeTUduwE8XH7xKEnHCOgcpxRCLxeq16eiw/0v9Bxd2PEmpXS32AAAAAElFTkSuQmCC",t={class:"flex items-end gap"},z=a({__name:"index",props:{logoClass:{type:String,default:"h-[40px]"}},setup(s){return(c,A)=>(w(),B("div",t,[e("img",{src:l,alt:"logo",class:n(s.logoClass)},null,2),A[0]||(A[0]=e("span",{class:"text-gray-800 dark:text-white font-bold text-xl truncate"},"omp Hub",-1))]))}});export{z as _};
@@ -1 +0,0 @@
1
- import{a as s}from"./index-CpXbVBP2.js";import{I as t,S as n}from"./vendor-core-B1hRUZR_.js";const c=t({__name:"index",setup(i){const o=s();function r(){const e=o.isRealUserLogin();return e||o.logoutDialog(),e}return(e,a)=>n(e.$slots,"default",{isLogin:r})}});export{c as _};
@@ -1 +0,0 @@
1
- import{o as x,_ as $,e as C,b as B}from"./index-CpXbVBP2.js";import{s as I,ao as b,au as D,N as L}from"./vendor-ui-CMQTpMsc.js";import{I as k,aA as z,O as o,Q as l,Y as c,P as E,S as w,$ as _,R as y,a1 as h,u as a,a2 as v,U as M,a as S,aJ as A,aG as N,E as T,f as O,a7 as P,aC as V,ae as K,a0 as R,m as U}from"./vendor-core-B1hRUZR_.js";/* empty css */import{_ as Y}from"./index.vue_vue_type_style_index_0_lang-D39LYnj3.js";import{u as g}from"./useTeamHeaders-kxuE8Q8s.js";import{c as H,a as j}from"./index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js";const F={class:"flex items-center justify-between px-3 py-2 select-none"},G={class:"text-sm font-medium"},J={class:"flex gap-[6px]"},Q={key:0,class:"flex-1 p-2 overflow-auto"},q=k({__name:"BasePane",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:i}){const{t:u}=z(),m=t,n=i,e=S(!1),d=S(!1);function f(){n("close")}function p(){e.value=!e.value,n("maximize",e.value)}function s(r){return m.actions.includes(r)}return(r,ee)=>(o(),l(a(b),{"body-class":"pane-body","header-class":"pane-header",class:M(["pane-card w-full h-full",{"pane-maximized":e.value}])},{header:c(()=>[y("div",F,[y("div",G,h(t.title),1),y("div",J,[w(r.$slots,"beforeActions",{},void 0,!0),s("close")?(o(),l(a(I),{key:0,type:"primary",circle:"",onClick:f},{default:c(()=>[v(a(x),{icon:"material-symbols:close"})]),_:1})):_("",!0),s("maximize")?(o(),l(a(I),{key:1,type:"primary",circle:"",title:a(u)("common.maximizeRestore"),onClick:p},{default:c(()=>[e.value?(o(),l(a(x),{key:1,icon:"material-symbols:fullscreen-exit"})):(o(),l(a(x),{key:0,icon:"material-symbols:fullscreen"}))]),_:1},8,["title"])):_("",!0)])])]),default:c(()=>[d.value?_("",!0):(o(),E("div",Q,[w(r.$slots,"default",{isMaximized:e.value},void 0,!0)]))]),_:3},8,["class"]))}}),re=$(q,[["__scopeId","data-v-5116a325"]]),W={class:"min-h-[400px]"},X=k({__name:"index",setup(t){const i=A(),u=N(),{compId:m}=i.params,{headers:n}=g(),e=H(i.path)();T(C.PROVIDE_KEY_COMP_LIST_STORE,e);const d=new Map;T(C.PROVIDE_KEY_CALLBACKS,d);const f=async()=>{if(e.setLoading(!0),!m)return;const s=await B.v1Comp.compcontrollerSimilarcomps({compId:m},{headers:n}),{rows:r}=s.data||{};await e.renderList(r),e.setLoading(!1)};function p(s){u.push({path:`/preview/${s}`})}return O(()=>{f()}),P(()=>{e.$reset()}),(s,r)=>(o(),E("div",W,[v(j,{compType:a(C).IFRAME_ROUTES.CONTAINER.SIMILAR,onPreview:p},null,8,["compType"])]))}}),Z={ref:"similarComp",class:"mt-[10px] overflow-hidden"},le=k({__name:"index",props:{mdSrc:{type:String,default:""},compDesc:{type:String,default:""},scrollContainer:{type:String,default:""},stickyTopDistance:{type:Number,default:45},showSimilarComp:{type:Boolean,default:!0}},setup(t){const{t:i}=z(),{teamId:u}=g(),m=U(()=>i(u?"team.similarCompInTeam":"team.similarComp")),n=S(!1),e=V("similarComp");return D(e,([d])=>{n.value||(n.value=d?.isIntersecting||!1)}),(d,f)=>{const p=L,s=b;return o(),l(Y,{showToc:!0,src:t.mdSrc,scrollContainer:t.scrollContainer,stickyTopDistance:t.stickyTopDistance},K({empty:c(()=>[R(h(t.compDesc||a(i)("common.noReadme")),1)]),_:2},[t.showSimilarComp?{name:"footer",fn:c(()=>[y("div",Z,[v(p,{"content-position":"center"},{default:c(()=>[R(h(m.value),1)]),_:1}),v(s,{"body-class":"!p-1",class:"mt-[10px]"},{default:c(()=>[n.value?(o(),l(X,{key:0})):_("",!0)]),_:1})],512)]),key:"0"}:void 0]),1032,["src","scrollContainer","stickyTopDistance"])}}});export{re as B,le as _};
@@ -1 +0,0 @@
1
- import{a as C,c as h,e as d}from"./index-CpXbVBP2.js";import{c as l}from"./useCompMetaLocalStore-CnMRn13T.js";import{u as w}from"./vendor-ui-CMQTpMsc.js";import{u as N}from"./useVscodeOpen-CA_im4Vj.js";import{I as k,aC as D,w as G,O as W,P as v,R as F,u as B,m as f}from"./vendor-core-B1hRUZR_.js";import{u as b,a as R,I as a,b as T,c as $}from"./useMessage-C_SU5QaN.js";const U={class:"size-full"},V=["src"],J=k({__name:"index",props:{compType:{},version:{},compAttrs:{},iuid:{}},setup(I){const o=I,E=C(),p=h(),r=b(!1,window.__GLOBAL_CONFIG__.subPort),{instanceUid:S,messageListener:A,sendMessageToTargetIframe:m}=$(),{addListener:n}=A(),{createIframeParams:L}=R(),{openCompPathInVscode:g,handlePath:P}=N(),M=w().value,_=D("iframe"),O=(()=>{const e={topOrigin:window.location.origin,userId:E.userId??"",instanceUid:[S.value,o.iuid].join(",")??"",compId:o.compAttrs?._id??"",isSfc:!0},t={params:L(e),isDark:M.toString()},s=new URLSearchParams(t).toString();return`${r}/${d.WEBSITE_PATH_ITEM}/${o.compType}?${s}`})();async function u(){const e=_.value?.contentWindow;if(e){const t=l(o.compAttrs?._id)(),{dep:s,depToFile:c}=t,i={item:o.compAttrs,dep:s,depToFile:c};m(e,a.ITEM_INIT_SET_LOCAL,i,r)}}return n(a.ITEM_INIT_GET_LOCAL,()=>{u()}),n(a.ITEM_SITE_PATH_GET,e=>{const t=l(e)(),{stopWatch:s,triggerCallback:c}=T(f(()=>t.detail.fullPath),()=>{const i=_.value?.contentWindow;i?m(i,a.ITEM_SITE_PATH_SET,P(t.detail.fullPath,1),r):s()});c(e)}),n(a.ACTION_OPEN_VSCODE_LOCAL,e=>{const s=l(e)().detail.fullPath;g(s,`./${d.COMP_CONFIG_FILENAME}`)}),n(a.SETTING_DATA_LEAF_GET,T(f(()=>p.deps),()=>{const e=_.value?.contentWindow;e&&m(e,a.SETTING_DATA_LEAF_SET,p.deps,r)}).triggerCallback),G(()=>o.compAttrs,e=>{e&&u()}),(e,t)=>(W(),v("div",U,[F("iframe",{ref:"iframe",class:"size-full",src:B(O),frameborder:"0"},null,8,V)]))}});export{J as _};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-De1XOjmk.js","./vendor-ui-CMQTpMsc.js","./vendor-core-B1hRUZR_.js","./index-CpXbVBP2.js","./index-C8unIZll.css"])))=>i.map(i=>d[i]);
2
- import{I as ne,aA as x,O as se,Q as Oe,Y as H,R as G,a2 as U,u as y,a1 as te,a0 as ye,aL as Me,a as P,aB as ce,j as R,aC as oe,w as Ae,P as Ne,T as Pe,m as O}from"./vendor-core-B1hRUZR_.js";import{p as z,c as M}from"./index-BoBZsqw_.js";import{k as Re,c as Y,n as g,e as L,a as ie,b,O as N,K as Fe,s as ke}from"./index-CpXbVBP2.js";import{c as B}from"./useCompMetaLocalStore-CnMRn13T.js";import{al as Ge,F as V,ar as X,aj as q,u as Be}from"./vendor-ui-CMQTpMsc.js";import{u as be}from"./useCacheOssStore-D1ihuvZi.js";import{u as re}from"./useVscodeOpen-CA_im4Vj.js";import{u as Ve}from"./useTeamHeaders-kxuE8Q8s.js";/* empty css */import{_ as xe}from"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import{_ as We}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js";import{d as $e,u as He,a as Ue,e as Ye,b as A,c as Ke}from"./useMessage-C_SU5QaN.js";const je={class:"flex justify-between items-center"},ze={class:"h-[65vh]"},Xe=ne({__name:"index",setup(f,{expose:e}){const{t:a}=x(),s=Me(()=>Re(()=>import("./index-De1XOjmk.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),{openCompPathInVscode:p}=re(),{cwd:l}=window.__GLOBAL_CONFIG__,m=P(!1),c=P(null),n=P(l);function r(){p(n.value,"./package.json")}const d=E=>{m.value=!0,c.value=E},C=()=>{m.value=!1,c.value=null},_=E=>{c.value&&c.value(E)};return e({open:d,close:C}),(E,v)=>{const F=Ge;return se(),Oe(y(xe),{modelValue:m.value,"onUpdate:modelValue":v[0]||(v[0]=w=>m.value=w),width:"50%","show-close":""},{header:H(()=>[G("div",je,[G("span",null,[G("span",null,te(y(a)("file.projectPath"))+":",1),U(F,{href:"javascript:void(0)",type:"primary",underline:"always",title:n.value,class:"truncate",onClick:r},{default:H(()=>[ye(te(n.value),1)]),_:1},8,["title"])])])]),default:H(()=>[G("div",ze,[U(y(s),{onSelect:_})])]),_:1},8,["modelValue"])}}}),Ct=(f,e)=>ce(`compListStore_${f}`,{state:()=>({scopeId:f,list:[],localList:[],loading:!1,listType:e??L.COMP_LIST_TYPE_REMOTE}),getters:{isEmpty:a=>a.list.length===0,isRemote:a=>a.listType===L.COMP_LIST_TYPE_REMOTE,isLocal:a=>a.listType===L.COMP_LIST_TYPE_LOCAL},actions:{setLocalList(a){this.$patch(s=>{s.localList=a})},setLoading(a){this.$patch(s=>{s.loading=a})},setList(a){this.$patch(s=>{s.list=a})},delCompListById(a){this.$patch(s=>{s.list=s.list.filter(p=>p._id!==a)})},updateCompListItemById(a,s){this.$patch(p=>{p.list=p.list.map(l=>{if(l._id===a){const m={...l,...s};return M(a)().setDetail(m.version,m),m}return l})})},async getListDeps(a){const s=Y(),m=a.map(r=>r.dep).map(r=>z(r,s.deps)).reduce((r,d)=>[...r,...d],[]).map(r=>r.name),c=await g.v1Module.modulecontrollerPrebuild({deps:[...new Set(m)]}),{entryNameToFile:n={}}=c.data;return n},async initCompMetas(a){const s=Y(),p=await g.v1Comp.compcontrollerLocalcompsbyids({compIds:a.map(c=>c._id)}),{compInfos:l=[]}=p.data,m=await this.getListDeps(a);a.forEach(c=>{const r=z(c.dep,s.deps).reduce((_,E)=>(m[E.name]&&(_[E.name]=m[E.name]),_),{}),d=M(c._id)();d.setLatestVersion(c.version),d.setDetail(c.version,c);const C=l.filter(_=>_.id===c._id);d.setLocalCompInfo(C),d.setDepEntryNameToFile(c.version,r)})},async initCompMetasLocal(a){a.forEach(s=>{B(s._id)().setDetail(s)})},async renderList(a){a.length&&(this.isRemote?await this.initCompMetas(a):await this.initCompMetasLocal(a)),this.setList(a)}}});async function ae(f){const e=Y();async function a(r){const{objectId:d,version:C,files:_}=r,E={objectId:d,version:C,files:_.map(w=>w.path)},v=await g.v1Comp.compcontrollerCompfilesosssignedurl(E),{signedUrls:F}=v.data;return F}async function s(r){const{dep:d}=r,C=z(d,e.deps).map(v=>v.name),_=await g.v1Module.modulecontrollerPrebuild({deps:C}),{entryNameToFile:E={}}=_.data;return E}const{version:p,_id:l}=f,m=M(l)();let c=null,n=null;m.versionToFileAccessPath[p]||(c=await a(f),m.setVersionToFileAccessPath(p,c)),m.depEntryNameToFile[p]||(n=await s(f),m.setDepEntryNameToFile(p,n))}const le=()=>{const f=ie();function e(){const a=f.isRealUserLogin();return a||f.logoutDialog(),a}return{isLogin:e}};function qe(){const{isLogin:f}=le(),e=R(L.PROVIDE_KEY_CALLBACKS),a=R(L.PROVIDE_KEY_COMP_LIST_STORE),{t:s}=x();async function p(l){if(!f()||!a.isRemote)return;const{id:m,isCollect:c}=l,n=a.list.find(d=>d._id===m);if(!n||!c&&await V.confirm(s("comp.uncollectConfirm",{name:n.name}),s("comp.uncollect"),{confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;const r=X.service({fullscreen:!0});b.v1Comp.compcontrollerCollect({compId:n._id,isCollect:c}).then(()=>{q.success(n.isCollect?s("message.success.uncollect"):s("message.success.collect")),window?.umami?.track(N.COMP_COLLECT_TOGGLE,{compId:n._id,name:n.name,action:c?"collect":"uncollect"});const d={...n,isCollect:c};c?a.updateCompListItemById(n._id,{...d,collectCount:n.collectCount+1}):(a.updateCompListItemById(n._id,{...d,collectCount:n.collectCount-1}),e.get(L.COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT)?.(n._id))}).finally(()=>{r.close()})}return{onCollect:p}}const Qe=(f="")=>{if(!f)throw new Error("createTeamHomeStore scopeId is required");return ce(`teamHome_${f}`,{state:()=>({teamDetail:{},loading:!1,selectedRows:[],selectedRowsToLeafNodeMap:{},dataSourceCopy:[],canSaveCopy:!1}),getters:{teamName:e=>e.teamDetail.name,creator:e=>({nickname:e.teamDetail?.creatorId?.nickname||e.teamDetail?.creatorId?.account||"",avatar:e.teamDetail?.creatorId?.avatar||""}),creatorNickname:e=>e.teamDetail?.creatorNickname||"",memberCount:e=>e.teamDetail?.memberCount||0,compCount:e=>e.teamDetail?.compCount||0,totalDownloadCount:e=>e.teamDetail?.totalDownloadCount||0,isCreator:e=>e.teamDetail.isCreator,isMember:e=>e.teamDetail.isMember,isOutMember:e=>!e.teamDetail.isCreator&&!e.teamDetail.isMember,description:e=>e.teamDetail.description||"",isPublic:e=>e.teamDetail.isPublic,isApplyNeedAudit:e=>e.teamDetail.isApplyNeedAudit,isAllowCompAuthorDelete:e=>e.teamDetail.isAllowCompAuthorDelete,isShowRepeatComp:e=>e.teamDetail.isShowRepeatComp,code:e=>e.teamDetail.code||"",menuGroup:e=>e.teamDetail.menuGroup||[]},actions:{setCanSaveCopy(e){this.$patch(a=>{a.canSaveCopy=e})},setLoading(e){this.$patch(a=>{a.loading=e})},setTeamDetail(e){this.$patch(a=>{a.teamDetail=e})},setSelectedRows(e){this.$patch(a=>{a.selectedRows=e})},setDataSourceCopy(e){this.$patch(a=>{a.dataSourceCopy=e})},setSelectedRowsToLeafNodeMap(e){this.$patch(a=>{a.selectedRowsToLeafNodeMap=e})},addSelectedRowsToLeafNodeMap(e){this.$patch(a=>{a.selectedRowsToLeafNodeMap={...a.selectedRowsToLeafNodeMap,...e}})},delSelectedRowsToLeafNodeMap(e){this.$patch(a=>{const s={...a.selectedRowsToLeafNodeMap};e.forEach(p=>{delete s[p]}),a.selectedRowsToLeafNodeMap=s})},getSelectedGroupLeafNodes(e=""){return e?Fe.getTreeAllChildren(this.menuGroup,e).filter(s=>s.children?.length===0).map(s=>s.id):[]}}})};function Je(){const{isLogin:f}=le(),e=R(L.PROVIDE_KEY_CALLBACKS),a=R(L.PROVIDE_KEY_COMP_LIST_STORE),{t:s}=x(),{headers:p,teamId:l}=Ve();async function m(c){const n=X.service({fullscreen:!0});try{if(!f())return;const r=a.list.find(C=>C._id===c);if(!r){console.error("组件不存在");return}if(!r.name){console.error("组件名称不能为空");return}if(await V.confirm(s("comp.deleteConfirm",{name:r.name}),s("common.info"),{confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;if(l){const C=Qe(l)();await b.v1Team.teamcontrollerRemovemyteamcomp({compIds:[c]},{headers:p}).then(()=>{a.delCompListById(c),C.setTeamDetail({...C.teamDetail,compCount:C.teamDetail.compCount-1}),e.get(L.COMP_METHOD_KEY_AFTER_COMP_DEL)?.(c)})}else await b.v1Comp.compcontrollerDeletemycomp({compId:c}).then(()=>{a.delCompListById(c),e.get(L.COMP_METHOD_KEY_AFTER_COMP_DEL)?.(c)});q.success(s("message.success.delete")),window?.umami?.track(N.COMP_DELETE,{compId:c,compName:r.name,teamId:l||void 0})}finally{n.close()}}return{onDelete:m}}function Ze(f){const e=P(),a=R(L.PROVIDE_KEY_COMP_LIST_STORE),{t:s}=x();async function p(m){if(!a.isRemote)return;const c=X.service({lock:!0,text:s("comp.downloading")});try{if(await V.confirm(s("comp.downloadPathConfirm",{path:m.path}),s("common.info"),{confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;const r=a.list.find(_=>_._id===e.value?.id);if(!r)return;const d=await g.v1Comp.compcontrollerDownload({compId:e.value?.id??"",savePath:m.path,compName:r.name??"",version:e.value?.version??""}),{isRepeat:C=!1}=d.data;if(C){if(await V.confirm(s("comp.downloadCoverConfirm",{name:r.name??""}),s("common.info"),{confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm"){c.close();return}await g.v1Comp.compcontrollerDownload({compId:e.value?.id??"",savePath:m.path,compName:r.name??"",isCover:!0,version:e.value?.version??""})}q.success(s("message.success.download")),window?.umami?.track(N.COMP_DOWNLOAD_SUCCESS,{compId:r._id,compName:r.name,savePath:m.path,version:e.value?.version,isCover:C}),a.updateCompListItemById(r._id,{totalDownloadCount:r.totalDownloadCount+1}),await l(r._id),f?.()}catch(n){window?.umami?.track(N.COMP_DOWNLOAD_FAILED,{compId:e.value?.id,error:String(n)})}finally{c.close()}}async function l(m){const c=M(m)(),n=await g.v1Comp.compcontrollerLocalcompsbyids({compIds:[m]}),{compInfos:r=[]}=n.data,d=r.filter(C=>C.id===m);c.setLocalCompInfo(d)}return{currDownloadCompItem:e,affirmDownload:p}}const et=["src"],Tt=ne({__name:"index",props:{compType:{},iuid:{default:-1}},emits:["preview","previewLocal","update"],setup(f,{expose:e,emit:a}){const s=f,p=a,l=R(L.PROVIDE_KEY_COMP_LIST_STORE),{t:m,locale:c}=x(),{IFRAME_POST_MESSAGE_TYPE:n}=Ye,r=Y(),d=ie(),C=be(),_=$e(!1,window.__GLOBAL_CONFIG__.subPort),E=He(!1,window.__GLOBAL_CONFIG__.subPort),{instanceUid:v,messageListener:F,sendMessageToTargetIframe:w}=Ke(),{createIframeParams:me}=Ue(),{addListener:T}=F(),{openCompPathInVscode:pe,handlePath:de}=re(),{onCollect:ue}=qe(),{onDelete:_e}=Je(),{currDownloadCompItem:fe,affirmDownload:Q}=Ze(()=>J.value?.close()),K=Be(),Ce=K.value,W=oe("iframe"),J=oe("dialogVueFinder"),j=P(0),Z=P({}),Te=O(()=>j.value?{height:`${j.value+10}px`}:{}),Ee=(()=>{const t={topOrigin:window.location.origin,compType:s.compType,userId:d.userId??"",instanceUid:[v.value,s.iuid].filter(Boolean).join(",")??""},o=new URLSearchParams({params:me(t),isDark:Ce.toString()}).toString();return`${_}/${L.WEBSITE_PATH_CONTAINER}/${s.compType}/?${o}`})();function D(t,o,i){const u=W.value?.contentWindow;return u?(w(u,t,o,i),!0):!1}function Ie(t,o,i){const u=W.value?.contentWindow;if(!u)return;const I=u.length??0;for(let h=0;h<I;h++){const S=u[h];S&&w(S,t,o,i)}}function k(t){try{const o=W.value?.contentWindow;if(o)return o[t]}catch(o){console.log("findIframeByCompId error",o.message)}return null}function Le(t,o){if(o){const i=k(o);i&&t(i)}else t(W.value?.contentWindow)}async function he(t){if(!l.isLocal)return;const o=l.list.find($=>$._id===t);if(!o)return;const i=B(t)(),{data:u}=await g.v1Comp.compcontrollerDep({compPath:o.path}),{thirdParty:I}=u;i.setDep(I);const h=I.map($=>$.name),S=await g.v1Module.modulecontrollerPrebuild({deps:h}),{entryNameToFile:ee={}}=S.data;i.setDepToFile(ee)}async function Se(t){const o=l.list.find(i=>i._id===t);if(o){const i=k(t);if(i&&l.isRemote){await ae(o);const u=M(o._id)(),I=u.depEntryNameToFile[o.version],h=u.versionToFileAccessPath[o.version],S={item:o,depEntryNameToFile:I,versionToFileAccessPath:h};w(i,n.ITEM_INIT_SET,S,E)}}}async function we(t){const o=l.list.find(i=>i._id===t);if(o){const i=k(t);if(i){await he(t);const u=B(t)(),{dep:I,depToFile:h}=u,S={item:o,dep:I,depToFile:h};w(i,n.ITEM_INIT_SET_LOCAL,S,E)}}}function ge(t){t.forEach(o=>{const i=k(o._id);i&&l.isRemote&&ae(o).then(()=>{const u=M(o._id)(),I=u.depEntryNameToFile[o.version],h=u.versionToFileAccessPath[o.version],S={item:o,depEntryNameToFile:I,versionToFileAccessPath:h};w(i,n.ITEM_INIT_SET,S,E)})})}return T(n.LIST_INIT_GET,()=>{const{stopWatch:t,triggerCallback:o}=A(O(()=>l.list),()=>{D(n.LIST_INIT,l.list,_)||t()});o()}),T(n.SETTING_DATA_GET,()=>{const{stopWatch:t,triggerCallback:o}=A(O(()=>r.deps),()=>{D(n.SETTING_DATA_SET,r.deps,_)||t()});o()}),T(n.SETTING_DATA_LEAF_GET,t=>{const{stopWatch:o,triggerCallback:i}=A(O(()=>r.deps),()=>{const u=k(t);u?w(u,n.SETTING_DATA_LEAF_SET,r.deps,E):o()});i()}),T(n.ITEM_SITE_PATH_GET,()=>{const{stopWatch:t,triggerCallback:o}=A(O(()=>l.list),()=>{const i=l.list.map(u=>{const I=B(u._id)();return{compId:u._id,fullPath:de(I.detail.fullPath,1)}});D(n.ITEM_SITE_PATH_SET,i,_)||t()});o()}),T(n.LOCALE_GET,()=>{const{stopWatch:t,triggerCallback:o}=A(O(()=>c.value),()=>{D(n.LOCALE_SET,c.value,E)||t()});o()}),T(n.THEME_CHANGE_GET,()=>{const{stopWatch:t,triggerCallback:o}=A(O(()=>K.value),()=>{const i={isDark:K.value};if(!D(n.THEME_CHANGE_SET,i,_)){t();return}Ie(n.THEME_CHANGE_SET,i,E)});o()}),T(n.ACTION_COLLECT,ue),T(n.ACTION_DELETE,_e),T(n.ACTION_DOWNLOAD,async t=>{const{version:o}=t;fe.value=t,await V.confirm(m("comp.downloadVersionConfirm",{version:o}),m("common.info"),{confirmButtonText:m("common.confirm"),cancelButtonText:m("common.cancel"),type:"warning"}).catch(()=>{})==="confirm"&&J.value?.open(Q)}),T(n.ACTION_PREVIEW,t=>{window?.umami?.track(N.COMP_PREVIEW,{compId:t}),p("preview",t)}),T(n.ACTION_PREVIEW_LOCAL,t=>{p("previewLocal",t)}),T(n.ACTION_UPDATE,t=>{window?.umami?.track(N.COMP_UPDATE,{compId:t}),p("update",t)}),T(n.UPDATE_IFRAME_HEIGHT,t=>{j.value=t}),T(n.ITEM_INIT_GET,t=>{Se(t)}),T(n.ITEM_INIT_GET_LOCAL,t=>{we(t)}),T(n.ITEM_VERSION_CHANGE,async t=>{const{compId:o,version:i}=t;window?.umami?.track(N.COMP_VERSION_CHANGE,{compId:o,version:i});const I=M(o)().detail[i];if(I){const{totalDownloadCount:tt,collectCount:ot,isCollect:at,...De}=I;l.updateCompListItemById(o,{...De,_id:o});return}const{data:h}=await b.v1Comp.compcontrollerCompdetail({compId:o,version:i}),{totalDownloadCount:S,collectCount:ee,isCollect:$,...ve}=h;l.updateCompListItemById(o,{...ve,_id:o})}),T(n.ITEM_VERSION_LIST_GET,async t=>{let o=Z.value[t];o||(o=(await b.v1Comp.compcontrollerVersions({compId:t})).data.rows??[],Z.value[t]=o),D(n.ITEM_VERSION_LIST_SET,{compId:t,versionList:o},_)}),T(n.LOCAL_EXIST_GET,t=>{const o=M(t)(),{stopWatch:i,triggerCallback:u}=A(O(()=>o.isLocalExist),I=>{D(n.LOCAL_EXIST_SET,{compId:I,exist:o.isLocalExist},_)||i()});u(t)}),T(n.ACTION_OPEN_VSCODE_LOCAL,t=>{const i=B(t)().detail.fullPath;pe(i,`./${L.COMP_CONFIG_FILENAME}`)}),T(n.OSS_FILE_SIGN_URL_GET,async({objectId:t})=>{let o=C.getCacheUrl(t);o||(o=(await g.v1Oss.osscontrollerFilesignurl({objectId:t})).data.signUrl,C.setCacheUrl(t,o)),D(n.OSS_FILE_SIGN_URL_SET,{objectId:t,signUrl:o},_)}),T(n.LOADING_SET,t=>{l.setLoading(t)}),Ae(()=>l.list,(t,o)=>{if(t.length===0){l.setLoading(!1);return}const{modifiedItems:i}=ke.findChangedArrayItems(t,o);ge(i)},{deep:!0}),e({sendMessageToTargetIframeByCompId:Le}),(t,o)=>(se(),Ne("div",{style:Pe(Te.value),class:"min-h-[390px]"},[U(y(We),{isEmpty:y(l).isEmpty,loading:y(l).loading,class:"size-full"},{default:H(()=>[G("iframe",{ref:"iframe",class:"size-full min-h-[390px]",src:y(Ee),frameborder:"0"},null,8,et)]),_:1},8,["isEmpty","loading"]),U(Xe,{ref:"dialogVueFinder",onDownload:y(Q)},null,8,["onDownload"])],4))}});export{Xe as _,Tt as a,Qe as b,Ct as c};
@@ -1 +0,0 @@
1
- import{c as w,a as C,e as L}from"./index-CpXbVBP2.js";import{c as O}from"./index-BoBZsqw_.js";import{u as G}from"./vendor-ui-CMQTpMsc.js";import{I as P,aA as k,aC as W,w as b,O as M,P as h,R as B,u as D,m}from"./vendor-core-B1hRUZR_.js";import{u as F,a as N,I as o,b as l,c as R}from"./useMessage-C_SU5QaN.js";const y={class:"size-full"},U=["src"],Y=P({__name:"index",props:{compType:{},version:{},compAttrs:{},iuid:{},bgColor:{}},setup(f){const s=f,{locale:u}=k(),_=w(),T=C(),r=F(!1,window.__GLOBAL_CONFIG__.subPort),{instanceUid:E,messageListener:g,sendMessageToTargetIframe:n}=R(),{addListener:i}=g(),{createIframeParams:I}=N(),S=G().value,c=W("iframe"),A=(()=>{const e={topOrigin:window.location.origin,userId:T.userId??"",instanceUid:[E.value,s.iuid].join(",")??"",compId:s.compAttrs?._id??"",isSfc:!0},t={params:I(e),isDark:S.toString()},a=new URLSearchParams(t).toString();return`${r}/${L.WEBSITE_PATH_ITEM}/${s.compType}?${a}`})();async function d(){const e=c.value?.contentWindow;if(e){const t=O(s.compAttrs?._id)(),a=t.depEntryNameToFile[s.version],p=t.versionToFileAccessPath[s.version],v={item:s.compAttrs,depEntryNameToFile:a,versionToFileAccessPath:p};n(e,o.ITEM_INIT_SET,v,r)}}return i(o.ITEM_INIT_GET,()=>{d()}),i(o.SETTING_DATA_LEAF_GET,l(m(()=>_.deps),()=>{const e=c.value?.contentWindow;e&&n(e,o.SETTING_DATA_LEAF_SET,_.deps,r)}).triggerCallback),i(o.LOCALE_GET,()=>{const{stopWatch:e,triggerCallback:t}=l(m(()=>u.value),()=>{const a=c.value?.contentWindow;a?n(a,o.LOCALE_SET,u.value,r):e()});t()}),i(o.BG_COLOR_GET,l(m(()=>s.bgColor??""),()=>{const e=c.value?.contentWindow;e&&n(e,o.BG_COLOR_SET,s.bgColor??"",r)}).triggerCallback),b([()=>s.version,()=>s.compAttrs],async([e,t])=>{e&&t&&d()}),(e,t)=>(M(),h("div",y,[B("iframe",{ref:"iframe",class:"size-full",src:D(A),frameborder:"0"},null,8,U)]))}});export{Y as _};
@@ -1,6 +0,0 @@
1
- import{m as Ye,a as L,I as Xe,aA as Je,aC as de,w as Qe,f as je,L as Ge,M as Ze,a7 as et,O as tt,P as st,R as nt}from"./vendor-core-B1hRUZR_.js";import{r as rt,a as it,b as ot,c as at}from"./vendor-xterm-mNFjEaKn.js";import{p as ct,q as ht}from"./index-CpXbVBP2.js";import{b as ut,a as lt}from"./vendor-ui-CMQTpMsc.js";var ft=rt(),dt=it(),pt=ot();const A=Object.create(null);A.open="0";A.close="1";A.ping="2";A.pong="3";A.message="4";A.upgrade="5";A.noop="6";const P=Object.create(null);Object.keys(A).forEach(r=>{P[A[r]]=r});const X={type:"error",data:"parser error"},we=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ee=typeof ArrayBuffer=="function",be=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,ee=({type:r,data:e},t,n)=>we&&e instanceof Blob?t?n(e):pe(e,n):Ee&&(e instanceof ArrayBuffer||be(e))?t?n(e):pe(new Blob([e]),n):n(A[r]+(e||"")),pe=(r,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(r)};function xe(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let W;function xt(r,e){if(we&&r.data instanceof Blob)return r.data.arrayBuffer().then(xe).then(e);if(Ee&&(r.data instanceof ArrayBuffer||be(r.data)))return e(xe(r.data));ee(r,!1,t=>{W||(W=new TextEncoder),e(W.encode(t))})}const me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<me.length;r++)S[me.charCodeAt(r)]=r;const mt=r=>{let e=r.length*.75,t=r.length,n,i=0,o,s,h,c;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);const f=new ArrayBuffer(e),d=new Uint8Array(f);for(n=0;n<t;n+=4)o=S[r.charCodeAt(n)],s=S[r.charCodeAt(n+1)],h=S[r.charCodeAt(n+2)],c=S[r.charCodeAt(n+3)],d[i++]=o<<2|s>>4,d[i++]=(s&15)<<4|h>>2,d[i++]=(h&3)<<6|c&63;return f},yt=typeof ArrayBuffer=="function",te=(r,e)=>{if(typeof r!="string")return{type:"message",data:ve(r,e)};const t=r.charAt(0);return t==="b"?{type:"message",data:gt(r.substring(1),e)}:P[t]?r.length>1?{type:P[t],data:r.substring(1)}:{type:P[t]}:X},gt=(r,e)=>{if(yt){const t=mt(r);return ve(t,e)}else return{base64:!0,data:r}},ve=(r,e)=>e==="blob"?r instanceof Blob?r:new Blob([r]):r instanceof ArrayBuffer?r:r.buffer,Ce="",_t=(r,e)=>{const t=r.length,n=new Array(t);let i=0;r.forEach((o,s)=>{ee(o,!1,h=>{n[s]=h,++i===t&&e(n.join(Ce))})})},wt=(r,e)=>{const t=r.split(Ce),n=[];for(let i=0;i<t.length;i++){const o=te(t[i],e);if(n.push(o),o.type==="error")break}return n};function Et(){return new TransformStream({transform(r,e){xt(r,t=>{const n=t.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,n)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(n))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let K;function D(r){return r.reduce((e,t)=>e+t.length,0)}function N(r,e){if(r[0].length===e)return r.shift();const t=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)t[i]=r[0][n++],n===r[0].length&&(r.shift(),n=0);return r.length&&n<r[0].length&&(r[0]=r[0].slice(n)),t}function bt(r,e){K||(K=new TextDecoder);const t=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,h){for(t.push(s);;){if(n===0){if(D(t)<1)break;const c=N(t,1);o=(c[0]&128)===128,i=c[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(D(t)<2)break;const c=N(t,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(D(t)<8)break;const c=N(t,8),f=new DataView(c.buffer,c.byteOffset,c.length),d=f.getUint32(0);if(d>Math.pow(2,21)-1){h.enqueue(X);break}i=d*Math.pow(2,32)+f.getUint32(4),n=3}else{if(D(t)<i)break;const c=N(t,i);h.enqueue(te(o?c:K.decode(c),e)),n=0}if(i===0||i>r){h.enqueue(X);break}}}})}const Ae=4;function g(r){if(r)return vt(r)}function vt(r){for(var e in g.prototype)r[e]=g.prototype[e];return r}g.prototype.on=g.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};g.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};g.prototype.off=g.prototype.removeListener=g.prototype.removeAllListeners=g.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var n,i=0;i<t.length;i++)if(n=t[i],n===e||n.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};g.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,i=t.length;n<i;++n)t[n].apply(this,e)}return this};g.prototype.emitReserved=g.prototype.emit;g.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};g.prototype.hasListeners=function(r){return!!this.listeners(r).length};const V=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),w=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ct="arraybuffer";function Fe(r,...e){return e.reduce((t,n)=>(r.hasOwnProperty(n)&&(t[n]=r[n]),t),{})}const At=w.setTimeout,Ft=w.clearTimeout;function M(r,e){e.useNativeTimers?(r.setTimeoutFn=At.bind(w),r.clearTimeoutFn=Ft.bind(w)):(r.setTimeoutFn=w.setTimeout.bind(w),r.clearTimeoutFn=w.clearTimeout.bind(w))}const Bt=1.33;function kt(r){return typeof r=="string"?Tt(r):Math.ceil((r.byteLength||r.size)*Bt)}function Tt(r){let e=0,t=0;for(let n=0,i=r.length;n<i;n++)e=r.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function Be(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Rt(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Ot(r){let e={},t=r.split("&");for(let n=0,i=t.length;n<i;n++){let o=t[n].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class St extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class se extends g{constructor(e){super(),this.writable=!1,M(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new St(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=te(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Rt(e);return t.length?"?"+t:""}}class Dt extends se{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};wt(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,_t(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Be()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let ke=!1;try{ke=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Nt=ke;function Lt(){}class Pt extends Dt{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}class C extends g{constructor(e,t,n){super(),this.createRequest=e,M(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const t=Fe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=C.requestsCount++,C.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lt,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete C.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}C.requestsCount=0;C.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ye);else if(typeof addEventListener=="function"){const r="onpagehide"in w?"pagehide":"unload";addEventListener(r,ye,!1)}}function ye(){for(let r in C.requests)C.requests.hasOwnProperty(r)&&C.requests[r].abort()}const qt=(function(){const r=Te({xdomain:!1});return r&&r.responseType!==null})();class It extends Pt{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=qt&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new C(Te,this.uri(),e)}}function Te(r){const e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Nt))return new XMLHttpRequest}catch{}if(!e)try{return new w[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Re=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ut extends se{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Re?{}:Fe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;ee(n,this.supportsBinary,o=>{try{this.doWrite(n,o)}catch{}i&&V(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Be()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const z=w.WebSocket||w.MozWebSocket;class Vt extends Ut{createSocket(e,t,n){return Re?new z(e,t,n):t?new z(e,t):new z(e)}doWrite(e,t){this.ws.send(t)}}class Mt extends se{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=bt(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),i=Et();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const o=()=>{n.read().then(({done:h,value:c})=>{h||(this.onPacket(c),o())}).catch(h=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;this._writer.write(n).then(()=>{i&&V(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Ht={websocket:Vt,webtransport:Mt,polling:It},$t=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function J(r){if(r.length>8e3)throw"URI too long";const e=r,t=r.indexOf("["),n=r.indexOf("]");t!=-1&&n!=-1&&(r=r.substring(0,t)+r.substring(t,n).replace(/:/g,";")+r.substring(n,r.length));let i=$t.exec(r||""),o={},s=14;for(;s--;)o[Wt[s]]=i[s]||"";return t!=-1&&n!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Kt(o,o.path),o.queryKey=zt(o,o.query),o}function Kt(r,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function zt(r,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,o){i&&(t[i]=o)}),t}const Q=typeof addEventListener=="function"&&typeof removeEventListener=="function",q=[];Q&&addEventListener("offline",()=>{q.forEach(r=>r())},!1);class B extends g{constructor(e,t){if(super(),this.binaryType=Ct,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const n=J(e);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=J(t.host).host);M(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ot(this.opts.query)),Q&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},q.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ae,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&B.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",B.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(t+=kt(i)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,V(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,i){if(typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(B.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Q&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=q.indexOf(this._offlineEventListener);n!==-1&&q.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}B.protocol=Ae;class Yt extends B{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;B.priorWebsocketSuccess=!1;const i=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",p=>{if(!n)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;B.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=t.name,this.emitReserved("upgradeError",x)}}))};function o(){n||(n=!0,d(),t.close(),t=null)}const s=p=>{const x=new Error("probe error: "+p);x.transport=t.name,o(),this.emitReserved("upgradeError",x)};function h(){s("transport closed")}function c(){s("socket closed")}function f(p){t&&p.name!==t.name&&o()}const d=()=>{t.removeListener("open",i),t.removeListener("error",s),t.removeListener("close",h),this.off("close",c),this.off("upgrading",f)};t.once("open",i),t.once("error",s),t.once("close",h),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Xt=class extends Yt{constructor(e,t={}){const n=typeof e=="object"?e:t;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(i=>Ht[i]).filter(i=>!!i)),super(e,n)}};function Jt(r,e="",t){let n=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),n=J(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+e,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}const Qt=typeof ArrayBuffer=="function",jt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Oe=Object.prototype.toString,Gt=typeof Blob=="function"||typeof Blob<"u"&&Oe.call(Blob)==="[object BlobConstructor]",Zt=typeof File=="function"||typeof File<"u"&&Oe.call(File)==="[object FileConstructor]";function ne(r){return Qt&&(r instanceof ArrayBuffer||jt(r))||Gt&&r instanceof Blob||Zt&&r instanceof File}function I(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,n=r.length;t<n;t++)if(I(r[t]))return!0;return!1}if(ne(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return I(r.toJSON(),!0);for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&I(r[t]))return!0;return!1}function es(r){const e=[],t=r.data,n=r;return n.data=j(t,e),n.attachments=e.length,{packet:n,buffers:e}}function j(r,e){if(!r)return r;if(ne(r)){const t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){const t=new Array(r.length);for(let n=0;n<r.length;n++)t[n]=j(r[n],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){const t={};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=j(r[n],e));return t}return r}function ts(r,e){return r.data=G(r.data,e),delete r.attachments,r}function G(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=G(r[t],e);else if(typeof r=="object")for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=G(r[t],e));return r}const ss=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var l;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(l||(l={}));class ns{constructor(e){this.replacer=e}encode(e){return(e.type===l.EVENT||e.type===l.ACK)&&I(e)?this.encodeAsBinary({type:e.type===l.EVENT?l.BINARY_EVENT:l.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===l.BINARY_EVENT||e.type===l.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=es(e),n=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(n),i}}class re extends g{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===l.BINARY_EVENT;n||t.type===l.BINARY_ACK?(t.type=n?l.EVENT:l.ACK,this.reconstructor=new rs(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(ne(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(l[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===l.BINARY_EVENT||n.type===l.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const s=e.substring(o,t);if(s!=Number(s)||e.charAt(t)!=="-")throw new Error("Illegal attachments");const h=Number(s);if(!is(h)||h<0)throw new Error("Illegal attachments");if(h>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=h}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(o,t)}else n.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const o=t+1;for(;++t;){const s=e.charAt(t);if(s==null||Number(s)!=s){--t;break}if(t===e.length)break}n.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(re.isPayloadValid(n.type,o))n.data=o;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case l.CONNECT:return ge(t);case l.DISCONNECT:return t===void 0;case l.CONNECT_ERROR:return typeof t=="string"||ge(t);case l.EVENT:case l.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&ss.indexOf(t[0])===-1);case l.ACK:case l.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rs{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=ts(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const is=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function ge(r){return Object.prototype.toString.call(r)==="[object Object]"}const os=Object.freeze(Object.defineProperty({__proto__:null,Decoder:re,Encoder:ns,get PacketType(){return l}},Symbol.toStringTag,{value:"Module"}));function b(r,e,t){return r.on(e,t),function(){r.off(e,t)}}const as=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Se extends g{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[b(e,"open",this.onopen.bind(this)),b(e,"packet",this.onpacket.bind(this)),b(e,"error",this.onerror.bind(this)),b(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,i,o;if(as.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const s={type:l.EVENT,data:t};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const d=this.ids++,p=t.pop();this._registerAckCallback(d,p),s.id=d}const h=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!h||(c?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,t){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===e&&this.sendBuffer.splice(h,1);t.call(this,new Error("operation has timed out"))},i),s=(...h)=>{this.io.clearTimeoutFn(o),t.apply(this,h)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...t){return new Promise((n,i)=>{const o=(s,h)=>s?i(s):n(h);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>(this._queue[0],i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...o)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:l.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case l.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case l.EVENT:case l.BINARY_EVENT:this.onevent(e);break;case l.ACK:case l.BINARY_ACK:this.onack(e);break;case l.DISCONNECT:this.ondisconnect();break;case l.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...i){n||(n=!0,t.packet({type:l.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:l.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function T(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}T.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};T.prototype.reset=function(){this.attempts=0};T.prototype.setMin=function(r){this.ms=r};T.prototype.setMax=function(r){this.max=r};T.prototype.setJitter=function(r){this.jitter=r};class Z extends g{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,M(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new T({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||os;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Xt(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=b(t,"open",function(){n.onopen(),e&&e()}),o=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),e?e(h):this.maybeReconnectOnOpen()},s=b(t,"error",o);if(this._timeout!==!1){const h=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),t.close()},h);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(b(e,"ping",this.onping.bind(this)),b(e,"data",this.ondata.bind(this)),b(e,"error",this.onerror.bind(this)),b(e,"close",this.onclose.bind(this)),b(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){V(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Se(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const R={};function U(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};const t=Jt(r,e.path||"/socket.io"),n=t.source,i=t.id,o=t.path,s=R[i]&&o in R[i].nsps,h=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return h?c=new Z(n,e):(R[i]||(R[i]=new Z(n,e)),c=R[i]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(U,{Manager:Z,Socket:Se,io:U,connect:U});const _=U("/terminal",{autoConnect:!1});_.on("connect",()=>{console.log("手动连接成功")});_.on("disconnect",()=>{console.log("连接已断开")});var Y={exports:{}},_e;function cs(){return _e||(_e=1,(function(r){var e={};r.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length===2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s===12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s===8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s===172||s===175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s===161||s===164||167<=s&&s<=168||s===170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s===198||s===208||215<=s&&s<=216||222<=s&&s<=225||s===230||232<=s&&s<=234||236<=s&&s<=237||s===240||242<=s&&s<=243||247<=s&&s<=250||s===252||s===254||s===257||s===273||s===275||s===283||294<=s&&s<=295||s===299||305<=s&&s<=307||s===312||319<=s&&s<=322||s===324||328<=s&&s<=331||s===333||338<=s&&s<=339||358<=s&&s<=359||s===363||s===462||s===464||s===466||s===468||s===470||s===472||s===474||s===476||s===593||s===609||s===708||s===711||713<=s&&s<=715||s===717||s===720||728<=s&&s<=731||s===733||s===735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s===1025||1040<=s&&s<=1103||s===1105||s===8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s===8240||8242<=s&&s<=8243||s===8245||s===8251||s===8254||s===8308||s===8319||8321<=s&&s<=8324||s===8364||s===8451||s===8453||s===8457||s===8467||s===8470||8481<=s&&s<=8482||s===8486||s===8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s===8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s===8658||s===8660||s===8679||s===8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s===8715||s===8719||s===8721||s===8725||s===8730||8733<=s&&s<=8736||s===8739||s===8741||8743<=s&&s<=8748||s===8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s===8776||s===8780||s===8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s===8853||s===8857||s===8869||s===8895||s===8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s===9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s===9711||9733<=s&&s<=9734||s===9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s===9756||s===9758||s===9792||s===9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s===9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s===9955||9960<=s&&s<=9983||s===10045||s===10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s===65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i==="F"||i==="W"||i==="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=t(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){var s=e.length(n);i=i??0,o=o===void 0||i===null?1:o,i<0&&(i=s+i),o<0&&(o=s+o);for(var h="",c=0,f=t(n),d=0;d<f.length;d++){var p=f[d],x=e.length(p);if(c>=i-(x===2?1:0))if(c+x<=o)h+=p;else break;c+=x}return h}})(Y)),Y.exports}var O=cs();const hs=()=>{const r=L("/"),e=c=>{const f=/^([A-Za-z]):[\\/]?(.*)/.exec(c);if(!f)return{letter:"",rest:c.replace(/\\/g,"/")};if(!f[1]||!f[2])throw new Error("splitDriveLetter path error");return{letter:f[1].toUpperCase(),rest:f[2].replace(/\\/g,"/")}},t=(c,f)=>c?`${c}:\\${f.replace(/\//g,"\\")}`:f.replace(/\//g,"\\"),n=async()=>{r.value=window.__GLOBAL_CONFIG__.cwd||"/"},i=c=>{r.value=c},o=c=>{const f=/^\s*cd\s+([^\s]*)\s*$/i,d=c.match(f);if(!d)return{isCd:!1};const p=d[1]||"/",{rest:x,letter:u}=e(r.value),m=ct.resolve(`/${x}`,p);return{newCwd:t(u,m.slice(1)),oldCwd:r.value,isCd:!0}},s=c=>{const{isCd:f,newCwd:d,oldCwd:p}=o(c);if(f){_.emit("command",{command:"",cwd:d,oldCwd:p});return}_.emit("command",{command:c,cwd:r.value})},h=(c="")=>{_.emit("tab",{cwd:r.value,lastWord:c})};return{cwd:Ye(()=>r.value),initCwd:n,sendCommand:s,updateCwd:i,sendTabCommand:h}};var us=at();const ls={ref:"terminalContainer",class:"size-full overflow-hidden p-2 pr-0 bg-[#1e1e1e]"},fs={ref:"terminalEl",class:"!h-full"},gs=Xe({__name:"index",setup(r){const{t:e}=Je(),t=hs(),n=de("terminalContainer"),i=de("terminalEl"),{height:o,width:s}=ut(n),h=new dt.FitAddon,c=L(!1),f=L(!1),d=a=>{u&&(u.options.cursorStyle=a?"bar":"block",u.options.cursorBlink=!0,f.value=a)},p=lt(ht,[]),x=L(-1);let u=null,m="",v="",E="",ie;const oe=async()=>{u||(u=new ft.Terminal({theme:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#c5c5c5"},fontSize:14,fontFamily:'Consolas, "Courier New", monospace',cursorBlink:!0,windowsMode:!0,allowProposedApi:!0,convertEol:!0}),u.loadAddon(h),u.loadAddon(new pt.Unicode11Addon),u.loadAddon(new us.WebLinksAddon),u.attachCustomKeyEventHandler(a=>a.type==="keydown"&&(a.ctrlKey||a.metaKey)&&a.key==="v"?(a.preventDefault(),Le(),!1):!0),i.value&&(u.open(i.value),h.fit()),u.onData(De),ie=await Ke())},H=()=>{m="",v="",E=""},De=a=>{if(u){if(a==="\x1B[A"||a==="\x1B[B"){$e(a);return}if(a==="\r"){Ve();return}if(a===""){Pe();return}if(a.charCodeAt(0)===9||a===" "){qe();return}if(a===""){Ne();return}a.charCodeAt(0)<32&&a!==" "||(m+=a,u.write(a))}},Ne=()=>{d(!1),H(),u?.write("^C"),u?.write(`\r
2
- `),t.sendCommand("^C")},Le=async()=>{try{const a=await navigator.clipboard.readText();if(!a||!u)return;const y=[...a].filter(k=>{const F=k.charCodeAt(0);return F>=32||F===9||F===10||F===13}).join("");y&&(m+=y,u.write(y))}catch{}},Pe=()=>{if(v.length){E.length&&(E=v);const a=v.slice(-1),y=O.characterLength(a);u?.write("\b \b".repeat(y)),v=v.slice(0,-1),E=E.slice(0,-1);return}if(m.length){const a=m.slice(-1),y=O.characterLength(a);u?.write("\b \b".repeat(y)),m=m.slice(0,-1)}},qe=()=>{if(E){t.sendTabCommand(E);return}const a=m.trim().split(/\s+/);a.length>1&&(E=a[a.length-1],t.sendTabCommand(E))},Ie=()=>{for(const a of m){const y=O.characterLength(a);u?.write("\b \b".repeat(y))}m=""},Ue=()=>{for(const a of v){const y=O.characterLength(a);u?.write("\b \b".repeat(y))}v=""},Ve=()=>{if(u?.write(`\r
3
- `),m==="clear"){u?.clear(),t.sendCommand(""),H();return}m.trim()?(t.sendCommand(m+v),d(!0)):t.sendCommand(""),H()},Me=a=>{a&&(p.value=p.value.filter(y=>y!==a),p.value.unshift(a))},He=a=>`PS ${a}>`,$e=a=>{const y=x.value;a==="\x1B[A"&&(x.value=Math.min(x.value+1,p.value.length-1)),a==="\x1B[B"&&(x.value=Math.max(x.value-1,-1)),y!==x.value&&(Ie(),x.value===-1?m="":m=p.value[x.value]??"",u?.write(m))},We=a=>{if(a){if(Ue(),m.endsWith(E))for(const k of E){const F=O.characterLength(k);u?.write("\b \b".repeat(F)),m=m.slice(0,-1)}u?.write(`${a}`),v=`${a}`}},Ke=async()=>{await t.initCwd(),_.connect();const a=F=>{console.log("终端输出:",F);const{stderr:ce,stdout:he,cwd:$,err:ue,command:le,tab:fe}=F;if(ce){u?.write(`${ce}`);return}if(he){u?.write(`${he}`);return}if($){const ze=He($);u?.write(ze),t.updateCwd($),le&&Me(le),x.value=-1,d(!1);return}if(ue){u?.write(`\x1B[31m${ue}\x1B[0m`),u?.write(`\r
4
- `),d(!1);return}fe&&We(fe)},y=()=>{c.value=!0,t.sendCommand("")},k=()=>{c.value=!1,u?.writeln(`
5
- ${e("terminal.disconnected")}
6
- `)};return _.on("output",a),_.on("connect",y),_.on("disconnect",k),()=>{_.off("output",a),_.off("connect",y),_.off("disconnect",k)}};Qe(()=>[s.value,o.value],async()=>{h?.fit()},{immediate:!0}),je(()=>{oe()}),Ge(()=>{oe()});const ae=()=>{u?.dispose(),ie?.(),_?.disconnect(),u=null};return Ze(()=>{u?.clear(),ae()}),et(()=>{ae()}),(a,y)=>(tt(),st("div",ls,[nt("div",fs,null,512)],512))}});export{gs as _};
@@ -1 +0,0 @@
1
- import{aq as te,al as ae,$ as oe,a as se,v as le,s as ne,F as $,aj as U}from"./vendor-ui-CMQTpMsc.js";import{e as d,F as ce,n as y,b as M,I as N,x as re}from"./index-CpXbVBP2.js";import{C as ie}from"./useCompEditStore-DCFM66C4.js";import{c as pe}from"./index-BoBZsqw_.js";import{u as me}from"./useTeamHeaders-kxuE8Q8s.js";/* empty css */import{I as A,aD as de,O as v,Q as D,Y as h,P as H,H as ue,af as fe,u,R as k,a1 as L,a2 as V,ad as he,a0 as Y,aE as Ce,aA as ve,j as _e,Z as ge,U as Pe,W as Ee,a as x,m as B,J as Ie,n as Ue}from"./vendor-core-B1hRUZR_.js";import{u as ye}from"./useVscodeOpen-CA_im4Vj.js";import{_ as Te}from"./BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js";import{v as we}from"./v4-EwEgHOG0.js";const Oe={class:"flex items-center justify-between"},Se=["title"],Fe=A({__name:"index",props:Ce({options:{type:Array,default:()=>[]},placeholderText:{type:String,default:""},openInVscodeText:{type:String,default:""}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(f){const{openCompPathInVscode:T,handlePath:_}=ye(),c=de(f,"modelValue"),g=f;function w(r){const e=g.options.find(i=>i.fullPath===r);e&&T(e.fullPath,`./${d.COMP_CONFIG_FILENAME}`)}function P(r){c.value=r}return(r,e)=>{const i=ae,C=te,O=oe;return v(),D(O,{"model-value":c.value,placeholder:f.placeholderText,onChange:P},{default:h(()=>[(v(!0),H(ue,null,fe(f.options,p=>(v(),D(C,{key:p.value,label:u(_)(p.fullPath),value:p.value},{default:h(()=>[k("div",Oe,[k("span",{title:p.fullPath},L(u(_)(p.fullPath)),9,Se),V(i,{type:"primary",href:"javascript:void(0)",onClick:[e[0]||(e[0]=he(()=>{},["stop"])),b=>w(p.fullPath)]},{default:h(()=>[Y(L(f.openInVscodeText),1)]),_:1},8,["onClick"])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["model-value","placeholder"])}}}),Be=A({__name:"index",emits:["updateSuccess"],setup(f,{expose:T,emit:_}){const{t:c}=ve(),g=_,{headers:w,teamId:P}=me(),r=se(ce,!1),e=_e(d.PROVIDE_KEY_COMP_EDIT_STORE),i=x(!1),C=x(!0),O=B(()=>{const a=e.selectedFolder?.basename,t=e.compDetail?.name??"";return a?`${c("comp.compOnlineUpdate")}:${t}`:`${c("comp.compOfflineUpdate")}:${t}`}),p=B(()=>({title:O.value,fullscreen:r.value,top:"5vh",width:"70%"}));async function b(a){C.value=!0;try{const t=await y.v1Comp.compcontrollerLocalcompsbyids({compIds:[a]}),{compInfos:o}=t.data;if(o?.length){let s=o[0];if(o.length>1&&(s=await j(o),!s))return;e.setCompUpdateType(d.COMP_UPDATE_TYPE_ONLINE),i.value=!0,e.setSelectedFolder(s),await F(a,s.path)}else{if(await $.confirm(c("comp.compNotInLocal"),c("common.info"),{type:"warning"}).catch(()=>{})!=="confirm")return;e.setCompUpdateType(d.COMP_UPDATE_TYPE_OFFLINE),i.value=!0,await F(a)}}catch(t){console.error(t),U.error(t.message)}finally{C.value=!1}}async function j(a){const t=a.map(n=>({value:n.fullPathHash,label:n.fullPath,fullPath:n.fullPath})),o=x("");return await $({title:c("comp.selectUpdateFolder"),customClass:"select-message",message:()=>Ie(Fe,{modelValue:o.value,"onUpdate:modelValue":n=>o.value=n,options:t,placeholderText:c("comp.selectUpdateFolder"),openInVscodeText:c("comp.openInVscode")}),beforeClose:(n,m,E)=>{if(n==="confirm"){if(!o.value){U.error(c("comp.selectUpdateFolder"));return}E()}else E()}}).catch(()=>{})!=="confirm"?void 0:a.find(n=>n.fullPathHash===o.value)}function S(){i.value=!1}function W(){e.$reset()}function z(a,t){const o=l=>{if(!l?.length||!a)return"";const n=we(),m=re.getPreviewUrl(a,l);return`${d.COMP_PREVIEW_PREFIX_LOCAL}/${m}?v=${n}`};return t.map(l=>({...l,activeTab:d.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:o(l.miniPath),fullEntryUrl:o(l.fullPath)}))}function q(a,t){const o=new Map(a.map(({path:s,signedUrl:l})=>[s,l]));return t.map(s=>{const l=N.replaceBackslashWithSlash(s.miniPath.at(-1)??""),n=N.replaceBackslashWithSlash(s.fullPath?.at(-1)??"");return{...s,activeTab:d.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:o.get(l)??"",fullEntryUrl:o.get(n)??""}})}async function F(a,t){e.setLoading(!0);const o=await M.v1Comp.compcontrollerCompdetail({compId:a}),{desc:s,previewConfigs:l,bgColor:n,dep:m,name:E,version:Q,tags:X}=o.data||{};if(e.setCompDetail(o.data),e.setOnlineCompDep(m),e.setCompBgColor(n??"#fff"),e.setExtraInfo({description:s,name:E,tags:X}),e.setEditCompId(a),e.isOnlineUpdate&&t){const R=await M.v1Comp.compcontrollerComphash({compId:a}),I=await y.v1Comp.compcontrollerCompfilehash({compPath:t}),Z=await y.v1Comp.compcontrollerDep({compPath:t}),{thirdParty:ee}=Z.data;e.setCompDep(ee),e.setLocalCompHash(I.data.compHash),e.setRemoteCompHash(R.data.compHash),e.setPreviewCompList(z(t,l))}else{const I=pe(a)().versionToFileAccessPath[Q]??[];e.setSignedUrls(I),e.setPreviewCompList(q(I,l)),e.setCompDep(m)}e.setLoading(!1)}function G({end:a}){const t=e.getCompSubmitParams();if(e.isOnlineUpdate)y.v1Comp.compcontrollerUpdate({compId:e.editCompId,...t,...P?{teamId:P}:{}}).then(()=>{U.success(c("message.success.update")),g("updateSuccess",e.editCompId),S()}).finally(()=>{a()});else if(e.isOfflineUpdate){const{name:o,desc:s,bgColor:l,previewConfigs:n,tags:m}=t;M.v1Comp.compcontrollerUpdatebasicinfo({compId:e.editCompId,name:o,desc:s,bgColor:l,previewConfigs:n,tags:m},{headers:w}).then(()=>{U.success(c("message.success.update")),g("updateSuccess",e.editCompId),S()}).finally(()=>{a()})}}async function J(){r.value=!r.value}async function K(){const a=e.editCompId,t=e.selectedFolder,o=e.compUpdateType;e.$reset(),await Ue(),e.setCompUpdateType(o),e.setSelectedFolder(t),F(a,t.path)}return T({open:b,close:S}),(a,t)=>{const o=ne,s=le;return v(),D(u(Te),Ee({modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=l=>i.value=l),class:"comp-update-dialog"},p.value,{"destroy-on-close":"","show-close":"",onClose:W}),{footer:h(()=>[V(o,{onClick:J},{default:h(()=>[Y(L(u(r)?u(c)("common.exitFullscreen"):u(c)("common.fullscreen")),1)]),_:1})]),default:h(()=>[ge((v(),H("div",{class:Pe(u(r)?"size-full":"h-[70vh]")},[V(ie,{class:"h-full",onConfirmUpload:G,onReload:K})],2)),[[s,C.value]])]),_:1},16,["modelValue"])}}});export{Be as _};
@@ -1 +0,0 @@
1
- import{I as i}from"./index-B2G95uaY.js";import{O as a,Q as h,u as o}from"./vendor-core-B1hRUZR_.js";const c='<path class="z5ochubni"/>',d={__name:"kid-star",props:["width","height"],setup(t){const e={width:24,height:24};return(n,s)=>(a(),h(o(i),{width:t.width,height:t.height,viewBox:e,content:c,fallback:"material-symbols:kid-star"},null,8,["width","height"]))}};export{d as default};
@@ -1 +0,0 @@
1
- import{B as E}from"./vendor-ui-CMQTpMsc.js";var x={exports:{}},y={exports:{}},_;function H(){return _||(_=1,(function(){var F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l={rotl:function(f,i){return f<<i|f>>>32-i},rotr:function(f,i){return f<<32-i|f>>>i},endian:function(f){if(f.constructor==Number)return l.rotl(f,8)&16711935|l.rotl(f,24)&4278255360;for(var i=0;i<f.length;i++)f[i]=l.endian(f[i]);return f},randomBytes:function(f){for(var i=[];f>0;f--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(f){for(var i=[],c=0,a=0;c<f.length;c++,a+=8)i[a>>>5]|=f[c]<<24-a%32;return i},wordsToBytes:function(f){for(var i=[],c=0;c<f.length*32;c+=8)i.push(f[c>>>5]>>>24-c%32&255);return i},bytesToHex:function(f){for(var i=[],c=0;c<f.length;c++)i.push((f[c]>>>4).toString(16)),i.push((f[c]&15).toString(16));return i.join("")},hexToBytes:function(f){for(var i=[],c=0;c<f.length;c+=2)i.push(parseInt(f.substr(c,2),16));return i},bytesToBase64:function(f){for(var i=[],c=0;c<f.length;c+=3)for(var a=f[c]<<16|f[c+1]<<8|f[c+2],h=0;h<4;h++)c*8+h*6<=f.length*8?i.push(F.charAt(a>>>6*(3-h)&63)):i.push("=");return i.join("")},base64ToBytes:function(f){f=f.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],c=0,a=0;c<f.length;a=++c%4)a!=0&&i.push((F.indexOf(f.charAt(c-1))&Math.pow(2,-2*a+8)-1)<<a*2|F.indexOf(f.charAt(c))>>>6-a*2);return i}};y.exports=l})()),y.exports}var B,S;function C(){if(S)return B;S=1;var F={utf8:{stringToBytes:function(l){return F.bin.stringToBytes(unescape(encodeURIComponent(l)))},bytesToString:function(l){return decodeURIComponent(escape(F.bin.bytesToString(l)))}},bin:{stringToBytes:function(l){for(var f=[],i=0;i<l.length;i++)f.push(l.charCodeAt(i)&255);return f},bytesToString:function(l){for(var f=[],i=0;i<l.length;i++)f.push(String.fromCharCode(l[i]));return f.join("")}}};return B=F,B}var T,A;function U(){if(A)return T;A=1,T=function(f){return f!=null&&(F(f)||l(f)||!!f._isBuffer)};function F(f){return!!f.constructor&&typeof f.constructor.isBuffer=="function"&&f.constructor.isBuffer(f)}function l(f){return typeof f.readFloatLE=="function"&&typeof f.slice=="function"&&F(f.slice(0,0))}return T}var q;function z(){return q||(q=1,(function(){var F=H(),l=C().utf8,f=U(),i=C().bin,c=function(a,h){a.constructor==String?h&&h.encoding==="binary"?a=i.stringToBytes(a):a=l.stringToBytes(a):f(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var e=F.bytesToWords(a),g=a.length*8,t=1732584193,r=-271733879,u=-1732584194,n=271733878,o=0;o<e.length;o++)e[o]=(e[o]<<8|e[o]>>>24)&16711935|(e[o]<<24|e[o]>>>8)&4278255360;e[g>>>5]|=128<<g%32,e[(g+64>>>9<<4)+14]=g;for(var p=c._ff,v=c._gg,s=c._hh,d=c._ii,o=0;o<e.length;o+=16){var I=t,R=r,M=u,w=n;t=p(t,r,u,n,e[o+0],7,-680876936),n=p(n,t,r,u,e[o+1],12,-389564586),u=p(u,n,t,r,e[o+2],17,606105819),r=p(r,u,n,t,e[o+3],22,-1044525330),t=p(t,r,u,n,e[o+4],7,-176418897),n=p(n,t,r,u,e[o+5],12,1200080426),u=p(u,n,t,r,e[o+6],17,-1473231341),r=p(r,u,n,t,e[o+7],22,-45705983),t=p(t,r,u,n,e[o+8],7,1770035416),n=p(n,t,r,u,e[o+9],12,-1958414417),u=p(u,n,t,r,e[o+10],17,-42063),r=p(r,u,n,t,e[o+11],22,-1990404162),t=p(t,r,u,n,e[o+12],7,1804603682),n=p(n,t,r,u,e[o+13],12,-40341101),u=p(u,n,t,r,e[o+14],17,-1502002290),r=p(r,u,n,t,e[o+15],22,1236535329),t=v(t,r,u,n,e[o+1],5,-165796510),n=v(n,t,r,u,e[o+6],9,-1069501632),u=v(u,n,t,r,e[o+11],14,643717713),r=v(r,u,n,t,e[o+0],20,-373897302),t=v(t,r,u,n,e[o+5],5,-701558691),n=v(n,t,r,u,e[o+10],9,38016083),u=v(u,n,t,r,e[o+15],14,-660478335),r=v(r,u,n,t,e[o+4],20,-405537848),t=v(t,r,u,n,e[o+9],5,568446438),n=v(n,t,r,u,e[o+14],9,-1019803690),u=v(u,n,t,r,e[o+3],14,-187363961),r=v(r,u,n,t,e[o+8],20,1163531501),t=v(t,r,u,n,e[o+13],5,-1444681467),n=v(n,t,r,u,e[o+2],9,-51403784),u=v(u,n,t,r,e[o+7],14,1735328473),r=v(r,u,n,t,e[o+12],20,-1926607734),t=s(t,r,u,n,e[o+5],4,-378558),n=s(n,t,r,u,e[o+8],11,-2022574463),u=s(u,n,t,r,e[o+11],16,1839030562),r=s(r,u,n,t,e[o+14],23,-35309556),t=s(t,r,u,n,e[o+1],4,-1530992060),n=s(n,t,r,u,e[o+4],11,1272893353),u=s(u,n,t,r,e[o+7],16,-155497632),r=s(r,u,n,t,e[o+10],23,-1094730640),t=s(t,r,u,n,e[o+13],4,681279174),n=s(n,t,r,u,e[o+0],11,-358537222),u=s(u,n,t,r,e[o+3],16,-722521979),r=s(r,u,n,t,e[o+6],23,76029189),t=s(t,r,u,n,e[o+9],4,-640364487),n=s(n,t,r,u,e[o+12],11,-421815835),u=s(u,n,t,r,e[o+15],16,530742520),r=s(r,u,n,t,e[o+2],23,-995338651),t=d(t,r,u,n,e[o+0],6,-198630844),n=d(n,t,r,u,e[o+7],10,1126891415),u=d(u,n,t,r,e[o+14],15,-1416354905),r=d(r,u,n,t,e[o+5],21,-57434055),t=d(t,r,u,n,e[o+12],6,1700485571),n=d(n,t,r,u,e[o+3],10,-1894986606),u=d(u,n,t,r,e[o+10],15,-1051523),r=d(r,u,n,t,e[o+1],21,-2054922799),t=d(t,r,u,n,e[o+8],6,1873313359),n=d(n,t,r,u,e[o+15],10,-30611744),u=d(u,n,t,r,e[o+6],15,-1560198380),r=d(r,u,n,t,e[o+13],21,1309151649),t=d(t,r,u,n,e[o+4],6,-145523070),n=d(n,t,r,u,e[o+11],10,-1120210379),u=d(u,n,t,r,e[o+2],15,718787259),r=d(r,u,n,t,e[o+9],21,-343485551),t=t+I>>>0,r=r+R>>>0,u=u+M>>>0,n=n+w>>>0}return F.endian([t,r,u,n])};c._ff=function(a,h,e,g,t,r,u){var n=a+(h&e|~h&g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._gg=function(a,h,e,g,t,r,u){var n=a+(h&g|e&~g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._hh=function(a,h,e,g,t,r,u){var n=a+(h^e^g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._ii=function(a,h,e,g,t,r,u){var n=a+(e^(h|~g))+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._blocksize=16,c._digestsize=16,x.exports=function(a,h){if(a==null)throw new Error("Illegal argument "+a);var e=F.wordsToBytes(c(a,h));return h&&h.asBytes?e:h&&h.asString?i.bytesToString(e):F.bytesToHex(e)}})()),x.exports}var G=z();const W=E(G);export{W as m};
@@ -1 +0,0 @@
1
- import{I as i}from"./index-B2G95uaY.js";import{O as n,Q as s,u as a}from"./vendor-core-B1hRUZR_.js";const h='<path class="nxa7mutkg"/>',m={__name:"settings",props:["width","height"],setup(t){const e={width:24,height:24};return(o,c)=>(n(),s(a(i),{width:t.width,height:t.height,viewBox:e,content:h,fallback:"material-symbols:settings"},null,8,["width","height"]))}};export{m as default};
@@ -1 +0,0 @@
1
- import{I as i}from"./index-B2G95uaY.js";import{O as s,Q as c,u as h}from"./vendor-core-B1hRUZR_.js";const r='<path class="x07lvybhb"/>',u={__name:"supervised-user-circle",props:["width","height"],setup(e){const t={width:24,height:24};return(o,a)=>(s(),c(h(i),{width:e.width,height:e.height,viewBox:t,content:r,fallback:"material-symbols:supervised-user-circle"},null,8,["width","height"]))}};export{u as default};
@@ -1 +0,0 @@
1
- import{I as a}from"./index-B2G95uaY.js";import{O as o,Q as c,u as n}from"./vendor-core-B1hRUZR_.js";const h='<path class="kd54x8aht"/>',d={__name:"sync-saved-locally-rounded",props:["width","height"],setup(t){const e={width:24,height:24};return(s,i)=>(o(),c(n(a),{width:t.width,height:t.height,viewBox:e,content:h,fallback:"material-symbols:sync-saved-locally-rounded"},null,8,["width","height"]))}};export{d as default};
@@ -1 +0,0 @@
1
- import{I as a}from"./index-B2G95uaY.js";import{O as i,Q as h,u as n}from"./vendor-core-B1hRUZR_.js";const o='<path class="y6w8zebcp"/>',m={__name:"terminal",props:["width","height"],setup(t){const e={width:24,height:24};return(c,r)=>(i(),h(n(a),{width:t.width,height:t.height,viewBox:e,content:o,fallback:"material-symbols:terminal"},null,8,["width","height"]))}};export{m as default};
@@ -1 +0,0 @@
1
- import{aB as a}from"./vendor-core-B1hRUZR_.js";const s=a("cacheOssStore",{state:()=>({cacheUrl:{}}),actions:{setCacheUrl(e,t){this.$patch(c=>{c.cacheUrl[e]=t})},getCacheUrl(e){return this.cacheUrl[e]}}});export{s as u};
@@ -1 +0,0 @@
1
- import{aB as o}from"./vendor-core-B1hRUZR_.js";const i=(a="")=>{if(!a)throw new Error("createCompMetaLocalStore scopeId is required");return o(`compMetaLocal_${a}`,{state:()=>({detail:{},dep:{},depToFile:{}}),getters:{},actions:{setDetail(e){this.$patch(t=>{t.detail=e})},setDep(e){this.$patch(t=>{t.dep=e})},setDepToFile(e){this.$patch(t=>{t.depToFile=e})}}})};export{i as c};
@@ -1 +0,0 @@
1
- import{d as n,I as a,b as d,c as u}from"./useMessage-C_SU5QaN.js";import{m as E}from"./vendor-core-B1hRUZR_.js";const T=(s,o)=>{const{sendMessageToTargetIframe:r,messageListener:t}=u(),{addListener:i}=t(),_=n(!1,window.__GLOBAL_CONFIG__.subPort);i(a.SEARCH_KEYWORD_GET,()=>{const{triggerCallback:c,stopWatch:m}=d(E(()=>s.value),()=>{o.value?.sendMessageToTargetIframeByCompId(e=>{e?r(e,a.SEARCH_KEYWORD_SET,s.value,_):m()})});c()})};export{T as u};
@@ -1 +0,0 @@
1
- import{w as P,a7 as N,M as y,h as C,m as G}from"./vendor-core-B1hRUZR_.js";import{B as U}from"./vendor-ui-CMQTpMsc.js";import{e as D}from"./index-CpXbVBP2.js";function b(m,S,g){let I=()=>{};const w=C();let h=null,c=[];I=P(()=>m.value,e=>{h=e,c.forEach(({task:n,data:i})=>{n(i)})},{deep:!0,immediate:!0,...g});function a(e){c.push({task:S,data:e??{}}),h&&S(e??{})}return w&&(N(()=>{I(),c=[]}),y(()=>{c=[]})),{stopWatch:I,triggerCallback:a}}var L={exports:{}},v;function x(){return v||(v=1,(function(m){var S=(function(){var g=String.fromCharCode,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",h={};function c(e,n){if(!h[e]){h[e]={};for(var i=0;i<e.length;i++)h[e][e.charAt(i)]=i}return h[e][n]}var a={compressToBase64:function(e){if(e==null)return"";var n=a._compress(e,6,function(i){return I.charAt(i)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return e==null?"":e==""?null:a._decompress(e.length,32,function(n){return c(I,e.charAt(n))})},compressToUTF16:function(e){return e==null?"":a._compress(e,15,function(n){return g(n+32)})+" "},decompressFromUTF16:function(e){return e==null?"":e==""?null:a._decompress(e.length,16384,function(n){return e.charCodeAt(n)-32})},compressToUint8Array:function(e){for(var n=a.compress(e),i=new Uint8Array(n.length*2),o=0,r=n.length;o<r;o++){var u=n.charCodeAt(o);i[o*2]=u>>>8,i[o*2+1]=u%256}return i},decompressFromUint8Array:function(e){if(e==null)return a.decompress(e);for(var n=new Array(e.length/2),i=0,o=n.length;i<o;i++)n[i]=e[i*2]*256+e[i*2+1];var r=[];return n.forEach(function(u){r.push(g(u))}),a.decompress(r.join(""))},compressToEncodedURIComponent:function(e){return e==null?"":a._compress(e,6,function(n){return w.charAt(n)})},decompressFromEncodedURIComponent:function(e){return e==null?"":e==""?null:(e=e.replace(/ /g,"+"),a._decompress(e.length,32,function(n){return c(w,e.charAt(n))}))},compress:function(e){return a._compress(e,16,function(n){return g(n)})},_compress:function(e,n,i){if(e==null)return"";var o,r,u={},O={},d="",A="",f="",p=2,T=3,l=2,E=[],t=0,_=0,s;for(s=0;s<e.length;s+=1)if(d=e.charAt(s),Object.prototype.hasOwnProperty.call(u,d)||(u[d]=T++,O[d]=!0),A=f+d,Object.prototype.hasOwnProperty.call(u,A))f=A;else{if(Object.prototype.hasOwnProperty.call(O,f)){if(f.charCodeAt(0)<256){for(o=0;o<l;o++)t=t<<1,_==n-1?(_=0,E.push(i(t)),t=0):_++;for(r=f.charCodeAt(0),o=0;o<8;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1}else{for(r=1,o=0;o<l;o++)t=t<<1|r,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=0;for(r=f.charCodeAt(0),o=0;o<16;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1}p--,p==0&&(p=Math.pow(2,l),l++),delete O[f]}else for(r=u[f],o=0;o<l;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1;p--,p==0&&(p=Math.pow(2,l),l++),u[A]=T++,f=String(d)}if(f!==""){if(Object.prototype.hasOwnProperty.call(O,f)){if(f.charCodeAt(0)<256){for(o=0;o<l;o++)t=t<<1,_==n-1?(_=0,E.push(i(t)),t=0):_++;for(r=f.charCodeAt(0),o=0;o<8;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1}else{for(r=1,o=0;o<l;o++)t=t<<1|r,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=0;for(r=f.charCodeAt(0),o=0;o<16;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1}p--,p==0&&(p=Math.pow(2,l),l++),delete O[f]}else for(r=u[f],o=0;o<l;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1;p--,p==0&&(p=Math.pow(2,l),l++)}for(r=2,o=0;o<l;o++)t=t<<1|r&1,_==n-1?(_=0,E.push(i(t)),t=0):_++,r=r>>1;for(;;)if(t=t<<1,_==n-1){E.push(i(t));break}else _++;return E.join("")},decompress:function(e){return e==null?"":e==""?null:a._decompress(e.length,32768,function(n){return e.charCodeAt(n)})},_decompress:function(e,n,i){var o=[],r=4,u=4,O=3,d="",A=[],f,p,T,l,E,t,_,s={val:i(0),position:n,index:1};for(f=0;f<3;f+=1)o[f]=f;for(T=0,E=Math.pow(2,2),t=1;t!=E;)l=s.val&s.position,s.position>>=1,s.position==0&&(s.position=n,s.val=i(s.index++)),T|=(l>0?1:0)*t,t<<=1;switch(T){case 0:for(T=0,E=Math.pow(2,8),t=1;t!=E;)l=s.val&s.position,s.position>>=1,s.position==0&&(s.position=n,s.val=i(s.index++)),T|=(l>0?1:0)*t,t<<=1;_=g(T);break;case 1:for(T=0,E=Math.pow(2,16),t=1;t!=E;)l=s.val&s.position,s.position>>=1,s.position==0&&(s.position=n,s.val=i(s.index++)),T|=(l>0?1:0)*t,t<<=1;_=g(T);break;case 2:return""}for(o[3]=_,p=_,A.push(_);;){if(s.index>e)return"";for(T=0,E=Math.pow(2,O),t=1;t!=E;)l=s.val&s.position,s.position>>=1,s.position==0&&(s.position=n,s.val=i(s.index++)),T|=(l>0?1:0)*t,t<<=1;switch(_=T){case 0:for(T=0,E=Math.pow(2,8),t=1;t!=E;)l=s.val&s.position,s.position>>=1,s.position==0&&(s.position=n,s.val=i(s.index++)),T|=(l>0?1:0)*t,t<<=1;o[u++]=g(T),_=u-1,r--;break;case 1:for(T=0,E=Math.pow(2,16),t=1;t!=E;)l=s.val&s.position,s.position>>=1,s.position==0&&(s.position=n,s.val=i(s.index++)),T|=(l>0?1:0)*t,t<<=1;o[u++]=g(T),_=u-1,r--;break;case 2:return A.join("")}if(r==0&&(r=Math.pow(2,O),O++),o[_])d=o[_];else if(_===u)d=p+p.charAt(0);else return null;A.push(d),o[u++]=p+d.charAt(0),r--,p=d,r==0&&(r=Math.pow(2,O),O++)}}};return a})();m!=null?m.exports=S:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return S})})(L)),L.exports}var H=x();const R=U(H),M=["topOrigin","compType","userId","instanceUid","compId","isSfc"],z=()=>{const m=I();function S(c){if(Object.keys(c).filter(e=>!M.includes(e)).length)throw new Error(`iframe参数键名只能包含${M.join(", ")}`);return R.compressToEncodedURIComponent(JSON.stringify(c))}function g(c){const a=R.decompressFromEncodedURIComponent(c);return JSON.parse(a)}function I(){const a=new URLSearchParams(window.location.search).get("params")??"";return g(a)}function w(c){const a={...m,...c};return S(a)}function h(){return new URLSearchParams(window.location.search).get("isDark")}return{params:m,createIframeParams:S,uniteParams:w,getTheme:h}},J=(m,S)=>`${D.IFRAME_HOST}:${S}`,q=(m,S)=>`${D.IFRAME_HOST}:${S}`,k={LIST_INIT:"list_init",LIST_INIT_GET:"list_init_get",ITEM_INIT_SET:"item_init_set",ITEM_INIT_GET:"item_init_get",ITEM_INIT_SET_LOCAL:"item_init_set_local",ITEM_INIT_GET_LOCAL:"item_init_get_local",ITEM_VERSION_CHANGE:"item_version_change",ITEM_VERSION_LIST_GET:"item_version_list_get",ITEM_VERSION_LIST_SET:"item_version_list_set",ITEM_SITE_PATH_SET:"item_site_path_set",ITEM_SITE_PATH_GET:"item_site_path_get",THEME_CHANGE_SET:"theme_change_set",THEME_CHANGE_GET:"theme_change_get",BG_COLOR_SET:"bg_color_set",BG_COLOR_GET:"bg_color_get",UPDATE_IFRAME_HEIGHT:"update_iframe_height",SELECTED_ROWS_SET:"selected_rows_set",SELECTED_ROWS_GET:"selected_rows_get",SELECTED_ROWS_TO_LEAF_NODE_MAP_SET:"selected_rows_to_leaf_node_map_set",SELECTED_ROWS_TO_LEAF_NODE_MAP_GET:"selected_rows_to_leaf_node_map_get",COMP_GROUP_PATH_GET:"comp_group_path_get",COMP_GROUP_PATH_SET:"comp_group_path_set",COMP_PREVIEW_LIST_SET:"comp_preview_list_set",COMP_PREVIEW_LIST_GET:"comp_preview_list_get",COMP_RENDER_INFO_SET:"comp_render_info_set",COMP_RENDER_INFO_GET:"comp_render_info_get",CAROUSEL_INDEX_SET:"carousel_index_set",CAROUSEL_INDEX_GET:"carousel_index_get",LOCAL_EXIST_GET:"local_exist_get",LOCAL_EXIST_SET:"local_exist_set",SHOW_REFRESH_BTN_SET:"show_refresh_btn_set",SHOW_REFRESH_BTN_GET:"show_refresh_btn_get",ACTION_ADD_COMP_START_LOADING:"action_add_comp_start_loading",ACTION_ADD_COMP_FINISH_LOADING:"action_add_comp_finish_loading",ACTION_DOWNLOAD:"action_download",ACTION_PREVIEW:"action_preview",ACTION_PREVIEW_LOCAL:"action_preview_local",ACTION_COLLECT:"action_collect",ACTION_UPDATE:"action_update",ACTION_DELETE:"action_delete",ACTION_REFRESH:"action_refresh",ACTION_OPEN_VSCODE_LOCAL:"action_open_vscode_local",IS_ONLINE_UPDATE_SET:"is_online_update_set",IS_ONLINE_UPDATE_GET:"is_online_update_get",IS_ADD_SET:"is_add_set",IS_ADD_GET:"is_add_get",COMP_EDIT_TAB_TYPE_SET:"comp_edit_tab_type_set",OSS_FILE_SIGN_URL_GET:"oss_file_sign_url_get",OSS_FILE_SIGN_URL_SET:"oss_file_sign_url_set",SETTING_DATA_SET:"setting_data_set",SETTING_DATA_GET:"setting_data_get",SETTING_DATA_LEAF_SET:"setting_data_leaf_set",SETTING_DATA_LEAF_GET:"setting_data_leaf_get",SEARCH_KEYWORD_GET:"search_keyword_get",SEARCH_KEYWORD_SET:"search_keyword_set",LOCALE_SET:"locale_set",LOCALE_GET:"locale_get",COMP_RENDER_ERROR_SET:"comp_render_error_set",COMP_SCREENSHOT_REQUEST:"comp_screenshot_request",COMP_SCREENSHOT_RESPONSE:"comp_screenshot_response",SELECTED_FOLDER_SET:"selected_folder_set",SELECTED_FOLDER_GET:"selected_folder_get",LOADING_SET:"loading_set"};function F(){const m=C(),S=(c,a,e,n)=>{c.postMessage({type:a,payload:JSON.stringify(e)},n)};return{sendMessageToParent:(c,a,e)=>{window.parent.postMessage({type:c,payload:JSON.stringify(a)},e)},sendMessageToTop:(c,a,e,n)=>{if(!e)throw new Error("targetOrigin 不能为空");window.top?.postMessage({type:c,payload:JSON.stringify(a),instanceUid:n},e)},sendMessageToTargetIframe:S,messageListener:()=>{const c=new Map,a=e=>{const{type:n,payload:i,instanceUid:o}=e.data??{},r=e.source===window.parent||e.source===window.top,u=o?.split(",").some(d=>d===m?.uid.toString()),O=c.get(n);(u||r)&&O?.(JSON.parse(i))};return window.addEventListener("message",a),N(()=>{window.removeEventListener("message",a),c.clear()}),{addListener:(e,n)=>{c.set(e,i=>{n(i)})},removeListener:e=>{e?c.delete(e):(c.clear(),window.removeEventListener("message",a))}}},requestResponse:async({targetWindow:c,requestType:a,responseType:e,data:n,targetOrigin:i,timeout:o=1e4})=>c?new Promise(r=>{let u=!1;const O=setTimeout(()=>{u||(u=!0,window.removeEventListener("message",d),r(null))},o),d=A=>{if(!u)try{const{type:f,payload:p}=A.data;f===e&&(u=!0,clearTimeout(O),window.removeEventListener("message",d),r(JSON.parse(p)))}catch{}};window.addEventListener("message",d),S(c,a,n,i)}):null,instanceUid:G(()=>m?.uid?.toString()??"")}}const K=Object.freeze(Object.defineProperty({__proto__:null,IFRAME_POST_MESSAGE_TYPE:k,usePostMessage:F},Symbol.toStringTag,{value:"Module"}));export{k as I,z as a,b,F as c,J as d,K as e,q as u};
@@ -1 +0,0 @@
1
- import{ar as c}from"./vendor-ui-CMQTpMsc.js";import{m as p,n as r}from"./index-CpXbVBP2.js";const{i18n:l}=p;function d(){function s(o,e){const n=c.service({lock:!0,text:l.global.t("comp.openingInEditor")});r.v1Comp.compcontrollerOpencomppathinvscode({folderPath:o,relativeFilePath:e}).finally(()=>{n.close()})}function i(o,e=2){const n=window.__GLOBAL_CONFIG__.sep,t=o.split(n);return t.length>e?`...${n}${t.slice(-e).join(n)}`:o}return{handlePath:i,openCompPathInVscode:s}}export{d as u};