comp-hub 0.0.111 → 0.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/website/dist/assets/{atom-one-dark-DmWwHoWK.js → atom-one-dark-xkUplIA_.js} +1 -1
- package/dist/website/dist/assets/{index-7g-aSb_q.js → index-BIRs-yvJ.js} +1 -1
- package/dist/website/dist/assets/{index-C7hnIt9s.js → index-BaVL0IPd.js} +1 -1
- package/dist/website/dist/assets/{index-Z3wV2r7b.js → index-Bv0L4T4Z.js} +1 -1
- package/dist/website/dist/assets/{index-DkaD8cL9.js → index-CMIQkogm.js} +1 -1
- package/dist/website/dist/assets/{index-B5e_GsEp.js → index-CX7DTbmq.js} +1 -1
- package/dist/website/dist/assets/{index-DwlXau9Y.js → index-CkQ55l2s.js} +1 -1
- package/dist/website/dist/assets/{index-KcFUaSBt.js → index-Coa4yLV0.js} +1 -1
- package/dist/website/dist/assets/{index-DKTq3sZs.js → index-D8DP5Njt.js} +1 -1
- package/dist/website/dist/assets/{index-Cfr4O1Jh.js → index-DULEEvgT.js} +1 -1
- package/dist/website/dist/assets/{index-BuZTXppo.js → index-D_AtGMEa.js} +1 -1
- package/dist/website/dist/assets/index-GWS37p4v.js +1 -0
- package/dist/website/dist/assets/{index-y_yThRhR.js → index-RXDua4Dk.js} +1 -1
- package/dist/website/dist/assets/{index-DUydxA9_.js → index-RwJN9QCp.js} +2 -2
- package/dist/website/dist/assets/{index-DVUs3ntb.js → index-iW0FMVaJ.js} +2 -2
- package/dist/website/dist/assets/{index-BkXdGq6f.js → index-kDzWy4mC.js} +1 -1
- package/dist/website/dist/assets/{index-W7gZMCJ2.js → index-mpzxMLt4.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-CTLkUtjl.js → index.vue_vue_type_script_setup_true_lang-C-wco12i.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-NPvifOmm.js → index.vue_vue_type_script_setup_true_lang-CyTuSNan.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-B71JWV5F.js → index.vue_vue_type_script_setup_true_lang-DTKIvNdb.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-w9pFA4CP.js → index.vue_vue_type_script_setup_true_lang-QiFiXGkp.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_style_index_0_lang-oyNq_ZPX.js → index.vue_vue_type_style_index_0_lang-DxqUXX1Y.js} +1 -1
- package/dist/website/dist/assets/{md5-BIioHKoi.js → md5-Cv8oe130.js} +1 -1
- package/dist/website/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/website/dist/assets/index-ByJFVSOn.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g,y as x,z as v,c as d,o as r,b as t,a as n,n as l,_ as b,w as i,r as u,u as s,F as _,t as c,A as h,f as o}from"./index-
|
|
1
|
+
import{d as g,y as x,z as v,c as d,o as r,b as t,a as n,n as l,_ as b,w as i,r as u,u as s,F as _,t as c,A as h,f as o}from"./index-iW0FMVaJ.js";import{C as y}from"./index-DULEEvgT.js";import{C}from"./index-BaVL0IPd.js";import"./atom-one-dark-xkUplIA_.js";const k={class:"relative"},S={class:"absolute inset-0 bg-[#fff] border border-[#ccc] rounded-sm max-w-[1000px] mx-auto p-[10px] min-h-[100vh] overflow-auto"},V={class:"flex items-center gap-[5px]"},w={key:0,class:"h-[100px] flex items-center justify-center text-[#ccc]"},z={class:"flex items-center gap-[5px]"},B={class:"text-[14px] whitespace-pre-line leading-5"},j=g({__name:"index",setup(D){const f=x(),a=v();return(N,e)=>{const p=u("el-tag"),m=u("el-divider");return r(),d("div",k,[t(C),n("div",S,[n("div",V,[t(b,{logoClass:"h-[30px] mt-[40px] mb-[40px]"}),t(p,{type:"info",round:"",size:"small"},{default:i(()=>[o(c(s(f).compHubVersion),1)]),_:1})]),s(a).hasUpgrade?l("",!0):(r(),d("div",w,"暂无更新")),s(a).upgradeDesc?(r(),d(_,{key:1},[t(m,{"content-position":"center"},{default:i(()=>[n("div",z,[e[0]||(e[0]=o(" 新版功能 ",-1)),t(p,{type:"info",round:"",size:"small"},{default:i(()=>[o(c(s(a).latestVersion),1)]),_:1})])]),_:1}),n("p",B,c(s(a).upgradeDesc),1)],64)):l("",!0),s(a).isUpgrade?(r(),d(_,{key:2},[t(m,{"content-position":"center"},{default:i(()=>[...e[1]||(e[1]=[o(" 更新方式 ",-1)])]),_:1}),e[3]||(e[3]=n("div",{class:"mb-[10px]"},[o(" 更新 "),n("span",{class:"font-bold"},"comp-hub"),o(" 请回到项目根目录,打开终端,执行以下命令: ")],-1)),s(a).isForceUpgrade?(r(),h(p,{key:0,type:"danger",round:"",size:"small"},{default:i(()=>[...e[2]||(e[2]=[o(" 不可忽略此次更新 ",-1)])]),_:1})):l("",!0),t(y,{code:"npm install comp-hub@latest -D",language:"bash"})],64)):l("",!0)])])}}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as R,r as I,c as C,o as f,b as y,au as Te,w as x,x as ne,h as w,A as D,Q as ue,F as H,a4 as G,f as X,t as $,aF as de,u as T,k as pe,av as fe,a as g,j as S,a7 as Le,n as j,D as me,b0 as ze,b1 as Pe,a2 as ce,P as Re,p as Ae,at as Be,$ as Y,U as be,V as Ce,b2 as Fe,E as J,aZ as W,O as le,ac as ae,a_ as xe,b3 as Ne,b4 as Ve,a$ as je,b5 as Ue,b6 as We,b7 as He,aQ as Ie,b8 as Ge,b9 as k,ba as ee,i as re,Z as Ye,Y as qe,G as Ze,ao as Qe,ap as Xe,bb as Ke,bc as Je,bd as et,be as we,bf as tt,bg as nt,am as ot}from"./index-DVUs3ntb.js";import{a as lt,c as at,_ as st,E as it,G as ct}from"./index-DUydxA9_.js";import{_ as rt}from"./index.vue_vue_type_script_setup_true_lang-w9pFA4CP.js";import{_ as ut}from"./index.vue_vue_type_script_setup_true_lang-B71JWV5F.js";const dt={class:"collect"},pt=R({__name:"index",props:{isCollect:{type:Boolean,default:!1}},emits:["collect"],setup(t,{emit:o}){const n=t,e=o;function i(){e("collect",!n.isCollect)}return(c,u)=>{const s=I("StarFilled"),l=I("el-icon");return f(),C("div",dt,[y(l,{class:Te(["collect-icon",{"is-collect":t.isCollect}]),onClick:i},{default:x(()=>[y(s)]),_:1},8,["class"])])}}}),ft=ne(pt,[["__scopeId","data-v-25eb2692"]]),mt=R({__name:"index",setup(t,{expose:o}){const n=w(!1),e=w(null),i=s=>{n.value=!0,e.value=s},c=()=>{n.value=!1,e.value=null},u=s=>{e.value&&e.value(s)};return o({open:i,close:c}),(s,l)=>(f(),D(rt,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),title:"项目文件夹",width:"50%","show-close":""},{default:x(()=>[y(lt,{onSelect:u})]),_:1},8,["modelValue"]))}}),Se=R({__name:"index",props:{title:{type:String,default:""},column:{type:Number,default:3},items:{type:Array,default:()=>[]}},setup(t){const o=ue();return(n,e)=>{const i=I("el-descriptions-item"),c=I("el-descriptions");return f(),D(c,de({column:t.column,title:t.title},T(o)),{default:x(()=>[(f(!0),C(H,null,G(t.items,(u,s)=>(f(),D(i,{key:s,label:u.label},{default:x(()=>[X($(u.value),1)]),_:2},1032,["label"]))),128))]),_:1},16,["column","title"])}}}),vt={class:"comp-desc-container"},_t=R({__name:"index",props:{desc:{type:String,default:""}},setup(t){const o=w(null),n=w(!1),e=t;return pe(async()=>{if(e.desc){await fe();const i=o.value;if(!i)return;n.value=i.scrollHeight>i.clientHeight}}),(i,c)=>{const u=I("el-popover");return f(),C("div",vt,[y(u,{disabled:!n.value,content:t.desc,placement:"bottom",width:"300"},{reference:x(()=>[g("p",{ref_key:"paraRef",ref:o},$(t.desc),513)]),_:1},8,["disabled","content"])])}}}),ht=ne(_t,[["__scopeId","data-v-f59630ca"]]),gt={key:0,class:"comp-deps size-full"},yt={key:0,class:"more"},bt={class:"measure-row"},Ct=5,xt=70,wt=R({__name:"index",props:{compDeps:{}},setup(t){const o=t,n=w(0),e=w([]);function i(a){n.value=a[0].contentRect.width}function c(a){!a||a instanceof Element||fe().then(()=>{const d=a.$el||a;e.value.push(d.offsetWidth)})}const u=S(()=>{let a=0,d=0;const v=n.value-xt;for(let p=0;p<e.value.length&&(a+=e.value[p]+(p?Ct:0),!(a>v));p++)d++;return Math.max(0,d)}),s=S(()=>o.compDeps.slice(0,u.value)),l=S(()=>o.compDeps.length-u.value);return(a,d)=>{const v=I("el-tag");return f(),D(Le,{resize:i},{default:x(()=>[a.compDeps.length?(f(),C("div",gt,[(f(!0),C(H,null,G(s.value,p=>(f(),D(v,{key:p.name,type:"success"},{default:x(()=>[X($(p.name)+" "+$(p.version),1)]),_:2},1024))),128)),l.value>0?(f(),C("span",yt,"+"+$(l.value)+" more",1)):j("",!0)])):j("",!0),g("div",bt,[(f(!0),C(H,null,G(a.compDeps,p=>(f(),D(v,{key:"m-"+p.name,type:"success",ref_for:!0,ref:c},{default:x(()=>[X($(p.name)+" "+$(p.version),1)]),_:2},1024))),128))])]),_:1})}}}),De=ne(wt,[["__scopeId","data-v-a1f79215"]]),St={class:"w-[100px]"},Et=R({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:o}){const n=o,e=ue(),i=w([]);async function c(){const l=await ze({compName:e.name});i.value=l.data.map(a=>({value:a.version,label:a.version}))}function u(l){console.log("切换版本号",l),n("update:modelValue",l)}function s(){i.value=[{value:e.version,label:e.version}],n("update:modelValue",e.version)}return me(()=>{s()}),(l,a)=>{const d=I("el-option"),v=I("el-select");return f(),C("div",St,[y(v,{"model-value":t.modelValue,onChange:u,onVisibleChange:c},{default:x(()=>[(f(!0),C(H,null,G(i.value,p=>(f(),D(d,{key:p.value,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])}}}),kt={class:"flex justify-center items-center gap-[5px]"},Tt={class:"text-[12px] text-[#857e7e]"},It=R({__name:"index",props:{nickname:{type:String,default:""},avatar:{type:String,default:""}},setup(t){const o=t,n=w("");return pe(async()=>{if(!o.avatar)return;const e=await Pe({objectId:o.avatar});n.value=e.data.signUrl}),(e,i)=>{const c=I("el-avatar");return f(),C("div",kt,[g("span",Tt,$(t.nickname),1),y(c,{size:15,src:n.value},null,8,["src"])])}}}),Dt={class:"bg-[#fff] flex items-center justify-center flex-col size-full overflow-hidden"},Ot={class:"h-[270px] overflow-hidden w-full"},$t={class:"flex flex-1 justify-start gap-[5px]"},Mt={class:"text-left flex-1 flex flex-col w-full overflow-hidden p-[5px] gap-[5px]"},Lt={class:"flex justify-between"},zt={class:"font-medium"},Pt={class:"desc-content flex-1"},Rt={class:"h-[30px] p-[5px] overflow-hidden w-full bg-[#ccc] flex items-center justify-between"},At={class:"flex gap-[5px]"},Bt={class:"flex"},Ft=R({__name:"index",setup(t){const o=ce("compListStore"),n=ce("callbacks"),e=ue(),i=Re(),c=Ae(),u=w(),s=w([{key:"delete",text:"删除",handler:z,type:"danger"},{key:"update",text:"更新",handler:B,type:"primary"},{key:"preview",text:"预览",handler:q,type:"primary"},{key:"download",text:"下载",handler:P,type:"primary"},{key:"collect",text:"收藏",handler:M}]),l=w(""),a=w([]),d=S(()=>o.operate.length?o.operate.map(r=>s.value.find(m=>m.key===r)):[]),v=S(()=>o.operate.includes("terminal")),p=S(()=>e.previewConfigs.filter(r=>{var m;return(m=r.path)==null?void 0:m.length}).slice(0,3).map(r=>{const m=r.path[r.path.length-1].replace(/[/\\]/g,"/"),h=a.value.find(_=>_.path===m);return{entryUrl:h==null?void 0:h.signedUrl}})),b=S(()=>[{label:"下载:",value:e.downloadCount},{label:"收藏:",value:e.collectCount}]),E=S(()=>Object.keys(e.dep).map(m=>{var h,_;return{name:m,version:(_=(h=e.dep)==null?void 0:h[m])==null?void 0:_.version}})),L=S(()=>({panelType:Be.MINI,previews:p.value,dep:e.dep,bgColor:e.bgColor,signedUrls:a.value,autoplay:!0,onePageEntryNameToFile:o.onePageEntryNameToFile}));async function z(){!e.name||await ae.confirm(W.CONFIRM.DELETE(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm"||Ne({compId:e.id}).then(()=>J.success(W.SUCCESS.DELETE)).finally(()=>n.get(le.AFTER_COMP_DEL)(e.id))}function B(){e.id&&Ve({compId:e.id}).then(r=>{if(!r.data){J.error("组件不在本地,请先下载后更新");return}i.setSelectedFolder(r.data),n.get(le.BEFORE_COMP_GO_UPDATE)(e.id)})}function q(){console.log("预览"),c.push({path:`/preview/${e.id}`})}async function P(r){var h;!r()||await ae.confirm("当前选择的版本为:"+l.value+",确认下载吗?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).catch(()=>{console.log("取消下载")})!=="confirm"||(h=u.value)==null||h.open(K)}async function M(r){r()&&(console.log("收藏"),Fe({compId:e.id,isCollect:!e.isCollect}).then(()=>{J.success(e.isCollect?W.SUCCESS.UNCOLLECT:W.SUCCESS.COLLECT);const m={...e,isCollect:!e.isCollect};o.updateCompListItemById(e.id,m),e.isCollect?(o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount-1}),n.get(le.AFTER_COMP_CANCEL_COLLECT)(e.id)):o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount+1})}))}async function K(r){var A;if(await ae.confirm(W.CONFIRM.DOWNLOAD(r.path),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;const h=await xe({compId:e.id,savePath:r.path,compName:e.name,version:l.value}),{isRepeat:_=!1}=h.data;if(_){if(await ae.confirm(W.CONFIRM.COVER(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;await xe({compId:e.id,savePath:r.path,compName:e.name,isCover:!0,version:l.value})}J.success(W.SUCCESS.DOWNLOAD),o.updateCompListItemById(e.id,{...e,downloadCount:e.downloadCount+1}),(A=u.value)==null||A.close()}async function ie(){const r={objectId:e.objectId,compName:e.name,version:e.version,files:e.files.map(m=>m.path)};await je(r).then(m=>{a.value=m.data.signedUrls})}async function Z(r){await Ue({compName:e.name,version:r}).then(m=>{o.updateCompListItemById(e.id,{...m.data,id:e.id,downloadCount:e.downloadCount,collectCount:e.collectCount,isCollect:e.isCollect})})}function oe(){n.get(le.OPEN_COMP_TERMINAL)(e.id)}return Y(()=>e,async()=>{a.value=[],await ie()},{immediate:!0,deep:!0}),Y(()=>l.value,async r=>{r!==e.version&&await Z(r)}),(r,m)=>{const h=I("el-button");return f(),C("div",Dt,[g("div",Ot,[y(at,be(Ce(L.value)),{compToolBar:x(()=>[g("div",$t,[v.value?(f(),D(h,{key:0,color:"#414141",onClick:oe},{default:x(()=>[...m[1]||(m[1]=[X("终端",-1)])]),_:1})):j("",!0),y(Et,de({modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=_=>l.value=_)},T(e)),null,16,["modelValue"])])]),_:1},16)]),g("div",Mt,[g("div",Lt,[g("h4",zt,$(T(e).name),1),g("div",null,[y(It,be(Ce(T(e).authorId)),null,16)])]),g("div",Pt,[y(ht,{desc:T(e).desc},null,8,["desc"])]),y(De,{compDeps:E.value},null,8,["compDeps"])]),g("div",Rt,[g("div",At,[y(Se,{column:1,items:[b.value[0]]},null,8,["items"]),y(Se,{column:1,items:[b.value[1]]},null,8,["items"])]),g("div",Bt,[(f(!0),C(H,null,G(d.value,(_,A)=>(f(),D(st,{key:A},{default:x(({isLogin:N})=>[(_==null?void 0:_.key)!=="collect"?(f(),D(h,{key:0,title:_==null?void 0:_.text,type:_==null?void 0:_.type,link:"",onClick:O=>_==null?void 0:_.handler(N)},{default:x(()=>[X($(_==null?void 0:_.text),1)]),_:2},1032,["title","type","onClick"])):(f(),D(ft,{key:1,class:"pl-[5px]",isCollect:T(e).isCollect,onCollect:O=>M(N)},null,8,["isCollect","onCollect"]))]),_:2},1024))),128))])]),y(mt,{ref_key:"DialogVueFinderRef",ref:u,onDownload:K},null,512)])}}});function ve(t){return We()?(He(t),!0):!1}const Nt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=t=>t!=null,Vt=Object.prototype.toString,jt=t=>Vt.call(t)==="[object Object]",F=()=>{};function $e(t,o){function n(...e){return new Promise((i,c)=>{Promise.resolve(t(()=>o.apply(this,e),{fn:o,thisArg:this,args:e})).then(i).catch(c)})}return n}function Ut(t,o={}){let n,e,i=F;const c=l=>{clearTimeout(l),i(),i=F};let u;return l=>{const a=k(t),d=k(o.maxWait);return n&&c(n),a<=0||d!==void 0&&d<=0?(e&&(c(e),e=void 0),Promise.resolve(l())):new Promise((v,p)=>{i=o.rejectOnCancel?p:v,u=l,d&&!e&&(e=setTimeout(()=>{n&&c(n),e=void 0,v(u())},d)),n=setTimeout(()=>{e&&c(e),e=void 0,v(l())},a)})}}function Wt(...t){let o=0,n,e=!0,i=F,c,u,s,l,a;!Ge(t[0])&&typeof t[0]=="object"?{delay:u,trailing:s=!0,leading:l=!0,rejectOnCancel:a=!1}=t[0]:[u,s=!0,l=!0,a=!1]=t;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return p=>{const b=k(u),E=Date.now()-o,L=()=>c=p();return d(),b<=0?(o=Date.now(),L()):(E>b&&(l||!e)?(o=Date.now(),L()):s&&(c=new Promise((z,B)=>{i=a?B:z,n=setTimeout(()=>{o=Date.now(),e=!0,z(L()),d()},Math.max(0,b-E))})),!l&&!n&&(n=setTimeout(()=>e=!0,b)),e=!1,c)}}function te(t){return Array.isArray(t)?t:[t]}function Ht(t){return Ie()}function Gt(t,o=200,n={}){return $e(Ut(o,n),t)}function Yt(t,o=200,n=!1,e=!0,i=!1){return $e(Wt(o,n,e,i),t)}function qt(t,o=!0,n){Ht()?me(t,n):o?t():fe(t)}function Zt(t,o,n){return Y(t,o,{...n,immediate:!0})}const se=Nt?window:void 0;function Q(t){var o;const n=k(t);return(o=n==null?void 0:n.$el)!=null?o:n}function Ee(...t){const o=[],n=()=>{o.forEach(s=>s()),o.length=0},e=(s,l,a,d)=>(s.addEventListener(l,a,d),()=>s.removeEventListener(l,a,d)),i=S(()=>{const s=te(k(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),c=Zt(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(a=>Q(a)))!=null?l:[se].filter(a=>a!=null),te(k(i.value?t[1]:t[0])),te(T(i.value?t[2]:t[1])),k(i.value?t[3]:t[2])]},([s,l,a,d])=>{if(n(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(a!=null&&a.length))return;const v=jt(d)?{...d}:d;o.push(...s.flatMap(p=>l.flatMap(b=>a.map(E=>e(p,b,E,v)))))},{flush:"post"}),u=()=>{c(),n()};return ve(n),u}function Qt(){const t=ee(!1),o=Ie();return o&&me(()=>{t.value=!0},o),t}function Me(t){const o=Qt();return S(()=>(o.value,!!t()))}function Xt(t,o,n={}){const{window:e=se,...i}=n;let c;const u=Me(()=>e&&"MutationObserver"in e),s=()=>{c&&(c.disconnect(),c=void 0)},l=S(()=>{const p=k(t),b=te(p).map(Q).filter(Oe);return new Set(b)}),a=Y(l,p=>{s(),u.value&&p.size&&(c=new MutationObserver(o),p.forEach(b=>c.observe(b,i)))},{immediate:!0,flush:"post"}),d=()=>c==null?void 0:c.takeRecords(),v=()=>{a(),s()};return ve(v),{isSupported:u,stop:v,takeRecords:d}}function gn(t,o,n={}){const{root:e,rootMargin:i="0px",threshold:c=0,window:u=se,immediate:s=!0}=n,l=Me(()=>u&&"IntersectionObserver"in u),a=S(()=>{const E=k(t);return te(E).map(Q).filter(Oe)});let d=F;const v=ee(s),p=l.value?Y(()=>[a.value,Q(e),v.value],([E,L])=>{if(d(),!v.value||!E.length)return;const z=new IntersectionObserver(o,{root:Q(L),rootMargin:i,threshold:c});E.forEach(B=>B&&z.observe(B)),d=()=>{z.disconnect(),d=F}},{immediate:s,flush:"post"}):F,b=()=>{d(),p(),v.value=!1};return ve(b),{isSupported:l,isActive:v,pause(){d(),v.value=!1},resume(){v.value=!0},stop:b}}const ke=1;function Kt(t,o={}){const{throttle:n=0,idle:e=200,onStop:i=F,onScroll:c=F,offset:u={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:a="auto",window:d=se,onError:v=r=>{console.error(r)}}=o,p=typeof s=="boolean"?{mutation:s}:s,b=ee(0),E=ee(0),L=S({get(){return b.value},set(r){B(r,void 0)}}),z=S({get(){return E.value},set(r){B(void 0,r)}});function B(r,m){var h,_,A,N;if(!d)return;const O=k(t);if(!O)return;(A=O instanceof Document?d.document.body:O)==null||A.scrollTo({top:(h=k(m))!=null?h:z.value,left:(_=k(r))!=null?_:L.value,behavior:k(a)});const V=((N=O==null?void 0:O.document)==null?void 0:N.documentElement)||(O==null?void 0:O.documentElement)||O;L!=null&&(b.value=V.scrollLeft),z!=null&&(E.value=V.scrollTop)}const q=ee(!1),P=re({left:!0,right:!1,top:!0,bottom:!1}),M=re({left:!1,right:!1,top:!1,bottom:!1}),K=r=>{q.value&&(q.value=!1,M.left=!1,M.right=!1,M.top=!1,M.bottom=!1,i(r))},ie=Gt(K,n+e),Z=r=>{var m;if(!d)return;const h=((m=r==null?void 0:r.document)==null?void 0:m.documentElement)||(r==null?void 0:r.documentElement)||Q(r),{display:_,flexDirection:A,direction:N}=getComputedStyle(h),O=N==="rtl"?-1:1,V=h.scrollLeft;M.left=V<b.value,M.right=V>b.value;const _e=Math.abs(V*O)<=(u.left||0),he=Math.abs(V*O)+h.clientWidth>=h.scrollWidth-(u.right||0)-ke;_==="flex"&&A==="row-reverse"?(P.left=he,P.right=_e):(P.left=_e,P.right=he),b.value=V;let U=h.scrollTop;r===d.document&&!U&&(U=d.document.body.scrollTop),M.top=U<E.value,M.bottom=U>E.value;const ge=Math.abs(U)<=(u.top||0),ye=Math.abs(U)+h.clientHeight>=h.scrollHeight-(u.bottom||0)-ke;_==="flex"&&A==="column-reverse"?(P.top=ye,P.bottom=ge):(P.top=ge,P.bottom=ye),E.value=U},oe=r=>{var m;if(!d)return;const h=(m=r.target.documentElement)!=null?m:r.target;Z(h),q.value=!0,ie(r),c(r)};return Ee(t,"scroll",n?Yt(oe,n,!0,!1):oe,l),qt(()=>{try{const r=k(t);if(!r)return;Z(r)}catch(r){v(r)}}),p!=null&&p.mutation&&t!=null&&t!==d&&t!==document&&Xt(t,()=>{const r=k(t);r&&Z(r)},{attributes:!0,childList:!0,subtree:!0}),Ee(t,"scrollend",K,l),{x:L,y:z,isScrolling:q,arrivedState:P,directions:M,measure(){const r=k(t);d&&r&&Z(r)}}}function Jt(t){const o=w(0),n=typeof t=="string"?w(document.querySelector(t)):t,{y:e}=Kt(n,{behavior:"auto"});return Ye(()=>{o.value=T(e)??0}),qe(async()=>{setTimeout(()=>{e.value=o.value},0)}),{memoryY:o}}function en(t,o=10,n=50){const e=w([]);let i=0,c=0;const u=l=>{for(;i<t.value.length&&(l.timeRemaining()>0||l.didTimeout);){const a=Math.min(i+o,t.value.length);e.value.push(...t.value.slice(i,a)),i=a}i<t.value.length&&(c=requestIdleCallback(u,{timeout:n}))};return Y(t,()=>{cancelIdleCallback(c),e.value=[],i=0,c=requestIdleCallback(u,{timeout:n})},{immediate:!0}),Ze(()=>cancelIdleCallback(c)),e}const tn={class:"h-full flex flex-col overflow-hidden gap-[10px]"},nn={key:0,class:"flex justify-center p-[5px]"},yn=R({__name:"index",props:{isPagination:{type:Boolean,default:!0}},setup(t){const o=w(null);Jt(o);const n=ce("compListStore"),e=S(()=>n.loading),i=en(S(()=>n.list),1),c=re({total:n.pagination.total,background:!0,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30],page:n.pagination.page,pageSize:n.pagination.pageSize});function u(l){Ke(l.toString()),n.setPagination({...n.pagination,pageSize:l})}function s(l){n.setPagination({...n.pagination,page:l})}return Y([()=>n.pagination.pageSize,()=>n.pagination.page],async()=>{await n.getComps()}),(l,a)=>{const d=I("el-pagination"),v=Xe("loading");return Qe((f(),C("div",tn,[g("div",{class:"flex-1 overflow-auto",ref_key:"compListEl",ref:o},[y(it,{isEmpty:T(i).length===0&&!e.value},{default:x(()=>[y(ct,{itemMinWidth:310},{default:x(()=>[(f(!0),C(H,null,G(T(i),p=>(f(),C("div",{key:p.id,class:"h-[400px] overflow-hidden rounded-md"},[y(Ft,de({ref_for:!0},p),null,16)]))),128))]),_:1})]),_:1},8,["isEmpty"])],512),t.isPagination?(f(),C("div",nn,[y(d,{"current-page":c.page,"onUpdate:currentPage":a[0]||(a[0]=p=>c.page=p),"page-size":c.pageSize,"onUpdate:pageSize":a[1]||(a[1]=p=>c.pageSize=p),"page-sizes":c.pageSizes,background:c.background,layout:c.layout,total:T(n).pagination.total,onSizeChange:u,onCurrentChange:s},null,8,["current-page","page-size","page-sizes","background","layout","total"])])):j("",!0)])),[[v,e.value]])}}}),on={class:"terminal-pane-container"},ln={class:"deps-content"},an={class:"comp-name"},sn={class:"cli-list"},cn=R({__name:"index",props:{compId:{},getCompDetail:{type:Function}},setup(t){const o=t,n=w(),e=S(()=>n.value?Object.keys(n.value.dep).map(s=>{var l,a,d;return{name:s,version:(d=(a=(l=n.value)==null?void 0:l.dep)==null?void 0:a[s])==null?void 0:d.version}}):[]),i=(u,s)=>`npm install ${u}@${s}`,c=async u=>{const s=await Je(i(u.name,u.version));s&&J.success(s)};return pe(async()=>{const u=await o.getCompDetail(o.compId);u&&(n.value=u)}),(u,s)=>{const l=I("el-button"),a=I("el-splitter-panel"),d=I("el-splitter");return f(),C("div",on,[y(d,{layout:"vertical"},{default:x(()=>[y(a,{size:"30%",min:200},{default:x(()=>{var v;return[g("div",ln,[g("h4",null,[g("span",an,$((v=n.value)==null?void 0:v.name),1)]),g("div",null,[y(De,{compDeps:e.value},null,8,["compDeps"])]),s[1]||(s[1]=g("h4",null,"安装命令",-1)),g("div",sn,[(f(!0),C(H,null,G(e.value,p=>(f(),C("div",{key:p.name,class:"cli-item"},[g("span",null,$(i(p.name,p.version)),1),y(l,{type:"primary",onClick:b=>c(p)},{default:x(()=>[...s[0]||(s[0]=[X("复制",-1)])]),_:1},8,["onClick"])]))),128))])])]}),_:1}),y(a,{min:200},{default:x(()=>[y(ut)]),_:1})]),_:1})])}}}),bn=ne(cn,[["__scopeId","data-v-88ef56f4"]]),rn={class:"base-pane-pane-header"},un={class:"base-pane-pane-header-title"},dn={class:"base-pane-pane-header-actions"},pn={key:0,class:"base-pane-pane-body"},fn=R({__name:"index",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:o}){const n=t,e=o,i=w(!1),c=w(!1);function u(){e("close")}function s(){i.value=!i.value,e("maximize",i.value)}function l(){c.value=!c.value,e("minimize",c.value)}function a(d){return n.actions.includes(d)}return(d,v)=>{const p=I("el-button");return f(),C("div",{class:Te(["base-pane-pane rounded-sm",{"is-maximized":i.value,"is-minimized":c.value}])},[g("div",rn,[g("div",un,$(t.title),1),g("div",dn,[a("close")?(f(),D(p,{key:0,type:"primary",icon:T(et),circle:"",onClick:u},null,8,["icon"])):j("",!0),a("maximize")?(f(),D(p,{key:1,type:"primary",icon:i.value?T(we):T(tt),circle:"",onClick:s},null,8,["icon"])):j("",!0),a("minimize")?(f(),D(p,{key:2,type:"primary",icon:c.value?T(we):T(nt),circle:"",onClick:l},null,8,["icon"])):j("",!0)])]),c.value?j("",!0):(f(),C("div",pn,[ot(d.$slots,"default",{},void 0,!0)]))],2)}}}),Cn=ne(fn,[["__scopeId","data-v-3120dd55"]]);export{Cn as B,De as C,bn as T,yn as _,gn as a,mt as b,Et as c,Jt as u};
|
|
1
|
+
import{d as R,r as I,c as C,o as f,b as y,au as Te,w as x,x as ne,h as w,A as D,Q as ue,F as H,a4 as G,f as X,t as $,aF as de,u as T,k as pe,av as fe,a as g,j as S,a7 as Le,n as j,D as me,b0 as ze,b1 as Pe,a2 as ce,P as Re,p as Ae,at as Be,$ as Y,U as be,V as Ce,b2 as Fe,E as J,aZ as W,O as le,ac as ae,a_ as xe,b3 as Ne,b4 as Ve,a$ as je,b5 as Ue,b6 as We,b7 as He,aQ as Ie,b8 as Ge,b9 as k,ba as ee,i as re,Z as Ye,Y as qe,G as Ze,ao as Qe,ap as Xe,bb as Ke,bc as Je,bd as et,be as we,bf as tt,bg as nt,am as ot}from"./index-iW0FMVaJ.js";import{a as lt,c as at,_ as st,E as it,G as ct}from"./index-RwJN9QCp.js";import{_ as rt}from"./index.vue_vue_type_script_setup_true_lang-QiFiXGkp.js";import{_ as ut}from"./index.vue_vue_type_script_setup_true_lang-DTKIvNdb.js";const dt={class:"collect"},pt=R({__name:"index",props:{isCollect:{type:Boolean,default:!1}},emits:["collect"],setup(t,{emit:o}){const n=t,e=o;function i(){e("collect",!n.isCollect)}return(c,u)=>{const s=I("StarFilled"),l=I("el-icon");return f(),C("div",dt,[y(l,{class:Te(["collect-icon",{"is-collect":t.isCollect}]),onClick:i},{default:x(()=>[y(s)]),_:1},8,["class"])])}}}),ft=ne(pt,[["__scopeId","data-v-25eb2692"]]),mt=R({__name:"index",setup(t,{expose:o}){const n=w(!1),e=w(null),i=s=>{n.value=!0,e.value=s},c=()=>{n.value=!1,e.value=null},u=s=>{e.value&&e.value(s)};return o({open:i,close:c}),(s,l)=>(f(),D(rt,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),title:"项目文件夹",width:"50%","show-close":""},{default:x(()=>[y(lt,{onSelect:u})]),_:1},8,["modelValue"]))}}),Se=R({__name:"index",props:{title:{type:String,default:""},column:{type:Number,default:3},items:{type:Array,default:()=>[]}},setup(t){const o=ue();return(n,e)=>{const i=I("el-descriptions-item"),c=I("el-descriptions");return f(),D(c,de({column:t.column,title:t.title},T(o)),{default:x(()=>[(f(!0),C(H,null,G(t.items,(u,s)=>(f(),D(i,{key:s,label:u.label},{default:x(()=>[X($(u.value),1)]),_:2},1032,["label"]))),128))]),_:1},16,["column","title"])}}}),vt={class:"comp-desc-container"},_t=R({__name:"index",props:{desc:{type:String,default:""}},setup(t){const o=w(null),n=w(!1),e=t;return pe(async()=>{if(e.desc){await fe();const i=o.value;if(!i)return;n.value=i.scrollHeight>i.clientHeight}}),(i,c)=>{const u=I("el-popover");return f(),C("div",vt,[y(u,{disabled:!n.value,content:t.desc,placement:"bottom",width:"300"},{reference:x(()=>[g("p",{ref_key:"paraRef",ref:o},$(t.desc),513)]),_:1},8,["disabled","content"])])}}}),ht=ne(_t,[["__scopeId","data-v-f59630ca"]]),gt={key:0,class:"comp-deps size-full"},yt={key:0,class:"more"},bt={class:"measure-row"},Ct=5,xt=70,wt=R({__name:"index",props:{compDeps:{}},setup(t){const o=t,n=w(0),e=w([]);function i(a){n.value=a[0].contentRect.width}function c(a){!a||a instanceof Element||fe().then(()=>{const d=a.$el||a;e.value.push(d.offsetWidth)})}const u=S(()=>{let a=0,d=0;const v=n.value-xt;for(let p=0;p<e.value.length&&(a+=e.value[p]+(p?Ct:0),!(a>v));p++)d++;return Math.max(0,d)}),s=S(()=>o.compDeps.slice(0,u.value)),l=S(()=>o.compDeps.length-u.value);return(a,d)=>{const v=I("el-tag");return f(),D(Le,{resize:i},{default:x(()=>[a.compDeps.length?(f(),C("div",gt,[(f(!0),C(H,null,G(s.value,p=>(f(),D(v,{key:p.name,type:"success"},{default:x(()=>[X($(p.name)+" "+$(p.version),1)]),_:2},1024))),128)),l.value>0?(f(),C("span",yt,"+"+$(l.value)+" more",1)):j("",!0)])):j("",!0),g("div",bt,[(f(!0),C(H,null,G(a.compDeps,p=>(f(),D(v,{key:"m-"+p.name,type:"success",ref_for:!0,ref:c},{default:x(()=>[X($(p.name)+" "+$(p.version),1)]),_:2},1024))),128))])]),_:1})}}}),De=ne(wt,[["__scopeId","data-v-a1f79215"]]),St={class:"w-[100px]"},Et=R({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:o}){const n=o,e=ue(),i=w([]);async function c(){const l=await ze({compName:e.name});i.value=l.data.map(a=>({value:a.version,label:a.version}))}function u(l){console.log("切换版本号",l),n("update:modelValue",l)}function s(){i.value=[{value:e.version,label:e.version}],n("update:modelValue",e.version)}return me(()=>{s()}),(l,a)=>{const d=I("el-option"),v=I("el-select");return f(),C("div",St,[y(v,{"model-value":t.modelValue,onChange:u,onVisibleChange:c},{default:x(()=>[(f(!0),C(H,null,G(i.value,p=>(f(),D(d,{key:p.value,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])}}}),kt={class:"flex justify-center items-center gap-[5px]"},Tt={class:"text-[12px] text-[#857e7e]"},It=R({__name:"index",props:{nickname:{type:String,default:""},avatar:{type:String,default:""}},setup(t){const o=t,n=w("");return pe(async()=>{if(!o.avatar)return;const e=await Pe({objectId:o.avatar});n.value=e.data.signUrl}),(e,i)=>{const c=I("el-avatar");return f(),C("div",kt,[g("span",Tt,$(t.nickname),1),y(c,{size:15,src:n.value},null,8,["src"])])}}}),Dt={class:"bg-[#fff] flex items-center justify-center flex-col size-full overflow-hidden"},Ot={class:"h-[270px] overflow-hidden w-full"},$t={class:"flex flex-1 justify-start gap-[5px]"},Mt={class:"text-left flex-1 flex flex-col w-full overflow-hidden p-[5px] gap-[5px]"},Lt={class:"flex justify-between"},zt={class:"font-medium"},Pt={class:"desc-content flex-1"},Rt={class:"h-[30px] p-[5px] overflow-hidden w-full bg-[#ccc] flex items-center justify-between"},At={class:"flex gap-[5px]"},Bt={class:"flex"},Ft=R({__name:"index",setup(t){const o=ce("compListStore"),n=ce("callbacks"),e=ue(),i=Re(),c=Ae(),u=w(),s=w([{key:"delete",text:"删除",handler:z,type:"danger"},{key:"update",text:"更新",handler:B,type:"primary"},{key:"preview",text:"预览",handler:q,type:"primary"},{key:"download",text:"下载",handler:P,type:"primary"},{key:"collect",text:"收藏",handler:M}]),l=w(""),a=w([]),d=S(()=>o.operate.length?o.operate.map(r=>s.value.find(m=>m.key===r)):[]),v=S(()=>o.operate.includes("terminal")),p=S(()=>e.previewConfigs.filter(r=>{var m;return(m=r.path)==null?void 0:m.length}).slice(0,3).map(r=>{const m=r.path[r.path.length-1].replace(/[/\\]/g,"/"),h=a.value.find(_=>_.path===m);return{entryUrl:h==null?void 0:h.signedUrl}})),b=S(()=>[{label:"下载:",value:e.downloadCount},{label:"收藏:",value:e.collectCount}]),E=S(()=>Object.keys(e.dep).map(m=>{var h,_;return{name:m,version:(_=(h=e.dep)==null?void 0:h[m])==null?void 0:_.version}})),L=S(()=>({panelType:Be.MINI,previews:p.value,dep:e.dep,bgColor:e.bgColor,signedUrls:a.value,autoplay:!0,onePageEntryNameToFile:o.onePageEntryNameToFile}));async function z(){!e.name||await ae.confirm(W.CONFIRM.DELETE(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm"||Ne({compId:e.id}).then(()=>J.success(W.SUCCESS.DELETE)).finally(()=>n.get(le.AFTER_COMP_DEL)(e.id))}function B(){e.id&&Ve({compId:e.id}).then(r=>{if(!r.data){J.error("组件不在本地,请先下载后更新");return}i.setSelectedFolder(r.data),n.get(le.BEFORE_COMP_GO_UPDATE)(e.id)})}function q(){console.log("预览"),c.push({path:`/preview/${e.id}`})}async function P(r){var h;!r()||await ae.confirm("当前选择的版本为:"+l.value+",确认下载吗?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).catch(()=>{console.log("取消下载")})!=="confirm"||(h=u.value)==null||h.open(K)}async function M(r){r()&&(console.log("收藏"),Fe({compId:e.id,isCollect:!e.isCollect}).then(()=>{J.success(e.isCollect?W.SUCCESS.UNCOLLECT:W.SUCCESS.COLLECT);const m={...e,isCollect:!e.isCollect};o.updateCompListItemById(e.id,m),e.isCollect?(o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount-1}),n.get(le.AFTER_COMP_CANCEL_COLLECT)(e.id)):o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount+1})}))}async function K(r){var A;if(await ae.confirm(W.CONFIRM.DOWNLOAD(r.path),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;const h=await xe({compId:e.id,savePath:r.path,compName:e.name,version:l.value}),{isRepeat:_=!1}=h.data;if(_){if(await ae.confirm(W.CONFIRM.COVER(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;await xe({compId:e.id,savePath:r.path,compName:e.name,isCover:!0,version:l.value})}J.success(W.SUCCESS.DOWNLOAD),o.updateCompListItemById(e.id,{...e,downloadCount:e.downloadCount+1}),(A=u.value)==null||A.close()}async function ie(){const r={objectId:e.objectId,compName:e.name,version:e.version,files:e.files.map(m=>m.path)};await je(r).then(m=>{a.value=m.data.signedUrls})}async function Z(r){await Ue({compName:e.name,version:r}).then(m=>{o.updateCompListItemById(e.id,{...m.data,id:e.id,downloadCount:e.downloadCount,collectCount:e.collectCount,isCollect:e.isCollect})})}function oe(){n.get(le.OPEN_COMP_TERMINAL)(e.id)}return Y(()=>e,async()=>{a.value=[],await ie()},{immediate:!0,deep:!0}),Y(()=>l.value,async r=>{r!==e.version&&await Z(r)}),(r,m)=>{const h=I("el-button");return f(),C("div",Dt,[g("div",Ot,[y(at,be(Ce(L.value)),{compToolBar:x(()=>[g("div",$t,[v.value?(f(),D(h,{key:0,color:"#414141",onClick:oe},{default:x(()=>[...m[1]||(m[1]=[X("终端",-1)])]),_:1})):j("",!0),y(Et,de({modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=_=>l.value=_)},T(e)),null,16,["modelValue"])])]),_:1},16)]),g("div",Mt,[g("div",Lt,[g("h4",zt,$(T(e).name),1),g("div",null,[y(It,be(Ce(T(e).authorId)),null,16)])]),g("div",Pt,[y(ht,{desc:T(e).desc},null,8,["desc"])]),y(De,{compDeps:E.value},null,8,["compDeps"])]),g("div",Rt,[g("div",At,[y(Se,{column:1,items:[b.value[0]]},null,8,["items"]),y(Se,{column:1,items:[b.value[1]]},null,8,["items"])]),g("div",Bt,[(f(!0),C(H,null,G(d.value,(_,A)=>(f(),D(st,{key:A},{default:x(({isLogin:N})=>[(_==null?void 0:_.key)!=="collect"?(f(),D(h,{key:0,title:_==null?void 0:_.text,type:_==null?void 0:_.type,link:"",onClick:O=>_==null?void 0:_.handler(N)},{default:x(()=>[X($(_==null?void 0:_.text),1)]),_:2},1032,["title","type","onClick"])):(f(),D(ft,{key:1,class:"pl-[5px]",isCollect:T(e).isCollect,onCollect:O=>M(N)},null,8,["isCollect","onCollect"]))]),_:2},1024))),128))])]),y(mt,{ref_key:"DialogVueFinderRef",ref:u,onDownload:K},null,512)])}}});function ve(t){return We()?(He(t),!0):!1}const Nt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=t=>t!=null,Vt=Object.prototype.toString,jt=t=>Vt.call(t)==="[object Object]",F=()=>{};function $e(t,o){function n(...e){return new Promise((i,c)=>{Promise.resolve(t(()=>o.apply(this,e),{fn:o,thisArg:this,args:e})).then(i).catch(c)})}return n}function Ut(t,o={}){let n,e,i=F;const c=l=>{clearTimeout(l),i(),i=F};let u;return l=>{const a=k(t),d=k(o.maxWait);return n&&c(n),a<=0||d!==void 0&&d<=0?(e&&(c(e),e=void 0),Promise.resolve(l())):new Promise((v,p)=>{i=o.rejectOnCancel?p:v,u=l,d&&!e&&(e=setTimeout(()=>{n&&c(n),e=void 0,v(u())},d)),n=setTimeout(()=>{e&&c(e),e=void 0,v(l())},a)})}}function Wt(...t){let o=0,n,e=!0,i=F,c,u,s,l,a;!Ge(t[0])&&typeof t[0]=="object"?{delay:u,trailing:s=!0,leading:l=!0,rejectOnCancel:a=!1}=t[0]:[u,s=!0,l=!0,a=!1]=t;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return p=>{const b=k(u),E=Date.now()-o,L=()=>c=p();return d(),b<=0?(o=Date.now(),L()):(E>b&&(l||!e)?(o=Date.now(),L()):s&&(c=new Promise((z,B)=>{i=a?B:z,n=setTimeout(()=>{o=Date.now(),e=!0,z(L()),d()},Math.max(0,b-E))})),!l&&!n&&(n=setTimeout(()=>e=!0,b)),e=!1,c)}}function te(t){return Array.isArray(t)?t:[t]}function Ht(t){return Ie()}function Gt(t,o=200,n={}){return $e(Ut(o,n),t)}function Yt(t,o=200,n=!1,e=!0,i=!1){return $e(Wt(o,n,e,i),t)}function qt(t,o=!0,n){Ht()?me(t,n):o?t():fe(t)}function Zt(t,o,n){return Y(t,o,{...n,immediate:!0})}const se=Nt?window:void 0;function Q(t){var o;const n=k(t);return(o=n==null?void 0:n.$el)!=null?o:n}function Ee(...t){const o=[],n=()=>{o.forEach(s=>s()),o.length=0},e=(s,l,a,d)=>(s.addEventListener(l,a,d),()=>s.removeEventListener(l,a,d)),i=S(()=>{const s=te(k(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),c=Zt(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(a=>Q(a)))!=null?l:[se].filter(a=>a!=null),te(k(i.value?t[1]:t[0])),te(T(i.value?t[2]:t[1])),k(i.value?t[3]:t[2])]},([s,l,a,d])=>{if(n(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(a!=null&&a.length))return;const v=jt(d)?{...d}:d;o.push(...s.flatMap(p=>l.flatMap(b=>a.map(E=>e(p,b,E,v)))))},{flush:"post"}),u=()=>{c(),n()};return ve(n),u}function Qt(){const t=ee(!1),o=Ie();return o&&me(()=>{t.value=!0},o),t}function Me(t){const o=Qt();return S(()=>(o.value,!!t()))}function Xt(t,o,n={}){const{window:e=se,...i}=n;let c;const u=Me(()=>e&&"MutationObserver"in e),s=()=>{c&&(c.disconnect(),c=void 0)},l=S(()=>{const p=k(t),b=te(p).map(Q).filter(Oe);return new Set(b)}),a=Y(l,p=>{s(),u.value&&p.size&&(c=new MutationObserver(o),p.forEach(b=>c.observe(b,i)))},{immediate:!0,flush:"post"}),d=()=>c==null?void 0:c.takeRecords(),v=()=>{a(),s()};return ve(v),{isSupported:u,stop:v,takeRecords:d}}function gn(t,o,n={}){const{root:e,rootMargin:i="0px",threshold:c=0,window:u=se,immediate:s=!0}=n,l=Me(()=>u&&"IntersectionObserver"in u),a=S(()=>{const E=k(t);return te(E).map(Q).filter(Oe)});let d=F;const v=ee(s),p=l.value?Y(()=>[a.value,Q(e),v.value],([E,L])=>{if(d(),!v.value||!E.length)return;const z=new IntersectionObserver(o,{root:Q(L),rootMargin:i,threshold:c});E.forEach(B=>B&&z.observe(B)),d=()=>{z.disconnect(),d=F}},{immediate:s,flush:"post"}):F,b=()=>{d(),p(),v.value=!1};return ve(b),{isSupported:l,isActive:v,pause(){d(),v.value=!1},resume(){v.value=!0},stop:b}}const ke=1;function Kt(t,o={}){const{throttle:n=0,idle:e=200,onStop:i=F,onScroll:c=F,offset:u={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:a="auto",window:d=se,onError:v=r=>{console.error(r)}}=o,p=typeof s=="boolean"?{mutation:s}:s,b=ee(0),E=ee(0),L=S({get(){return b.value},set(r){B(r,void 0)}}),z=S({get(){return E.value},set(r){B(void 0,r)}});function B(r,m){var h,_,A,N;if(!d)return;const O=k(t);if(!O)return;(A=O instanceof Document?d.document.body:O)==null||A.scrollTo({top:(h=k(m))!=null?h:z.value,left:(_=k(r))!=null?_:L.value,behavior:k(a)});const V=((N=O==null?void 0:O.document)==null?void 0:N.documentElement)||(O==null?void 0:O.documentElement)||O;L!=null&&(b.value=V.scrollLeft),z!=null&&(E.value=V.scrollTop)}const q=ee(!1),P=re({left:!0,right:!1,top:!0,bottom:!1}),M=re({left:!1,right:!1,top:!1,bottom:!1}),K=r=>{q.value&&(q.value=!1,M.left=!1,M.right=!1,M.top=!1,M.bottom=!1,i(r))},ie=Gt(K,n+e),Z=r=>{var m;if(!d)return;const h=((m=r==null?void 0:r.document)==null?void 0:m.documentElement)||(r==null?void 0:r.documentElement)||Q(r),{display:_,flexDirection:A,direction:N}=getComputedStyle(h),O=N==="rtl"?-1:1,V=h.scrollLeft;M.left=V<b.value,M.right=V>b.value;const _e=Math.abs(V*O)<=(u.left||0),he=Math.abs(V*O)+h.clientWidth>=h.scrollWidth-(u.right||0)-ke;_==="flex"&&A==="row-reverse"?(P.left=he,P.right=_e):(P.left=_e,P.right=he),b.value=V;let U=h.scrollTop;r===d.document&&!U&&(U=d.document.body.scrollTop),M.top=U<E.value,M.bottom=U>E.value;const ge=Math.abs(U)<=(u.top||0),ye=Math.abs(U)+h.clientHeight>=h.scrollHeight-(u.bottom||0)-ke;_==="flex"&&A==="column-reverse"?(P.top=ye,P.bottom=ge):(P.top=ge,P.bottom=ye),E.value=U},oe=r=>{var m;if(!d)return;const h=(m=r.target.documentElement)!=null?m:r.target;Z(h),q.value=!0,ie(r),c(r)};return Ee(t,"scroll",n?Yt(oe,n,!0,!1):oe,l),qt(()=>{try{const r=k(t);if(!r)return;Z(r)}catch(r){v(r)}}),p!=null&&p.mutation&&t!=null&&t!==d&&t!==document&&Xt(t,()=>{const r=k(t);r&&Z(r)},{attributes:!0,childList:!0,subtree:!0}),Ee(t,"scrollend",K,l),{x:L,y:z,isScrolling:q,arrivedState:P,directions:M,measure(){const r=k(t);d&&r&&Z(r)}}}function Jt(t){const o=w(0),n=typeof t=="string"?w(document.querySelector(t)):t,{y:e}=Kt(n,{behavior:"auto"});return Ye(()=>{o.value=T(e)??0}),qe(async()=>{setTimeout(()=>{e.value=o.value},0)}),{memoryY:o}}function en(t,o=10,n=50){const e=w([]);let i=0,c=0;const u=l=>{for(;i<t.value.length&&(l.timeRemaining()>0||l.didTimeout);){const a=Math.min(i+o,t.value.length);e.value.push(...t.value.slice(i,a)),i=a}i<t.value.length&&(c=requestIdleCallback(u,{timeout:n}))};return Y(t,()=>{cancelIdleCallback(c),e.value=[],i=0,c=requestIdleCallback(u,{timeout:n})},{immediate:!0}),Ze(()=>cancelIdleCallback(c)),e}const tn={class:"h-full flex flex-col overflow-hidden gap-[10px]"},nn={key:0,class:"flex justify-center p-[5px]"},yn=R({__name:"index",props:{isPagination:{type:Boolean,default:!0}},setup(t){const o=w(null);Jt(o);const n=ce("compListStore"),e=S(()=>n.loading),i=en(S(()=>n.list),1),c=re({total:n.pagination.total,background:!0,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30],page:n.pagination.page,pageSize:n.pagination.pageSize});function u(l){Ke(l.toString()),n.setPagination({...n.pagination,pageSize:l})}function s(l){n.setPagination({...n.pagination,page:l})}return Y([()=>n.pagination.pageSize,()=>n.pagination.page],async()=>{await n.getComps()}),(l,a)=>{const d=I("el-pagination"),v=Xe("loading");return Qe((f(),C("div",tn,[g("div",{class:"flex-1 overflow-auto",ref_key:"compListEl",ref:o},[y(it,{isEmpty:T(i).length===0&&!e.value},{default:x(()=>[y(ct,{itemMinWidth:310},{default:x(()=>[(f(!0),C(H,null,G(T(i),p=>(f(),C("div",{key:p.id,class:"h-[400px] overflow-hidden rounded-md"},[y(Ft,de({ref_for:!0},p),null,16)]))),128))]),_:1})]),_:1},8,["isEmpty"])],512),t.isPagination?(f(),C("div",nn,[y(d,{"current-page":c.page,"onUpdate:currentPage":a[0]||(a[0]=p=>c.page=p),"page-size":c.pageSize,"onUpdate:pageSize":a[1]||(a[1]=p=>c.pageSize=p),"page-sizes":c.pageSizes,background:c.background,layout:c.layout,total:T(n).pagination.total,onSizeChange:u,onCurrentChange:s},null,8,["current-page","page-size","page-sizes","background","layout","total"])])):j("",!0)])),[[v,e.value]])}}}),on={class:"terminal-pane-container"},ln={class:"deps-content"},an={class:"comp-name"},sn={class:"cli-list"},cn=R({__name:"index",props:{compId:{},getCompDetail:{type:Function}},setup(t){const o=t,n=w(),e=S(()=>n.value?Object.keys(n.value.dep).map(s=>{var l,a,d;return{name:s,version:(d=(a=(l=n.value)==null?void 0:l.dep)==null?void 0:a[s])==null?void 0:d.version}}):[]),i=(u,s)=>`npm install ${u}@${s}`,c=async u=>{const s=await Je(i(u.name,u.version));s&&J.success(s)};return pe(async()=>{const u=await o.getCompDetail(o.compId);u&&(n.value=u)}),(u,s)=>{const l=I("el-button"),a=I("el-splitter-panel"),d=I("el-splitter");return f(),C("div",on,[y(d,{layout:"vertical"},{default:x(()=>[y(a,{size:"30%",min:200},{default:x(()=>{var v;return[g("div",ln,[g("h4",null,[g("span",an,$((v=n.value)==null?void 0:v.name),1)]),g("div",null,[y(De,{compDeps:e.value},null,8,["compDeps"])]),s[1]||(s[1]=g("h4",null,"安装命令",-1)),g("div",sn,[(f(!0),C(H,null,G(e.value,p=>(f(),C("div",{key:p.name,class:"cli-item"},[g("span",null,$(i(p.name,p.version)),1),y(l,{type:"primary",onClick:b=>c(p)},{default:x(()=>[...s[0]||(s[0]=[X("复制",-1)])]),_:1},8,["onClick"])]))),128))])])]}),_:1}),y(a,{min:200},{default:x(()=>[y(ut)]),_:1})]),_:1})])}}}),bn=ne(cn,[["__scopeId","data-v-88ef56f4"]]),rn={class:"base-pane-pane-header"},un={class:"base-pane-pane-header-title"},dn={class:"base-pane-pane-header-actions"},pn={key:0,class:"base-pane-pane-body"},fn=R({__name:"index",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:o}){const n=t,e=o,i=w(!1),c=w(!1);function u(){e("close")}function s(){i.value=!i.value,e("maximize",i.value)}function l(){c.value=!c.value,e("minimize",c.value)}function a(d){return n.actions.includes(d)}return(d,v)=>{const p=I("el-button");return f(),C("div",{class:Te(["base-pane-pane rounded-sm",{"is-maximized":i.value,"is-minimized":c.value}])},[g("div",rn,[g("div",un,$(t.title),1),g("div",dn,[a("close")?(f(),D(p,{key:0,type:"primary",icon:T(et),circle:"",onClick:u},null,8,["icon"])):j("",!0),a("maximize")?(f(),D(p,{key:1,type:"primary",icon:i.value?T(we):T(tt),circle:"",onClick:s},null,8,["icon"])):j("",!0),a("minimize")?(f(),D(p,{key:2,type:"primary",icon:c.value?T(we):T(nt),circle:"",onClick:l},null,8,["icon"])):j("",!0)])]),c.value?j("",!0):(f(),C("div",pn,[ot(d.$slots,"default",{},void 0,!0)]))],2)}}}),Cn=ne(fn,[["__scopeId","data-v-3120dd55"]]);export{Cn as B,De as C,bn as T,yn as _,gn as a,mt as b,Et as c,Jt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g,T as A,B as L}from"./index-
|
|
1
|
+
import{_ as g,T as A,B as L}from"./index-mpzxMLt4.js";import{h as k,Y as P,Z as M,d as x,i as N,$ as S,A as f,o as m,r as c,a0 as I,w as r,b as n,a1 as h,f as C,a2 as v,k as b,a3 as O,c as E,F as z,a4 as B,u as D,t as V,O as $,a5 as G,a6 as q,n as K,a as Z}from"./index-iW0FMVaJ.js";function T(){const _=k(!0);return P(()=>{_.value=!0}),M(()=>{_.value=!1}),_}const j=x({__name:"index",setup(_){const t=N({keyword:""}),s=v("compListStore"),l=T(),i=()=>{s.setQuery({...s.query,keyword:t.keyword})},a=()=>{t.keyword="",s.setQuery({...s.query,keyword:""})};return S(()=>s.query.keyword,(u,e)=>{u!==e&&l.value&&s.getCompList()}),(u,e)=>{const o=c("el-input"),p=c("el-form-item"),d=c("el-button"),y=c("el-form");return m(),f(y,{inline:!0,model:t,"label-width":"auto",onSubmit:e[1]||(e[1]=I(()=>{},["prevent"]))},{default:r(()=>[n(p,{label:"关键词:"},{default:r(()=>[n(o,{modelValue:t.keyword,"onUpdate:modelValue":e[0]||(e[0]=w=>t.keyword=w),modelModifiers:{trim:!0},placeholder:"组件名/组件描述",onKeyup:h(i,["enter"])},null,8,["modelValue"])]),_:1}),n(p,null,{default:r(()=>[n(d,{type:"primary",onClick:i},{default:r(()=>[...e[2]||(e[2]=[C("查询",-1)])]),_:1}),n(d,{type:"primary",onClick:a},{default:r(()=>[...e[3]||(e[3]=[C("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])}}}),F={class:"flex justify-start mb-[5px]"},Q=x({__name:"index",setup(_){const t=v("compListStore"),s=T();function l(a){return a.value===t.selectTag}const i=a=>{t.setSelectTag(a.value)};return S(()=>t.selectTag,(a,u)=>{!a||a===u||s.value&&t.getCompList()}),b(()=>{t.selectTag&&O(t.selectTag)}),(a,u)=>{const e=c("el-button");return m(),E("div",F,[(m(!0),E(z,null,B(D(t).tagGroup,o=>(m(),f(e,{type:l(o)?"primary":"default",text:"",key:o.label,value:o.value,onClick:p=>i(o)},{default:r(()=>[C(V(o.label),1)]),_:2},1032,["type","value","onClick"]))),128))])}}}),R={class:"bg-[#fff] rounded-sm p-[10px]"},H=x({__name:"index",setup(_){const t=v("callbacks"),s=v("compListStore"),l=k(0),i=k("");function a(){l.value=0}async function u(e){return await s.getCompDetail(e||"")}return b(()=>{const e=l.value;e&&q(e.toString())}),t.set($.OPEN_COMP_TERMINAL,e=>{const o=Number(G());l.value=Math.max(o,500),i.value=e}),(e,o)=>{const p=c("el-splitter-panel"),d=c("el-splitter");return m(),f(d,null,{default:r(()=>[n(p,{min:400,class:"h-full min-w-[400px] flex flex-col gap-[10px]"},{default:r(()=>[Z("div",R,[n(j),n(Q)]),n(g,{class:"flex-1"})]),_:1}),l.value?(m(),f(p,{key:0,size:l.value,"onUpdate:size":o[0]||(o[0]=y=>l.value=y),collapsible:""},{default:r(()=>[n(L,{title:"依赖安装",onClose:a},{default:r(()=>[n(A,{compId:i.value,getCompDetail:u},null,8,["compId"])]),_:1})]),_:1},8,["size"])):K("",!0)]),_:1})}}});export{H as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,h as o,am as r}from"./index-
|
|
1
|
+
import{d as s,h as o,am as r}from"./index-iW0FMVaJ.js";const i=s({__name:"index",setup(l){const e=o(!1);function n(){e.value=!0}function a(){e.value=!1}return(t,u)=>r(t.$slots,"default",{instance:{start:n,end:a},loading:e.value})}});export{i as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as de,j as Te,br as ie,ai as Me,bs as Oe,d as Pe,bt as Ie,k as Fe,D as He,G as We,A as Ue,o as Ne,w as $e,a7 as je,bu as ze,a as Ke}from"./index-
|
|
1
|
+
import{h as de,j as Te,br as ie,ai as Me,bs as Oe,d as Pe,bt as Ie,k as Fe,D as He,G as We,A as Ue,o as Ne,w as $e,a7 as je,bu as ze,a as Ke}from"./index-iW0FMVaJ.js";var Se={exports:{}},xe;function qe(){return xe||(xe=1,(function(Q,J){(function(Y,K){Q.exports=K()})(globalThis,(()=>(()=>{var Y={4567:function(d,s,o){var h=this&&this.__decorate||function(e,i,a,v){var p,m=arguments.length,u=m<3?i:v===null?v=Object.getOwnPropertyDescriptor(i,a):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(e,i,a,v);else for(var S=e.length-1;S>=0;S--)(p=e[S])&&(u=(m<3?p(u):m>3?p(i,a,u):p(i,a))||u);return m>3&&u&&Object.defineProperty(i,a,u),u},f=this&&this.__param||function(e,i){return function(a,v){i(a,v,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),l=o(9924),_=o(844),g=o(4725),c=o(2585),t=o(3656);let r=s.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,v){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=v,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new l.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((p=>this._handleResize(p.rows)))),this.register(this._terminal.onRender((p=>this._refreshRows(p.start,p.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((p=>this._handleChar(p)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((p=>this._handleTab(p)))),this.register(this._terminal.onKey((p=>this._handleKey(p.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,t.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,_.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let i=0;i<e;i++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,i){this._liveRegionDebouncer.refresh(e,i,this._terminal.rows)}_renderRows(e,i){const a=this._terminal.buffer,v=a.lines.length.toString();for(let p=e;p<=i;p++){const m=a.lines.get(a.ydisp+p),u=[],S=(m==null?void 0:m.translateToString(!0,void 0,void 0,u))||"",k=(a.ydisp+p+1).toString(),L=this._rowElements[p];L&&(S.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=S,this._rowColumns.set(L,u)),L.setAttribute("aria-posinset",k),L.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,i){const a=e.target,v=this._rowElements[i===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(i===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==v)return;let p,m;if(i===0?(p=a,m=this._rowElements.pop(),this._rowContainer.removeChild(m)):(p=this._rowElements.shift(),m=a,this._rowContainer.removeChild(p)),p.removeEventListener("focus",this._topBoundaryFocusListener),m.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){const u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{const u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var S;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((i.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===a.node&&i.offset>a.offset)&&([i,a]=[a,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;const v=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(v)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:v,offset:((S=v.textContent)==null?void 0:S.length)??0}),!this._rowContainer.contains(a.node))return;const p=({node:k,offset:L})=>{const x=k instanceof Text?k.parentNode:k;let w=parseInt(x==null?void 0:x.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(x);if(!B)return console.warn("columns is null. Race condition?"),null;let M=L<B.length?B[L]:B.slice(-1)[0]+1;return M>=this._terminal.cols&&(++w,M=0),{row:w,column:M}},m=p(i),u=p(a);if(m&&u){if(m.row>u.row||m.row===u.row&&m.column>=u.column)throw new Error("invalid range");this._terminal.select(m.column,m.row,(u.row-m.row)*this._terminal.cols-m.column+u.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=r=h([f(1,c.IInstantiationService),f(2,g.ICoreBrowserService),f(3,g.IRenderService)],r)},3614:(d,s)=>{function o(l){return l.replace(/\r?\n/g,"\r")}function h(l,_){return _?"\x1B[200~"+l+"\x1B[201~":l}function f(l,_,g,c){l=h(l=o(l),g.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(l,!0),_.value=""}function n(l,_,g){const c=g.getBoundingClientRect(),t=l.clientX-c.left-10,r=l.clientY-c.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${t}px`,_.style.top=`${r}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=o,s.bracketTextForPaste=h,s.copyHandler=function(l,_){l.clipboardData&&l.clipboardData.setData("text/plain",_.selectionText),l.preventDefault()},s.handlePasteEvent=function(l,_,g,c){l.stopPropagation(),l.clipboardData&&f(l.clipboardData.getData("text/plain"),_,g,c)},s.paste=f,s.moveTextAreaUnderMouseCursor=n,s.rightClickHandler=function(l,_,g,c,t){n(l,_,g),t&&c.rightClickSelect(l),_.value=c.selectionText,_.select()}},7239:(d,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const h=o(1505);s.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(f,n,l){this._css.set(f,n,l)}getCss(f,n){return this._css.get(f,n)}setColor(f,n,l){this._color.set(f,n,l)}getColor(f,n){return this._color.get(f,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(o,h,f,n){o.addEventListener(h,f,n);let l=!1;return{dispose:()=>{l||(l=!0,o.removeEventListener(h,f,n))}}}},3551:function(d,s,o){var h=this&&this.__decorate||function(r,e,i,a){var v,p=arguments.length,m=p<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,e,i,a);else for(var u=r.length-1;u>=0;u--)(v=r[u])&&(m=(p<3?v(m):p>3?v(e,i,m):v(e,i))||m);return p>3&&m&&Object.defineProperty(e,i,m),m},f=this&&this.__param||function(r,e){return function(i,a){e(i,a,r)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const n=o(3656),l=o(8460),_=o(844),g=o(2585),c=o(4725);let t=s.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(r,e,i,a,v){super(),this._element=r,this._mouseService=e,this._renderService=i,this._bufferService=a,this._linkProviderService=v,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new l.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new l.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)((()=>{var p;this._lastMouseEvent=void 0,(p=this._activeProviderReplies)==null||p.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(r){this._lastMouseEvent=r;const e=this._positionFromMouseEvent(r,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const i=r.composedPath();for(let a=0;a<i.length;a++){const v=i[a];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(r){if(this._activeLine!==r.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(r,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,r)||(this._clearCurrentLink(),this._askForLink(r,!0))}_askForLink(r,e){var a,v;this._activeProviderReplies&&e||((a=this._activeProviderReplies)==null||a.forEach((p=>{p==null||p.forEach((m=>{m.link.dispose&&m.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=r.y);let i=!1;for(const[p,m]of this._linkProviderService.linkProviders.entries())e?(v=this._activeProviderReplies)!=null&&v.get(p)&&(i=this._checkLinkProviderResult(p,r,i)):m.provideLinks(r.y,(u=>{var k,L;if(this._isMouseOut)return;const S=u==null?void 0:u.map((x=>({link:x})));(k=this._activeProviderReplies)==null||k.set(p,S),i=this._checkLinkProviderResult(p,r,i),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(r.y,this._activeProviderReplies)}))}_removeIntersectingLinks(r,e){const i=new Set;for(let a=0;a<e.size;a++){const v=e.get(a);if(v)for(let p=0;p<v.length;p++){const m=v[p],u=m.link.range.start.y<r?0:m.link.range.start.x,S=m.link.range.end.y>r?this._bufferService.cols:m.link.range.end.x;for(let k=u;k<=S;k++){if(i.has(k)){v.splice(p--,1);break}i.add(k)}}}}_checkLinkProviderResult(r,e,i){var p;if(!this._activeProviderReplies)return i;const a=this._activeProviderReplies.get(r);let v=!1;for(let m=0;m<r;m++)this._activeProviderReplies.has(m)&&!this._activeProviderReplies.get(m)||(v=!0);if(!v&&a){const m=a.find((u=>this._linkAtPosition(u.link,e)));m&&(i=!0,this._handleNewLink(m))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let m=0;m<this._activeProviderReplies.size;m++){const u=(p=this._activeProviderReplies.get(m))==null?void 0:p.find((S=>this._linkAtPosition(S.link,e)));if(u){i=!0,this._handleNewLink(u);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(r){if(!this._currentLink)return;const e=this._positionFromMouseEvent(r,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(r,this._currentLink.link.text)}_clearCurrentLink(r,e){this._currentLink&&this._lastMouseEvent&&(!r||!e||this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(r){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(r.link,e)&&(this._currentLink=r,this._currentLink.state={decorations:{underline:r.link.decorations===void 0||r.link.decorations.underline,pointerCursor:r.link.decorations===void 0||r.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,r.link,this._lastMouseEvent),r.link.decorations={},Object.defineProperties(r.link.decorations,{pointerCursor:{get:()=>{var i,a;return(a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.pointerCursor},set:i=>{var a;(a=this._currentLink)!=null&&a.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,a;return(a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.underline},set:i=>{var a,v,p;(a=this._currentLink)!=null&&a.state&&((p=(v=this._currentLink)==null?void 0:v.state)==null?void 0:p.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(r.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((i=>{if(!this._currentLink)return;const a=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=v&&(this._clearCurrentLink(a,v),this._lastMouseEvent)){const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._askForLink(p,!1)}}))))}_linkHover(r,e,i){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&r.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(i,e.text)}_fireUnderlineEvent(r,e){const i=r.range,a=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-a-1,i.end.x,i.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)}_linkLeave(r,e,i){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&r.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(i,e.text)}_linkAtPosition(r,e){const i=r.range.start.y*this._bufferService.cols+r.range.start.x,a=r.range.end.y*this._bufferService.cols+r.range.end.x,v=e.y*this._bufferService.cols+e.x;return i<=v&&v<=a}_positionFromMouseEvent(r,e,i){const a=i.getCoords(r,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(r,e,i,a,v){return{x1:r,y1:e,x2:i,y2:a,cols:this._bufferService.cols,fg:v}}};s.Linkifier=t=h([f(1,c.IMouseService),f(2,c.IRenderService),f(3,g.IBufferService),f(4,c.ILinkProviderService)],t)},9042:(d,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,s,o){var h=this&&this.__decorate||function(c,t,r,e){var i,a=arguments.length,v=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,r):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(c,t,r,e);else for(var p=c.length-1;p>=0;p--)(i=c[p])&&(v=(a<3?i(v):a>3?i(t,r,v):i(t,r))||v);return a>3&&v&&Object.defineProperty(t,r,v),v},f=this&&this.__param||function(c,t){return function(r,e){t(r,e,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const n=o(511),l=o(2585);let _=s.OscLinkProvider=class{constructor(c,t,r){this._bufferService=c,this._optionsService=t,this._oscLinkService=r}provideLinks(c,t){var S;const r=this._bufferService.buffer.lines.get(c-1);if(!r)return void t(void 0);const e=[],i=this._optionsService.rawOptions.linkHandler,a=new n.CellData,v=r.getTrimmedLength();let p=-1,m=-1,u=!1;for(let k=0;k<v;k++)if(m!==-1||r.hasContent(k)){if(r.loadCell(k,a),a.hasExtendedAttrs()&&a.extended.urlId){if(m===-1){m=k,p=a.extended.urlId;continue}u=a.extended.urlId!==p}else m!==-1&&(u=!0);if(u||m!==-1&&k===v-1){const L=(S=this._oscLinkService.getLinkData(p))==null?void 0:S.uri;if(L){const x={start:{x:m+1,y:c},end:{x:k+(u||k!==v-1?0:1),y:c}};let w=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{const B=new URL(L);["http:","https:"].includes(B.protocol)||(w=!0)}catch{w=!0}w||e.push({text:L,range:x,activate:(B,M)=>i?i.activate(B,M,x):g(0,M),hover:(B,M)=>{var I;return(I=i==null?void 0:i.hover)==null?void 0:I.call(i,B,M,x)},leave:(B,M)=>{var I;return(I=i==null?void 0:i.leave)==null?void 0:I.call(i,B,M,x)}})}u=!1,a.hasExtendedAttrs()&&a.extended.urlId?(m=k,p=a.extended.urlId):(m=-1,p=-1)}}t(e)}};function g(c,t){if(confirm(`Do you want to navigate to ${t}?
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,bp as c,j as p,A as u,o as m,aC as d,aO as f,u as l,bq as _,aQ as i}from"./index-
|
|
1
|
+
import{d as r,bp as c,j as p,A as u,o as m,aC as d,aO as f,u as l,bq as _,aQ as i}from"./index-iW0FMVaJ.js";const C=r({__name:"index",setup(x){const s=i(),t=c(),o={modal:!0,appendToBody:!0},a=p(()=>({...o,...t}));function n(e){s&&(s.exposed=e||{},s.exposeProxy=e||{})}return(e,g)=>(m(),u(d(f(l(_),{...a.value,ref:n},e.$slots))))}});export{C as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var pt=Object.defineProperty;var gt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>gt(t,typeof e!="symbol"?e+"":e,n);import{H as V}from"./atom-one-dark-
|
|
1
|
+
var pt=Object.defineProperty;var gt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>gt(t,typeof e!="symbol"?e+"":e,n);import{H as V}from"./atom-one-dark-xkUplIA_.js";import{d as qe,h as ae,G as Dt,$ as ft,Y as mt,c as Ft,o as Ue,a as Fe,am as Ze,p as bt,aW as kt,B as Et,k as Ct,av as At,A as xt,w as wt,n as yt,au as Bt}from"./index-iW0FMVaJ.js";function Ae(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var W=Ae();function Ge(t){W=t}var te={exec:()=>null};function k(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(B.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,e)};return s}var B={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},St=/^(?:[ \t]*(?:\n|$))+/,Tt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,re=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xe=/(?:[*+-]|\d{1,9}[.)])/,je=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qe=k(je).replace(/bull/g,xe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rt=k(je).replace(/bull/g,xe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),we=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Nt=/^[^\n]+/,ye=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$t=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ye).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lt=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xe).getRegex(),he="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Be=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,It=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Be).replace("tag",he).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),We=k(we).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he).getRegex(),Ot=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",We).getRegex(),Se={blockquote:Ot,code:Tt,def:$t,fences:vt,heading:_t,hr:re,html:It,lheading:Qe,list:Lt,newline:St,paragraph:We,table:te,text:Nt},Ne=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he).getRegex(),zt={...Se,lheading:Rt,table:Ne,paragraph:k(we).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he).getRegex()},Mt={...Se,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Be).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:te,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(we).replace("hr",re).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Qe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Pt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xe=/^( {2,}|\\)\n(?!\s*$)/,qt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pe=/[\p{P}\p{S}]/u,Te=/[\s\p{P}\p{S}]/u,Ke=/[^\s\p{P}\p{S}]/u,Ut=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Te).getRegex(),Ye=/(?!~)[\p{P}\p{S}]/u,Zt=/(?!~)[\s\p{P}\p{S}]/u,Gt=/(?:[^\s\p{P}\p{S}]|~)/u,jt=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ve=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qt=k(Ve,"u").replace(/punct/g,pe).getRegex(),Wt=k(Ve,"u").replace(/punct/g,Ye).getRegex(),Je="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xt=k(Je,"gu").replace(/notPunctSpace/g,Ke).replace(/punctSpace/g,Te).replace(/punct/g,pe).getRegex(),Kt=k(Je,"gu").replace(/notPunctSpace/g,Gt).replace(/punctSpace/g,Zt).replace(/punct/g,Ye).getRegex(),Yt=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ke).replace(/punctSpace/g,Te).replace(/punct/g,pe).getRegex(),Vt=k(/\\(punct)/,"gu").replace(/punct/g,pe).getRegex(),Jt=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),en=k(Be).replace("(?:-->|$)","-->").getRegex(),tn=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",en).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ue=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,nn=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ue).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=k(/^!?\[(label)\]\[(ref)\]/).replace("label",ue).replace("ref",ye).getRegex(),tt=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",ye).getRegex(),rn=k("reflink|nolink(?!\\()","g").replace("reflink",et).replace("nolink",tt).getRegex(),ve={_backpedal:te,anyPunctuation:Vt,autolink:Jt,blockSkip:jt,br:Xe,code:Ht,del:te,emStrongLDelim:Qt,emStrongRDelimAst:Xt,emStrongRDelimUnd:Yt,escape:Pt,link:nn,nolink:tt,punctuation:Ut,reflink:et,reflinkSearch:rn,tag:tn,text:qt,url:te},sn={...ve,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",ue).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue).getRegex()},be={...ve,emStrongRDelimAst:Kt,emStrongLDelim:Wt,url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ln={...be,br:k(Xe).replace("{2,}","*").getRegex(),text:k(be.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},le={normal:Se,gfm:zt,pedantic:Mt},J={normal:ve,gfm:be,breaks:ln,pedantic:sn},an={"&":"&","<":"<",">":">",'"':""","'":"'"},$e=t=>an[t];function I(t,e){if(e){if(B.escapeTest.test(t))return t.replace(B.escapeReplace,$e)}else if(B.escapeTestNoEncode.test(t))return t.replace(B.escapeReplaceNoEncode,$e);return t}function Le(t){try{t=encodeURI(t).replace(B.percentDecode,"%")}catch{return null}return t}function Ie(t,e){var i;let n=t.replace(B.findPipe,(o,a,u)=>{let l=!1,c=a;for(;--c>=0&&u[c]==="\\";)l=!l;return l?"|":" |"}),s=n.split(B.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(B.slashPipe,"|");return s}function ee(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function on(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Oe(t,e,n,s,r){let i=e.href,o=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,u}function un(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
3
3
|
`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
|
|
4
4
|
`)}var ce=class{constructor(t){A(this,"options");A(this,"rules");A(this,"lexer");this.options=t||W}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ee(n,`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aR as E,aV as H}from"./index-
|
|
1
|
+
import{aR as E,aV as H}from"./index-iW0FMVaJ.js";async function $(p,l){return E("/__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:p})}var g={exports:{}},x={exports:{}},_;function O(){return _||(_=1,(function(){var p="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(p.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((p.indexOf(f.charAt(c-1))&Math.pow(2,-2*a+8)-1)<<a*2|p.indexOf(f.charAt(c))>>>6-a*2);return i}};x.exports=l})()),x.exports}var B,S;function C(){if(S)return B;S=1;var p={utf8:{stringToBytes:function(l){return p.bin.stringToBytes(unescape(encodeURIComponent(l)))},bytesToString:function(l){return decodeURIComponent(escape(p.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=p,B}/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script src="/dist/js/vue3-sfc-loader.js"></script>
|
|
10
10
|
<script src="/dist/font/iconfont.js"></script>
|
|
11
11
|
|
|
12
|
-
<script type="module" crossorigin src="/dist/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/dist/assets/index-iW0FMVaJ.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/dist/assets/index-DU6Rp_2R.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-B71JWV5F.js";import{d as a,c as o,o as t,b as s,x as n}from"./index-DVUs3ntb.js";const c={class:"terminal-container"},_=a({__name:"index",setup(r){return(d,i)=>(t(),o("div",c,[s(e)]))}}),f=n(_,[["__scopeId","data-v-45a9da26"]]);export{f as default};
|