diff --git a/agent/scheduler.go b/agent/scheduler.go index e7e0188..7d598e0 100644 --- a/agent/scheduler.go +++ b/agent/scheduler.go @@ -460,14 +460,17 @@ func (a *client) TryStartTask(plan common.TaskSchedulePlan) error { }) return err }, retry.RetryIf(func(err error) bool { - if gerr, _ := status.FromError(err); gerr.Code() != codes.Aborted { - a.logger.Debug("task aborted", zap.String("task_id", plan.Task.TaskID), zap.Int64("project_id", plan.Task.ProjectID), - zap.String("tmp_id", plan.TmpID), zap.Error(err)) + if gerr, _ := status.FromError(err); gerr.Code() == codes.Aborted || gerr.Code() == codes.Unauthenticated { return false } return true }), retry.Attempts(3), retry.DelayType(retry.BackOffDelay), retry.MaxJitter(time.Second*30), retry.LastErrorOnly(true)); err != nil { + if gerr, _ := status.FromError(err); gerr.Code() == codes.Aborted { + a.logger.Debug("task aborted", zap.String("task_id", plan.Task.TaskID), zap.Int64("project_id", plan.Task.ProjectID), + zap.String("tmp_id", plan.TmpID), zap.Error(err)) + return + } taskExecuteInfo.CancelFunc() a.metrics.SystemErrInc("agent_status_report_failure") a.logger.Error(fmt.Sprintf("task: %s, id: %s, tmp_id: %s, change running status error, %v", plan.Task.Name, @@ -708,9 +711,9 @@ func tryLockUntilCtxIsDone(cli cronpb.CenterClient, execInfo *common.TaskExecuti safe.Run(func() { // 任务执行后锁最少保持5s // 防止分布式部署下多台机器共同执行 - // if time.Since(execInfo.RealTime).Seconds() < 5 { - // time.Sleep(5*time.Second - time.Since(execInfo.RealTime)) - // } + if time.Since(execInfo.RealTime).Seconds() < 5 { + time.Sleep(5*time.Second - time.Since(execInfo.RealTime)) + } locker.Send(&cronpb.TryLockRequest{ ProjectId: execInfo.Task.ProjectID, TaskId: execInfo.Task.TaskID, diff --git a/cmd/service/rpc.go b/cmd/service/rpc.go index 5699be9..764af39 100644 --- a/cmd/service/rpc.go +++ b/cmd/service/rpc.go @@ -409,9 +409,14 @@ Here: return nil } +type registerInfo struct { + reqID string + info *cronpb.RegisterInfo +} + // watchAgentResponse watch agent register request or event handle response -func watchAgentResponse(ctx context.Context, receive func() (*cronpb.ClientEvent, error), callback func(*cronpb.ClientEvent)) <-chan *cronpb.RegisterInfo { - newRegisterInfo := make(chan *cronpb.RegisterInfo) +func watchAgentResponse(ctx context.Context, receive func() (*cronpb.ClientEvent, error), callback func(*cronpb.ClientEvent)) <-chan *registerInfo { + newRegisterInfo := make(chan *registerInfo) go safe.Run(func() { defer close(newRegisterInfo) for { @@ -425,7 +430,10 @@ func watchAgentResponse(ctx context.Context, receive func() (*cronpb.ClientEvent } if info.Type == cronpb.EventType_EVENT_REGISTER_REQUEST { - newRegisterInfo <- info.GetRegisterInfo() + newRegisterInfo <- ®isterInfo{ + reqID: info.Id, + info: info.GetRegisterInfo(), + } } else { callback(info) } @@ -527,15 +535,15 @@ func (s *cronRpc) buildAgentRegister(ctx context.Context) (registerFunc func(req return registerFunc, deRegisterFunc } -type dispatcher func(meta infra.NodeMeta) app.JobDispatcher +type dispatcher func(reqID string, meta infra.NodeMeta) app.JobDispatcher func buildDispatchJobsV2Handler(sendEvent func(ctx context.Context, e *cronpb.ServiceEvent) error) dispatcher { - return func(meta infra.NodeMeta) app.JobDispatcher { + return func(reqID string, meta infra.NodeMeta) app.JobDispatcher { return func(taskRaw []byte) error { ctx, cancel := context.WithTimeout(context.Background(), time.Second*3) defer cancel() if err := sendEvent(ctx, &cronpb.ServiceEvent{ - Id: utils.GetStrID(), + Id: reqID, Type: cronpb.EventType_EVENT_REGISTER_REPLY, EventTime: time.Now().Unix(), Event: &cronpb.ServiceEvent_RegisterReply{ @@ -599,7 +607,7 @@ func (s *cronRpc) RegisterAgentV2(req cronpb.Center_RegisterAgentV2Server) error } }) - // 注册成功后像agent下发任务的处理方法 + // 注册成功后向agent下发任务的处理方法 dispatchHandler := buildDispatchJobsV2Handler(func(ctx context.Context, e *cronpb.ServiceEvent) error { _, err := s.app.StreamManagerV2().SendEventWaitResponse(ctx, req, e) return err @@ -619,12 +627,12 @@ func (s *cronRpc) RegisterAgentV2(req cronpb.Center_RegisterAgentV2Server) error return nil } // 将agent信息进行注册 - err := register(multiService, func(nm []infra.NodeMeta) error { + err := register(multiService.info, func(nm []infra.NodeMeta) error { // 完成注册后将stream缓存至内存中,方便后续中心与agent通信时使用 for _, meta := range nm { s.app.StreamManagerV2().SaveStream(meta, req, cancel) // 下发对应项目的任务列表 - if err := s.app.DispatchAgentJob(meta.System, dispatchHandler(meta)); err != nil { + if err := s.app.DispatchAgentJob(meta.System, dispatchHandler(multiService.reqID, meta)); err != nil { return err } } diff --git a/dist/assets/Confirm.47315734.js b/dist/assets/Confirm.4116c3bd.js similarity index 96% rename from dist/assets/Confirm.47315734.js rename to dist/assets/Confirm.4116c3bd.js index 7fa628c..0e917ca 100644 --- a/dist/assets/Confirm.47315734.js +++ b/dist/assets/Confirm.4116c3bd.js @@ -1 +1 @@ -import{_ as m,k as C,l as p,r as v,o as g,c as b,w as a,a as o,Q as y,$ as k,b as h,t as V,D as w,x,C as B,h as s,i as Q,A as D,E as S,F as _}from"./index.d76e71bf.js";const A={class:"q-ml-sm"},L=C({props:{modelValue:{type:Boolean,default:!1},content:{type:String,default:""},confirmLabel:{type:String,default:"\u786E\u8BA4"},cancelLabel:{type:String,default:"\u53D6\u6D88"},type:{type:String,default:"confirm"},loading:{type:Boolean,default:!1}},emits:["update:modelValue","confirm","cancel"],setup(l,{emit:n}){const t=l,c=p({get:()=>t.modelValue,set:r=>n("update:modelValue",r)}),u=()=>{n("confirm")},d=()=>{n("cancel")},e=v({confirmColor:"",cancelColor:"",icon:"",iconColor:""});switch(t.type){case"warning":e.value.confirmColor="red",e.value.cancelColor="",e.value.icon="notifications_active",e.value.iconColor="red";break;default:e.value.confirmColor="primary",e.value.cancelColor="",e.value.icon="check",e.value.iconColor="primary";break}return(r,i)=>(g(),b(_,{modelValue:D(c),"onUpdate:modelValue":i[0]||(i[0]=f=>S(c)?c.value=f:null)},{default:a(()=>[o(Q,null,{default:a(()=>[o(y,{class:"row items-center"},{default:a(()=>[o(k,{icon:e.value.icon,color:e.value.iconColor,"text-color":e.value.iconColor==="primary"?"black":"white"},null,8,["icon","color","text-color"]),h("span",A,V(l.content),1)]),_:1}),o(w,{align:"right"},{default:a(()=>[x(o(s,{flat:"",label:l.cancelLabel,color:e.value.cancelColor,onClick:d},null,8,["label","color"]),[[B,!0]]),o(s,{flat:"",label:l.confirmLabel,color:e.value.confirmColor,loading:l.loading,onClick:u},null,8,["label","color","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var F=m(L,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/Confirm.vue"]]);export{F as C}; +import{_ as m,k as C,l as p,r as v,o as g,c as b,w as a,a as o,Q as y,$ as k,b as h,t as V,D as w,x,C as B,h as s,i as Q,A as D,E as S,F as _}from"./index.f89dd3dd.js";const A={class:"q-ml-sm"},L=C({props:{modelValue:{type:Boolean,default:!1},content:{type:String,default:""},confirmLabel:{type:String,default:"\u786E\u8BA4"},cancelLabel:{type:String,default:"\u53D6\u6D88"},type:{type:String,default:"confirm"},loading:{type:Boolean,default:!1}},emits:["update:modelValue","confirm","cancel"],setup(l,{emit:n}){const t=l,c=p({get:()=>t.modelValue,set:r=>n("update:modelValue",r)}),u=()=>{n("confirm")},d=()=>{n("cancel")},e=v({confirmColor:"",cancelColor:"",icon:"",iconColor:""});switch(t.type){case"warning":e.value.confirmColor="red",e.value.cancelColor="",e.value.icon="notifications_active",e.value.iconColor="red";break;default:e.value.confirmColor="primary",e.value.cancelColor="",e.value.icon="check",e.value.iconColor="primary";break}return(r,i)=>(g(),b(_,{modelValue:D(c),"onUpdate:modelValue":i[0]||(i[0]=f=>S(c)?c.value=f:null)},{default:a(()=>[o(Q,null,{default:a(()=>[o(y,{class:"row items-center"},{default:a(()=>[o(k,{icon:e.value.icon,color:e.value.iconColor,"text-color":e.value.iconColor==="primary"?"black":"white"},null,8,["icon","color","text-color"]),h("span",A,V(l.content),1)]),_:1}),o(w,{align:"right"},{default:a(()=>[x(o(s,{flat:"",label:l.cancelLabel,color:e.value.cancelColor,onClick:d},null,8,["label","color"]),[[B,!0]]),o(s,{flat:"",label:l.confirmLabel,color:e.value.confirmColor,loading:l.loading,onClick:u},null,8,["label","color","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var F=m(L,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/Confirm.vue"]]);export{F as C}; diff --git a/dist/assets/DummyContainer.53b75c50.js b/dist/assets/DummyContainer.2932fa1c.js similarity index 76% rename from dist/assets/DummyContainer.53b75c50.js rename to dist/assets/DummyContainer.2932fa1c.js index 52ec694..c21a790 100644 --- a/dist/assets/DummyContainer.53b75c50.js +++ b/dist/assets/DummyContainer.2932fa1c.js @@ -1 +1 @@ -import{_ as o,ag as r,c as n,o as t}from"./index.d76e71bf.js";const c={};function s(a,_){const e=r("router-view");return t(),n(e)}var u=o(c,[["render",s],["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/DummyContainer.vue"]]);export{u as default}; +import{_ as o,ag as r,c as n,o as t}from"./index.f89dd3dd.js";const c={};function s(a,_){const e=r("router-view");return t(),n(e)}var u=o(c,[["render",s],["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/DummyContainer.vue"]]);export{u as default}; diff --git a/dist/assets/HTTPStatus.a6c1441d.js b/dist/assets/HTTPStatus.da72d188.js similarity index 90% rename from dist/assets/HTTPStatus.a6c1441d.js rename to dist/assets/HTTPStatus.da72d188.js index df7f52a..7ff8135 100644 --- a/dist/assets/HTTPStatus.a6c1441d.js +++ b/dist/assets/HTTPStatus.da72d188.js @@ -1 +1 @@ -import{_ as d,k as _,K as t,a as s,q as c,p as n,d as a,o as e}from"./index.d76e71bf.js";const p={class:"tw-h-full tw-w-full tw-text-primary tw-grid tw-place-content-center tw-text-center tw-py-12"},l={key:0,class:"tw-font-bold tw-text-7xl tw-py-2"},u=a(" 403 Forbidden "),f={key:1,class:"tw-font-bold tw-text-7xl tw-py-2"},i=a(" 404 Not Found "),w=_({props:{code:{type:Number,default:404}},setup(r){const o=r;return(h,m)=>(e(),t("div",p,[o.code===403?(e(),t("h1",l,[u,s(c,{name:"do_not_touch"})])):n("v-if",!0),o.code===404?(e(),t("h1",f,[i,s(c,{name:"search_off"})])):n("v-if",!0)]))}});var y=d(w,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/HTTPStatus.vue"]]);export{y as default}; +import{_ as d,k as _,K as t,a as s,q as c,p as n,d as a,o as e}from"./index.f89dd3dd.js";const p={class:"tw-h-full tw-w-full tw-text-primary tw-grid tw-place-content-center tw-text-center tw-py-12"},l={key:0,class:"tw-font-bold tw-text-7xl tw-py-2"},u=a(" 403 Forbidden "),f={key:1,class:"tw-font-bold tw-text-7xl tw-py-2"},i=a(" 404 Not Found "),w=_({props:{code:{type:Number,default:404}},setup(r){const o=r;return(h,m)=>(e(),t("div",p,[o.code===403?(e(),t("h1",l,[u,s(c,{name:"do_not_touch"})])):n("v-if",!0),o.code===404?(e(),t("h1",f,[i,s(c,{name:"search_off"})])):n("v-if",!0)]))}});var y=d(w,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/HTTPStatus.vue"]]);export{y as default}; diff --git a/dist/assets/JSONViewer.6dded83c.js b/dist/assets/JSONViewer.177a839e.js similarity index 91% rename from dist/assets/JSONViewer.6dded83c.js rename to dist/assets/JSONViewer.177a839e.js index 1c6370a..d9e5032 100644 --- a/dist/assets/JSONViewer.6dded83c.js +++ b/dist/assets/JSONViewer.177a839e.js @@ -1 +1 @@ -import{_ as i,k as a,o as p,K as u}from"./index.d76e71bf.js";const c=["innerHTML"],_=a({props:{json:{type:String,default:"none"}},setup(r){const s=r;function l(e){try{return o(JSON.stringify(JSON.parse(e),null,2))}catch{return e}}function o(e){return e=e.replace(/&/g,"&").replace(//g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\\-]?\d+)?)/g,function(n){let t="number";return/^"/.test(n)?/:$/.test(n)?t="key":t="string":/true|false/.test(n)?t="boolean":/null/.test(n)&&(t="null"),''+n+""})}return(e,n)=>(p(),u("pre",{innerHTML:l(s.json)},null,8,c))}});var g=i(_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/JSONViewer.vue"]]);export{g as J}; +import{_ as i,k as a,o as p,K as u}from"./index.f89dd3dd.js";const c=["innerHTML"],_=a({props:{json:{type:String,default:"none"}},setup(r){const s=r;function l(e){try{return o(JSON.stringify(JSON.parse(e),null,2))}catch{return e}}function o(e){return e=e.replace(/&/g,"&").replace(//g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\\-]?\d+)?)/g,function(n){let t="number";return/^"/.test(n)?/:$/.test(n)?t="key":t="string":/true|false/.test(n)?t="boolean":/null/.test(n)&&(t="null"),''+n+""})}return(e,n)=>(p(),u("pre",{innerHTML:l(s.json)},null,8,c))}});var g=i(_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/JSONViewer.vue"]]);export{g as J}; diff --git a/dist/assets/LandingLayout.f500530e.js b/dist/assets/LandingLayout.0344366d.js similarity index 99% rename from dist/assets/LandingLayout.f500530e.js rename to dist/assets/LandingLayout.0344366d.js index d011b5a..a768383 100644 --- a/dist/assets/LandingLayout.f500530e.js +++ b/dist/assets/LandingLayout.0344366d.js @@ -1 +1 @@ -import{_ as Q,k as S,r as v,l as C,u as O,m as M,n as z,o as x,c as A,w as t,a as e,M as P,Q as $,K as B,f as I,x as N,C as T,h as k,A as u,i as H,E as j,F as G,H as q,S as g,T as c,b as p,ab as J,q as b,ac as K,ad as W,U as Y,a2 as X,d as y,t as F,z as Z,Y as ee,ae as te,J as ae,aa as se,af as oe,ag as le,ah as re,ai as ne,p as U,aj as ue,L as ie,ak as de,a4 as ce,al as me,W as fe,e as D,am as we,an as pe,ao as ge}from"./index.d76e71bf.js";const ve={key:0,class:"text-h6"},_e={key:1,class:"text-h6"},he=S({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(_,{emit:w}){const d=_,f=v(!1),l=C({get:()=>d.modelValue,set:a=>w("update:modelValue",a)}),o=O(),s=v({title:"",remark:"",id:""}),m=v({title:"",remark:"",id:""}),r=C(()=>{const a=s.value,n=m.value;return(a==null?void 0:a.title.trim())===(n==null?void 0:n.title.trim())&&(a==null?void 0:a.remark.trim())===(n==null?void 0:n.remark.trim())}),V=C(()=>{const a=s.value;return(a==null?void 0:a.title.trim())!==""&&!r.value});M(()=>{z(()=>{l.value||(s.value=Object.assign({},m.value))})});async function h(){const a=s.value;if(!a){o.commit("error",{error:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u4FE1\u606F"});return}o.commit("cleanError"),f.value=!0,a.id!==""?await o.dispatch("updateOrg",{id:a.id,title:a.title.trim(),remark:a.remark.trim()}):await o.dispatch("createOrg",{title:a.title.trim(),remark:a.remark.trim()}),o.state.Root.currentError===void 0&&(l.value=!1),f.value=!1}return(a,n)=>(x(),A(G,{modelValue:u(l),"onUpdate:modelValue":n[2]||(n[2]=i=>j(l)?l.value=i:null),"no-backdrop-dismiss":!u(r)},{default:t(()=>[e(H,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(P,{onSubmit:h},{default:t(()=>[e($,null,{default:t(()=>[s.value.id===""?(x(),B("div",ve,"\u521B\u5EFA\u7EC4\u7EC7")):(x(),B("div",_e,"\u7F16\u8F91\u7EC4\u7EC7"))]),_:1}),e($,null,{default:t(()=>[e(I,{modelValue:s.value.title,"onUpdate:modelValue":n[0]||(n[0]=i=>s.value.title=i),type:"text",label:"\u7EC4\u7EC7\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(I,{modelValue:s.value.remark,"onUpdate:modelValue":n[1]||(n[1]=i=>s.value.remark=i),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[N(e(k,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[T,!0]]),e(k,{color:"primary","text-color":"black",type:"submit",label:s.value.id===""?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!u(V),class:"lg:tw-w-24 tw-w-full",loading:f.value},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var be=Q(he,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogOrgForm.vue"]]);const xe={class:"text-center"},ye=S({props:{behavior:{type:String,default:"default"}},setup(_){const w=O(),d=v([]);async function f(s,m){var V;const r=[{label:"\u901A\u7528",value:"baseorg"}];(V=w.state.Root.userOrgs)==null||V.forEach((h,a,n)=>{h.id!=="baseorg"&&r.push({label:h.title,value:h.id})}),d.value=r,m(()=>{console.log("select done")})}f("",()=>{});const l=C({get:()=>w.state.Root.currentOrg,set:s=>{!s||(l.value?w.dispatch("switchOrg",s):w.commit("setCurrentOrg",s),localStorage.setItem("gc_choosed_org",s))}});M(()=>{if(!l.value){const s=q();l.value=s.params.orgId||"baseorg",w.commit("setCurrentOrg",l.value)}});const o=v(!1);return(s,m)=>(x(),B(ee,null,[e(be,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=r=>o.value=r)},null,8,["modelValue"]),e(u(Z),{ref:"search",modelValue:u(l),"onUpdate:modelValue":m[2]||(m[2]=r=>j(l)?l.value=r:null),dense:"",dark:"",color:"text-white",standout:"bg-white text-black","emit-value":"","map-options":"",label:"\u9009\u62E9\u7EC4\u7EC7",options:d.value,behavior:_.behavior,style:{width:"300px"},onFilter:f},{"no-option":t(()=>[e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[p("div",xe,[e(J,{color:"grey-5",size:"24px"})])]),_:1})]),_:1})]),append:t(()=>[e(b,{name:"add",onClick:m[1]||(m[1]=K(r=>o.value=!0,["stop","prevent"]))})]),option:t(r=>[e(g,W(r.itemProps,{class:"tw-text-white"}),{default:t(()=>[e(c,null,{default:t(()=>[e(Y,{innerHTML:r.opt.label},null,8,["innerHTML"])]),_:2},1024),e(c,{side:"",class:X({"default-type":!r.opt.type})},{default:t(()=>[e(k,{outline:"",dense:"","no-caps":"","text-color":"grey-5",size:"12px",class:"tw-bg-white q-px-sm"},{default:t(()=>[y(F(r.opt.type||"\u5207\u6362")+" ",1),e(b,{name:"subdirectory_arrow_left",size:"14px"})]),_:2},1024)]),_:2},1032,["class"])]),_:2},1040)]),_:1},8,["modelValue","options","behavior"])],64))}});var L=Q(ye,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/OrgSelect.vue"]]);const ke={class:"tw-flex tw-bg-primary tw-justify-start tw-space-x-2 tw-items-center tw-h-full tw-py-4 tw-px-3.5 tw-box-border tw-w-full tw-text-black tw-overflow-hidden"},Ee={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},Ce={class:"tw-text-xs tw-font-bold tw-rounded tw-leading-3 tw-text-white"},Fe={class:"q-item__section--main tw-flex tw-w-full tw-justify-between"},Ve={class:"tw-flex tw-flex-col tw-space-y-2 tw-overflow-hidden"},Be={class:"tw-text-base tw-leading-4 tw-whitespace-nowrap tw-overflow-hidden tw-overflow-ellipsis"},Qe={class:"tw-cursor-pointer tw-text-xs tw-leading-3"},Se=S({setup(_){const d=O().getters.currentUser,f=te(d.name),l=ae(),o=()=>{l.push({name:"user-profile"})};return(s,m)=>(x(),B("div",ke,[p("div",Ee,[p("p",Ce,F(u(f)),1)]),p("div",Fe,[p("div",Ve,[p("p",Be,F(u(d).name),1),p("p",Qe,F(u(d).account),1)]),e(k,{flat:"",dense:"",size:"md",icon:"more_horiz",round:"",onClick:o})])]))}});var Oe=Q(Se,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/UserBaseInfo.vue"]]);async function $e(){const _=await se.get("/version");return _.data.meta.code===0?_.data.response:""}const Ae=p("span",{class:"tw-text-lg tw-pl-2 tw-tracking-wide tw-font-bold tw-cursor-pointer"},"GopherCron",-1),Ie={key:0,class:"tw-text-sm"},Ue={class:"tw-hidden md:tw-flex"},De=p("svg",{fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[p("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})],-1),Le=y("\u770B\u677F"),Me=y("\u9879\u76EE\u7BA1\u7406"),ze=y("\u4EFB\u52A1\u7F16\u6392"),Ne=y("\u7528\u6237\u7BA1\u7406"),je=y("\u8282\u70B9\u7BA1\u7406"),qe=y("\u9000\u51FA"),Re=S({setup(_){const w=oe(),d=v(!0);w.screen.lt.md&&(d.value=!1);const f=v(!0),l=v(!1),o=O(),s=q();z(()=>{if(!s.name)return;const n=["user-admin","node-admin"];l.value=n.includes(s.name.toString())});const m=C(()=>w.screen.lt.md?d.value:!f.value),r=v("");(async()=>{const n=await $e();r.value=n})();const h=C(()=>o.getters.notificationSetting);function a(){o.dispatch("changeNotificationStatus")}return(n,i)=>{const R=le("router-view");return x(),A(re,{view:"hHh Lpr lff",class:"rounded-borders tw-flex tw-flex-no-wrap tw-h-full tw-w-full"},{default:t(()=>[e(de,{class:"bg-black"},{default:t(()=>[e(ne,{class:"tw-gap-4"},{default:t(()=>[e(k,{flat:"",round:"",dense:"",icon:"menu",onClick:i[0]||(i[0]=E=>d.value=!d.value)}),Ae,r.value?(x(),B("span",Ie,"("+F(r.value)+")",1)):U("v-if",!0),p("div",Ue,[e(L)]),e(ue),e(k,{flat:"",round:"",dense:"",icon:u(h).status?"notifications":"notifications_off",onClick:a},{default:t(()=>[e(ie,null,{default:t(()=>[y(F(u(h).status?"\u70B9\u51FB\u5173\u95ED\u4EFB\u52A1\u72B6\u6001\u901A\u77E5":"\u70B9\u51FB\u5F00\u542F\u4EFB\u52A1\u72B6\u6001\u901A\u77E5"),1)]),_:1})]),_:1},8,["icon"]),e(k,{flat:"",round:"",dense:"",href:"https://github.com/holdno/gopherCron",target:"_blank"},{default:t(()=>[De]),_:1})]),_:1})]),_:1}),e(pe,{modelValue:d.value,"onUpdate:modelValue":i[2]||(i[2]=E=>d.value=E),mini:f.value,width:200,breakpoint:u(w).screen.sizes.md,onMouseover:i[3]||(i[3]=E=>f.value=!1),onMouseout:i[4]||(i[4]=E=>f.value=!0)},{default:t(()=>[e(ce,{style:{"margin-bottom":"80px",height:"calc(100% - 80px)"}},{default:t(()=>[e(me,{padding:""},{default:t(()=>[N(e(g,{class:"tw-flex md:tw-hidden"},{default:t(()=>[e(L,{behavior:"dialog"})]),_:1},512),[[fe,u(m)]]),e(g,{clickable:"",to:{name:"summary",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"timeline"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Le]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"projects",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"view_list"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Me]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"workflows",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"mediation"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[ze]),_:1})]),_:1},8,["to"]),e(D,{class:"tw-bg-stone-800"}),u(o).getters.isAdmin?(x(),A(we,{key:0,modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=E=>l.value=E),label:"\u7CFB\u7EDF\u7BA1\u7406","header-class":"tw-font-medium",icon:"admin_panel_settings"},{default:t(()=>[e(g,{clickable:"","inset-level":.2,to:{name:"user-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"supervisor_account"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Ne]),_:1})]),_:1},8,["inset-level","to"]),e(g,{clickable:"","inset-level":.2,to:{name:"node-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"dynamic_form"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[je]),_:1})]),_:1},8,["inset-level","to"])]),_:1},8,["modelValue"])):U("v-if",!0),e(D,{class:"tw-bg-stone-800"}),e(g,{clickable:"",to:{name:"logout"}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"logout"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[qe]),_:1})]),_:1})]),_:1})]),_:1}),e(Oe,{class:"tw-absolute tw-bottom-0 tw-left-0 tw-w-full",style:{height:"80px"}})]),_:1},8,["modelValue","mini","breakpoint"]),e(ge,{class:"tw-w-full tw-h-full tw-box-border"},{default:t(()=>[e(R)]),_:1})]),_:1})}}});var Te=Q(Re,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/LandingLayout.vue"]]);export{Te as default}; +import{_ as Q,k as S,r as v,l as C,u as O,m as M,n as z,o as x,c as A,w as t,a as e,M as P,Q as $,K as B,f as I,x as N,C as T,h as k,A as u,i as H,E as j,F as G,H as q,S as g,T as c,b as p,ab as J,q as b,ac as K,ad as W,U as Y,a2 as X,d as y,t as F,z as Z,Y as ee,ae as te,J as ae,aa as se,af as oe,ag as le,ah as re,ai as ne,p as U,aj as ue,L as ie,ak as de,a4 as ce,al as me,W as fe,e as D,am as we,an as pe,ao as ge}from"./index.f89dd3dd.js";const ve={key:0,class:"text-h6"},_e={key:1,class:"text-h6"},he=S({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(_,{emit:w}){const d=_,f=v(!1),l=C({get:()=>d.modelValue,set:a=>w("update:modelValue",a)}),o=O(),s=v({title:"",remark:"",id:""}),m=v({title:"",remark:"",id:""}),r=C(()=>{const a=s.value,n=m.value;return(a==null?void 0:a.title.trim())===(n==null?void 0:n.title.trim())&&(a==null?void 0:a.remark.trim())===(n==null?void 0:n.remark.trim())}),V=C(()=>{const a=s.value;return(a==null?void 0:a.title.trim())!==""&&!r.value});M(()=>{z(()=>{l.value||(s.value=Object.assign({},m.value))})});async function h(){const a=s.value;if(!a){o.commit("error",{error:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u4FE1\u606F"});return}o.commit("cleanError"),f.value=!0,a.id!==""?await o.dispatch("updateOrg",{id:a.id,title:a.title.trim(),remark:a.remark.trim()}):await o.dispatch("createOrg",{title:a.title.trim(),remark:a.remark.trim()}),o.state.Root.currentError===void 0&&(l.value=!1),f.value=!1}return(a,n)=>(x(),A(G,{modelValue:u(l),"onUpdate:modelValue":n[2]||(n[2]=i=>j(l)?l.value=i:null),"no-backdrop-dismiss":!u(r)},{default:t(()=>[e(H,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(P,{onSubmit:h},{default:t(()=>[e($,null,{default:t(()=>[s.value.id===""?(x(),B("div",ve,"\u521B\u5EFA\u7EC4\u7EC7")):(x(),B("div",_e,"\u7F16\u8F91\u7EC4\u7EC7"))]),_:1}),e($,null,{default:t(()=>[e(I,{modelValue:s.value.title,"onUpdate:modelValue":n[0]||(n[0]=i=>s.value.title=i),type:"text",label:"\u7EC4\u7EC7\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(I,{modelValue:s.value.remark,"onUpdate:modelValue":n[1]||(n[1]=i=>s.value.remark=i),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[N(e(k,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[T,!0]]),e(k,{color:"primary","text-color":"black",type:"submit",label:s.value.id===""?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!u(V),class:"lg:tw-w-24 tw-w-full",loading:f.value},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var be=Q(he,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogOrgForm.vue"]]);const xe={class:"text-center"},ye=S({props:{behavior:{type:String,default:"default"}},setup(_){const w=O(),d=v([]);async function f(s,m){var V;const r=[{label:"\u901A\u7528",value:"baseorg"}];(V=w.state.Root.userOrgs)==null||V.forEach((h,a,n)=>{h.id!=="baseorg"&&r.push({label:h.title,value:h.id})}),d.value=r,m(()=>{console.log("select done")})}f("",()=>{});const l=C({get:()=>w.state.Root.currentOrg,set:s=>{!s||(l.value?w.dispatch("switchOrg",s):w.commit("setCurrentOrg",s),localStorage.setItem("gc_choosed_org",s))}});M(()=>{if(!l.value){const s=q();l.value=s.params.orgId||"baseorg",w.commit("setCurrentOrg",l.value)}});const o=v(!1);return(s,m)=>(x(),B(ee,null,[e(be,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=r=>o.value=r)},null,8,["modelValue"]),e(u(Z),{ref:"search",modelValue:u(l),"onUpdate:modelValue":m[2]||(m[2]=r=>j(l)?l.value=r:null),dense:"",dark:"",color:"text-white",standout:"bg-white text-black","emit-value":"","map-options":"",label:"\u9009\u62E9\u7EC4\u7EC7",options:d.value,behavior:_.behavior,style:{width:"300px"},onFilter:f},{"no-option":t(()=>[e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[p("div",xe,[e(J,{color:"grey-5",size:"24px"})])]),_:1})]),_:1})]),append:t(()=>[e(b,{name:"add",onClick:m[1]||(m[1]=K(r=>o.value=!0,["stop","prevent"]))})]),option:t(r=>[e(g,W(r.itemProps,{class:"tw-text-white"}),{default:t(()=>[e(c,null,{default:t(()=>[e(Y,{innerHTML:r.opt.label},null,8,["innerHTML"])]),_:2},1024),e(c,{side:"",class:X({"default-type":!r.opt.type})},{default:t(()=>[e(k,{outline:"",dense:"","no-caps":"","text-color":"grey-5",size:"12px",class:"tw-bg-white q-px-sm"},{default:t(()=>[y(F(r.opt.type||"\u5207\u6362")+" ",1),e(b,{name:"subdirectory_arrow_left",size:"14px"})]),_:2},1024)]),_:2},1032,["class"])]),_:2},1040)]),_:1},8,["modelValue","options","behavior"])],64))}});var L=Q(ye,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/OrgSelect.vue"]]);const ke={class:"tw-flex tw-bg-primary tw-justify-start tw-space-x-2 tw-items-center tw-h-full tw-py-4 tw-px-3.5 tw-box-border tw-w-full tw-text-black tw-overflow-hidden"},Ee={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},Ce={class:"tw-text-xs tw-font-bold tw-rounded tw-leading-3 tw-text-white"},Fe={class:"q-item__section--main tw-flex tw-w-full tw-justify-between"},Ve={class:"tw-flex tw-flex-col tw-space-y-2 tw-overflow-hidden"},Be={class:"tw-text-base tw-leading-4 tw-whitespace-nowrap tw-overflow-hidden tw-overflow-ellipsis"},Qe={class:"tw-cursor-pointer tw-text-xs tw-leading-3"},Se=S({setup(_){const d=O().getters.currentUser,f=te(d.name),l=ae(),o=()=>{l.push({name:"user-profile"})};return(s,m)=>(x(),B("div",ke,[p("div",Ee,[p("p",Ce,F(u(f)),1)]),p("div",Fe,[p("div",Ve,[p("p",Be,F(u(d).name),1),p("p",Qe,F(u(d).account),1)]),e(k,{flat:"",dense:"",size:"md",icon:"more_horiz",round:"",onClick:o})])]))}});var Oe=Q(Se,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/UserBaseInfo.vue"]]);async function $e(){const _=await se.get("/version");return _.data.meta.code===0?_.data.response:""}const Ae=p("span",{class:"tw-text-lg tw-pl-2 tw-tracking-wide tw-font-bold tw-cursor-pointer"},"GopherCron",-1),Ie={key:0,class:"tw-text-sm"},Ue={class:"tw-hidden md:tw-flex"},De=p("svg",{fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[p("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})],-1),Le=y("\u770B\u677F"),Me=y("\u9879\u76EE\u7BA1\u7406"),ze=y("\u4EFB\u52A1\u7F16\u6392"),Ne=y("\u7528\u6237\u7BA1\u7406"),je=y("\u8282\u70B9\u7BA1\u7406"),qe=y("\u9000\u51FA"),Re=S({setup(_){const w=oe(),d=v(!0);w.screen.lt.md&&(d.value=!1);const f=v(!0),l=v(!1),o=O(),s=q();z(()=>{if(!s.name)return;const n=["user-admin","node-admin"];l.value=n.includes(s.name.toString())});const m=C(()=>w.screen.lt.md?d.value:!f.value),r=v("");(async()=>{const n=await $e();r.value=n})();const h=C(()=>o.getters.notificationSetting);function a(){o.dispatch("changeNotificationStatus")}return(n,i)=>{const R=le("router-view");return x(),A(re,{view:"hHh Lpr lff",class:"rounded-borders tw-flex tw-flex-no-wrap tw-h-full tw-w-full"},{default:t(()=>[e(de,{class:"bg-black"},{default:t(()=>[e(ne,{class:"tw-gap-4"},{default:t(()=>[e(k,{flat:"",round:"",dense:"",icon:"menu",onClick:i[0]||(i[0]=E=>d.value=!d.value)}),Ae,r.value?(x(),B("span",Ie,"("+F(r.value)+")",1)):U("v-if",!0),p("div",Ue,[e(L)]),e(ue),e(k,{flat:"",round:"",dense:"",icon:u(h).status?"notifications":"notifications_off",onClick:a},{default:t(()=>[e(ie,null,{default:t(()=>[y(F(u(h).status?"\u70B9\u51FB\u5173\u95ED\u4EFB\u52A1\u72B6\u6001\u901A\u77E5":"\u70B9\u51FB\u5F00\u542F\u4EFB\u52A1\u72B6\u6001\u901A\u77E5"),1)]),_:1})]),_:1},8,["icon"]),e(k,{flat:"",round:"",dense:"",href:"https://github.com/holdno/gopherCron",target:"_blank"},{default:t(()=>[De]),_:1})]),_:1})]),_:1}),e(pe,{modelValue:d.value,"onUpdate:modelValue":i[2]||(i[2]=E=>d.value=E),mini:f.value,width:200,breakpoint:u(w).screen.sizes.md,onMouseover:i[3]||(i[3]=E=>f.value=!1),onMouseout:i[4]||(i[4]=E=>f.value=!0)},{default:t(()=>[e(ce,{style:{"margin-bottom":"80px",height:"calc(100% - 80px)"}},{default:t(()=>[e(me,{padding:""},{default:t(()=>[N(e(g,{class:"tw-flex md:tw-hidden"},{default:t(()=>[e(L,{behavior:"dialog"})]),_:1},512),[[fe,u(m)]]),e(g,{clickable:"",to:{name:"summary",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"timeline"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Le]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"projects",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"view_list"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Me]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"workflows",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"mediation"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[ze]),_:1})]),_:1},8,["to"]),e(D,{class:"tw-bg-stone-800"}),u(o).getters.isAdmin?(x(),A(we,{key:0,modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=E=>l.value=E),label:"\u7CFB\u7EDF\u7BA1\u7406","header-class":"tw-font-medium",icon:"admin_panel_settings"},{default:t(()=>[e(g,{clickable:"","inset-level":.2,to:{name:"user-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"supervisor_account"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Ne]),_:1})]),_:1},8,["inset-level","to"]),e(g,{clickable:"","inset-level":.2,to:{name:"node-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"dynamic_form"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[je]),_:1})]),_:1},8,["inset-level","to"])]),_:1},8,["modelValue"])):U("v-if",!0),e(D,{class:"tw-bg-stone-800"}),e(g,{clickable:"",to:{name:"logout"}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"logout"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[qe]),_:1})]),_:1})]),_:1})]),_:1}),e(Oe,{class:"tw-absolute tw-bottom-0 tw-left-0 tw-w-full",style:{height:"80px"}})]),_:1},8,["modelValue","mini","breakpoint"]),e(ge,{class:"tw-w-full tw-h-full tw-box-border"},{default:t(()=>[e(R)]),_:1})]),_:1})}}});var Te=Q(Re,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/LandingLayout.vue"]]);export{Te as default}; diff --git a/dist/assets/LoginPage.d43407c2.js b/dist/assets/LoginPage.945f899b.js similarity index 98% rename from dist/assets/LoginPage.d43407c2.js rename to dist/assets/LoginPage.945f899b.js index 20c875b..e139a13 100644 --- a/dist/assets/LoginPage.d43407c2.js +++ b/dist/assets/LoginPage.945f899b.js @@ -1 +1 @@ -import{_ as C,k as F,o as h,K as B,b as o,a2 as q,r as i,u as I,J as S,H as A,aS as x,aT as E,a as n,c as M,w as y,h as p,p as N,M as Q,d as V,aU as T,aV as P,f as b}from"./index.d76e71bf.js";const $=["src"],j=o("div",{class:"tw-font-bold tw-text-md tw-text-center"},"GOPHERCRON",-1),H=F({props:{class:{type:String,default:""},src:{type:String,default:"/logo.png"}},setup(m){const l=m;return(u,s)=>(h(),B("div",{class:q(l.class+" tw-flex tw-items-center tw-flex-col")},[o("img",{src:m.src,alt:"logo"},null,8,$),j],2))}});var z=C(H,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/LogoTpl.vue"]]);const G={class:"tw-h-full tw-bg-gradient-to-tl tw-from-primary tw-to-black tw-w-full tw-px-4"},J={class:"tw-flex tw-flex-col tw-items-center tw-justify-center tw-h-full tw-w-full"},K={class:"tw-bg-[#1D1D1D] tw-shadow tw-rounded-2xl tw-max-w-md lg:tw-w-1/3 sm:tw-w-2/3 tw-w-full tw-p-10 md:tw-mt-6 tw-mt-2"},W=V(" \u4F7F\u7528 OIDC \u767B\u5F55 "),X=o("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-2xl tw-font-extrabold tw-leading-6"}," \u8D26\u53F7\u5BC6\u7801\u767B\u5F55 ",-1),Y=o("p",{tabindex:"0",class:"tw-pb-8 focus:tw-outline-none tw-text-sm tw-mt-4 tw-font-medium tw-leading-none tw-text-gray-500"},[V(" \u6CA1\u6709\u8D26\u53F7? "),o("a",{href:"javascript:void(0)",class:"hover:text-gray-500 focus:text-gray-500 focus:outline-none focus:underline hover:underline text-sm font-medium leading-none text-gray-800 cursor-pointer"},"\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A")],-1),Z=o("label",{id:"email",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u8D26\u53F7",-1),tt={class:"tw-mt-6 tw-w-full"},et=o("label",{for:"pass",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u5BC6\u7801",-1),ot={class:"tw-mt-8"},st=F({setup(m){const l=i(""),u=i(""),s=I(),L=S(),c=A(),r=i(!1),a=i(!1);let d=x("code"),w=x("state");d||(d=c.query.code),w||(w=c.query.state),d&&w&&D(d,w);const v=i();async function k(){try{v.value=await T()}catch(t){console.error(t),s.commit("error",{error:t})}}k();async function D(t,e){a.value=!0,await s.dispatch("loginWithOIDC",{code:t,state:e}),s.state.Root.logined&&await _(c.query.redirect),a.value=!1}async function _(t){const e={name:"",path:"",params:{}};if(t&&t.length>0&&t.indexOf("/summary")===-1)e.path=t||e.path;else{const f=localStorage.getItem("gc_choosed_org")||"baseorg";e.name="summary",e.params={orgId:f}}await L.push(e)}async function R(){a.value=!0;try{const t=await P();window.location.href=t}catch(t){console.error(t),a.value=!1,s.commit("error",{error:t})}}async function O(){r.value=!0,await s.dispatch("login",{username:l.value,password:u.value}),s.state.Root.logined&&await _(c.query.redirect),r.value=!1}function U(){l.value="",u.value=""}return E(()=>s.dispatch("logout")),(t,e)=>{var f;return h(),B("div",G,[o("div",J,[n(z,{class:"tw-w-24 md:tw-w-32",src:"./logo_white.png"}),o("div",K,[(f=v.value)!=null&&f.oidc?(h(),M(p,{key:0,outline:"","text-color":"white",loading:a.value,disable:a.value||r.value,class:"focus:tw-ring-2 tw-mb-6 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full",onClick:R},{default:y(()=>[W]),_:1},8,["loading","disable"])):N("v-if",!0),X,Y,n(Q,{onSubmit:O,onReset:U},{default:y(()=>[o("div",null,[Z,n(b,{modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=g=>l.value=g),dense:"",type:"text",square:"",filled:""},null,8,["modelValue"])]),o("div",tt,[et,n(b,{modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=g=>u.value=g),dense:"",type:"password",square:"",filled:""},null,8,["modelValue"])]),o("div",ot,[n(p,{color:"primary",type:"submit",label:"\u767B\u5F55","text-color":"black",loading:r.value,disable:a.value||r.value,class:"focus:tw-ring-2 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full"},null,8,["loading","disable"]),n(p,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",class:"tw-text-sm tw-w-full tw-mt-3 tw-border tw-rounded"})])]),_:1})])])])}}});var lt=C(st,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/LoginPage.vue"]]);export{lt as default}; +import{_ as C,k as F,o as h,K as B,b as o,a2 as q,r as i,u as I,J as S,H as A,aS as x,aT as E,a as n,c as M,w as y,h as p,p as N,M as Q,d as V,aU as T,aV as P,f as b}from"./index.f89dd3dd.js";const $=["src"],j=o("div",{class:"tw-font-bold tw-text-md tw-text-center"},"GOPHERCRON",-1),H=F({props:{class:{type:String,default:""},src:{type:String,default:"/logo.png"}},setup(m){const l=m;return(u,s)=>(h(),B("div",{class:q(l.class+" tw-flex tw-items-center tw-flex-col")},[o("img",{src:m.src,alt:"logo"},null,8,$),j],2))}});var z=C(H,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/LogoTpl.vue"]]);const G={class:"tw-h-full tw-bg-gradient-to-tl tw-from-primary tw-to-black tw-w-full tw-px-4"},J={class:"tw-flex tw-flex-col tw-items-center tw-justify-center tw-h-full tw-w-full"},K={class:"tw-bg-[#1D1D1D] tw-shadow tw-rounded-2xl tw-max-w-md lg:tw-w-1/3 sm:tw-w-2/3 tw-w-full tw-p-10 md:tw-mt-6 tw-mt-2"},W=V(" \u4F7F\u7528 OIDC \u767B\u5F55 "),X=o("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-2xl tw-font-extrabold tw-leading-6"}," \u8D26\u53F7\u5BC6\u7801\u767B\u5F55 ",-1),Y=o("p",{tabindex:"0",class:"tw-pb-8 focus:tw-outline-none tw-text-sm tw-mt-4 tw-font-medium tw-leading-none tw-text-gray-500"},[V(" \u6CA1\u6709\u8D26\u53F7? "),o("a",{href:"javascript:void(0)",class:"hover:text-gray-500 focus:text-gray-500 focus:outline-none focus:underline hover:underline text-sm font-medium leading-none text-gray-800 cursor-pointer"},"\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A")],-1),Z=o("label",{id:"email",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u8D26\u53F7",-1),tt={class:"tw-mt-6 tw-w-full"},et=o("label",{for:"pass",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u5BC6\u7801",-1),ot={class:"tw-mt-8"},st=F({setup(m){const l=i(""),u=i(""),s=I(),L=S(),c=A(),r=i(!1),a=i(!1);let d=x("code"),w=x("state");d||(d=c.query.code),w||(w=c.query.state),d&&w&&D(d,w);const v=i();async function k(){try{v.value=await T()}catch(t){console.error(t),s.commit("error",{error:t})}}k();async function D(t,e){a.value=!0,await s.dispatch("loginWithOIDC",{code:t,state:e}),s.state.Root.logined&&await _(c.query.redirect),a.value=!1}async function _(t){const e={name:"",path:"",params:{}};if(t&&t.length>0&&t.indexOf("/summary")===-1)e.path=t||e.path;else{const f=localStorage.getItem("gc_choosed_org")||"baseorg";e.name="summary",e.params={orgId:f}}await L.push(e)}async function R(){a.value=!0;try{const t=await P();window.location.href=t}catch(t){console.error(t),a.value=!1,s.commit("error",{error:t})}}async function O(){r.value=!0,await s.dispatch("login",{username:l.value,password:u.value}),s.state.Root.logined&&await _(c.query.redirect),r.value=!1}function U(){l.value="",u.value=""}return E(()=>s.dispatch("logout")),(t,e)=>{var f;return h(),B("div",G,[o("div",J,[n(z,{class:"tw-w-24 md:tw-w-32",src:"./logo_white.png"}),o("div",K,[(f=v.value)!=null&&f.oidc?(h(),M(p,{key:0,outline:"","text-color":"white",loading:a.value,disable:a.value||r.value,class:"focus:tw-ring-2 tw-mb-6 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full",onClick:R},{default:y(()=>[W]),_:1},8,["loading","disable"])):N("v-if",!0),X,Y,n(Q,{onSubmit:O,onReset:U},{default:y(()=>[o("div",null,[Z,n(b,{modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=g=>l.value=g),dense:"",type:"text",square:"",filled:""},null,8,["modelValue"])]),o("div",tt,[et,n(b,{modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=g=>u.value=g),dense:"",type:"password",square:"",filled:""},null,8,["modelValue"])]),o("div",ot,[n(p,{color:"primary",type:"submit",label:"\u767B\u5F55","text-color":"black",loading:r.value,disable:a.value||r.value,class:"focus:tw-ring-2 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full"},null,8,["loading","disable"]),n(p,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",class:"tw-text-sm tw-w-full tw-mt-3 tw-border tw-rounded"})])]),_:1})])])])}}});var lt=C(st,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/LoginPage.vue"]]);export{lt as default}; diff --git a/dist/assets/ModifyBox.88f33ebb.js b/dist/assets/ModifyBox.25d0a805.js similarity index 98% rename from dist/assets/ModifyBox.88f33ebb.js rename to dist/assets/ModifyBox.25d0a805.js index 1c0df97..1746fb8 100644 --- a/dist/assets/ModifyBox.88f33ebb.js +++ b/dist/assets/ModifyBox.25d0a805.js @@ -1 +1 @@ -var Q=Object.defineProperty,q=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var y=(u,a,s)=>a in u?Q(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s,b=(u,a)=>{for(var s in a||(a={}))O.call(a,s)&&y(u,s,a[s]);if(v)for(var s of v(a))S.call(a,s)&&y(u,s,a[s]);return u},g=(u,a)=>q(u,N(a));import{_ as M,k as _,r as j,l as V,aP as n,o as p,c,w as i,a as r,Q as B,b as E,t as I,M as J,f as m,A as f,p as x,h as A,i as R,E as L,F as $,aQ as z,aR as G}from"./index.d76e71bf.js";const H={class:"text-h6"},K={class:"tw-flex tw-flex-row-reverse tw-gap-4"},T=_({props:{modelValue:{type:Boolean,default:!1},user:{type:Object,default:null}},emits:["update:modelValue","modify"],setup(u,{emit:a}){const s=u,w=s.user!=null?g(b({},s.user),{password:"",passwordAgain:"",newPassword:""}):{id:void 0,account:"",password:"",newPassword:"",passwordAgain:"",name:""},e=j(Object.assign({},w)),C=V(()=>JSON.stringify(w)===JSON.stringify(e.value)),k=n.getters.isAdmin,D=()=>{e.value=Object.assign({},w)},d=V({get(){return s.modelValue},set(t){t||D(),a("update:modelValue",t)}}),F=async()=>{try{if(e.value.newPassword!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await z({userID:e.value.id?e.value.id:0,password:e.value.password,newPassword:e.value.newPassword})).meta.code===0&&(n.commit("success",{message:"\u4FEE\u6539\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},P=async()=>{try{if(e.value.password!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await G({account:e.value.account,password:e.value.password,name:e.value.name})).meta.code===0&&(n.commit("success",{message:"\u65B0\u589E\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},U=async()=>s.user?await F():await P();return(t,l)=>(p(),c($,{modelValue:f(d),"onUpdate:modelValue":l[6]||(l[6]=o=>L(d)?d.value=o:null),"no-backdrop-dismiss":!f(C)},{default:i(()=>[r(R,{style:{width:"300px"}},{default:i(()=>[r(B,null,{default:i(()=>[E("div",H,I(u.user?"\u7F16\u8F91":"\u65B0\u589E"),1)]),_:1}),r(B,{class:"q-pt-none"},{default:i(()=>[r(J,{class:"tw-w-full",onSubmit:U},{default:i(()=>[r(m,{key:"name",modelValue:e.value.name,"onUpdate:modelValue":l[0]||(l[0]=o=>e.value.name=o),disable:e.value.id!==void 0,type:"textarea",label:"\u540D\u79F0",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),r(m,{key:"account",modelValue:e.value.account,"onUpdate:modelValue":l[1]||(l[1]=o=>e.value.account=o),disable:e.value.id!==void 0,type:"text",label:"\u8D26\u53F7(\u90AE\u7BB1)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),e.value.id===void 0||!f(k)?(p(),c(m,{key:"password_again",modelValue:e.value.password,"onUpdate:modelValue":l[2]||(l[2]=o=>e.value.password=o),type:"password",label:e.value.id===void 0?"\u5BC6\u7801":"\u65E7\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","label"])):x("v-if",!0),e.value.id!==void 0?(p(),c(m,{key:"password",modelValue:e.value.newPassword,"onUpdate:modelValue":l[3]||(l[3]=o=>e.value.newPassword=o),type:"password",label:"\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"])):x("v-if",!0),r(m,{key:"password_again",modelValue:e.value.passwordAgain,"onUpdate:modelValue":l[4]||(l[4]=o=>e.value.passwordAgain=o),type:"password",label:"\u786E\u8BA4\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),E("div",K,[r(A,{color:"primary","text-color":"black",type:"submit",label:"\u63D0\u4EA4",class:"lg:tw-w-24 tw-w-full"}),r(A,{flat:"",type:"reset",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full",onClick:l[5]||(l[5]=o=>d.value=!1)})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var Y=M(T,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/ModifyBox.vue"]]);export{Y as M}; +var Q=Object.defineProperty,q=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var y=(u,a,s)=>a in u?Q(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s,b=(u,a)=>{for(var s in a||(a={}))O.call(a,s)&&y(u,s,a[s]);if(v)for(var s of v(a))S.call(a,s)&&y(u,s,a[s]);return u},g=(u,a)=>q(u,N(a));import{_ as M,k as _,r as j,l as V,aP as n,o as p,c,w as i,a as r,Q as B,b as E,t as I,M as J,f as m,A as f,p as x,h as A,i as R,E as L,F as $,aQ as z,aR as G}from"./index.f89dd3dd.js";const H={class:"text-h6"},K={class:"tw-flex tw-flex-row-reverse tw-gap-4"},T=_({props:{modelValue:{type:Boolean,default:!1},user:{type:Object,default:null}},emits:["update:modelValue","modify"],setup(u,{emit:a}){const s=u,w=s.user!=null?g(b({},s.user),{password:"",passwordAgain:"",newPassword:""}):{id:void 0,account:"",password:"",newPassword:"",passwordAgain:"",name:""},e=j(Object.assign({},w)),C=V(()=>JSON.stringify(w)===JSON.stringify(e.value)),k=n.getters.isAdmin,D=()=>{e.value=Object.assign({},w)},d=V({get(){return s.modelValue},set(t){t||D(),a("update:modelValue",t)}}),F=async()=>{try{if(e.value.newPassword!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await z({userID:e.value.id?e.value.id:0,password:e.value.password,newPassword:e.value.newPassword})).meta.code===0&&(n.commit("success",{message:"\u4FEE\u6539\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},P=async()=>{try{if(e.value.password!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await G({account:e.value.account,password:e.value.password,name:e.value.name})).meta.code===0&&(n.commit("success",{message:"\u65B0\u589E\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},U=async()=>s.user?await F():await P();return(t,l)=>(p(),c($,{modelValue:f(d),"onUpdate:modelValue":l[6]||(l[6]=o=>L(d)?d.value=o:null),"no-backdrop-dismiss":!f(C)},{default:i(()=>[r(R,{style:{width:"300px"}},{default:i(()=>[r(B,null,{default:i(()=>[E("div",H,I(u.user?"\u7F16\u8F91":"\u65B0\u589E"),1)]),_:1}),r(B,{class:"q-pt-none"},{default:i(()=>[r(J,{class:"tw-w-full",onSubmit:U},{default:i(()=>[r(m,{key:"name",modelValue:e.value.name,"onUpdate:modelValue":l[0]||(l[0]=o=>e.value.name=o),disable:e.value.id!==void 0,type:"textarea",label:"\u540D\u79F0",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),r(m,{key:"account",modelValue:e.value.account,"onUpdate:modelValue":l[1]||(l[1]=o=>e.value.account=o),disable:e.value.id!==void 0,type:"text",label:"\u8D26\u53F7(\u90AE\u7BB1)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),e.value.id===void 0||!f(k)?(p(),c(m,{key:"password_again",modelValue:e.value.password,"onUpdate:modelValue":l[2]||(l[2]=o=>e.value.password=o),type:"password",label:e.value.id===void 0?"\u5BC6\u7801":"\u65E7\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","label"])):x("v-if",!0),e.value.id!==void 0?(p(),c(m,{key:"password",modelValue:e.value.newPassword,"onUpdate:modelValue":l[3]||(l[3]=o=>e.value.newPassword=o),type:"password",label:"\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"])):x("v-if",!0),r(m,{key:"password_again",modelValue:e.value.passwordAgain,"onUpdate:modelValue":l[4]||(l[4]=o=>e.value.passwordAgain=o),type:"password",label:"\u786E\u8BA4\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),E("div",K,[r(A,{color:"primary","text-color":"black",type:"submit",label:"\u63D0\u4EA4",class:"lg:tw-w-24 tw-w-full"}),r(A,{flat:"",type:"reset",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full",onClick:l[5]||(l[5]=o=>d.value=!1)})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var Y=M(T,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/ModifyBox.vue"]]);export{Y as M}; diff --git a/dist/assets/NodeListAdmin.5e0c8013.js b/dist/assets/NodeListAdmin.4379dd19.js similarity index 98% rename from dist/assets/NodeListAdmin.5e0c8013.js rename to dist/assets/NodeListAdmin.4379dd19.js index 4c4e30e..4eb530b 100644 --- a/dist/assets/NodeListAdmin.5e0c8013.js +++ b/dist/assets/NodeListAdmin.4379dd19.js @@ -1 +1 @@ -import{aa as v,_ as h,k as x,r as p,o as m,K as _,b as t,t as w,A as D,a as n,w as u,h as f,i as I,Q as b,$ as C,D as N,x as j,C as F,F as L,Y as y,d as k,aP as A,u as P,a8 as B,R as $,c as E}from"./index.d76e71bf.js";async function Q(s){const e=await v.get("/client/list",{params:{oid:s.oid,project_ids:s.projectIDs}}),c=[];return e.data.response&&e.data.response.length>0&&e.data.response.forEach((l,i)=>{c.push({clientIP:l.client_ip,projectID:l.project_id,version:l.version})}),{nodeList:c,meta:{code:e.data.meta.code,message:e.data.meta.msg}}}async function V(s){const e=await v.post("/client/reload/config",{client_ip:s.clientIP,project_id:s.projectID});return{code:e.data.meta.code,message:e.data.meta.msg}}const q={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},S={class:"tw-w-2/3"},U={class:"tw-flex tw-items-center"},O={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},R={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},z={class:"tw-pl-2"},K={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},T={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},Y={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},G=k("\u91CD\u8F7D\u914D\u7F6E"),H={class:"q-ml-sm"},J=x({props:{node:{type:Object,default:null}},setup(s){const e=s,l=(a=>{if(a==="")return"NODE";const o=a.split(".");return o[o.length-1]})(e.node.clientIP),i=p(!1),d=p(!1),r=async()=>{i.value=!0;try{const a=await V({clientIP:e.node.clientIP,projectID:e.node.projectID});a.code!==0?A.commit("error",{error:{message:a.message}}):d.value=!1}catch(a){console.log(a)}i.value=!1};return(a,o)=>(m(),_(y,null,[t("tr",q,[t("td",S,[t("div",U,[t("div",O,[t("p",R,w(D(l)),1)]),t("div",z,[t("p",K,w(s.node.clientIP),1),t("p",T,w(s.node.version),1)])])]),t("td",null,[t("div",Y,[n(f,{flat:"",class:"tw-text-red-300",onClick:o[0]||(o[0]=g=>d.value=!0)},{default:u(()=>[G]),_:1})])])]),n(L,{modelValue:d.value,"onUpdate:modelValue":o[1]||(o[1]=g=>d.value=g)},{default:u(()=>[n(I,null,{default:u(()=>[n(b,{class:"tw-flex-row tw-flex tw-items-center"},{default:u(()=>[n(C,{icon:"delete",color:"red","text-color":"white"}),t("span",H,"\u662F\u5426\u8981\u91CD\u8F7D\u8282\u70B9 "+w(s.node.clientIP)+" \u7684\u914D\u7F6E\uFF1F",1)]),_:1}),n(N,{align:"right"},{default:u(()=>[j(n(f,{flat:"",label:"\u53D6\u6D88"},null,512),[[F,!0]]),n(f,{flat:"",label:"\u786E\u5B9A",color:"primary",loading:i.value,onClick:r},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});var M=h(J,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeItem.vue"]]);const W={class:"tw-w-full tw-p-4"},X={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},Z=t("div",{class:"tw-px-4 tw-py-4"},[t("div",{class:"sm:tw-flex tw-items-center tw-justify-between"},[t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u8282\u70B9\u7BA1\u7406 "),t("div",{class:"tw-mt-4 sm:tw-mt-0"})])],-1),tt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},et={class:"tw-overflow-x-auto"},st={class:"tw-w-full tw-whitespace-nowrap"},ot=x({props:{orgId:{type:String,required:!0}},setup(s){const e=s,c=P(),l=p([]),i=p(!1);return(async()=>{i.value=!0;try{const r=await Q({oid:e.orgId,projectIDs:[]});r.meta.code===0?l.value=r.nodeList:c.commit("error",{error:{message:r.meta.message}})}catch(r){console.log(r)}i.value=!1})(),(r,a)=>(m(),_("div",W,[t("div",X,[Z,t("div",tt,[t("div",et,[t("table",st,[t("tbody",null,[(m(!0),_(y,null,B(l.value,o=>(m(),E(M,{key:o.clientIP,node:o},null,8,["node"]))),128))])])]),n($,{size:"md",showing:i.value},null,8,["showing"])])])]))}});var nt=h(ot,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeListAdmin.vue"]]);export{nt as default}; +import{aa as v,_ as h,k as x,r as p,o as m,K as _,b as t,t as w,A as D,a as n,w as u,h as f,i as I,Q as b,$ as C,D as N,x as j,C as F,F as L,Y as y,d as k,aP as A,u as P,a8 as B,R as $,c as E}from"./index.f89dd3dd.js";async function Q(s){const e=await v.get("/client/list",{params:{oid:s.oid,project_ids:s.projectIDs}}),c=[];return e.data.response&&e.data.response.length>0&&e.data.response.forEach((l,i)=>{c.push({clientIP:l.client_ip,projectID:l.project_id,version:l.version})}),{nodeList:c,meta:{code:e.data.meta.code,message:e.data.meta.msg}}}async function V(s){const e=await v.post("/client/reload/config",{client_ip:s.clientIP,project_id:s.projectID});return{code:e.data.meta.code,message:e.data.meta.msg}}const q={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},S={class:"tw-w-2/3"},U={class:"tw-flex tw-items-center"},O={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},R={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},z={class:"tw-pl-2"},K={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},T={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},Y={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},G=k("\u91CD\u8F7D\u914D\u7F6E"),H={class:"q-ml-sm"},J=x({props:{node:{type:Object,default:null}},setup(s){const e=s,l=(a=>{if(a==="")return"NODE";const o=a.split(".");return o[o.length-1]})(e.node.clientIP),i=p(!1),d=p(!1),r=async()=>{i.value=!0;try{const a=await V({clientIP:e.node.clientIP,projectID:e.node.projectID});a.code!==0?A.commit("error",{error:{message:a.message}}):d.value=!1}catch(a){console.log(a)}i.value=!1};return(a,o)=>(m(),_(y,null,[t("tr",q,[t("td",S,[t("div",U,[t("div",O,[t("p",R,w(D(l)),1)]),t("div",z,[t("p",K,w(s.node.clientIP),1),t("p",T,w(s.node.version),1)])])]),t("td",null,[t("div",Y,[n(f,{flat:"",class:"tw-text-red-300",onClick:o[0]||(o[0]=g=>d.value=!0)},{default:u(()=>[G]),_:1})])])]),n(L,{modelValue:d.value,"onUpdate:modelValue":o[1]||(o[1]=g=>d.value=g)},{default:u(()=>[n(I,null,{default:u(()=>[n(b,{class:"tw-flex-row tw-flex tw-items-center"},{default:u(()=>[n(C,{icon:"delete",color:"red","text-color":"white"}),t("span",H,"\u662F\u5426\u8981\u91CD\u8F7D\u8282\u70B9 "+w(s.node.clientIP)+" \u7684\u914D\u7F6E\uFF1F",1)]),_:1}),n(N,{align:"right"},{default:u(()=>[j(n(f,{flat:"",label:"\u53D6\u6D88"},null,512),[[F,!0]]),n(f,{flat:"",label:"\u786E\u5B9A",color:"primary",loading:i.value,onClick:r},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});var M=h(J,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeItem.vue"]]);const W={class:"tw-w-full tw-p-4"},X={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},Z=t("div",{class:"tw-px-4 tw-py-4"},[t("div",{class:"sm:tw-flex tw-items-center tw-justify-between"},[t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u8282\u70B9\u7BA1\u7406 "),t("div",{class:"tw-mt-4 sm:tw-mt-0"})])],-1),tt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},et={class:"tw-overflow-x-auto"},st={class:"tw-w-full tw-whitespace-nowrap"},ot=x({props:{orgId:{type:String,required:!0}},setup(s){const e=s,c=P(),l=p([]),i=p(!1);return(async()=>{i.value=!0;try{const r=await Q({oid:e.orgId,projectIDs:[]});r.meta.code===0?l.value=r.nodeList:c.commit("error",{error:{message:r.meta.message}})}catch(r){console.log(r)}i.value=!1})(),(r,a)=>(m(),_("div",W,[t("div",X,[Z,t("div",tt,[t("div",et,[t("table",st,[t("tbody",null,[(m(!0),_(y,null,B(l.value,o=>(m(),E(M,{key:o.clientIP,node:o},null,8,["node"]))),128))])])]),n($,{size:"md",showing:i.value},null,8,["showing"])])])]))}});var nt=h(ot,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeListAdmin.vue"]]);export{nt as default}; diff --git a/dist/assets/ProjectList.cb9d1f1f.js b/dist/assets/ProjectList.81bcf7ef.js similarity index 99% rename from dist/assets/ProjectList.cb9d1f1f.js rename to dist/assets/ProjectList.81bcf7ef.js index f0e2102..da94a16 100644 --- a/dist/assets/ProjectList.cb9d1f1f.js +++ b/dist/assets/ProjectList.81bcf7ef.js @@ -1,4 +1,4 @@ -import{_ as q,k as S,l as I,u as N,r as h,o as g,c as j,A as c,E as H,m as ee,n as ve,w as t,a as e,M as ge,Q as $,K as E,f as Q,x as F,C as B,h as C,i as Y,F as O,I as te,e as A,z as le,aq as oe,b as r,a8 as K,t as D,Y as z,D as X,p as P,d as U,ar as ye,aa as M,as as he,at as _e,al as ae,T,U as R,ac as W,S as L,au as ke,X as xe,q as G,av as be,aw as je,ax as Ve,ag as se,a2 as ne,a4 as Ie,H as re}from"./index.d76e71bf.js";import{C as J}from"./Confirm.47315734.js";import{f as ue}from"./datetime.561112b0.js";import{t as Ce,b as Ee}from"./thumbStyle.856de4cb.js";const Ue=S({props:{projectId:{type:Number,required:!0},orgId:{type:String,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:w=>k("update:modelValue",w)}),i=N(),p=I(()=>i.state.Project.projects.find(w=>w.id===a.projectId)),d=h(!1);async function _(w){d.value=!0;try{i.commit("cleanError"),await i.dispatch("deleteProject",{projectId:w,orgId:a.orgId}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(b){console.error(b),i.commit("error",{error:b})}d.value=!1}return(w,b)=>{var v;return g(),j(J,{modelValue:c(f),"onUpdate:modelValue":b[0]||(b[0]=x=>H(f)?f.value=x:null),content:"\u662F\u5426\u8981\u5220\u9664\u9879\u76EE"+((v=c(p))==null?void 0:v.title)+"?",type:"warning",loading:d.value,onConfirm:b[1]||(b[1]=x=>c(p)&&_(c(p).id))},null,8,["modelValue","content","loading"])}}});var ie=q(Ue,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectDeleteConfirm.vue"]]);const $e={key:0,class:"text-h6"},Fe={key:1,class:"text-h6"},Be=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:n=>k("update:modelValue",n)}),i=N(),p=I(()=>i.state.Project.projects.find(n=>n.id===a.projectId)),d=I(()=>{const n=p.value;return{title:(n==null?void 0:n.title)||"",remark:(n==null?void 0:n.remark)||""}}),_=h(d.value),w=I(()=>{const n=_.value,y=d.value;return n.title.trim()===y.title.trim()&&n.remark.trim()===y.remark.trim()}),b=I(()=>_.value.title.trim()!==""&&!w.value);ee(()=>{ve(()=>{f.value||(_.value=Object.assign({},d.value))})});const v=h(!1);async function x(){v.value=!0;try{const n=_.value;i.commit("cleanError"),a.projectId>0?await i.dispatch("updateProject",{projectId:a.projectId,title:n.title.trim(),remark:n.remark.trim(),orgId:a.orgId}):await i.dispatch("createProject",{orgId:a.orgId,title:n.title.trim(),remark:n.remark.trim()}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(n){console.error(n),i.commit("error",{error:n})}v.value=!1}return(n,y)=>(g(),j(O,{modelValue:c(f),"onUpdate:modelValue":y[2]||(y[2]=V=>H(f)?f.value=V:null),"no-backdrop-dismiss":!c(w)},{default:t(()=>[e(Y,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(ge,{onSubmit:x},{default:t(()=>[e($,null,{default:t(()=>[c(p)===void 0?(g(),E("div",$e,"\u521B\u5EFA\u9879\u76EE")):(g(),E("div",Fe,"\u7F16\u8F91\u9879\u76EE"))]),_:1}),e($,null,{default:t(()=>[e(Q,{modelValue:_.value.title,"onUpdate:modelValue":y[0]||(y[0]=V=>_.value.title=V),type:"text",label:"\u9879\u76EE\u540D",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(Q,{modelValue:_.value.remark,"onUpdate:modelValue":y[1]||(y[1]=V=>_.value.remark=V),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[F(e(C,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[B,!0]]),e(C,{color:"primary","text-color":"black",type:"submit",label:c(p)===void 0?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!c(b),loading:v.value,class:"lg:tw-w-24 tw-w-full"},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var de=q(Be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectForm.vue"]]);function De(o){return o?o.indexOf("manager")!==-1||o.indexOf("admin")!==-1:!1}function Pe(o){return o.indexOf("admin")!==-1}const ce=[{value:"admin",label:"\u7BA1\u7406\u5458"},{value:"manager",label:"\u53EF\u7F16\u8F91"},{value:"user",label:"\u4EC5\u67E5\u770B"}],pe=new Map;ce.forEach((o,k,a)=>{pe.set(o.value,o.label)});function qe(o){return pe.get(o)}const Se=r("div",{class:"text-h6"},"\u9879\u76EE\u6210\u5458\u7BA1\u7406",-1),Ae=U(" \u6DFB\u52A0 "),Me={role:"list",class:"tw-divide-y tw-divide-white/5"},Qe={class:"tw-min-w-0 tw-flex-auto"},Te={class:"tw-flex tw-items-center tw-gap-x-3"},Re=r("div",{class:"flex-none rounded-full p-1"},[r("div",{class:"tw-h-2 tw-w-2 tw-rounded-full tw-bg-current"})],-1),We={class:"tw-min-w-0 tw-text-sm tw-font-semibold tw-leading-6 tw-text-white"},Le={class:"tw-flex tw-gap-x-2"},Ne={class:"tw-whitespace-nowrap"},He=r("span",{class:"tw-text-gray-400"}," - ",-1),Ye={class:"tw-whitespace-nowrap tw-opacity-75"},Oe={class:"tw-mt-1 tw-flex tw-items-center tw-gap-x-2.5 tw-text-xs tw-leading-5 tw-text-gray-400"},ze={class:"tw-truncate tw-text-primary"},Ge=r("svg",{viewbox:"0 0 2 2",class:"tw-h-0.5 tw-w-0.5 tw-flex-none tw-fill-gray-300"},[r("circle",{cx:"1",cy:"1",r:"1"})],-1),Ke={class:"tw-whitespace-nowrap"},Xe={class:"rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset"},Je=U("\u79FB\u9664"),Ze=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=h("user"),i=I({get:()=>a.modelValue,set:s=>k("update:modelValue",s)}),p=h([]);async function d(){p.value=await ye(M,a.projectId)}te(()=>[a.projectId,i.value],async([,s])=>{s&&d(),_.value=""});const _=h(""),w=h(!1);async function b(){w.value=!0;try{await he(M,a.projectId,_.value,f.value),_.value="",await d()}finally{w.value=!1}}const v=h(),x=h(!1);function n(s){v.value=s,x.value=!0}function y(){v.value=void 0,x.value=!1}async function V(s){w.value=!0;try{await _e(M,a.projectId,s.id),await d()}finally{w.value=!1}}return(s,m)=>(g(),j(O,{modelValue:c(i),"onUpdate:modelValue":m[4]||(m[4]=u=>H(i)?i.value=u:null)},{default:t(()=>{var u;return[e(J,{modelValue:x.value,"onUpdate:modelValue":m[0]||(m[0]=l=>x.value=l),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(u=v.value)==null?void 0:u.name} \u5417\uFF1F`,onConfirm:m[1]||(m[1]=l=>v.value&&V(v.value).then(y))},null,8,["modelValue","content"]),e(Y,{class:"tw-w-full tw-mx-6 lg:tw-w-1/2"},{default:t(()=>[e($,null,{default:t(()=>[Se]),_:1}),e(A),e($,{class:"tw-flex md:tw-flex-row tw-flex-col tw-gap-2"},{default:t(()=>[e(Q,{modelValue:_.value,"onUpdate:modelValue":m[2]||(m[2]=l=>_.value=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7",dense:"",outlined:"",class:"tw-grow"},null,8,["modelValue"]),e(le,{modelValue:f.value,"onUpdate:modelValue":m[3]||(m[3]=l=>f.value=l),outlined:"",dense:"",class:"tw-w-full md:tw-w-32","emit-value":"","map-options":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u6743\u9650",options:c(ce)},null,8,["modelValue","options"]),e(C,{loading:w.value,outline:"","text-color":"primary",onClick:b},{default:t(()=>[Ae]),_:1},8,["loading"])]),_:1}),e(A),e($,{style:{"max-height":"40vh",height:"40vh"},class:"scroll"},{default:t(()=>[e(oe,{class:"tw-w-full tw-h-full",offset:100},{default:t(()=>[r("ul",Me,[(g(!0),E(z,null,K(p.value,l=>(g(),E("li",{key:l.id,class:"tw-relative tw-flex tw-items-center tw-space-x-4 tw-py-2"},[r("div",Qe,[r("div",Te,[Re,r("h2",We,[r("a",Le,[r("span",Ne,D(l.name),1),He,r("span",Ye,D(l.permissions&&c(qe)(l.permissions[0])),1)])])]),r("div",Oe,[r("p",ze,D(l.account),1),Ge,r("p",Ke,D(c(ue)(l.createTime*1e3,"YYYY-MM-DD HH:mm")),1)])]),r("div",Xe,[e(C,{type:"primary",unelevated:"",class:"tw-text-red-500",onClick:we=>n(l)},{default:t(()=>[Je]),_:2},1032,["onClick"])])]))),128))])]),_:1})]),_:1}),e(A),e(X,{align:"right"},{default:t(()=>[F(e(C,{flat:"",label:"\u5173\u95ED",color:"primary"},null,512),[[B,!0]])]),_:1})]),_:1}),P(` +import{_ as q,k as S,l as I,u as N,r as h,o as g,c as j,A as c,E as H,m as ee,n as ve,w as t,a as e,M as ge,Q as $,K as E,f as Q,x as F,C as B,h as C,i as Y,F as O,I as te,e as A,z as le,aq as oe,b as r,a8 as K,t as D,Y as z,D as X,p as P,d as U,ar as ye,aa as M,as as he,at as _e,al as ae,T,U as R,ac as W,S as L,au as ke,X as xe,q as G,av as be,aw as je,ax as Ve,ag as se,a2 as ne,a4 as Ie,H as re}from"./index.f89dd3dd.js";import{C as J}from"./Confirm.4116c3bd.js";import{f as ue}from"./datetime.561112b0.js";import{t as Ce,b as Ee}from"./thumbStyle.856de4cb.js";const Ue=S({props:{projectId:{type:Number,required:!0},orgId:{type:String,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:w=>k("update:modelValue",w)}),i=N(),p=I(()=>i.state.Project.projects.find(w=>w.id===a.projectId)),d=h(!1);async function _(w){d.value=!0;try{i.commit("cleanError"),await i.dispatch("deleteProject",{projectId:w,orgId:a.orgId}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(b){console.error(b),i.commit("error",{error:b})}d.value=!1}return(w,b)=>{var v;return g(),j(J,{modelValue:c(f),"onUpdate:modelValue":b[0]||(b[0]=x=>H(f)?f.value=x:null),content:"\u662F\u5426\u8981\u5220\u9664\u9879\u76EE"+((v=c(p))==null?void 0:v.title)+"?",type:"warning",loading:d.value,onConfirm:b[1]||(b[1]=x=>c(p)&&_(c(p).id))},null,8,["modelValue","content","loading"])}}});var ie=q(Ue,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectDeleteConfirm.vue"]]);const $e={key:0,class:"text-h6"},Fe={key:1,class:"text-h6"},Be=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:n=>k("update:modelValue",n)}),i=N(),p=I(()=>i.state.Project.projects.find(n=>n.id===a.projectId)),d=I(()=>{const n=p.value;return{title:(n==null?void 0:n.title)||"",remark:(n==null?void 0:n.remark)||""}}),_=h(d.value),w=I(()=>{const n=_.value,y=d.value;return n.title.trim()===y.title.trim()&&n.remark.trim()===y.remark.trim()}),b=I(()=>_.value.title.trim()!==""&&!w.value);ee(()=>{ve(()=>{f.value||(_.value=Object.assign({},d.value))})});const v=h(!1);async function x(){v.value=!0;try{const n=_.value;i.commit("cleanError"),a.projectId>0?await i.dispatch("updateProject",{projectId:a.projectId,title:n.title.trim(),remark:n.remark.trim(),orgId:a.orgId}):await i.dispatch("createProject",{orgId:a.orgId,title:n.title.trim(),remark:n.remark.trim()}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(n){console.error(n),i.commit("error",{error:n})}v.value=!1}return(n,y)=>(g(),j(O,{modelValue:c(f),"onUpdate:modelValue":y[2]||(y[2]=V=>H(f)?f.value=V:null),"no-backdrop-dismiss":!c(w)},{default:t(()=>[e(Y,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(ge,{onSubmit:x},{default:t(()=>[e($,null,{default:t(()=>[c(p)===void 0?(g(),E("div",$e,"\u521B\u5EFA\u9879\u76EE")):(g(),E("div",Fe,"\u7F16\u8F91\u9879\u76EE"))]),_:1}),e($,null,{default:t(()=>[e(Q,{modelValue:_.value.title,"onUpdate:modelValue":y[0]||(y[0]=V=>_.value.title=V),type:"text",label:"\u9879\u76EE\u540D",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(Q,{modelValue:_.value.remark,"onUpdate:modelValue":y[1]||(y[1]=V=>_.value.remark=V),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[F(e(C,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[B,!0]]),e(C,{color:"primary","text-color":"black",type:"submit",label:c(p)===void 0?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!c(b),loading:v.value,class:"lg:tw-w-24 tw-w-full"},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var de=q(Be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectForm.vue"]]);function De(o){return o?o.indexOf("manager")!==-1||o.indexOf("admin")!==-1:!1}function Pe(o){return o.indexOf("admin")!==-1}const ce=[{value:"admin",label:"\u7BA1\u7406\u5458"},{value:"manager",label:"\u53EF\u7F16\u8F91"},{value:"user",label:"\u4EC5\u67E5\u770B"}],pe=new Map;ce.forEach((o,k,a)=>{pe.set(o.value,o.label)});function qe(o){return pe.get(o)}const Se=r("div",{class:"text-h6"},"\u9879\u76EE\u6210\u5458\u7BA1\u7406",-1),Ae=U(" \u6DFB\u52A0 "),Me={role:"list",class:"tw-divide-y tw-divide-white/5"},Qe={class:"tw-min-w-0 tw-flex-auto"},Te={class:"tw-flex tw-items-center tw-gap-x-3"},Re=r("div",{class:"flex-none rounded-full p-1"},[r("div",{class:"tw-h-2 tw-w-2 tw-rounded-full tw-bg-current"})],-1),We={class:"tw-min-w-0 tw-text-sm tw-font-semibold tw-leading-6 tw-text-white"},Le={class:"tw-flex tw-gap-x-2"},Ne={class:"tw-whitespace-nowrap"},He=r("span",{class:"tw-text-gray-400"}," - ",-1),Ye={class:"tw-whitespace-nowrap tw-opacity-75"},Oe={class:"tw-mt-1 tw-flex tw-items-center tw-gap-x-2.5 tw-text-xs tw-leading-5 tw-text-gray-400"},ze={class:"tw-truncate tw-text-primary"},Ge=r("svg",{viewbox:"0 0 2 2",class:"tw-h-0.5 tw-w-0.5 tw-flex-none tw-fill-gray-300"},[r("circle",{cx:"1",cy:"1",r:"1"})],-1),Ke={class:"tw-whitespace-nowrap"},Xe={class:"rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset"},Je=U("\u79FB\u9664"),Ze=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=h("user"),i=I({get:()=>a.modelValue,set:s=>k("update:modelValue",s)}),p=h([]);async function d(){p.value=await ye(M,a.projectId)}te(()=>[a.projectId,i.value],async([,s])=>{s&&d(),_.value=""});const _=h(""),w=h(!1);async function b(){w.value=!0;try{await he(M,a.projectId,_.value,f.value),_.value="",await d()}finally{w.value=!1}}const v=h(),x=h(!1);function n(s){v.value=s,x.value=!0}function y(){v.value=void 0,x.value=!1}async function V(s){w.value=!0;try{await _e(M,a.projectId,s.id),await d()}finally{w.value=!1}}return(s,m)=>(g(),j(O,{modelValue:c(i),"onUpdate:modelValue":m[4]||(m[4]=u=>H(i)?i.value=u:null)},{default:t(()=>{var u;return[e(J,{modelValue:x.value,"onUpdate:modelValue":m[0]||(m[0]=l=>x.value=l),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(u=v.value)==null?void 0:u.name} \u5417\uFF1F`,onConfirm:m[1]||(m[1]=l=>v.value&&V(v.value).then(y))},null,8,["modelValue","content"]),e(Y,{class:"tw-w-full tw-mx-6 lg:tw-w-1/2"},{default:t(()=>[e($,null,{default:t(()=>[Se]),_:1}),e(A),e($,{class:"tw-flex md:tw-flex-row tw-flex-col tw-gap-2"},{default:t(()=>[e(Q,{modelValue:_.value,"onUpdate:modelValue":m[2]||(m[2]=l=>_.value=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7",dense:"",outlined:"",class:"tw-grow"},null,8,["modelValue"]),e(le,{modelValue:f.value,"onUpdate:modelValue":m[3]||(m[3]=l=>f.value=l),outlined:"",dense:"",class:"tw-w-full md:tw-w-32","emit-value":"","map-options":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u6743\u9650",options:c(ce)},null,8,["modelValue","options"]),e(C,{loading:w.value,outline:"","text-color":"primary",onClick:b},{default:t(()=>[Ae]),_:1},8,["loading"])]),_:1}),e(A),e($,{style:{"max-height":"40vh",height:"40vh"},class:"scroll"},{default:t(()=>[e(oe,{class:"tw-w-full tw-h-full",offset:100},{default:t(()=>[r("ul",Me,[(g(!0),E(z,null,K(p.value,l=>(g(),E("li",{key:l.id,class:"tw-relative tw-flex tw-items-center tw-space-x-4 tw-py-2"},[r("div",Qe,[r("div",Te,[Re,r("h2",We,[r("a",Le,[r("span",Ne,D(l.name),1),He,r("span",Ye,D(l.permissions&&c(qe)(l.permissions[0])),1)])])]),r("div",Oe,[r("p",ze,D(l.account),1),Ge,r("p",Ke,D(c(ue)(l.createTime*1e3,"YYYY-MM-DD HH:mm")),1)])]),r("div",Xe,[e(C,{type:"primary",unelevated:"",class:"tw-text-red-500",onClick:we=>n(l)},{default:t(()=>[Je]),_:2},1032,["onClick"])])]))),128))])]),_:1})]),_:1}),e(A),e(X,{align:"right"},{default:t(()=>[F(e(C,{flat:"",label:"\u5173\u95ED",color:"primary"},null,512),[[B,!0]])]),_:1})]),_:1}),P(`
\u9879\u76EE\u4EBA\u5458\u7BA1\u7406
diff --git a/dist/assets/SummaryPage.9cc28269.js b/dist/assets/SummaryPage.08383290.js similarity index 99% rename from dist/assets/SummaryPage.9cc28269.js rename to dist/assets/SummaryPage.08383290.js index 98f492c..f5fb55f 100644 --- a/dist/assets/SummaryPage.9cc28269.js +++ b/dist/assets/SummaryPage.08383290.js @@ -1,4 +1,4 @@ -import{_ as is,k as as,r as Ne,m as os,P as mh,n as vf,o as rr,c as il,w as _t,a as dt,h as i_,b as cp,q as a_,R as o_,S as s_,T as ci,U as Pe,d as Fe,t as di,A as an,e as u_,Q as l_,i as f_,V as h_,l as Ao,ap as dp,K as Hn,u as v_,H as c_,I as d_,X as p_,p as Os}from"./index.d76e71bf.js";import{g as g_}from"./log.a88c5349.js";import{J as y_}from"./JSONViewer.6dded83c.js";import{f as _h}from"./datetime.561112b0.js";const m_={class:"full-width tw-mt-4 row flex-center tw-text-white tw-text-lg q-gutter-sm"},__=cp("span",null," \u6682\u65E0\u6570\u636E ",-1),w_=Fe("\u4EFB\u52A1\u540D\u79F0"),x_=Fe("\u9879\u76EE\u540D\u79F0"),S_=Fe("\u8282\u70B9 IP"),b_=Fe("\u5F00\u59CB\u65F6\u95F4"),T_=Fe("\u7ED3\u675F\u65F6\u95F4"),C_=as({props:{orgId:{type:String,required:!0}},setup(r){const t=r,e=Ne([]),n=Ne(0),i=Ne(!1),a=Ne({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),o=async()=>{i.value=!0;try{const l=await g_({oid:t.orgId,page:a.value.page,pagesize:a.value.rowsPerPage});l.list&&(n.value=l.total,e.value=l.list)}catch(l){console.log(l)}i.value=!1};o();const s=Ne();os(()=>{mh(()=>{var l;(l=s.value)==null||l.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});async function u({pagination:{page:l,rowsPerPage:f}}){const h=a.value;h.page=l,h.rowsPerPage=f,await o(),mh(()=>{var c;window.scrollTo({top:((c=s.value)==null?void 0:c.$el.offsetTop)||0})})}return vf(()=>{const l=a.value;l.rowsNumber=n.value}),(l,f)=>(rr(),il(an(h_),{ref_key:"table",ref:s,pagination:a.value,"onUpdate:pagination":f[0]||(f[0]=h=>a.value=h),class:"tw-w-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],title:"\u9519\u8BEF\u65E5\u5FD7","title-class":"tw-text-white",rows:e.value,loading:i.value,"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:u},{"top-right":_t(()=>[dt(i_,{flat:"",dense:"",loading:i.value,icon:"refresh",onClick:o},null,8,["loading"])]),"no-data":_t(()=>[cp("div",m_,[dt(a_,{size:"2em",name:"sentiment_dissatisfied"}),__])]),loading:_t(()=>[dt(o_,{showing:"",color:"primary"})]),body:_t(h=>[dt(f_,{class:"tw-m-4",flat:"",bordered:""},{default:_t(()=>[dt(s_,null,{default:_t(()=>[dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[w_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.taskName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[x_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.projectName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[S_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.clientIp),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[b_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[T_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),dt(u_),dt(l_,{class:"tw-w-full tw-overflow-x-auto"},{default:_t(()=>[dt(y_,{json:h.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var M_=is(C_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/Summary/ErrTaskLogs.vue"]]);/*! ***************************************************************************** +import{_ as is,k as as,r as Ne,m as os,P as mh,n as vf,o as rr,c as il,w as _t,a as dt,h as i_,b as cp,q as a_,R as o_,S as s_,T as ci,U as Pe,d as Fe,t as di,A as an,e as u_,Q as l_,i as f_,V as h_,l as Ao,ap as dp,K as Hn,u as v_,H as c_,I as d_,X as p_,p as Os}from"./index.f89dd3dd.js";import{g as g_}from"./log.a17ac264.js";import{J as y_}from"./JSONViewer.177a839e.js";import{f as _h}from"./datetime.561112b0.js";const m_={class:"full-width tw-mt-4 row flex-center tw-text-white tw-text-lg q-gutter-sm"},__=cp("span",null," \u6682\u65E0\u6570\u636E ",-1),w_=Fe("\u4EFB\u52A1\u540D\u79F0"),x_=Fe("\u9879\u76EE\u540D\u79F0"),S_=Fe("\u8282\u70B9 IP"),b_=Fe("\u5F00\u59CB\u65F6\u95F4"),T_=Fe("\u7ED3\u675F\u65F6\u95F4"),C_=as({props:{orgId:{type:String,required:!0}},setup(r){const t=r,e=Ne([]),n=Ne(0),i=Ne(!1),a=Ne({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),o=async()=>{i.value=!0;try{const l=await g_({oid:t.orgId,page:a.value.page,pagesize:a.value.rowsPerPage});l.list&&(n.value=l.total,e.value=l.list)}catch(l){console.log(l)}i.value=!1};o();const s=Ne();os(()=>{mh(()=>{var l;(l=s.value)==null||l.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});async function u({pagination:{page:l,rowsPerPage:f}}){const h=a.value;h.page=l,h.rowsPerPage=f,await o(),mh(()=>{var c;window.scrollTo({top:((c=s.value)==null?void 0:c.$el.offsetTop)||0})})}return vf(()=>{const l=a.value;l.rowsNumber=n.value}),(l,f)=>(rr(),il(an(h_),{ref_key:"table",ref:s,pagination:a.value,"onUpdate:pagination":f[0]||(f[0]=h=>a.value=h),class:"tw-w-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],title:"\u9519\u8BEF\u65E5\u5FD7","title-class":"tw-text-white",rows:e.value,loading:i.value,"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:u},{"top-right":_t(()=>[dt(i_,{flat:"",dense:"",loading:i.value,icon:"refresh",onClick:o},null,8,["loading"])]),"no-data":_t(()=>[cp("div",m_,[dt(a_,{size:"2em",name:"sentiment_dissatisfied"}),__])]),loading:_t(()=>[dt(o_,{showing:"",color:"primary"})]),body:_t(h=>[dt(f_,{class:"tw-m-4",flat:"",bordered:""},{default:_t(()=>[dt(s_,null,{default:_t(()=>[dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[w_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.taskName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[x_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.projectName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[S_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.clientIp),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[b_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[T_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),dt(u_),dt(l_,{class:"tw-w-full tw-overflow-x-auto"},{default:_t(()=>[dt(y_,{json:h.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var M_=is(C_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/Summary/ErrTaskLogs.vue"]]);/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any diff --git a/dist/assets/TaskDetail.78b1d32f.js b/dist/assets/TaskDetail.78b1d32f.js deleted file mode 100644 index c956432..0000000 --- a/dist/assets/TaskDetail.78b1d32f.js +++ /dev/null @@ -1 +0,0 @@ -var Me=Object.defineProperty;var xe=Object.getOwnPropertySymbols;var Le=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;var Ve=(F,t,p)=>t in F?Me(F,t,{enumerable:!0,configurable:!0,writable:!0,value:p}):F[t]=p,_e=(F,t)=>{for(var p in t||(t={}))Le.call(t,p)&&Ve(F,p,t[p]);if(xe)for(var p of xe(t))Ye.call(t,p)&&Ve(F,p,t[p]);return F};import{_ as Z,u as ee,r as g,o as w,c as T,w as o,a as e,b as D,t as R,d as C,Q as Y,e as be,f as j,g as He,h as V,i as se,j as Ke,k as re,l as x,m as X,n as ke,p as A,q as pe,s as De,v as We,x as G,C as ne,y as Je,z as qe,A as s,B as fe,D as ye,E as Ge,F as Fe,G as Xe,H as Ee,I as oe,J as Ie,K as U,L as Ae,M as je,N as Ze,O as Ue,P as Se,R as et,S as Re,T as ae,U as z,V as tt,W as Pe,X as H,Y as te,Z as lt,$ as at,a0 as ut,a1 as ot,a2 as st,a3 as Be,a4 as rt,a5 as me,a6 as nt,a7 as Te,a8 as $e}from"./index.d76e71bf.js";import{u as it}from"./index.650f2770.js";import{C as ue}from"./Confirm.47315734.js";import{a as dt,f as ie}from"./datetime.561112b0.js";import{T as le}from"./task.f3ffd066.js";import{J as Qe}from"./JSONViewer.6dded83c.js";import{G as ct}from"./log.a88c5349.js";import{t as mt,b as pt}from"./thumbStyle.856de4cb.js";const ft=D("br",null,null,-1),vt=D("br",null,null,-1),wt=C(" \u63D0\u4EA4 "),gt={props:{projectId:{type:Number,required:!0},clientIp:{type:String,required:!0},version:{type:String,required:!0},weight:{type:Number,required:!0},region:{type:String,required:!0}},setup(F){const t=F,p=ee(),f=g(t.weight),k=g(!1);async function m(){k.value=!0;const i=t.clientIp.split(":")[0];try{await Ke(t.projectId,i,Number(f.value)),await p.dispatch("Project/fetchProjectClients",{projectId:t.projectId}),p.commit("success",{message:"\u4FEE\u6539\u6210\u529F"})}catch(l){console.error(l)}k.value=!1}return(i,l)=>(w(),T(se,{flat:"",bordered:""},{default:o(()=>[e(Y,{class:"text-center"},{default:o(()=>[D("strong",null,R(F.clientIp),1),ft,C(" "+R(F.region)+" ",1),vt,C(" "+R(F.version),1)]),_:1}),e(be),e(Y,{class:"flex flex-center"},{default:o(()=>[e(j,{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=B=>f.value=B),outlined:"",dense:"",type:"number",prefix:"\u6743\u91CD\uFF1A",onKeyup:He(m,["enter"])},{append:o(()=>[e(V,{dense:"",unelevated:"",loading:k.value,onClick:m},{default:o(()=>[wt]),_:1},8,["loading"])]),_:1},8,["modelValue","onKeyup"])]),_:1})]),_:1}))}};var kt=Z(gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/ClientNode.vue"]]);const bt=D("div",{class:"text-h6"},"\u521B\u5EFA\u4EFB\u52A1",-1),yt=D("div",{class:"text-base"}," \u4E34\u65F6\u4EFB\u52A1\u540C\u6837\u4F1A\u4E0E\u6B63\u5F0F\u7684\u5B9A\u65F6\u4EFB\u52A1\u7ADE\u4E89\u76F8\u540C\u7684\u9501\uFF0C\u8BF7\u907F\u514D\u8C03\u5EA6\u51B2\u7A81(\u6307\u8FD0\u884C\u65F6\u95F4\u6709\u4EA4\u96C6) ",-1),Ft={class:"tw-flex tw-gap-2 tw-justify-end tw-mb-2"},Et={class:"row items-center justify-end"},It={class:"row items-center justify-end"},jt=re({props:{modelValue:{type:Boolean,default:!1},task:{type:Object,default:()=>({})}},emits:["update:modelValue","created"],setup(F,{emit:t}){const p=F,f=x({get:()=>p.modelValue,set:b=>{t("update:modelValue",b),l.value=""}}),k=x(()=>{const b=[{value:"",label:"\u968F\u673A"}],d=m.state.Project.projectClients.get(p.task.projectId);return d&&d.forEach((r,P,I)=>{const _=r.clientIP;b.push({value:_,label:_})}),b}),m=ee(),i=g({taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}),l=g("");function B(b){l.value=dt(b*60,"YYYY-MM-DD HH:mm")}X(()=>{ke(()=>{f.value&&(i.value=Object.assign({},{taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}))})});const $=g(!1);async function h(){const b=i.value;if(!b.remark){m.commit("error",{error:{message:"\u4EFB\u52A1\u8BF4\u660E\u5FC5\u586B"}});return}if(!b.command){m.commit("error",{error:{message:"\u6267\u884C\u547D\u4EE4\u5FC5\u586B"}});return}$.value=!0;try{const d=await Xe({projectId:b.projectId,taskId:b.taskId,command:b.command,noseize:b.noseize,scheduleTime:Date.parse(l.value)/1e3,remark:b.remark,timeout:b.timeout,host:b.host});d.code!==0?m.commit("error",{error:{message:d.message}}):(m.commit("success",{message:"\u521B\u5EFA\u6210\u529F"}),f.value=!1,t("created"))}catch{}$.value=!1}return(b,d)=>(w(),T(Fe,{modelValue:s(f),"onUpdate:modelValue":d[11]||(d[11]=r=>Ge(f)?f.value=r:null),persistent:""},{default:o(()=>[e(se,{class:"tw-w-96 q-pa-sm"},{default:o(()=>[e(Y,null,{default:o(()=>[bt,yt]),_:1}),e(Y,{style:{"max-height":"50vh"},class:"scroll"},{default:o(()=>[F.task?(w(),T(j,{key:"id","model-value":F.task.taskId,disable:"",label:"\u5173\u8054\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"remark",modelValue:i.value.remark,"onUpdate:modelValue":d[0]||(d[0]=r=>i.value.remark=r),type:"textarea",label:"\u4EFB\u52A1\u8BF4\u660E *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),D("div",Ft,[e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5206\u949F\u540E",onClick:d[1]||(d[1]=r=>B(1))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E94\u5206\u949F\u540E",onClick:d[2]||(d[2]=r=>B(5))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5C0F\u65F6\u540E",onClick:d[3]||(d[3]=r=>B(60))})]),e(j,{modelValue:l.value,"onUpdate:modelValue":d[6]||(d[6]=r=>l.value=r),filled:"",square:"",label:"\u8C03\u5EA6\u65F6\u95F4 *",class:"tw-mb-4"},{prepend:o(()=>[e(pe,{name:"event",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(We,{modelValue:l.value,"onUpdate:modelValue":d[4]||(d[4]=r=>l.value=r),"text-color":"black",mask:"YYYY-MM-DD HH:mm"},{default:o(()=>[D("div",Et,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:o(()=>[e(pe,{name:"access_time",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(Je,{modelValue:l.value,"onUpdate:modelValue":d[5]||(d[5]=r=>l.value=r),mask:"YYYY-MM-DD HH:mm","text-color":"black",format24h:""},{default:o(()=>[D("div",It,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(j,{key:"timeout",modelValue:i.value.timeout,"onUpdate:modelValue":d[7]||(d[7]=r=>i.value.timeout=r),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 * (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:i.value.command,"onUpdate:modelValue":d[8]||(d[8]=r=>i.value.command=r),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4 *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(qe,{modelValue:i.value.host,"onUpdate:modelValue":d[9]||(d[9]=r=>i.value.host=r),"emit-value":"","map-options":"",autogrow:"",square:"",filled:"",label:"\u6267\u884C\u8282\u70B9",options:s(k),class:"tw-mb-4"},null,8,["modelValue","options"]),e(fe,{key:"noseize",modelValue:i.value.noseize,"onUpdate:modelValue":d[10]||(d[10]=r=>i.value.noseize=r),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"])]),_:1}),e(ye,{align:"right",class:"tw-flex tw-gap-2 tw-flex-col-reverse lg:tw-flex-row tw-justify-center lg:tw-justify-end"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[ne,!0]]),e(V,{color:"primary","text-color":"black",label:"\u521B\u5EFA",class:"lg:tw-w-24 tw-w-full !tw-ml-0",loading:$.value,onClick:h},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var Ne=Z(jt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogTemporaryTaskForm.vue"]]);const Ct={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},ht={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},xt=C("\u7ED3\u675F\u8FDB\u7A0B"),Vt=C("\u7ACB\u5373\u6267\u884C"),_t=C("\u4E34\u65F6\u8C03\u5EA6 "),Dt=C(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),At=C("\u590D\u5236\u4EFB\u52A1 "),Bt=C(" \u4EE5\u5F53\u524D\u4EFB\u52A1\u5185\u5BB9\u4E3A\u57FA\u7840\u8FDB\u884C\u65B0\u4EFB\u52A1\u7684\u521B\u5EFA "),Tt={key:1,class:"tw-flex tw-pb-3 tw-flex-wrap tw-gap-2 text-h6"},$t={class:"q-pa-sm"},qt=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F;function p(){N.push({name:"temporary_tasks",params:{projectId:t.projectId}})}const f=x(()=>({id:"",name:"",projectId:t.projectId,command:"",cronExpr:"0 0 0 * * * *",remark:"",timeout:300,createTime:0,status:0,isRunning:-1,noseize:0,exclusion:0,clientIp:"",tmpId:""}));function k(c,n){return!c||!n?!1:c.projectId===n.projectId&&c.name===n.name&&c.cronExpr===n.cronExpr&&c.remark===n.remark&&c.timeout===n.timeout&&c.status===n.status&&c.noseize===n.noseize&&c.command===n.command}const m=ee(),i=Ee(),l=x(()=>{var c;return(c=m.state.Task.tasks.get(t.projectId))==null?void 0:c.find(n=>n.id===t.id||n.id===i.query.copyid)}),B=g();function $(c){B.value={command:c.command,createTime:c.createTime,projectId:c.projectId,scheduleTime:0,taskId:c.id,userId:0,userName:"",noseize:0,timeout:c.timeout,remark:"",host:"",isRunning:-1,tmpId:""}}l.value&&$(l.value);const h=x(()=>m.state.Project.projects.find(c=>c.id===t.projectId)),b=g([]);function d(c){const n=[];c==null||c.forEach((q,J,ge)=>{n.push({value:q.id,label:q.title})}),b.value=n}m.state.Project.projects&&m.state.Project.projects.length>0&&d(m.state.Project.projects),oe(()=>m.state.Project.projects,(c,n)=>{d(n)});const r=g(Object.assign({},l.value||f.value)),P=x(()=>i.name&&i.name.toString()==="create_crontab_task"),I=x(()=>i.query.copyid&&i.query.copyid!=="");P.value&&(r.value.id="",r.value.isRunning=-1),oe(()=>t.id,(c,n)=>{var q;(t.id!==((q=l.value)==null?void 0:q.id)||!P.value&&r.value.id===""||r.value.id!==l.value.id)&&(r.value=Object.assign({},l.value||f.value)),r.value.isRunning=-1,l.value&&$(l.value)});const _=x(()=>{var c;return((c=l.value)==null?void 0:c.isRunning)===1?!1:!k(l.value,r.value)}),M=x(()=>{const{name:c,command:n,timeout:q,cronExpr:J}=r.value;return c!==""&&n!==""&&q>0&&J!==""}),O=x(()=>{const{name:c,command:n,timeout:q,cronExpr:J}=r.value;return c===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":n===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":q<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":J===""?"\u8C03\u5EA6\u8BA1\u5212\u672A\u6307\u5B9A":""});async function y(){await m.dispatch("Task/fetchTasks",{projectId:t.projectId})}const N=Ie(),Q=g(!1);async function a(){if(m.commit("cleanError"),!M.value){m.commit("error",{error:{message:O.value}});return}Q.value=!0,(P.value||I.value)&&(r.value.id="");try{const c=await m.dispatch("saveTask",{task:JSON.parse(JSON.stringify(r.value))});P.value&&(await y(),N.push({name:"crontab_task",params:{projectId:r.value.projectId,taskId:c.id}}))}catch{}Q.value=!1}function u(){r.value=Object.assign({},l.value||f.value)}const v=g(!1),L=g(!1);async function de(c,n){m.commit("cleanError"),L.value=!0,console.log("delete loading",L.value);try{await m.dispatch("deleteTask",{projectId:c,taskId:n}),m.state.Root.currentError===void 0&&(await y(),N.push({name:"crontab_tasks",params:{projectId:i.params.projectId}}),v.value=!1)}catch(q){console.error(q),m.commit("error",{error:q})}L.value=!1}const K=g(!1),W=g(!1);async function S(c,n){W.value=!1,K.value=!0;try{await Ze(m.getters.apiv1,c,n)}catch{K.value=!1}}X(()=>{m.watch(c=>[c.Root.eventTask],([c])=>{!c||c.projectId!==t.projectId||c.taskId!==t.id||le.isFinished(c.status)&&(K.value=!1)})});const ve=g(!1),ce=g(!1),ze=async()=>{ce.value=!1,ve.value=!0;try{await Ue({projectId:t.projectId,taskId:t.id}),await y(),r.value.status=0}catch(c){console.error(c),m.commit("error",{error:c})}ve.value=!1},we=g(!1);function Oe(){var c;N.push({name:"create_crontab_task",query:{copyid:(c=l.value)==null?void 0:c.id}})}return(c,n)=>{var q,J,ge,Ce,he;return w(),U("div",Ct,[e(Ne,{modelValue:we.value,"onUpdate:modelValue":n[0]||(n[0]=E=>we.value=E),task:B.value,onCreated:p},null,8,["modelValue","task"]),e(ue,{modelValue:v.value,"onUpdate:modelValue":n[1]||(n[1]=E=>v.value=E),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((q=s(l))==null?void 0:q.name)+"?",type:"warning",loading:L.value,onConfirm:n[2]||(n[2]=E=>s(h)&&s(l)&&de(s(h).id,s(l).id))},null,8,["modelValue","content","loading"]),e(ue,{modelValue:ce.value,"onUpdate:modelValue":n[3]||(n[3]=E=>ce.value=E),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F\u5F3A\u5236\u7ED3\u675F\u540E\u4EFB\u52A1\u7684\u542F\u7528\u72B6\u6001\u4F1A\u81EA\u52A8\u53D8\u66F4\u4E3A\u505C\u7528\u72B6\u6001\u3002",type:"warning",onConfirm:ze},null,8,["modelValue"]),e(ue,{modelValue:W.value,"onUpdate:modelValue":n[4]||(n[4]=E=>W.value=E),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:n[5]||(n[5]=E=>s(l)&&S(F.projectId,s(l).id))},null,8,["modelValue"]),s(P)?A("v-if",!0):(w(),U("div",ht,[e(V,{flat:"",dense:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:n[6]||(n[6]=E=>v.value=!0)}),((J=s(l))==null?void 0:J.isRunning)===1?(w(),T(V,{key:0,flat:"","text-color":"red",disable:((ge=s(l))==null?void 0:ge.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:ve.value,onClick:n[7]||(n[7]=E=>ce.value=!0)},{default:o(()=>[xt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{color:"primary","text-color":"black",disable:s(_)||((Ce=s(l))==null?void 0:Ce.isRunning)===1,class:"tw-w-24",loading:K.value||((he=s(l))==null?void 0:he.isRunning)===1,onClick:n[8]||(n[8]=E=>W.value=!0)},{default:o(()=>[Vt]),_:1},8,["disable","loading"]),e(V,{color:"warning","text-color":"black",class:"tw-w-24 tw-opacity-90",onClick:n[9]||(n[9]=E=>we.value=!0)},{default:o(()=>[_t,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Dt]),_:1})]),_:1}),e(V,{outline:"",class:"tw-w-24 tw-opacity-90",onClick:Oe},{default:o(()=>[At,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Bt]),_:1})]),_:1})])),s(I)?(w(),U("div",Tt," \u590D\u5236\u4EFB\u52A1 ")):A("v-if",!0),e(je,{class:"tw-w-full",onSubmit:a,onReset:u},{default:o(()=>[s(l)&&!s(P)?(w(),T(j,{key:"id","model-value":s(l).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),s(P)?(w(),T(qe,{key:1,modelValue:r.value.projectId,"onUpdate:modelValue":n[10]||(n[10]=E=>r.value.projectId=E),square:"",filled:"",class:"tw-w-full tw-mb-4","emit-value":"","map-options":"",label:"\u6240\u5C5E\u9879\u76EE",placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",options:b.value},null,8,["modelValue","options"])):(w(),T(j,{key:"project","model-value":s(h)?s(h).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])),e(j,{key:"name",modelValue:r.value.name,"onUpdate:modelValue":n[11]||(n[11]=E=>r.value.name=E),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron",modelValue:r.value.cronExpr,"onUpdate:modelValue":n[12]||(n[12]=E=>r.value.cronExpr=E),label:"\u8C03\u5EA6\u8BA1\u5212 (*\u79D2 *\u5206 *\u65F6 *\u65E5 *\u6708 *\u5468 *\u5E74)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:r.value.timeout,"onUpdate:modelValue":n[13]||(n[13]=E=>r.value.timeout=E),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:r.value.command,"onUpdate:modelValue":n[14]||(n[14]=E=>r.value.command=E),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:r.value.remark,"onUpdate:modelValue":n[15]||(n[15]=E=>r.value.remark=E),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:r.value.noseize,"onUpdate:modelValue":n[16]||(n[16]=E=>r.value.noseize=E),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"status",modelValue:r.value.status,"onUpdate:modelValue":n[17]||(n[17]=E=>r.value.status=E),"false-value":0,"true-value":1,label:"\u662F\u5426\u542F\u7528",class:"tw-mb-4"},null,8,["modelValue"]),D("div",$t,[e(V,{color:"primary","text-color":"black",type:"submit",label:s(I)?"\u786E\u8BA4\u590D\u5236":"\u4FDD\u5B58",disable:!s(_),loading:Q.value,class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["label","disable","loading"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(_),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1})])}}});var Ut=Z(qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskDetail.vue"]]);const St=C("\u8282\u70B9 IP"),Rt=C("\u5F00\u59CB\u65F6\u95F4"),Pt=C("\u7ED3\u675F\u65F6\u95F4"),Qt=re({props:{id:{type:String,required:!0},projectId:{type:Number,required:!0}},emits:["onpage"],setup(F,{emit:t}){const p=F,f=ee(),k=x(()=>f.state.Root.taskLogs),m=x(()=>f.state.Root.taskLogsTotal),i=x(()=>f.state.Root.loadingTaskLogs),l=g({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),B=g();X(()=>{Se(()=>{var h;(h=B.value)==null||h.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});function $({pagination:{page:h,rowsPerPage:b}}){const d=l.value;d.page=h,d.rowsPerPage=b,t("onpage")}return ke(()=>{const h=l.value;h.rowsNumber=m.value}),X(async()=>{ke(async()=>{const h=l.value;await f.dispatch("fetchTaskLogs",{projectId:p.projectId,taskId:p.id,page:h.page,pageSize:h.rowsPerPage})})}),(h,b)=>(w(),T(s(tt),{ref_key:"logTable",ref:B,pagination:l.value,"onUpdate:pagination":b[0]||(b[0]=d=>l.value=d),class:"tw-w-full tw-h-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],rows:s(k),loading:s(i),"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:$},{loading:o(()=>[e(et,{showing:"",color:"primary"})]),body:o(d=>[e(se,{class:"tw-my-4 tw-x-full",flat:"",bordered:""},{default:o(()=>[e(Re,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[St]),_:1}),e(z,null,{default:o(()=>[C(R(d.row.clientIp),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Rt]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(d.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Pt]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(d.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),e(be),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Qe,{json:d.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var Nt=Z(Qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskLogs.vue"]]);const zt=C("\u8282\u70B9 IP"),Ot=C("\u5F00\u59CB\u65F6\u95F4"),Mt=C("\u7ED3\u675F\u65F6\u95F4"),Lt={key:1,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Yt={key:2,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Ht=C("\u5220\u9664\u4EFB\u52A1"),Kt=C("\u7ED3\u675F\u8FDB\u7A0B"),Wt=C("\u590D\u5236\u4EFB\u52A1"),Jt={key:3},Gt=re({props:{id:{type:Number,default:0,required:!0},projectId:{type:Number,required:!0}},setup(F){const t=F,p=g(!1),f=g();function k(a){f.value={taskId:a.taskId,projectId:a.projectId,remark:a.remark,command:a.command,timeout:a.timeout,host:a.host,createTime:0,isRunning:0,noseize:0,tmpId:"",scheduleTime:0,userId:0,userName:""}}const m=g(),i=ee(),l=g();function B(){var a;l.value=(a=i.state.Task.temporaryTasks.get(t.projectId))==null?void 0:a.find(u=>u.id===Number(t.id))}oe(()=>t.id,(a,u)=>{console.log("watched",a,u),B()}),oe(l,(a,u)=>{console.log("watched task",a,u),(!m.value||(a==null?void 0:a.tmpId)!==(u==null?void 0:u.tmpId))&&Q()});function $(){l.value?(k(l.value),p.value=!0):console.error("failed to copy task, the task is not found")}const h=x(()=>i.state.Project.projects.find(a=>a.id===t.projectId));async function b(){try{await i.dispatch("Task/fetchTemporaryTasks",{projectId:t.projectId})}catch(a){console.error("failed to dispatch fetchTemporaryTasks",a)}}X(()=>{i.watch(a=>[a.Root.eventTask],async([a])=>{var u;!a||a.projectId!==t.projectId||a.tmpId!==((u=l.value)==null?void 0:u.tmpId)||!m.value&&le.isFinished(a.status)&&Q()}),B()});const d=g(!1),r=g(!1),P=async()=>{if(!!l.value){r.value=!1,d.value=!0;try{await Ue({projectId:t.projectId,taskId:l.value.taskId}),await b()}catch(a){console.log(a)}d.value=!1}},I=g(!1),_=g(!1),M=Ie(),O=async()=>{_.value=!1,I.value=!0;try{await lt(Number(t.id)),await b(),M.back()}catch(a){console.log(a)}I.value=!1},y=g(!0);function N(a=500){let u=!1,v=!1;return y.value=!0,setTimeout(()=>{v=!0,u&&(y.value=!1)},a),()=>{u=!0,v&&(y.value=!1)}}async function Q(){if(!l.value)return;const a=N(500);m.value=null;try{m.value=await ct({taskId:l.value.taskId,projectId:l.value.projectId,tmpId:l.value.tmpId})}catch(u){console.error(u)}a()}return(a,u)=>{var v,L,de,K,W;return w(),U(te,null,[e(Ne,{modelValue:p.value,"onUpdate:modelValue":u[0]||(u[0]=S=>p.value=S),task:f.value,onCreated:b},null,8,["modelValue","task"]),e(ue,{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=S=>r.value=S),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F",type:"warning",onConfirm:P},null,8,["modelValue"]),e(ue,{modelValue:_.value,"onUpdate:modelValue":u[2]||(u[2]=S=>_.value=S),content:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u4E34\u65F6\u4EFB\u52A1\u5417\uFF1F",type:"warning",onConfirm:O},null,8,["modelValue"]),G(e(H,{type:"QInput",class:"tw-h-52 tw-mb-4",animation:"fade"},null,512),[[Pe,y.value]]),!y.value&&m.value?(w(),T(se,{key:0,class:"tw-mb-4",flat:"",bordered:""},{default:o(()=>[e(Re,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[zt]),_:1}),e(z,null,{default:o(()=>[C(R(m.value.clientIp),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Ot]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(m.value.startTime*1e3)),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Mt]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(m.value.endTime*1e3)),1)]),_:1})]),_:1})]),_:1}),e(be),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Qe,{json:m.value.result},null,8,["json"])]),_:1})]),_:1})):A("v-if",!0),y.value?(w(),U("div",Lt,[e(H,{type:"QBtn",animation:"fade"})])):A("v-if",!0),y.value?A("v-if",!0):(w(),U("div",Yt,[(v=l.value)!=null&&v.isRunning?(w(),T(V,{key:0,loading:!0})):A("v-if",!0),((L=l.value)==null?void 0:L.isRunning)!==1&&!((de=m.value)!=null&&de.result)?(w(),T(V,{key:1,"text-color":"red",outline:"",class:"tw-w-24 tw-ml-1",loading:I.value,onClick:u[3]||(u[3]=S=>_.value=!0)},{default:o(()=>[Ht]),_:1},8,["loading"])):A("v-if",!0),((K=l.value)==null?void 0:K.isRunning)===1?(w(),T(V,{key:2,outline:"","text-color":"red",disable:((W=l.value)==null?void 0:W.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:d.value,onClick:u[4]||(u[4]=S=>r.value=!0)},{default:o(()=>[Kt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{outline:"",class:"tw-w-24 tw-ml-1",onClick:$},{default:o(()=>[Wt]),_:1})])),y.value?(w(),U("div",Jt,[e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"})])):A("v-if",!0),!y.value&&l.value?(w(),T(je,{key:4,class:"tw-w-full"},{default:o(()=>[l.value?(w(),T(j,{key:"id","model-value":l.value.taskId+" - "+l.value.tmpId,disable:"",label:"\u4EFB\u52A1 ID\uFF08task_id - tmp_id\uFF09",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(h)?s(h).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"remark",modelValue:l.value.remark,"onUpdate:modelValue":u[5]||(u[5]=S=>l.value.remark=S),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron","model-value":s(ie)(l.value.scheduleTime*1e3,"YYYY-MM-DD HH:mm"),label:"\u8C03\u5EA6\u65F6\u95F4",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"timeout",modelValue:l.value.timeout,"onUpdate:modelValue":u[6]||(u[6]=S=>l.value.timeout=S),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:l.value.command,"onUpdate:modelValue":u[7]||(u[7]=S=>l.value.command=S),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout","model-value":l.value.host||"\u968F\u673A",label:"\u6307\u5B9A\u6267\u884C\u8282\u70B9",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"noseize","model-value":l.value.noseize===1?"\u662F":"\u5426",type:"textarea",label:"\u5E76\u884C\u8C03\u5EA6",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])]),_:1})):A("v-if",!0)],64)}}});var Xt=Z(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskDetail.vue"]]);const Zt={class:"q-ml-sm"},el={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-1"},tl=C(" \u6267\u884C "),ll={class:"q-pa-sm"},al=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F,p=x(()=>({id:"",name:"",projectId:t.projectId,command:"",remark:"",timeout:300,createTime:0,noseize:0})),f=ee(),k=x(()=>{var a;return(a=f.state.WorkFlowTask.tasks.get(t.projectId))==null?void 0:a.find(u=>u.id===t.id)}),m=x(()=>f.state.Project.projects.find(a=>a.id===t.projectId)),i=g(Object.assign({},k.value||p.value));oe(()=>t.id,(a,u)=>{var v;(t.id!==((v=k.value)==null?void 0:v.id)||!O.value&&i.value.id===""||i.value.id!==k.value.id)&&(i.value=Object.assign({},k.value||p.value))});const l=g(!0);oe(k,()=>{l.value&&(l.value=!1,i.value=Object.assign({},k.value||p.value))});const B=x(()=>JSON.stringify(k.value)!==JSON.stringify(i.value)),$=x(()=>{const{name:a,command:u,timeout:v}=i.value;return a!==""&&u!==""&&v>0}),h=x(()=>{const{name:a,command:u,timeout:v}=i.value;return a===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":u===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":v<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":""}),b=Ie(),d=g(!1);async function r(){d.value=!0;try{if(f.commit("cleanError"),!$.value){f.commit("error",{error:{message:h.value}});return}if(await f.dispatch("saveWorkFlowTask",{task:i.value}),l.value=!0,await f.dispatch("WorkFlowTask/fetchTasks",{projectId:t.projectId}),O.value){const a=Object.assign([],f.state.WorkFlowTask.tasks.get(t.projectId)||[]);a.sort((v,L)=>v.createTime-L.createTime);const u=a[a.length-1];b.push({name:"workflow_task",params:{projectId:t.projectId,taskId:u.id}})}}catch(a){console.error(a),f.commit("error",{error:a})}d.value=!1}function P(){i.value=Object.assign({},k.value||p.value)}const I=g(!1);async function _(a,u){f.commit("cleanError"),await f.dispatch("deleteWorkFlowTask",{projectId:a,taskId:u}),f.state.Root.currentError===void 0&&(f.dispatch("WorkFlowTask/fetchTasks",_e({},t)),b.push({name:"workflow_tasks"}),I.value=!1)}const M=Ee(),O=x(()=>M.name&&M.name.toString()==="create_workflow_task"),y=g(!1),N=g(!1);async function Q(a,u){N.value=!1,y.value=!0;try{await ut(f.getters.apiv1,a,u)}catch(v){y.value=!0,console.error(v)}}return X(()=>{f.watch(a=>[a.Root.eventWorkFlowTask],([a])=>{var u;console.log(a),!(!a||a.projectId!==t.projectId||a.taskId!==t.id)&&(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?y.value=!0:le.isFinished(a.status)&&(y.value=!1))}),f.watch(a=>[a.Root.eventTask],([a])=>{var u;!a||a.projectId!==t.projectId||a.taskId!==t.id||(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?y.value=!0:le.isFinished(a.status)&&(y.value=!1))})}),(a,u)=>(w(),U(te,null,[e(Fe,{modelValue:I.value,"onUpdate:modelValue":u[1]||(u[1]=v=>I.value=v)},{default:o(()=>[e(se,null,{default:o(()=>[e(Y,{class:"row items-center"},{default:o(()=>{var v;return[e(at,{icon:"delete",color:"primary","text-color":"white"}),D("span",Zt," \u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1 "+R((v=s(k))==null?void 0:v.name),1)]}),_:1}),e(ye,{align:"right"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",color:"primary"},null,512),[[ne,!0]]),e(V,{flat:"",label:"\u5220\u9664",color:"red",onClick:u[0]||(u[0]=()=>s(m)&&s(k)&&_(s(m).id,s(k).id))})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(O)?A("v-if",!0):(w(),U("div",el,[e(V,{flat:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:u[2]||(u[2]=v=>I.value=!0)}),e(V,{color:"primary","text-color":"black",disable:s(B),class:"tw-w-24",loading:y.value,onClick:u[3]||(u[3]=()=>N.value=!0)},{default:o(()=>[tl]),_:1},8,["disable","loading"])])),e(je,{class:"tw-w-full",onSubmit:r,onReset:P},{default:o(()=>[s(k)?(w(),T(j,{key:"id","model-value":s(k).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(m)?s(m).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"name",modelValue:i.value.name,"onUpdate:modelValue":u[4]||(u[4]=v=>i.value.name=v),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:i.value.timeout,"onUpdate:modelValue":u[5]||(u[5]=v=>i.value.timeout=v),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:i.value.command,"onUpdate:modelValue":u[6]||(u[6]=v=>i.value.command=v),type:"textarea",placeholder:'echo "hello word"',label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:i.value.remark,"onUpdate:modelValue":u[7]||(u[7]=v=>i.value.remark=v),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:i.value.noseize,"onUpdate:modelValue":u[8]||(u[8]=v=>i.value.noseize=v),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),D("div",ll,[e(V,{color:"primary","text-color":"black",type:"submit",label:"\u4FDD\u5B58",loading:d.value,disable:!s(B),class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["loading","disable"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(B),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1}),e(ue,{modelValue:N.value,"onUpdate:modelValue":u[9]||(u[9]=v=>N.value=v),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:u[10]||(u[10]=v=>s(k)&&Q(F.projectId,s(k).id))},null,8,["modelValue"])],64))}});var ul=Z(al,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskDetail.vue"]]);const ol={class:"tw-px-4 tw-pt-2 tw-w-full tw-h-full tw-flex tw-flex-col"},sl={class:"tw-text-[#7e7e7e] tw-mb-4"},rl={class:"tw-flex tw-items-center tw-justify-start tw-gap-4 tw-text-lg tw-mb-4"},nl={key:0,class:"tw-pb-4"},il={class:"tw-flex tw-gap-2 tw-items-center"},dl=C(" \u5728\u7EBF\u8282\u70B9: "),cl={class:"tw-flex tw-w-full tw-grow"},ml={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},pl={key:0,class:"tw-hidden lg:tw-block"},fl=D("div",{class:"text-h6"},"\u8282\u70B9\u5217\u8868",-1),vl=D("div",{class:"text-base"},"\u4EC5 v2.4.6 \u53CA\u4EE5\u4E0A\u7248\u672C\u652F\u6301\u6743\u91CD\u53D8\u66F4",-1),wl={class:"tw-text-lg"},gl=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0},type:{type:String,default:"crontab"}},setup(F){const t=F,p=g(!1);function f(){p.value=!0}const k=ee(),m=x(()=>k.state.Project.projects.find(I=>I.id===t.projectId)),i=Ee(),l=g(),B=()=>{Se(()=>{var I;(I=l.value)==null||I.setScrollPosition("vertical",0)})},$=x(()=>i.name&&i.name.toString()===`create_${t.type}_task`),h=x(()=>{var I;if($.value)return"detail";if(i.name){const _=i.name.toString();if(_===`${t.type}_task_logs`)return"logs";if(_===`${t.type}_task`)return"detail"}throw new Error(`Unknown route name ${(I=i.name)==null?void 0:I.toString()}`)}),{width:b}=it();async function d(){await k.dispatch("Project/fetchProjectClients",{projectId:t.projectId})}X(()=>{d()}),ot(()=>{k.commit("Project/setProjectClients",{clients:[]})});const r=x(()=>k.state.Project.projectClients.get(t.projectId)),P=x(()=>{const I=new Map;return r.value&&r.value.forEach((_,M,O)=>{let y=I.get(_.region);y||(I.set(_.region,[]),y=I.get(_.region)),y==null||y.push(_)}),I});return(I,_)=>{var M,O;return w(),U(te,null,[D("div",ol,[D("div",sl,[D("div",rl,[D("span",null,[e(pe,{name:"folder"}),C(" "+R((M=s(m))==null?void 0:M.title),1)]),D("span",null," ID: "+R(F.projectId),1)]),s(m)&&s(m).remark.trim()!==""?(w(),U("div",nl,R(s(m).remark),1)):A("v-if",!0),D("div",il,[e(pe,{name:"hive"}),dl,D("span",{class:st(["tw-font-extrabold",{"tw-text-primary":s(r)&&s(r).length>0,"tw-text-red-500":!s(r)||s(r).length===0}])},R(((O=s(r))==null?void 0:O.length)||0),3),G(D("span",{class:"tw-text-white tw-cursor-pointer",onClick:f},"\u67E5\u770B\u8282\u70B9",512),[[Pe,s(r)&&s(r).length>0]])])]),s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(h),"active-color":"primary",align:"left",class:"lg:tw-hidden tw-display"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"])),D("div",cl,[D("div",ml,[e(s(rt),{ref_key:"scroll",ref:l,class:"tw-grow","thumb-style":s(mt),"bar-style":s(pt)},{default:o(()=>[e(nt,{"model-value":s(h),animated:"",vertical:s(b)>=1024,class:"tw-w-full tw-h-full tw-bg-[#121212] tw-p-0 lg:tw-pr-4"},{default:o(()=>[e(Te,{name:"detail",class:"tw-px-0"},{default:o(()=>[t.type==="crontab"?(w(),T(Ut,{key:0,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):t.type==="workflow"?(w(),T(ul,{key:1,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0),t.type==="temporary"?(w(),T(Xt,{key:2,id:Number(t.id),"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0)]),_:1}),e(Te,{name:"logs",class:"tw-px-0"},{default:o(()=>[e(Nt,{id:t.id,"project-id":t.projectId,onOnpage:B},null,8,["id","project-id"])]),_:1})]),_:1},8,["model-value","vertical"])]),_:1},8,["thumb-style","bar-style"])]),t.type!="temporary"?(w(),U("div",pl,[s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(h),"active-color":"primary",vertical:"","switch-indicator":"",align:"left"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"]))])):A("v-if",!0)])]),e(Fe,{modelValue:p.value,"onUpdate:modelValue":_[0]||(_[0]=y=>p.value=y)},{default:o(()=>[e(se,{class:"tw-w-full"},{default:o(()=>[e(Y,null,{default:o(()=>[fl,vl]),_:1}),(w(!0),U(te,null,$e(s(P),([y,N])=>(w(),U(te,{key:y},[e(Y,null,{default:o(()=>[D("div",wl,"Region: "+R(y),1)]),_:2},1024),e(Y,{class:"tw-q-pt-none scroll tw-flex tw-items-center tw-justify-center tw-align-middle tw-gap-2 tw-flex-wrap",style:{"max-height":"60vh"}},{default:o(()=>[(w(!0),U(te,null,$e(N,Q=>(w(),U("div",{key:Q.clientIP,class:"md:tw-w-[48%] tw-w-full"},[e(kt,{"client-ip":Q.clientIP,weight:Q.weight,"project-id":F.projectId,version:Q.version,region:Q.region},null,8,["client-ip","weight","project-id","version","region"])]))),128))]),_:2},1024)],64))),128)),e(ye,{align:"right",class:"text-teal"},{default:o(()=>[G(e(V,{flat:"",label:"OK"},null,512),[[ne,!0]])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}}});var xl=Z(gl,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskDetail.vue"]]);export{xl as default}; diff --git a/dist/assets/TaskDetail.ce4b2fe5.js b/dist/assets/TaskDetail.ce4b2fe5.js new file mode 100644 index 0000000..3727fef --- /dev/null +++ b/dist/assets/TaskDetail.ce4b2fe5.js @@ -0,0 +1 @@ +var Le=Object.defineProperty;var xe=Object.getOwnPropertySymbols;var Ye=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ve=(F,t,p)=>t in F?Le(F,t,{enumerable:!0,configurable:!0,writable:!0,value:p}):F[t]=p,_e=(F,t)=>{for(var p in t||(t={}))Ye.call(t,p)&&Ve(F,p,t[p]);if(xe)for(var p of xe(t))He.call(t,p)&&Ve(F,p,t[p]);return F};import{_ as Z,u as ee,r as g,o as w,c as T,w as o,a as e,b as D,t as R,d as h,Q as Y,e as ye,f as j,g as Ke,h as V,i as se,j as We,k as re,l as x,m as X,n as ke,p as A,q as pe,s as De,v as Je,x as G,C as ne,y as Ge,z as Ue,A as s,B as fe,D as be,E as Xe,F as Fe,G as Ze,H as Ee,I as oe,J as Ie,K as U,L as Ae,M as je,N as et,O as Se,P as Re,R as tt,S as Pe,T as ae,U as z,V as lt,W as Qe,X as H,Y as te,Z as at,$ as ut,a0 as ot,a1 as st,a2 as rt,a3 as Be,a4 as Te,a5 as me,a6 as nt,a7 as $e,a8 as qe}from"./index.f89dd3dd.js";import{u as it}from"./index.c4564906.js";import{C as ue}from"./Confirm.4116c3bd.js";import{a as dt,f as ie}from"./datetime.561112b0.js";import{T as le}from"./task.f3ffd066.js";import{J as Ne}from"./JSONViewer.177a839e.js";import{G as ct}from"./log.a17ac264.js";import{t as mt,b as pt}from"./thumbStyle.856de4cb.js";const ft=D("br",null,null,-1),vt=D("br",null,null,-1),wt=h(" \u63D0\u4EA4 "),gt={props:{projectId:{type:Number,required:!0},clientIp:{type:String,required:!0},version:{type:String,required:!0},weight:{type:Number,required:!0},region:{type:String,required:!0}},setup(F){const t=F,p=ee(),f=g(t.weight),k=g(!1);async function m(){k.value=!0;const d=t.clientIp.split(":")[0];try{await We(t.projectId,d,Number(f.value)),await p.dispatch("Project/fetchProjectClients",{projectId:t.projectId}),p.commit("success",{message:"\u4FEE\u6539\u6210\u529F"})}catch(l){console.error(l)}k.value=!1}return(d,l)=>(w(),T(se,{flat:"",bordered:""},{default:o(()=>[e(Y,{class:"text-center"},{default:o(()=>[D("strong",null,R(F.clientIp),1),ft,h(" "+R(F.region)+" ",1),vt,h(" "+R(F.version),1)]),_:1}),e(ye),e(Y,{class:"flex flex-center"},{default:o(()=>[e(j,{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=B=>f.value=B),outlined:"",dense:"",type:"number",prefix:"\u6743\u91CD\uFF1A",onKeyup:Ke(m,["enter"])},{append:o(()=>[e(V,{dense:"",unelevated:"",loading:k.value,onClick:m},{default:o(()=>[wt]),_:1},8,["loading"])]),_:1},8,["modelValue","onKeyup"])]),_:1})]),_:1}))}};var kt=Z(gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/ClientNode.vue"]]);const yt=D("div",{class:"text-h6"},"\u521B\u5EFA\u4EFB\u52A1",-1),bt=D("div",{class:"text-base"}," \u4E34\u65F6\u4EFB\u52A1\u540C\u6837\u4F1A\u4E0E\u6B63\u5F0F\u7684\u5B9A\u65F6\u4EFB\u52A1\u7ADE\u4E89\u76F8\u540C\u7684\u9501\uFF0C\u8BF7\u907F\u514D\u8C03\u5EA6\u51B2\u7A81(\u6307\u8FD0\u884C\u65F6\u95F4\u6709\u4EA4\u96C6) ",-1),Ft={class:"tw-flex tw-gap-2 tw-justify-end tw-mb-2"},Et={class:"row items-center justify-end"},It={class:"row items-center justify-end"},jt=re({props:{modelValue:{type:Boolean,default:!1},task:{type:Object,default:()=>({})}},emits:["update:modelValue","created"],setup(F,{emit:t}){const p=F,f=x({get:()=>p.modelValue,set:y=>{t("update:modelValue",y),l.value=""}}),k=x(()=>{const y=[{value:"",label:"\u968F\u673A"}],c=m.state.Project.projectClients.get(p.task.projectId);return c&&c.forEach((r,P,I)=>{const _=r.clientIP;y.push({value:_,label:_})}),y}),m=ee(),d=g({taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}),l=g("");function B(y){l.value=dt(y*60,"YYYY-MM-DD HH:mm")}X(()=>{ke(()=>{f.value&&(d.value=Object.assign({},{taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}))})});const $=g(!1);async function C(){const y=d.value;if(!y.remark){m.commit("error",{error:{message:"\u4EFB\u52A1\u8BF4\u660E\u5FC5\u586B"}});return}if(!y.command){m.commit("error",{error:{message:"\u6267\u884C\u547D\u4EE4\u5FC5\u586B"}});return}$.value=!0;try{const c=await Ze({projectId:y.projectId,taskId:y.taskId,command:y.command,noseize:y.noseize,scheduleTime:Date.parse(l.value)/1e3,remark:y.remark,timeout:y.timeout,host:y.host});c.code!==0?m.commit("error",{error:{message:c.message}}):(m.commit("success",{message:"\u521B\u5EFA\u6210\u529F"}),f.value=!1,t("created"))}catch{}$.value=!1}return(y,c)=>(w(),T(Fe,{modelValue:s(f),"onUpdate:modelValue":c[11]||(c[11]=r=>Xe(f)?f.value=r:null),persistent:""},{default:o(()=>[e(se,{class:"tw-w-96 q-pa-sm"},{default:o(()=>[e(Y,null,{default:o(()=>[yt,bt]),_:1}),e(Y,{style:{"max-height":"50vh"},class:"scroll"},{default:o(()=>[F.task?(w(),T(j,{key:"id","model-value":F.task.taskId,disable:"",label:"\u5173\u8054\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"remark",modelValue:d.value.remark,"onUpdate:modelValue":c[0]||(c[0]=r=>d.value.remark=r),type:"textarea",label:"\u4EFB\u52A1\u8BF4\u660E *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),D("div",Ft,[e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5206\u949F\u540E",onClick:c[1]||(c[1]=r=>B(1))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E94\u5206\u949F\u540E",onClick:c[2]||(c[2]=r=>B(5))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5C0F\u65F6\u540E",onClick:c[3]||(c[3]=r=>B(60))})]),e(j,{modelValue:l.value,"onUpdate:modelValue":c[6]||(c[6]=r=>l.value=r),filled:"",square:"",label:"\u8C03\u5EA6\u65F6\u95F4 *",class:"tw-mb-4"},{prepend:o(()=>[e(pe,{name:"event",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(Je,{modelValue:l.value,"onUpdate:modelValue":c[4]||(c[4]=r=>l.value=r),"text-color":"black",mask:"YYYY-MM-DD HH:mm"},{default:o(()=>[D("div",Et,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:o(()=>[e(pe,{name:"access_time",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(Ge,{modelValue:l.value,"onUpdate:modelValue":c[5]||(c[5]=r=>l.value=r),mask:"YYYY-MM-DD HH:mm","text-color":"black",format24h:""},{default:o(()=>[D("div",It,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(j,{key:"timeout",modelValue:d.value.timeout,"onUpdate:modelValue":c[7]||(c[7]=r=>d.value.timeout=r),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 * (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:d.value.command,"onUpdate:modelValue":c[8]||(c[8]=r=>d.value.command=r),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4 *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(Ue,{modelValue:d.value.host,"onUpdate:modelValue":c[9]||(c[9]=r=>d.value.host=r),"emit-value":"","map-options":"",autogrow:"",square:"",filled:"",label:"\u6267\u884C\u8282\u70B9",options:s(k),class:"tw-mb-4"},null,8,["modelValue","options"]),e(fe,{key:"noseize",modelValue:d.value.noseize,"onUpdate:modelValue":c[10]||(c[10]=r=>d.value.noseize=r),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"])]),_:1}),e(be,{align:"right",class:"tw-flex tw-gap-2 tw-flex-col-reverse lg:tw-flex-row tw-justify-center lg:tw-justify-end"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[ne,!0]]),e(V,{color:"primary","text-color":"black",label:"\u521B\u5EFA",class:"lg:tw-w-24 tw-w-full !tw-ml-0",loading:$.value,onClick:C},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var ze=Z(jt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogTemporaryTaskForm.vue"]]);const ht={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Ct={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},xt=h("\u7ED3\u675F\u8FDB\u7A0B"),Vt=h("\u7ACB\u5373\u6267\u884C"),_t=h("\u4E34\u65F6\u8C03\u5EA6 "),Dt=h(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),At=h("\u590D\u5236\u4EFB\u52A1 "),Bt=h(" \u4EE5\u5F53\u524D\u4EFB\u52A1\u5185\u5BB9\u4E3A\u57FA\u7840\u8FDB\u884C\u65B0\u4EFB\u52A1\u7684\u521B\u5EFA "),Tt={key:1,class:"tw-flex tw-pb-3 tw-flex-wrap tw-gap-2 text-h6"},$t={class:"q-pa-sm"},qt=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F;function p(){N.push({name:"temporary_tasks",params:{projectId:t.projectId}})}const f=x(()=>({id:"",name:"",projectId:t.projectId,command:"",cronExpr:"0 0 0 * * * *",remark:"",timeout:300,createTime:0,status:0,isRunning:-1,noseize:0,exclusion:0,clientIp:"",tmpId:""}));function k(i,n){return!i||!n?!1:i.projectId===n.projectId&&i.name===n.name&&i.cronExpr===n.cronExpr&&i.remark===n.remark&&i.timeout===n.timeout&&i.status===n.status&&i.noseize===n.noseize&&i.command===n.command}const m=ee(),d=Ee(),l=x(()=>{var i;return(i=m.state.Task.tasks.get(t.projectId))==null?void 0:i.find(n=>n.id===t.id||n.id===d.query.copyid)}),B=g();function $(i){B.value={command:i.command,createTime:i.createTime,projectId:i.projectId,scheduleTime:0,taskId:i.id,userId:0,userName:"",noseize:0,timeout:i.timeout,remark:"",host:"",isRunning:-1,tmpId:""}}l.value&&$(l.value);const C=x(()=>m.state.Project.projects.find(i=>i.id===t.projectId)),y=g([]);function c(i){const n=[];i==null||i.forEach((q,J,ge)=>{n.push({value:q.id,label:q.title})}),y.value=n}m.state.Project.projects&&m.state.Project.projects.length>0&&c(m.state.Project.projects),oe(()=>m.state.Project.projects,(i,n)=>{c(n)});const r=g(Object.assign({},l.value||f.value)),P=x(()=>d.name&&d.name.toString()==="create_crontab_task"),I=x(()=>d.query.copyid&&d.query.copyid!=="");P.value&&(r.value.id="",r.value.isRunning=-1),oe(()=>t.id,(i,n)=>{var q;(t.id!==((q=l.value)==null?void 0:q.id)||!P.value&&r.value.id===""||r.value.id!==l.value.id)&&(r.value=Object.assign({},l.value||f.value)),r.value.isRunning=-1,l.value&&$(l.value)});const _=x(()=>{var i;return((i=l.value)==null?void 0:i.isRunning)===1?!1:!k(l.value,r.value)}),M=x(()=>{const{name:i,command:n,timeout:q,cronExpr:J}=r.value;return i!==""&&n!==""&&q>0&&J!==""}),O=x(()=>{const{name:i,command:n,timeout:q,cronExpr:J}=r.value;return i===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":n===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":q<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":J===""?"\u8C03\u5EA6\u8BA1\u5212\u672A\u6307\u5B9A":""});async function b(i){await m.dispatch("Task/fetchTasks",{projectId:i})}const N=Ie(),Q=g(!1);async function a(){if(m.commit("cleanError"),!M.value){m.commit("error",{error:{message:O.value}});return}Q.value=!0,(P.value||I.value)&&(r.value.id="");try{const i=await m.dispatch("saveTask",{task:JSON.parse(JSON.stringify(r.value))});P.value&&(await b(r.value.projectId),N.push({name:"crontab_task",params:{projectId:r.value.projectId,taskId:i.id}}))}catch{}Q.value=!1}function u(){r.value=Object.assign({},l.value||f.value)}const v=g(!1),L=g(!1);async function de(i,n){m.commit("cleanError"),L.value=!0,console.log("delete loading",L.value);try{await m.dispatch("deleteTask",{projectId:i,taskId:n}),m.state.Root.currentError===void 0&&(await b(t.projectId),N.push({name:"crontab_tasks",params:{projectId:t.projectId}}),v.value=!1)}catch(q){console.error(q),m.commit("error",{error:q})}L.value=!1}const K=g(!1),W=g(!1);async function S(i,n){W.value=!1,K.value=!0;try{await et(m.getters.apiv1,i,n)}catch{K.value=!1}}X(()=>{m.watch(i=>[i.Root.eventTask],([i])=>{!i||i.projectId!==t.projectId||i.taskId!==t.id||le.isFinished(i.status)&&(K.value=!1)})});const ve=g(!1),ce=g(!1),Oe=async()=>{ce.value=!1,ve.value=!0;try{await Se({projectId:t.projectId,taskId:t.id}),await b(t.projectId),r.value.status=0}catch(i){console.error(i),m.commit("error",{error:i})}ve.value=!1},we=g(!1);function Me(){var i;N.push({name:"create_crontab_task",query:{copyid:(i=l.value)==null?void 0:i.id}})}return(i,n)=>{var q,J,ge,he,Ce;return w(),U("div",ht,[e(ze,{modelValue:we.value,"onUpdate:modelValue":n[0]||(n[0]=E=>we.value=E),task:B.value,onCreated:p},null,8,["modelValue","task"]),e(ue,{modelValue:v.value,"onUpdate:modelValue":n[1]||(n[1]=E=>v.value=E),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((q=s(l))==null?void 0:q.name)+"?",type:"warning",loading:L.value,onConfirm:n[2]||(n[2]=E=>s(C)&&s(l)&&de(s(C).id,s(l).id))},null,8,["modelValue","content","loading"]),e(ue,{modelValue:ce.value,"onUpdate:modelValue":n[3]||(n[3]=E=>ce.value=E),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F\u5F3A\u5236\u7ED3\u675F\u540E\u4EFB\u52A1\u7684\u542F\u7528\u72B6\u6001\u4F1A\u81EA\u52A8\u53D8\u66F4\u4E3A\u505C\u7528\u72B6\u6001\u3002",type:"warning",onConfirm:Oe},null,8,["modelValue"]),e(ue,{modelValue:W.value,"onUpdate:modelValue":n[4]||(n[4]=E=>W.value=E),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:n[5]||(n[5]=E=>s(l)&&S(F.projectId,s(l).id))},null,8,["modelValue"]),s(P)?A("v-if",!0):(w(),U("div",Ct,[e(V,{flat:"",dense:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:n[6]||(n[6]=E=>v.value=!0)}),((J=s(l))==null?void 0:J.isRunning)===1?(w(),T(V,{key:0,flat:"","text-color":"red",disable:((ge=s(l))==null?void 0:ge.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:ve.value,onClick:n[7]||(n[7]=E=>ce.value=!0)},{default:o(()=>[xt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{color:"primary","text-color":"black",disable:s(_)||((he=s(l))==null?void 0:he.isRunning)===1,class:"tw-w-24",loading:K.value||((Ce=s(l))==null?void 0:Ce.isRunning)===1,onClick:n[8]||(n[8]=E=>W.value=!0)},{default:o(()=>[Vt]),_:1},8,["disable","loading"]),e(V,{color:"warning","text-color":"black",class:"tw-w-24 tw-opacity-90",onClick:n[9]||(n[9]=E=>we.value=!0)},{default:o(()=>[_t,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Dt]),_:1})]),_:1}),e(V,{outline:"",class:"tw-w-24 tw-opacity-90",onClick:Me},{default:o(()=>[At,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Bt]),_:1})]),_:1})])),s(I)?(w(),U("div",Tt," \u590D\u5236\u4EFB\u52A1 ")):A("v-if",!0),e(je,{class:"tw-w-full",onSubmit:a,onReset:u},{default:o(()=>[s(l)&&!s(P)?(w(),T(j,{key:"id","model-value":s(l).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),s(P)?(w(),T(Ue,{key:1,modelValue:r.value.projectId,"onUpdate:modelValue":n[10]||(n[10]=E=>r.value.projectId=E),square:"",filled:"",class:"tw-w-full tw-mb-4","emit-value":"","map-options":"",label:"\u6240\u5C5E\u9879\u76EE",placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",options:y.value},null,8,["modelValue","options"])):(w(),T(j,{key:"project","model-value":s(C)?s(C).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])),e(j,{key:"name",modelValue:r.value.name,"onUpdate:modelValue":n[11]||(n[11]=E=>r.value.name=E),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron",modelValue:r.value.cronExpr,"onUpdate:modelValue":n[12]||(n[12]=E=>r.value.cronExpr=E),label:"\u8C03\u5EA6\u8BA1\u5212 (*\u79D2 *\u5206 *\u65F6 *\u65E5 *\u6708 *\u5468 *\u5E74)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:r.value.timeout,"onUpdate:modelValue":n[13]||(n[13]=E=>r.value.timeout=E),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:r.value.command,"onUpdate:modelValue":n[14]||(n[14]=E=>r.value.command=E),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:r.value.remark,"onUpdate:modelValue":n[15]||(n[15]=E=>r.value.remark=E),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:r.value.noseize,"onUpdate:modelValue":n[16]||(n[16]=E=>r.value.noseize=E),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"status",modelValue:r.value.status,"onUpdate:modelValue":n[17]||(n[17]=E=>r.value.status=E),"false-value":0,"true-value":1,label:"\u662F\u5426\u542F\u7528",class:"tw-mb-4"},null,8,["modelValue"]),D("div",$t,[e(V,{color:"primary","text-color":"black",type:"submit",label:s(I)?"\u786E\u8BA4\u590D\u5236":"\u4FDD\u5B58",disable:!s(_),loading:Q.value,class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["label","disable","loading"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(_),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1})])}}});var Ut=Z(qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskDetail.vue"]]);const St=h("\u8282\u70B9 IP"),Rt=h("\u5F00\u59CB\u65F6\u95F4"),Pt=h("\u7ED3\u675F\u65F6\u95F4"),Qt=re({props:{id:{type:String,required:!0},projectId:{type:Number,required:!0}},emits:["onpage"],setup(F,{emit:t}){const p=F,f=ee(),k=x(()=>f.state.Root.taskLogs),m=x(()=>f.state.Root.taskLogsTotal),d=x(()=>f.state.Root.loadingTaskLogs),l=g({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),B=g();X(()=>{Re(()=>{var C;(C=B.value)==null||C.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});function $({pagination:{page:C,rowsPerPage:y}}){const c=l.value;c.page=C,c.rowsPerPage=y,t("onpage")}return ke(()=>{const C=l.value;C.rowsNumber=m.value}),X(async()=>{ke(async()=>{const C=l.value;await f.dispatch("fetchTaskLogs",{projectId:p.projectId,taskId:p.id,page:C.page,pageSize:C.rowsPerPage})})}),(C,y)=>(w(),T(s(lt),{ref_key:"logTable",ref:B,pagination:l.value,"onUpdate:pagination":y[0]||(y[0]=c=>l.value=c),class:"tw-w-full tw-h-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],rows:s(k),loading:s(d),"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:$},{loading:o(()=>[e(tt,{showing:"",color:"primary"})]),body:o(c=>[e(se,{class:"tw-my-4 tw-x-full",flat:"",bordered:""},{default:o(()=>[e(Pe,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[St]),_:1}),e(z,null,{default:o(()=>[h(R(c.row.clientIp),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Rt]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(c.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Pt]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(c.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),e(ye),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Ne,{json:c.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var Nt=Z(Qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskLogs.vue"]]);const zt=h("\u8282\u70B9 IP"),Ot=h("\u5F00\u59CB\u65F6\u95F4"),Mt=h("\u7ED3\u675F\u65F6\u95F4"),Lt={key:1,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Yt={key:2,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Ht=h("\u5220\u9664\u4EFB\u52A1"),Kt=h("\u7ED3\u675F\u8FDB\u7A0B"),Wt=h("\u590D\u5236\u4EFB\u52A1"),Jt={key:3},Gt=re({props:{id:{type:Number,default:0,required:!0},projectId:{type:Number,required:!0}},setup(F){const t=F,p=g(!1),f=g();function k(a){f.value={taskId:a.taskId,projectId:a.projectId,remark:a.remark,command:a.command,timeout:a.timeout,host:a.host,createTime:0,isRunning:0,noseize:0,tmpId:"",scheduleTime:0,userId:0,userName:""}}const m=g(),d=ee(),l=g();function B(){var a;l.value=(a=d.state.Task.temporaryTasks.get(t.projectId))==null?void 0:a.find(u=>u.id===Number(t.id))}oe(()=>t.id,(a,u)=>{console.log("watched",a,u),B()}),oe(l,(a,u)=>{console.log("watched task",a,u),(!m.value||(a==null?void 0:a.tmpId)!==(u==null?void 0:u.tmpId))&&Q()});function $(){l.value?(k(l.value),p.value=!0):console.error("failed to copy task, the task is not found")}const C=x(()=>d.state.Project.projects.find(a=>a.id===t.projectId));async function y(){try{await d.dispatch("Task/fetchTemporaryTasks",{projectId:t.projectId})}catch(a){console.error("failed to dispatch fetchTemporaryTasks",a)}}X(()=>{d.watch(a=>[a.Root.eventTask],async([a])=>{var u;!a||a.projectId!==t.projectId||a.tmpId!==((u=l.value)==null?void 0:u.tmpId)||!m.value&&le.isFinished(a.status)&&Q()}),B()});const c=g(!1),r=g(!1),P=async()=>{if(!!l.value){r.value=!1,c.value=!0;try{await Se({projectId:t.projectId,taskId:l.value.taskId}),await y()}catch(a){console.log(a)}c.value=!1}},I=g(!1),_=g(!1),M=Ie(),O=async()=>{_.value=!1,I.value=!0;try{await at(Number(t.id)),await y(),M.back()}catch(a){console.log(a)}I.value=!1},b=g(!0);function N(a=500){let u=!1,v=!1;return b.value=!0,setTimeout(()=>{v=!0,u&&(b.value=!1)},a),()=>{u=!0,v&&(b.value=!1)}}async function Q(){if(!l.value)return;const a=N(500);m.value=null;try{m.value=await ct({taskId:l.value.taskId,projectId:l.value.projectId,tmpId:l.value.tmpId})}catch(u){console.error(u)}a()}return(a,u)=>{var v,L,de,K,W;return w(),U(te,null,[e(ze,{modelValue:p.value,"onUpdate:modelValue":u[0]||(u[0]=S=>p.value=S),task:f.value,onCreated:y},null,8,["modelValue","task"]),e(ue,{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=S=>r.value=S),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F",type:"warning",onConfirm:P},null,8,["modelValue"]),e(ue,{modelValue:_.value,"onUpdate:modelValue":u[2]||(u[2]=S=>_.value=S),content:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u4E34\u65F6\u4EFB\u52A1\u5417\uFF1F",type:"warning",onConfirm:O},null,8,["modelValue"]),G(e(H,{type:"QInput",class:"tw-h-52 tw-mb-4",animation:"fade"},null,512),[[Qe,b.value]]),!b.value&&m.value?(w(),T(se,{key:0,class:"tw-mb-4",flat:"",bordered:""},{default:o(()=>[e(Pe,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[zt]),_:1}),e(z,null,{default:o(()=>[h(R(m.value.clientIp),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Ot]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(m.value.startTime*1e3)),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Mt]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(m.value.endTime*1e3)),1)]),_:1})]),_:1})]),_:1}),e(ye),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Ne,{json:m.value.result},null,8,["json"])]),_:1})]),_:1})):A("v-if",!0),b.value?(w(),U("div",Lt,[e(H,{type:"QBtn",animation:"fade"})])):A("v-if",!0),b.value?A("v-if",!0):(w(),U("div",Yt,[(v=l.value)!=null&&v.isRunning?(w(),T(V,{key:0,loading:!0})):A("v-if",!0),((L=l.value)==null?void 0:L.isRunning)!==1&&!((de=m.value)!=null&&de.result)?(w(),T(V,{key:1,"text-color":"red",outline:"",class:"tw-w-24 tw-ml-1",loading:I.value,onClick:u[3]||(u[3]=S=>_.value=!0)},{default:o(()=>[Ht]),_:1},8,["loading"])):A("v-if",!0),((K=l.value)==null?void 0:K.isRunning)===1?(w(),T(V,{key:2,outline:"","text-color":"red",disable:((W=l.value)==null?void 0:W.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:c.value,onClick:u[4]||(u[4]=S=>r.value=!0)},{default:o(()=>[Kt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{outline:"",class:"tw-w-24 tw-ml-1",onClick:$},{default:o(()=>[Wt]),_:1})])),b.value?(w(),U("div",Jt,[e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"})])):A("v-if",!0),!b.value&&l.value?(w(),T(je,{key:4,class:"tw-w-full"},{default:o(()=>[l.value?(w(),T(j,{key:"id","model-value":l.value.taskId+" - "+l.value.tmpId,disable:"",label:"\u4EFB\u52A1 ID\uFF08task_id - tmp_id\uFF09",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(C)?s(C).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"remark",modelValue:l.value.remark,"onUpdate:modelValue":u[5]||(u[5]=S=>l.value.remark=S),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron","model-value":s(ie)(l.value.scheduleTime*1e3,"YYYY-MM-DD HH:mm"),label:"\u8C03\u5EA6\u65F6\u95F4",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"timeout",modelValue:l.value.timeout,"onUpdate:modelValue":u[6]||(u[6]=S=>l.value.timeout=S),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:l.value.command,"onUpdate:modelValue":u[7]||(u[7]=S=>l.value.command=S),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout","model-value":l.value.host||"\u968F\u673A",label:"\u6307\u5B9A\u6267\u884C\u8282\u70B9",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"noseize","model-value":l.value.noseize===1?"\u662F":"\u5426",type:"textarea",label:"\u5E76\u884C\u8C03\u5EA6",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])]),_:1})):A("v-if",!0)],64)}}});var Xt=Z(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskDetail.vue"]]);const Zt={class:"q-ml-sm"},el={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-1"},tl=h(" \u6267\u884C "),ll={class:"q-pa-sm"},al=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F,p=x(()=>({id:"",name:"",projectId:t.projectId,command:"",remark:"",timeout:300,createTime:0,noseize:0})),f=ee(),k=x(()=>{var a;return(a=f.state.WorkFlowTask.tasks.get(t.projectId))==null?void 0:a.find(u=>u.id===t.id)}),m=x(()=>f.state.Project.projects.find(a=>a.id===t.projectId)),d=g(Object.assign({},k.value||p.value));oe(()=>t.id,(a,u)=>{var v;(t.id!==((v=k.value)==null?void 0:v.id)||!O.value&&d.value.id===""||d.value.id!==k.value.id)&&(d.value=Object.assign({},k.value||p.value))});const l=g(!0);oe(k,()=>{l.value&&(l.value=!1,d.value=Object.assign({},k.value||p.value))});const B=x(()=>JSON.stringify(k.value)!==JSON.stringify(d.value)),$=x(()=>{const{name:a,command:u,timeout:v}=d.value;return a!==""&&u!==""&&v>0}),C=x(()=>{const{name:a,command:u,timeout:v}=d.value;return a===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":u===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":v<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":""}),y=Ie(),c=g(!1);async function r(){c.value=!0;try{if(f.commit("cleanError"),!$.value){f.commit("error",{error:{message:C.value}});return}if(await f.dispatch("saveWorkFlowTask",{task:d.value}),l.value=!0,await f.dispatch("WorkFlowTask/fetchTasks",{projectId:t.projectId}),O.value){const a=Object.assign([],f.state.WorkFlowTask.tasks.get(t.projectId)||[]);a.sort((v,L)=>v.createTime-L.createTime);const u=a[a.length-1];y.push({name:"workflow_task",params:{projectId:t.projectId,taskId:u.id}})}}catch(a){console.error(a),f.commit("error",{error:a})}c.value=!1}function P(){d.value=Object.assign({},k.value||p.value)}const I=g(!1);async function _(a,u){f.commit("cleanError"),await f.dispatch("deleteWorkFlowTask",{projectId:a,taskId:u}),f.state.Root.currentError===void 0&&(f.dispatch("WorkFlowTask/fetchTasks",_e({},t)),y.push({name:"workflow_tasks"}),I.value=!1)}const M=Ee(),O=x(()=>M.name&&M.name.toString()==="create_workflow_task"),b=g(!1),N=g(!1);async function Q(a,u){N.value=!1,b.value=!0;try{await ot(f.getters.apiv1,a,u)}catch(v){b.value=!0,console.error(v)}}return X(()=>{f.watch(a=>[a.Root.eventWorkFlowTask],([a])=>{var u;console.log(a),!(!a||a.projectId!==t.projectId||a.taskId!==t.id)&&(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?b.value=!0:le.isFinished(a.status)&&(b.value=!1))}),f.watch(a=>[a.Root.eventTask],([a])=>{var u;!a||a.projectId!==t.projectId||a.taskId!==t.id||(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?b.value=!0:le.isFinished(a.status)&&(b.value=!1))})}),(a,u)=>(w(),U(te,null,[e(Fe,{modelValue:I.value,"onUpdate:modelValue":u[1]||(u[1]=v=>I.value=v)},{default:o(()=>[e(se,null,{default:o(()=>[e(Y,{class:"row items-center"},{default:o(()=>{var v;return[e(ut,{icon:"delete",color:"primary","text-color":"white"}),D("span",Zt," \u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1 "+R((v=s(k))==null?void 0:v.name),1)]}),_:1}),e(be,{align:"right"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",color:"primary"},null,512),[[ne,!0]]),e(V,{flat:"",label:"\u5220\u9664",color:"red",onClick:u[0]||(u[0]=()=>s(m)&&s(k)&&_(s(m).id,s(k).id))})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(O)?A("v-if",!0):(w(),U("div",el,[e(V,{flat:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:u[2]||(u[2]=v=>I.value=!0)}),e(V,{color:"primary","text-color":"black",disable:s(B),class:"tw-w-24",loading:b.value,onClick:u[3]||(u[3]=()=>N.value=!0)},{default:o(()=>[tl]),_:1},8,["disable","loading"])])),e(je,{class:"tw-w-full",onSubmit:r,onReset:P},{default:o(()=>[s(k)?(w(),T(j,{key:"id","model-value":s(k).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(m)?s(m).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"name",modelValue:d.value.name,"onUpdate:modelValue":u[4]||(u[4]=v=>d.value.name=v),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:d.value.timeout,"onUpdate:modelValue":u[5]||(u[5]=v=>d.value.timeout=v),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:d.value.command,"onUpdate:modelValue":u[6]||(u[6]=v=>d.value.command=v),type:"textarea",placeholder:'echo "hello word"',label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:d.value.remark,"onUpdate:modelValue":u[7]||(u[7]=v=>d.value.remark=v),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:d.value.noseize,"onUpdate:modelValue":u[8]||(u[8]=v=>d.value.noseize=v),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),D("div",ll,[e(V,{color:"primary","text-color":"black",type:"submit",label:"\u4FDD\u5B58",loading:c.value,disable:!s(B),class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["loading","disable"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(B),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1}),e(ue,{modelValue:N.value,"onUpdate:modelValue":u[9]||(u[9]=v=>N.value=v),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:u[10]||(u[10]=v=>s(k)&&Q(F.projectId,s(k).id))},null,8,["modelValue"])],64))}});var ul=Z(al,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskDetail.vue"]]);const ol={class:"tw-px-4 tw-pt-2 tw-w-full tw-h-full tw-flex tw-flex-col"},sl={class:"tw-text-[#7e7e7e] tw-mb-4"},rl={class:"tw-flex tw-items-center tw-justify-start tw-gap-4 tw-text-lg tw-mb-4"},nl={key:0,class:"tw-pb-4"},il={class:"tw-flex tw-gap-2 tw-items-center"},dl=h(" \u5728\u7EBF\u8282\u70B9: "),cl={class:"tw-flex tw-w-full tw-grow"},ml={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},pl={key:0,class:"tw-hidden lg:tw-block"},fl=D("div",{class:"text-h6"},"\u8282\u70B9\u5217\u8868",-1),vl=D("div",{class:"text-base"},"\u4EC5 v2.4.6 \u53CA\u4EE5\u4E0A\u7248\u672C\u652F\u6301\u6743\u91CD\u53D8\u66F4",-1),wl={class:"tw-text-lg"},gl=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0},type:{type:String,default:"crontab"}},setup(F){const t=F,p=g(!1);function f(){p.value=!0}const k=ee(),m=x(()=>k.state.Project.projects.find(I=>I.id===t.projectId)),d=Ee(),l=g(),B=()=>{Re(()=>{var I;(I=l.value)==null||I.setScrollPosition("vertical",0)})},$=x(()=>d.name&&d.name.toString()===`create_${t.type}_task`),C=x(()=>{var I;if($.value)return"detail";if(d.name){const _=d.name.toString();if(_===`${t.type}_task_logs`)return"logs";if(_===`${t.type}_task`)return"detail"}throw new Error(`Unknown route name ${(I=d.name)==null?void 0:I.toString()}`)}),{width:y}=it();async function c(){await k.dispatch("Project/fetchProjectClients",{projectId:t.projectId})}X(()=>{c()}),st(()=>{k.commit("Project/setProjectClients",{clients:[]})});const r=x(()=>k.state.Project.projectClients.get(t.projectId)),P=x(()=>{const I=new Map;return r.value&&r.value.forEach((_,M,O)=>{let b=I.get(_.region);b||(I.set(_.region,[]),b=I.get(_.region)),b==null||b.push(_)}),I});return(I,_)=>{var M,O;return w(),U(te,null,[D("div",ol,[D("div",sl,[D("div",rl,[D("span",null,[e(pe,{name:"folder"}),h(" "+R((M=s(m))==null?void 0:M.title),1)]),D("span",null," ID: "+R(F.projectId),1)]),s(m)&&s(m).remark.trim()!==""?(w(),U("div",nl,R(s(m).remark),1)):A("v-if",!0),D("div",il,[e(pe,{name:"hive"}),dl,D("span",{class:rt(["tw-font-extrabold",{"tw-text-primary":s(r)&&s(r).length>0,"tw-text-red-500":!s(r)||s(r).length===0}])},R(((O=s(r))==null?void 0:O.length)||0),3),G(D("span",{class:"tw-text-white tw-cursor-pointer",onClick:f},"\u67E5\u770B\u8282\u70B9",512),[[Qe,s(r)&&s(r).length>0]])])]),s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(C),"active-color":"primary",align:"left",class:"lg:tw-hidden tw-display"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"])),D("div",cl,[D("div",ml,[e(s(Te),{ref_key:"scroll",ref:l,class:"tw-grow","thumb-style":s(mt),"bar-style":s(pt)},{default:o(()=>[e(nt,{"model-value":s(C),animated:"",vertical:s(y)>=1024,class:"tw-w-full tw-h-full tw-bg-[#121212] tw-p-0 lg:tw-pr-4"},{default:o(()=>[e($e,{name:"detail",class:"tw-px-0"},{default:o(()=>[t.type==="crontab"?(w(),T(Ut,{key:0,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):t.type==="workflow"?(w(),T(ul,{key:1,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0),t.type==="temporary"?(w(),T(Xt,{key:2,id:Number(t.id),"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0)]),_:1}),e($e,{name:"logs",class:"tw-px-0"},{default:o(()=>[e(Nt,{id:t.id,"project-id":t.projectId,onOnpage:B},null,8,["id","project-id"])]),_:1})]),_:1},8,["model-value","vertical"])]),_:1},8,["thumb-style","bar-style"])]),t.type!="temporary"?(w(),U("div",pl,[s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(C),"active-color":"primary",vertical:"","switch-indicator":"",align:"left"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"]))])):A("v-if",!0)])]),e(Fe,{modelValue:p.value,"onUpdate:modelValue":_[0]||(_[0]=b=>p.value=b)},{default:o(()=>[e(se,{class:"tw-w-full"},{default:o(()=>[e(Y,null,{default:o(()=>[fl,vl]),_:1}),e(s(Te),{style:{height:"50vh"}},{default:o(()=>[(w(!0),U(te,null,qe(s(P),([b,N])=>(w(),U(te,{key:b},[e(Y,null,{default:o(()=>[D("div",wl,"Region: "+R(b),1)]),_:2},1024),e(Y,{class:"tw-q-pt-none scroll tw-flex tw-items-center tw-justify-center tw-align-middle tw-gap-2 tw-flex-wrap",style:{"max-height":"60vh"}},{default:o(()=>[(w(!0),U(te,null,qe(N,Q=>(w(),U("div",{key:Q.clientIP,class:"md:tw-w-[48%] tw-w-full"},[e(kt,{"client-ip":Q.clientIP,weight:Q.weight,"project-id":F.projectId,version:Q.version,region:Q.region},null,8,["client-ip","weight","project-id","version","region"])]))),128))]),_:2},1024)],64))),128))]),_:1}),e(be,{align:"right",class:"text-teal"},{default:o(()=>[G(e(V,{flat:"",label:"OK"},null,512),[[ne,!0]])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}}});var xl=Z(gl,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskDetail.vue"]]);export{xl as default}; diff --git a/dist/assets/TaskList.7fccd2e3.js b/dist/assets/TaskList.51a57257.js similarity index 99% rename from dist/assets/TaskList.7fccd2e3.js rename to dist/assets/TaskList.51a57257.js index 4a1c96b..4c26296 100644 --- a/dist/assets/TaskList.7fccd2e3.js +++ b/dist/assets/TaskList.51a57257.js @@ -1 +1 @@ -var ut=Object.defineProperty;var st=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var at=(v,o,e)=>o in v?ut(v,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):v[o]=e,z=(v,o)=>{for(var e in o||(o={}))it.call(o,e)&&at(v,e,o[e]);if(st)for(var e of st(o))ct.call(o,e)&&at(v,e,o[e]);return v};import{_ as D,k as Q,u as H,l as E,H as N,m as J,n as M,r as $,J as ot,ag as U,o as b,K as j,a as t,A as s,b as l,w as n,q as I,f as Y,h as B,al as G,Y as q,a8 as X,c as L,a2 as S,d as x,t as g,aj as lt,ay as rt,p as A,a4 as Z,a3 as dt,a6 as wt,a5 as O,L as W,a7 as P}from"./index.d76e71bf.js";import{C as nt}from"./Confirm.47315734.js";import{T as K}from"./task.f3ffd066.js";import{f as R}from"./datetime.561112b0.js";import{t as tt,b as et}from"./thumbStyle.856de4cb.js";const pt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},mt={class:"q-pa-md tw-flex tw-justify-around"},ft={class:"tw-w-full tw-grow"},_t={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},vt={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},kt={class:"task__remark"},ht={class:"task__bottom-box"},bt={class:"task__bottom-time"},gt={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},xt=x(" \u6682\u65E0\u6570\u636E "),yt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.Task.loadingTasks),k=N();J(()=>{M(async()=>{e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),c.value="",await _(),k.params.taskId&&h(k.params.taskId)}),e.watch(u=>[u.Root.eventTask],([u])=>{if(!u||u.projectId!==o.projectId)return;const a=m.value.find(T=>T.id===u.taskId);a!==void 0&&(e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${a.name} \u5F53\u524D\u72B6\u6001: ${u.status}`}),e.commit("Task/updateTaskStatus",{projectId:a.projectId,taskId:a.id,isRunning:K.isRunning(u.status)}))})});async function _(){await e.dispatch("Task/fetchTasks",z({},o))}const c=$(""),m=E(()=>{var u;return((u=e.state.Task.tasks.get(o.projectId))==null?void 0:u.filter(a=>a.name.indexOf(c.value)>=0||a.id.toString().indexOf(c.value)>=0))||[]}),r=$();function h(u){const a=r.value;if(!a||!m.value)return;const T=m.value.findIndex(C=>C.id===u);setTimeout(()=>{if(T<0)a.setScrollPercentage("vertical",0);else{const C=1*T/m.value.length*a.getScroll().verticalSize-150;a.setScrollPosition("vertical",C)}},100)}function y(u){return k.params.taskId===u.id}const i=E(()=>m.value.filter(y).pop()),V=ot();V.beforeEach((u,a,T)=>{!a.params.taskId&&u.params.taskId&&h(u.params.taskId),T()});const w=$(!1),d=$(!1);async function F(u,a){try{d.value=!0,e.commit("cleanError"),await e.dispatch("deleteTask",{projectId:u,taskId:a}),e.state.Root.currentError===void 0&&(V.push({name:"crontab_tasks",params:{projectId:u}}),w.value=!1,await _())}catch(T){console.error(T),e.commit("error",{error:T})}d.value=!1}return(u,a)=>{var C;const T=U("router-link");return b(),j("div",pt,[t(nt,{modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=f=>w.value=f),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((C=s(i))==null?void 0:C.name)+"?",type:"warning",loading:d.value,onConfirm:a[1]||(a[1]=f=>s(i)&&F(s(i).projectId,s(i).id))},null,8,["modelValue","content","loading"]),l("div",mt,[t(Y,{modelValue:c.value,"onUpdate:modelValue":a[2]||(a[2]=f=>c.value=f),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:_},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_crontab_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(i),onClick:a[3]||(a[3]=f=>w.value=!0)},null,8,["disable"])]),l("div",ft,[t(s(Z),{ref_key:"scrollArea",ref:r,class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4 tw-overflow-hidden tw-relative"},{default:n(()=>[(b(!0),j(q,null,X(s(m),f=>(b(),L(T,{key:f.id,to:{name:"crontab_task",params:{taskId:f.id}}},{default:n(()=>[l("div",{class:S((y(f)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",_t,[l("div",vt,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(f.cronExpr),1)]),t(lt),t(rt,{outline:"",color:f.status===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(f.isRunning==1?"\u6267\u884C\u4E2D":f.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),A(`
`)]),l("div",{class:S((y(f)?"active ":"")+"task__title tw-flex-col tw-items-center tw-w-full")},[t(I,{name:"numbers"}),x(" "+g(f.name),1)],2),l("div",kt,g(f.remark||"-"),1),l("div",ht,[l("div",bt,g(s(R)(f.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(m)||s(m).length===0)?(b(),j("div",gt,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),xt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Tt=D(yt,[["__scopeId","data-v-189e9673"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskList.vue"]]);const It={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Et={class:"q-pa-md tw-flex tw-justify-around"},jt={class:"tw-w-full tw-grow"},Ft={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},$t={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},St={class:"task__remark"},Bt={class:"task__bottom-box"},Ct={class:"task__bottom-time"},At={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Vt=x(" \u6682\u65E0\u6570\u636E "),Lt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=$(""),p=H(),k=E(()=>p.state.Task.loadingTasks);J(async()=>{M(async()=>{await _(),p.dispatch("subscribeTopic",["/task/status/project/"+o.projectId])}),p.state.Task.temporaryTasks||await _(),p.watch(r=>[r.Root.eventTask],async([r])=>{if(!r||r.projectId!==o.projectId)return;const h=c.value.find(y=>y.tmpId===r.tmpId);!h||(p.commit("notifySuccess",{message:`\u4EFB\u52A1 ${h.remark} \u5F53\u524D\u72B6\u6001: ${r.status}`}),p.commit("Task/updateTemporaryTaskStatus",{projectId:o.projectId,tmpId:r.tmpId,isRunning:K.isRunning(r.status),finished:K.isFinished(r.status)}))})});async function _(){try{await p.dispatch("Task/fetchTemporaryTasks",{projectId:o.projectId})}catch(r){console.error("failed to dispatch fetchTemporaryTasks",r)}}const c=E(()=>{var r;return((r=p.state.Task.temporaryTasks.get(o.projectId))==null?void 0:r.filter(h=>h.taskId.toString().indexOf(e.value)>=0))||[]});function m(r){const h=N();return Number(h.params.taskId)===r.id}return(r,h)=>{const y=U("router-link");return b(),j("div",It,[l("div",Et,[t(Y,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=i=>e.value=i),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(k),icon:"refresh",onClick:_},null,8,["loading"])]),l("div",jt,[t(Z,{class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[s(c)?(b(),L(G,{key:0,class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),i=>(b(),L(y,{key:i.id,to:{name:"temporary_task",params:{taskId:i.id}}},{default:n(()=>[l("div",{class:S((m(i)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",Ft,[l("div",$t,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(s(R)(i.scheduleTime*1e3)),1)]),t(lt),t(rt,{outline:"",color:i.scheduleStatus===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(i.isRunning==1?"\u6267\u884C\u4E2D":i.scheduleStatus==1?"\u7B49\u5F85\u4E2D":"\u5DF2\u5904\u7406"),1)]),_:2},1032,["color"]),A(`
`)]),l("div",{class:S((m(i)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(i.remark),1)],2),l("div",St,"\u521B\u5EFA\u4EBA\uFF1A"+g(i.userName||"-"),1),l("div",Bt,[l("div",Ct,g(s(R)(i.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1})):A("v-if",!0),!s(k)&&(!s(c)||s(c).length===0)?(b(),j("div",At,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Vt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Rt=D(Lt,[["__scopeId","data-v-38f53198"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskList.vue"]]);const Dt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Qt={class:"q-pa-md tw-flex tw-justify-around"},Nt={class:"tw-w-full tw-grow"},Ut={class:"task__remark"},qt={class:"task__bottom-box"},zt={class:"task__bottom-time"},Ot={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Wt=x(" \u6682\u65E0\u6570\u636E "),Pt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.WorkFlowTask.loadingTasks);J(()=>{M(async()=>{await k()}),e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),e.watch(w=>[w.Root.eventWorkFlowTask],([w])=>{if(!w||w.projectId!==o.projectId)return;const d=c.value.find(F=>F.id===w.taskId);d!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${d.name} \u5F53\u524D\u72B6\u6001: ${w.status}`}),k()})});async function k(){await e.dispatch("WorkFlowTask/fetchTasks",z({},o))}const _=$(""),c=E(()=>{var w;return((w=e.state.WorkFlowTask.tasks.get(o.projectId))==null?void 0:w.filter(d=>d.name.indexOf(_.value)>=0||d.id.toString().indexOf(_.value)>=0))||[]});function m(w){return N().params.taskId===w.id}const r=E(()=>c.value.filter(m).pop()),h=ot(),y=$(!1),i=$(!1);async function V(w,d){i.value=!0;try{e.commit("cleanError"),await e.dispatch("deleteWorkFlowTask",{projectId:w,taskId:d}),e.state.Root.currentError===void 0&&(h.push({name:"workflow_tasks",params:{projectId:w}}),y.value=!1,await k())}catch(F){console.error(F),e.commit("error",{error:F})}i.value=!1}return(w,d)=>{var u;const F=U("router-link");return b(),j("div",Dt,[t(nt,{modelValue:y.value,"onUpdate:modelValue":d[0]||(d[0]=a=>y.value=a),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((u=s(r))==null?void 0:u.name)+"?",type:"warning",loading:i.value,onConfirm:d[1]||(d[1]=a=>s(r)&&V(s(r).projectId,s(r).id))},null,8,["modelValue","content","loading"]),l("div",Qt,[t(Y,{modelValue:_.value,"onUpdate:modelValue":d[2]||(d[2]=a=>_.value=a),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:k},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_workflow_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(r),onClick:d[3]||(d[3]=a=>y.value=!0)},null,8,["disable"])]),l("div",Nt,[t(Z,{class:"tw-h-full tw-w-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),a=>(b(),L(F,{key:a.id,to:{name:"workflow_task",params:{taskId:a.id}}},{default:n(()=>[l("div",{class:S((m(a)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-py-3 tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",{class:S((m(a)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(a.name),1)],2),l("div",Ut,g(a.remark||"-"),1),l("div",qt,[l("div",zt,g(s(R)(a.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(c)||s(c).length===0)?(b(),j("div",Ot,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Wt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Kt=D(Pt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskList.vue"]]);const Ht={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Jt=x(" \u65E5\u5E38\u5468\u671F\u6027\u5B9A\u65F6\u6267\u884C\u7684\u4EFB\u52A1 "),Mt=x(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),Yt=x(" \u7528\u4E8E\u4EFB\u52A1\u7F16\u6392\u7684\u5B50\u4EFB\u52A1 "),Gt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=N(),p=E(()=>e.name&&!["crontab_tasks","workflow_tasks","temporary_tasks"].includes(e.name.toString())),k=E(()=>{var _;if(e.name){const c=e.name.toString();if(c.search("crontab")>=0)return"normal";if(c.search("workflow")>=0)return"workflow";if(c.search("temporary")>=0)return"temporary"}throw new Error(`Unknown route name ${(_=e.name)==null?void 0:_.toString()}`)});return(_,c)=>{const m=U("router-view");return b(),j(q,null,[l("div",{class:S("xl:tw-basis-1/5 tw-basis-1/4 tw-w-full tw-h-full tw-bg-[#1E1E1E] tw-min-w-[280px]"+(s(p)?" tw-hidden lg:tw-block":""))},[l("div",Ht,[t(dt,{"model-value":s(k),"active-color":"primary"},{default:n(()=>[t(O,{name:"crontab",label:"\u666E\u901A",to:{name:"crontab_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Jt]),_:1})]),_:1},8,["to"]),t(O,{name:"temporary",label:"\u4E34\u65F6",to:{name:"temporary_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Mt]),_:1})]),_:1},8,["to"]),t(O,{name:"workflow",label:"\u4EFB\u52A1\u6D41",to:{name:"workflow_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Yt]),_:1})]),_:1},8,["to"])]),_:1},8,["model-value"]),t(wt,{"model-value":s(k),animated:"",class:"tw-w-full tw-grow"},{default:n(()=>[t(P,{name:"normal",class:"tw-p-0"},{default:n(()=>[t(Tt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"temporary",class:"tw-p-0"},{default:n(()=>[t(Rt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"workflow",class:"tw-p-0"},{default:n(()=>[t(Kt,{"project-id":o.projectId},null,8,["project-id"])]),_:1})]),_:1},8,["model-value"])])],2),l("div",{class:S("xl:tw-basis-3/5 tw-basis-1/2 tw-h-full tw-w-full"+(s(p)?"":" tw-hidden lg:tw-block"))},[t(m)],2)],64)}}});var oe=D(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskList.vue"]]);export{oe as default}; +var ut=Object.defineProperty;var st=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var at=(v,o,e)=>o in v?ut(v,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):v[o]=e,z=(v,o)=>{for(var e in o||(o={}))it.call(o,e)&&at(v,e,o[e]);if(st)for(var e of st(o))ct.call(o,e)&&at(v,e,o[e]);return v};import{_ as D,k as Q,u as H,l as E,H as N,m as J,n as M,r as $,J as ot,ag as U,o as b,K as j,a as t,A as s,b as l,w as n,q as I,f as Y,h as B,al as G,Y as q,a8 as X,c as L,a2 as S,d as x,t as g,aj as lt,ay as rt,p as A,a4 as Z,a3 as dt,a6 as wt,a5 as O,L as W,a7 as P}from"./index.f89dd3dd.js";import{C as nt}from"./Confirm.4116c3bd.js";import{T as K}from"./task.f3ffd066.js";import{f as R}from"./datetime.561112b0.js";import{t as tt,b as et}from"./thumbStyle.856de4cb.js";const pt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},mt={class:"q-pa-md tw-flex tw-justify-around"},ft={class:"tw-w-full tw-grow"},_t={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},vt={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},kt={class:"task__remark"},ht={class:"task__bottom-box"},bt={class:"task__bottom-time"},gt={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},xt=x(" \u6682\u65E0\u6570\u636E "),yt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.Task.loadingTasks),k=N();J(()=>{M(async()=>{e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),c.value="",await _(),k.params.taskId&&h(k.params.taskId)}),e.watch(u=>[u.Root.eventTask],([u])=>{if(!u||u.projectId!==o.projectId)return;const a=m.value.find(T=>T.id===u.taskId);a!==void 0&&(e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${a.name} \u5F53\u524D\u72B6\u6001: ${u.status}`}),e.commit("Task/updateTaskStatus",{projectId:a.projectId,taskId:a.id,isRunning:K.isRunning(u.status)}))})});async function _(){await e.dispatch("Task/fetchTasks",z({},o))}const c=$(""),m=E(()=>{var u;return((u=e.state.Task.tasks.get(o.projectId))==null?void 0:u.filter(a=>a.name.indexOf(c.value)>=0||a.id.toString().indexOf(c.value)>=0))||[]}),r=$();function h(u){const a=r.value;if(!a||!m.value)return;const T=m.value.findIndex(C=>C.id===u);setTimeout(()=>{if(T<0)a.setScrollPercentage("vertical",0);else{const C=1*T/m.value.length*a.getScroll().verticalSize-150;a.setScrollPosition("vertical",C)}},100)}function y(u){return k.params.taskId===u.id}const i=E(()=>m.value.filter(y).pop()),V=ot();V.beforeEach((u,a,T)=>{!a.params.taskId&&u.params.taskId&&h(u.params.taskId),T()});const w=$(!1),d=$(!1);async function F(u,a){try{d.value=!0,e.commit("cleanError"),await e.dispatch("deleteTask",{projectId:u,taskId:a}),e.state.Root.currentError===void 0&&(V.push({name:"crontab_tasks",params:{projectId:u}}),w.value=!1,await _())}catch(T){console.error(T),e.commit("error",{error:T})}d.value=!1}return(u,a)=>{var C;const T=U("router-link");return b(),j("div",pt,[t(nt,{modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=f=>w.value=f),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((C=s(i))==null?void 0:C.name)+"?",type:"warning",loading:d.value,onConfirm:a[1]||(a[1]=f=>s(i)&&F(s(i).projectId,s(i).id))},null,8,["modelValue","content","loading"]),l("div",mt,[t(Y,{modelValue:c.value,"onUpdate:modelValue":a[2]||(a[2]=f=>c.value=f),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:_},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_crontab_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(i),onClick:a[3]||(a[3]=f=>w.value=!0)},null,8,["disable"])]),l("div",ft,[t(s(Z),{ref_key:"scrollArea",ref:r,class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4 tw-overflow-hidden tw-relative"},{default:n(()=>[(b(!0),j(q,null,X(s(m),f=>(b(),L(T,{key:f.id,to:{name:"crontab_task",params:{taskId:f.id}}},{default:n(()=>[l("div",{class:S((y(f)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",_t,[l("div",vt,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(f.cronExpr),1)]),t(lt),t(rt,{outline:"",color:f.status===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(f.isRunning==1?"\u6267\u884C\u4E2D":f.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),A(`
`)]),l("div",{class:S((y(f)?"active ":"")+"task__title tw-flex-col tw-items-center tw-w-full")},[t(I,{name:"numbers"}),x(" "+g(f.name),1)],2),l("div",kt,g(f.remark||"-"),1),l("div",ht,[l("div",bt,g(s(R)(f.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(m)||s(m).length===0)?(b(),j("div",gt,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),xt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Tt=D(yt,[["__scopeId","data-v-189e9673"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskList.vue"]]);const It={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Et={class:"q-pa-md tw-flex tw-justify-around"},jt={class:"tw-w-full tw-grow"},Ft={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},$t={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},St={class:"task__remark"},Bt={class:"task__bottom-box"},Ct={class:"task__bottom-time"},At={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Vt=x(" \u6682\u65E0\u6570\u636E "),Lt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=$(""),p=H(),k=E(()=>p.state.Task.loadingTasks);J(async()=>{M(async()=>{await _(),p.dispatch("subscribeTopic",["/task/status/project/"+o.projectId])}),p.state.Task.temporaryTasks||await _(),p.watch(r=>[r.Root.eventTask],async([r])=>{if(!r||r.projectId!==o.projectId)return;const h=c.value.find(y=>y.tmpId===r.tmpId);!h||(p.commit("notifySuccess",{message:`\u4EFB\u52A1 ${h.remark} \u5F53\u524D\u72B6\u6001: ${r.status}`}),p.commit("Task/updateTemporaryTaskStatus",{projectId:o.projectId,tmpId:r.tmpId,isRunning:K.isRunning(r.status),finished:K.isFinished(r.status)}))})});async function _(){try{await p.dispatch("Task/fetchTemporaryTasks",{projectId:o.projectId})}catch(r){console.error("failed to dispatch fetchTemporaryTasks",r)}}const c=E(()=>{var r;return((r=p.state.Task.temporaryTasks.get(o.projectId))==null?void 0:r.filter(h=>h.taskId.toString().indexOf(e.value)>=0))||[]});function m(r){const h=N();return Number(h.params.taskId)===r.id}return(r,h)=>{const y=U("router-link");return b(),j("div",It,[l("div",Et,[t(Y,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=i=>e.value=i),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(k),icon:"refresh",onClick:_},null,8,["loading"])]),l("div",jt,[t(Z,{class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[s(c)?(b(),L(G,{key:0,class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),i=>(b(),L(y,{key:i.id,to:{name:"temporary_task",params:{taskId:i.id}}},{default:n(()=>[l("div",{class:S((m(i)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",Ft,[l("div",$t,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(s(R)(i.scheduleTime*1e3)),1)]),t(lt),t(rt,{outline:"",color:i.scheduleStatus===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(i.isRunning==1?"\u6267\u884C\u4E2D":i.scheduleStatus==1?"\u7B49\u5F85\u4E2D":"\u5DF2\u5904\u7406"),1)]),_:2},1032,["color"]),A(`
`)]),l("div",{class:S((m(i)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(i.remark),1)],2),l("div",St,"\u521B\u5EFA\u4EBA\uFF1A"+g(i.userName||"-"),1),l("div",Bt,[l("div",Ct,g(s(R)(i.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1})):A("v-if",!0),!s(k)&&(!s(c)||s(c).length===0)?(b(),j("div",At,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Vt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Rt=D(Lt,[["__scopeId","data-v-38f53198"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskList.vue"]]);const Dt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Qt={class:"q-pa-md tw-flex tw-justify-around"},Nt={class:"tw-w-full tw-grow"},Ut={class:"task__remark"},qt={class:"task__bottom-box"},zt={class:"task__bottom-time"},Ot={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Wt=x(" \u6682\u65E0\u6570\u636E "),Pt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.WorkFlowTask.loadingTasks);J(()=>{M(async()=>{await k()}),e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),e.watch(w=>[w.Root.eventWorkFlowTask],([w])=>{if(!w||w.projectId!==o.projectId)return;const d=c.value.find(F=>F.id===w.taskId);d!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${d.name} \u5F53\u524D\u72B6\u6001: ${w.status}`}),k()})});async function k(){await e.dispatch("WorkFlowTask/fetchTasks",z({},o))}const _=$(""),c=E(()=>{var w;return((w=e.state.WorkFlowTask.tasks.get(o.projectId))==null?void 0:w.filter(d=>d.name.indexOf(_.value)>=0||d.id.toString().indexOf(_.value)>=0))||[]});function m(w){return N().params.taskId===w.id}const r=E(()=>c.value.filter(m).pop()),h=ot(),y=$(!1),i=$(!1);async function V(w,d){i.value=!0;try{e.commit("cleanError"),await e.dispatch("deleteWorkFlowTask",{projectId:w,taskId:d}),e.state.Root.currentError===void 0&&(h.push({name:"workflow_tasks",params:{projectId:w}}),y.value=!1,await k())}catch(F){console.error(F),e.commit("error",{error:F})}i.value=!1}return(w,d)=>{var u;const F=U("router-link");return b(),j("div",Dt,[t(nt,{modelValue:y.value,"onUpdate:modelValue":d[0]||(d[0]=a=>y.value=a),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((u=s(r))==null?void 0:u.name)+"?",type:"warning",loading:i.value,onConfirm:d[1]||(d[1]=a=>s(r)&&V(s(r).projectId,s(r).id))},null,8,["modelValue","content","loading"]),l("div",Qt,[t(Y,{modelValue:_.value,"onUpdate:modelValue":d[2]||(d[2]=a=>_.value=a),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:k},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_workflow_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(r),onClick:d[3]||(d[3]=a=>y.value=!0)},null,8,["disable"])]),l("div",Nt,[t(Z,{class:"tw-h-full tw-w-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),a=>(b(),L(F,{key:a.id,to:{name:"workflow_task",params:{taskId:a.id}}},{default:n(()=>[l("div",{class:S((m(a)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-py-3 tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",{class:S((m(a)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(a.name),1)],2),l("div",Ut,g(a.remark||"-"),1),l("div",qt,[l("div",zt,g(s(R)(a.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(c)||s(c).length===0)?(b(),j("div",Ot,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Wt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Kt=D(Pt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskList.vue"]]);const Ht={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Jt=x(" \u65E5\u5E38\u5468\u671F\u6027\u5B9A\u65F6\u6267\u884C\u7684\u4EFB\u52A1 "),Mt=x(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),Yt=x(" \u7528\u4E8E\u4EFB\u52A1\u7F16\u6392\u7684\u5B50\u4EFB\u52A1 "),Gt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=N(),p=E(()=>e.name&&!["crontab_tasks","workflow_tasks","temporary_tasks"].includes(e.name.toString())),k=E(()=>{var _;if(e.name){const c=e.name.toString();if(c.search("crontab")>=0)return"normal";if(c.search("workflow")>=0)return"workflow";if(c.search("temporary")>=0)return"temporary"}throw new Error(`Unknown route name ${(_=e.name)==null?void 0:_.toString()}`)});return(_,c)=>{const m=U("router-view");return b(),j(q,null,[l("div",{class:S("xl:tw-basis-1/5 tw-basis-1/4 tw-w-full tw-h-full tw-bg-[#1E1E1E] tw-min-w-[280px]"+(s(p)?" tw-hidden lg:tw-block":""))},[l("div",Ht,[t(dt,{"model-value":s(k),"active-color":"primary"},{default:n(()=>[t(O,{name:"crontab",label:"\u666E\u901A",to:{name:"crontab_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Jt]),_:1})]),_:1},8,["to"]),t(O,{name:"temporary",label:"\u4E34\u65F6",to:{name:"temporary_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Mt]),_:1})]),_:1},8,["to"]),t(O,{name:"workflow",label:"\u4EFB\u52A1\u6D41",to:{name:"workflow_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Yt]),_:1})]),_:1},8,["to"])]),_:1},8,["model-value"]),t(wt,{"model-value":s(k),animated:"",class:"tw-w-full tw-grow"},{default:n(()=>[t(P,{name:"normal",class:"tw-p-0"},{default:n(()=>[t(Tt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"temporary",class:"tw-p-0"},{default:n(()=>[t(Rt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"workflow",class:"tw-p-0"},{default:n(()=>[t(Kt,{"project-id":o.projectId},null,8,["project-id"])]),_:1})]),_:1},8,["model-value"])])],2),l("div",{class:S("xl:tw-basis-3/5 tw-basis-1/2 tw-h-full tw-w-full"+(s(p)?"":" tw-hidden lg:tw-block"))},[t(m)],2)],64)}}});var oe=D(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskList.vue"]]);export{oe as default}; diff --git a/dist/assets/UserListAdmin.74b6349a.js b/dist/assets/UserListAdmin.54159650.js similarity index 97% rename from dist/assets/UserListAdmin.74b6349a.js rename to dist/assets/UserListAdmin.54159650.js index 4e3ba20..f4c01b0 100644 --- a/dist/assets/UserListAdmin.74b6349a.js +++ b/dist/assets/UserListAdmin.54159650.js @@ -1 +1 @@ -import{_ as $,k as C,u as U,ae as L,r as c,o as _,K as y,b as t,t as d,A as h,a as s,w as u,h as p,i as Q,Q as F,$ as B,D,x as I,C as M,F as q,Y as V,d as k,aN as N,l as b,I as j,a8 as E,R as S,aO as T,c as z}from"./index.d76e71bf.js";import{M as A}from"./ModifyBox.88f33ebb.js";import{f as P}from"./datetime.561112b0.js";const R={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},O={class:"tw-w-1/3 tw-px-4"},K={class:"tw-flex tw-items-center"},Y={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},G={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},H={class:"tw-pl-2"},J={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},W={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},X={class:"tw-w-1/4 tw-px-4"},Z={class:"tw-flex tw-items-center tw-text-gray-400"},tt={class:"tw-w-1/4 tw-px-4"},et={class:"tw-flex tw-items-center tw-text-gray-400"},st={class:"tw-px-4"},ot={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},at=k("\u7F16\u8F91"),lt=k("\u5220\u9664\u7528\u6237"),nt={class:"q-ml-sm"},it=C({props:{user:{type:Object,default:null}},emits:["modify"],setup(a,{emit:x}){const n=a,v=U(),w=L(n.user.name),m=()=>{x("modify",{})},g=async()=>{(await N({id:n.user.id})).meta.code===0&&(v.commit("success",{message:"\u5220\u9664\u6210\u529F"}),l.value=!1,x("modify",{}))},f=c(!1),l=c(!1);return(r,e)=>(_(),y(V,null,[t("tr",R,[t("td",O,[t("div",K,[t("div",Y,[t("p",G,d(h(w)),1)]),t("div",H,[t("p",J,d(a.user.name),1),t("p",W,d(a.user.permissions.join(", ")||"-"),1)])])]),t("td",X,[t("div",Z,d(a.user.account),1)]),t("td",tt,[t("div",et,d(h(P)(a.user.createTime*1e3)),1)]),t("td",st,[t("div",ot,[s(p,{color:"primary",class:"tw-mr-2 md:tw-mr-4","text-color":"black",onClick:e[0]||(e[0]=o=>f.value=!0)},{default:u(()=>[at]),_:1}),s(p,{disable:a.user.id===1,flat:"",class:"tw-text-red-300",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:u(()=>[lt]),_:1},8,["disable"])])])]),s(q,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value=o)},{default:u(()=>[s(Q,null,{default:u(()=>[s(F,{class:"row items-center"},{default:u(()=>[s(B,{icon:"delete",color:"red","text-color":"white"}),t("span",nt,"\u662F\u5426\u8981\u5220\u9664\u7528\u6237 "+d(a.user.name),1)]),_:1}),s(D,{align:"right"},{default:u(()=>[I(s(p,{flat:"",label:"\u53D6\u6D88"},null,512),[[M,!0]]),s(p,{flat:"",label:"\u5220\u9664",color:"red",onClick:g})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(A,{modelValue:f.value,"onUpdate:modelValue":e[3]||(e[3]=o=>f.value=o),user:a.user,onModify:m},null,8,["modelValue","user"])],64))}});var rt=$(it,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListItem.vue"]]);const dt={class:"tw-w-full tw-p-4"},ut={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},ct={class:"tw-px-4 tw-py-4"},wt={class:"tw-flex tw-items-center tw-justify-between"},mt=t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u7528\u6237\u7BA1\u7406 ",-1),ft={class:"tw-mt-0"},pt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},xt={class:"tw-overflow-x-auto"},vt={class:"tw-w-full tw-whitespace-nowrap"},_t={class:"q-pa-lg flex flex-center"},ht=C({props:{orgId:{type:String,required:!0}},setup(a){const x=a,n=c(1),v=c(10),w=c(!1),m=U(),g=b(()=>m.state.Root.users),f=b(()=>{const e=m.state.Root.userTotal||0;return Math.ceil(e/v.value)}),l=c(!1),r=async()=>{l.value=!0;try{await m.dispatch("fetchUsers",{oid:x.orgId,page:n.value,pagesize:v.value})}catch(e){console.log(e)}l.value=!1};return r(),j(n,(e,o)=>{r()}),(e,o)=>(_(),y("div",dt,[t("div",ut,[t("div",ct,[t("div",wt,[mt,t("div",ft,[s(p,{flat:"",class:"tw-text-white",icon:"add",onClick:o[0]||(o[0]=i=>w.value=!0)})])])]),t("div",pt,[t("div",xt,[t("table",vt,[t("tbody",null,[(_(!0),y(V,null,E(h(g),i=>(_(),z(rt,{key:i.id,user:i,onModify:r},null,8,["user"]))),128))])])]),s(S,{size:"md",showing:l.value},null,8,["showing"])]),t("div",_t,[s(T,{modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),color:"grey-4","active-color":"black",max:h(f),"boundary-numbers":!1},null,8,["modelValue","max"])]),s(A,{modelValue:w.value,"onUpdate:modelValue":o[2]||(o[2]=i=>w.value=i),onModify:r},null,8,["modelValue"])])]))}});var $t=$(ht,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListAdmin.vue"]]);export{$t as default}; +import{_ as $,k as C,u as U,ae as L,r as c,o as _,K as y,b as t,t as d,A as h,a as s,w as u,h as p,i as Q,Q as F,$ as B,D,x as I,C as M,F as q,Y as V,d as k,aN as N,l as b,I as j,a8 as E,R as S,aO as T,c as z}from"./index.f89dd3dd.js";import{M as A}from"./ModifyBox.25d0a805.js";import{f as P}from"./datetime.561112b0.js";const R={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},O={class:"tw-w-1/3 tw-px-4"},K={class:"tw-flex tw-items-center"},Y={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},G={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},H={class:"tw-pl-2"},J={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},W={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},X={class:"tw-w-1/4 tw-px-4"},Z={class:"tw-flex tw-items-center tw-text-gray-400"},tt={class:"tw-w-1/4 tw-px-4"},et={class:"tw-flex tw-items-center tw-text-gray-400"},st={class:"tw-px-4"},ot={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},at=k("\u7F16\u8F91"),lt=k("\u5220\u9664\u7528\u6237"),nt={class:"q-ml-sm"},it=C({props:{user:{type:Object,default:null}},emits:["modify"],setup(a,{emit:x}){const n=a,v=U(),w=L(n.user.name),m=()=>{x("modify",{})},g=async()=>{(await N({id:n.user.id})).meta.code===0&&(v.commit("success",{message:"\u5220\u9664\u6210\u529F"}),l.value=!1,x("modify",{}))},f=c(!1),l=c(!1);return(r,e)=>(_(),y(V,null,[t("tr",R,[t("td",O,[t("div",K,[t("div",Y,[t("p",G,d(h(w)),1)]),t("div",H,[t("p",J,d(a.user.name),1),t("p",W,d(a.user.permissions.join(", ")||"-"),1)])])]),t("td",X,[t("div",Z,d(a.user.account),1)]),t("td",tt,[t("div",et,d(h(P)(a.user.createTime*1e3)),1)]),t("td",st,[t("div",ot,[s(p,{color:"primary",class:"tw-mr-2 md:tw-mr-4","text-color":"black",onClick:e[0]||(e[0]=o=>f.value=!0)},{default:u(()=>[at]),_:1}),s(p,{disable:a.user.id===1,flat:"",class:"tw-text-red-300",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:u(()=>[lt]),_:1},8,["disable"])])])]),s(q,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value=o)},{default:u(()=>[s(Q,null,{default:u(()=>[s(F,{class:"row items-center"},{default:u(()=>[s(B,{icon:"delete",color:"red","text-color":"white"}),t("span",nt,"\u662F\u5426\u8981\u5220\u9664\u7528\u6237 "+d(a.user.name),1)]),_:1}),s(D,{align:"right"},{default:u(()=>[I(s(p,{flat:"",label:"\u53D6\u6D88"},null,512),[[M,!0]]),s(p,{flat:"",label:"\u5220\u9664",color:"red",onClick:g})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(A,{modelValue:f.value,"onUpdate:modelValue":e[3]||(e[3]=o=>f.value=o),user:a.user,onModify:m},null,8,["modelValue","user"])],64))}});var rt=$(it,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListItem.vue"]]);const dt={class:"tw-w-full tw-p-4"},ut={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},ct={class:"tw-px-4 tw-py-4"},wt={class:"tw-flex tw-items-center tw-justify-between"},mt=t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u7528\u6237\u7BA1\u7406 ",-1),ft={class:"tw-mt-0"},pt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},xt={class:"tw-overflow-x-auto"},vt={class:"tw-w-full tw-whitespace-nowrap"},_t={class:"q-pa-lg flex flex-center"},ht=C({props:{orgId:{type:String,required:!0}},setup(a){const x=a,n=c(1),v=c(10),w=c(!1),m=U(),g=b(()=>m.state.Root.users),f=b(()=>{const e=m.state.Root.userTotal||0;return Math.ceil(e/v.value)}),l=c(!1),r=async()=>{l.value=!0;try{await m.dispatch("fetchUsers",{oid:x.orgId,page:n.value,pagesize:v.value})}catch(e){console.log(e)}l.value=!1};return r(),j(n,(e,o)=>{r()}),(e,o)=>(_(),y("div",dt,[t("div",ut,[t("div",ct,[t("div",wt,[mt,t("div",ft,[s(p,{flat:"",class:"tw-text-white",icon:"add",onClick:o[0]||(o[0]=i=>w.value=!0)})])])]),t("div",pt,[t("div",xt,[t("table",vt,[t("tbody",null,[(_(!0),y(V,null,E(h(g),i=>(_(),z(rt,{key:i.id,user:i,onModify:r},null,8,["user"]))),128))])])]),s(S,{size:"md",showing:l.value},null,8,["showing"])]),t("div",_t,[s(T,{modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),color:"grey-4","active-color":"black",max:h(f),"boundary-numbers":!1},null,8,["modelValue","max"])]),s(A,{modelValue:w.value,"onUpdate:modelValue":o[2]||(o[2]=i=>w.value=i),onModify:r},null,8,["modelValue"])])]))}});var $t=$(ht,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListAdmin.vue"]]);export{$t as default}; diff --git a/dist/assets/UserProfile.ab80fd42.js b/dist/assets/UserProfile.3ae9d6ce.js similarity index 96% rename from dist/assets/UserProfile.ab80fd42.js rename to dist/assets/UserProfile.3ae9d6ce.js index 8f4c501..f95b245 100644 --- a/dist/assets/UserProfile.ab80fd42.js +++ b/dist/assets/UserProfile.3ae9d6ce.js @@ -1,4 +1,4 @@ -import{_ as n,k as i,u as c,r as u,K as x,b as t,t as l,A as e,ae as m,p,a as d,h as _,Y as f,d as r,o as h}from"./index.d76e71bf.js";import{M as v}from"./ModifyBox.88f33ebb.js";const b={class:"tw-bg-gradient-to-r tw-from-primary tw-to-purple-500"},g={class:"tw-mx-auto tw-container tw-px-6"},y={class:"xl:tw-flex tw-items-center tw-flex-wrap"},F=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5"},null,-1),B={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-flex tw-flex-col tw-items-center xl:tw-pl-8 tw-py-12 md:tw-pt-12 md:tw-pb-12 xl:tw-pb-6"},E={class:"tw-w-full tw-flex tw-items-center tw-justify-center"},k={class:"tw-flex tw-flex-col tw-items-center"},V={class:"tw-w-20 tw-h-20 tw-bg-gray-700 tw-rounded-full tw-flex tw-items-center tw-justify-center"},j={class:"tw-text-lg tw-font-bold tw-rounded tw-leading-3 tw-text-white"},D={class:"tw-mt-2 tw-text-xs sm:tw-text-sm md:tw-text-base tw-font-semibold tw-text-center tw-text-white"},U={class:"tw-px-4 xl:tw-px-0"},q={class:"tw-mx-auto tw-container"},A={class:"xl:tw-flex"},C=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5 tw--mt-8 xl:tw--mt-36"},[t("div",{class:"tw-pl-4 md:tw-pl-10 tw-py-4 md:tw-py-7 tw-bg-gray-100 tw-rounded-tl-lg tw-rounded-tr-lg tw-shadow"},[t("p",{class:"tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-gray-800"}," \u66F4\u65B0\u65E5\u5FD7 ")]),t("div",{class:"q-dark tw-shadow-lg tw-pb-8 tw-px-4 md:tw-px-8 xl:tw-px-10 tw-h-5/6 tw-py-6"},[r(" V2.0.0-Beta"),t("br"),r(" \u589E\u52A0 workflow \u529F\u80FD ")])],-1),N={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-pt-7 xl:tw-pl-8 tw-pb-7"},M=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u8D26\u53F7\u4FE1\u606F ",-1),P={class:"tw-mt-4"},S={class:"tw-flex tw-box-border tw-px-2 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},K={class:"tw-flex tw-box-border tw-px-2 tw-mt-4 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},Q={class:"tw-mt-7"},T=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u4E2A\u4EBA\u8BBE\u7F6E ",-1),Y={class:"tw-flex tw-mt-4 q-dark tw-h-12 tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},$=i({setup(z){const s=c().getters.currentUser,o=u(!1);return(H,w)=>(h(),x(f,null,[t("div",null,[t("div",b,[t("div",g,[t("div",y,[F,t("div",B,[t("div",E,[t("div",k,[t("div",V,[t("p",j,l(e(m)(e(s).name)),1)]),t("p",D,l(e(s).name),1)])]),p(`
+import{_ as n,k as i,u as c,r as u,K as x,b as t,t as l,A as e,ae as m,p,a as d,h as _,Y as f,d as r,o as h}from"./index.f89dd3dd.js";import{M as v}from"./ModifyBox.25d0a805.js";const b={class:"tw-bg-gradient-to-r tw-from-primary tw-to-purple-500"},g={class:"tw-mx-auto tw-container tw-px-6"},y={class:"xl:tw-flex tw-items-center tw-flex-wrap"},F=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5"},null,-1),B={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-flex tw-flex-col tw-items-center xl:tw-pl-8 tw-py-12 md:tw-pt-12 md:tw-pb-12 xl:tw-pb-6"},E={class:"tw-w-full tw-flex tw-items-center tw-justify-center"},k={class:"tw-flex tw-flex-col tw-items-center"},V={class:"tw-w-20 tw-h-20 tw-bg-gray-700 tw-rounded-full tw-flex tw-items-center tw-justify-center"},j={class:"tw-text-lg tw-font-bold tw-rounded tw-leading-3 tw-text-white"},D={class:"tw-mt-2 tw-text-xs sm:tw-text-sm md:tw-text-base tw-font-semibold tw-text-center tw-text-white"},U={class:"tw-px-4 xl:tw-px-0"},q={class:"tw-mx-auto tw-container"},A={class:"xl:tw-flex"},C=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5 tw--mt-8 xl:tw--mt-36"},[t("div",{class:"tw-pl-4 md:tw-pl-10 tw-py-4 md:tw-py-7 tw-bg-gray-100 tw-rounded-tl-lg tw-rounded-tr-lg tw-shadow"},[t("p",{class:"tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-gray-800"}," \u66F4\u65B0\u65E5\u5FD7 ")]),t("div",{class:"q-dark tw-shadow-lg tw-pb-8 tw-px-4 md:tw-px-8 xl:tw-px-10 tw-h-5/6 tw-py-6"},[r(" V2.0.0-Beta"),t("br"),r(" \u589E\u52A0 workflow \u529F\u80FD ")])],-1),N={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-pt-7 xl:tw-pl-8 tw-pb-7"},M=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u8D26\u53F7\u4FE1\u606F ",-1),P={class:"tw-mt-4"},S={class:"tw-flex tw-box-border tw-px-2 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},K={class:"tw-flex tw-box-border tw-px-2 tw-mt-4 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},Q={class:"tw-mt-7"},T=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u4E2A\u4EBA\u8BBE\u7F6E ",-1),Y={class:"tw-flex tw-mt-4 q-dark tw-h-12 tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},$=i({setup(z){const s=c().getters.currentUser,o=u(!1);return(H,w)=>(h(),x(f,null,[t("div",null,[t("div",b,[t("div",g,[t("div",y,[F,t("div",B,[t("div",E,[t("div",k,[t("div",V,[t("p",j,l(e(m)(e(s).name)),1)]),t("p",D,l(e(s).name),1)])]),p(`

\u8D26\u53F7

diff --git a/dist/assets/WorkflowList.bd34351b.js b/dist/assets/WorkflowList.56e40ec4.js similarity index 98% rename from dist/assets/WorkflowList.bd34351b.js rename to dist/assets/WorkflowList.56e40ec4.js index 6cccb20..ab50525 100644 --- a/dist/assets/WorkflowList.bd34351b.js +++ b/dist/assets/WorkflowList.56e40ec4.js @@ -1 +1 @@ -var ee=Object.defineProperty;var R=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var q=(i,n,e)=>n in i?ee(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e,L=(i,n)=>{for(var e in n||(n={}))te.call(n,e)&&q(i,e,n[e]);if(R)for(var e of R(n))oe.call(n,e)&&q(i,e,n[e]);return i};import{_ as U,k as E,l as I,J as le,u as J,r as k,o as v,c as b,A as c,E as K,I as $,w as u,a as l,Q as z,K as V,a8 as Y,az as ae,d as y,t as C,Y as N,D as se,f as re,h as Q,i as ne,F as ue,b as g,aA as ie,aB as de,aC as we,al as G,x as M,C as T,T as P,U as j,ac as S,S as H,au as ce,H as O,m as fe,aD as me,ag as X,aq as pe,a2 as A,q as D,aj as ve,ay as _e,p as B,a4 as ge}from"./index.d76e71bf.js";import{C as Z}from"./Confirm.47315734.js";import{f as ke}from"./datetime.561112b0.js";import{t as he,b as ye}from"./thumbStyle.856de4cb.js";const be=E({props:{workflowId:{type:Number,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:p=>n("update:modelValue",p)}),_=le(),m=J(),a=I(()=>m.state.WorkFlow.workflows.get(e.workflowId)),o=k(!1);async function W(p){o.value=!0;try{m.commit("cleanError"),await m.dispatch("WorkFlow/deleteWorkFlow",{id:p}),m.state.Root.currentError===void 0&&(_.push({name:"workflows"}),d.value=!1)}catch(w){console.error(w),m.commit("error",{error:w})}o.value=!1}return(p,w)=>{var x;return v(),b(Z,{modelValue:c(d),"onUpdate:modelValue":w[0]||(w[0]=F=>K(d)?d.value=F:null),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1\u7F16\u6392 "+((x=c(a))==null?void 0:x.title)+" ?",type:"warning",loading:o.value,onConfirm:w[1]||(w[1]=F=>c(a)&&W(c(a).id))},null,8,["modelValue","content","loading"])}}});var xe=U(be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowDeleteConfirm.vue"]]);const Fe=g("div",{class:"text-h6"},"\u4EFB\u52A1\u7F16\u6392\u4EBA\u5458\u7BA1\u7406",-1),Ce=y(" \u6DFB\u52A0 "),Ve=E({props:{workflowId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:s=>n("update:modelValue",s)}),_=k([]);async function m(){_.value=await ie(e.workflowId)}$(()=>[e.workflowId,d.value],async([,s])=>{s&&m(),a.value=""});const a=k(""),o=k(!1);async function W(){o.value=!0;try{await de(e.workflowId,a.value),a.value="",await m()}finally{o.value=!1}}const p=k(),w=k(!1);function x(s){p.value=s,w.value=!0}function F(){p.value=void 0,w.value=!1}async function t(s){o.value=!0;try{await we(e.workflowId,s.id),await m()}finally{o.value=!1}}return(s,f)=>(v(),b(ue,{modelValue:c(d),"onUpdate:modelValue":f[3]||(f[3]=r=>K(d)?d.value=r:null)},{default:u(()=>{var r;return[l(Z,{modelValue:w.value,"onUpdate:modelValue":f[0]||(f[0]=h=>w.value=h),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(r=p.value)==null?void 0:r.name} \u5417\uFF1F`,onConfirm:f[1]||(f[1]=h=>p.value&&t(p.value).then(F))},null,8,["modelValue","content"]),l(ne,{class:"tw-w-96 q-pa-sm"},{default:u(()=>[l(z,null,{default:u(()=>[Fe]),_:1}),l(z,null,{default:u(()=>[(v(!0),V(N,null,Y(_.value,h=>(v(),b(ae,{key:h.id,removable:"",color:"primary","text-color":"black",onRemove:Je=>x(h)},{default:u(()=>[y(C(h.name),1)]),_:2},1032,["onRemove"]))),128))]),_:1}),l(se,null,{default:u(()=>[l(re,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=h=>a.value=h),class:"tw-w-full",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7"},{append:u(()=>[l(Q,{loading:o.value,flat:"",icon:"add","text-color":"primary",onClick:W},{default:u(()=>[Ce]),_:1},8,["loading"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]}),_:1},8,["modelValue"]))}});var Ie=U(Ve,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowUsersManage.vue"]]);const We=y("\u4EBA\u5458\u7BA1\u7406"),Ue=y("\u5220\u9664"),Ee=E({props:{workflowId:{type:Number,required:!0}},setup(i){const n=i,e=k(!1),d=k(!1),_=k(!1);return(m,a)=>(v(),V(N,null,[l(xe,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=o=>d.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(Ie,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=o=>_.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(ce,{modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=o=>e.value=o),dense:"",flat:"","dropdown-icon":"more_horiz","no-icon-animation":"",onClick:a[5]||(a[5]=S(()=>{},["stop","prevent"]))},{default:u(()=>[l(G,{dense:""},{default:u(()=>[M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[2]||(a[2]=S(o=>_.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[We]),_:1})]),_:1})]),_:1})),[[T,!0]]),M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[3]||(a[3]=S(o=>d.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[Ue]),_:1})]),_:1})]),_:1})),[[T,!0]])]),_:1})]),_:1},8,["modelValue"])],64))}});var Be=U(Ee,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DropdownWorkFlowManage.vue"]]);const Se={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},De={class:"q-pa-md tw-flex tw-flex-row-reverse tw-gap-4"},$e={class:"tw-w-full tw-grow tw-overflow-hidden tw-min-w-[280px]"},Qe={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},Ae={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},Ne={class:"task__remark"},Re={class:"task__bottom-box"},qe={class:"task__bottom-time"},Le={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},ze=y(" \u6682\u65E0\u6570\u636E "),Me=E({props:{orgId:{type:String,required:!0}},setup(i){const n=i,e=J(),d=O(),_=k(),m=I(()=>e.state.WorkFlow.loadingWorkflows);e.commit("WorkFlow/clearWorkFlows"),$(()=>d.name,t=>{(t==null?void 0:t.toString())==="workflows"&&w()});function a(t){const s=_.value;if(s===void 0)throw new Error("scroll-area instance is missing");if(!o.value)return;const f=o.value.findIndex(r=>r.id===t);setTimeout(()=>{if(f<0)s.setScrollPercentage("vertical",0);else{const r=1*f/o.value.length*s.getScroll().verticalSize-50;s.setScrollPosition("vertical",r)}},100)}fe(async()=>{e.watch(t=>[t.Root.eventWorkFlow],([t])=>{if(!t)return;const s=e.state.WorkFlow.workflows.get(t.workFlowId);s!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1\u7F16\u6392 ${s.title} \u5F53\u524D\u72B6\u6001: ${t.status}`}),w()}),$(()=>[o.value],()=>{const t=Number(d.params.workflowId);t!==0&&!isNaN(t)&&a(t)},{deep:!0}),w()});const o=I(()=>{const t=e.state.WorkFlow.workflows,s=Array.from(t.values());return s.sort((f,r)=>r.id-f.id),s});async function W(t,s){if(t===1)return;p.page=t,(await w()).length{const f=X("router-link");return v(),V("div",Se,[g("div",De,[l(Q,{flat:"",loading:c(m),icon:"refresh",onClick:w},null,8,["loading"]),l(Q,{flat:"",icon:"add",to:{name:"create_workflow"}})]),g("div",$e,[l(c(ge),{ref_key:"scrollArea",ref:_,visible:"","thumb-style":c(he),"bar-style":c(ye),class:"tw-w-full tw-h-full tw-px-[15px]"},{default:u(()=>[l(c(pe),{class:"tw-w-full tw-h-full",offset:100,onLoad:W},{default:u(()=>[c(o)&&c(o).length>0?(v(),b(G,{key:0,class:"tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:u(()=>[(v(!0),V(N,null,Y(c(o),r=>(v(),b(f,{key:r.id,to:{name:"workflow",params:{workflowId:r.id}}},{default:u(()=>[g("div",{class:A((x(r)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[g("div",Qe,[g("div",Ae,[l(D,{name:"schedule",class:"tw-inline"}),y(" "+C(r.cronExpr),1)]),l(ve),l(_e,{outline:"",color:r.status===1?"green":"red",class:"tw-w-[50px]"},{default:u(()=>[y(C(F(r)?"\u6267\u884C\u4E2D":r.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),B(`
`)]),g("div",{class:A((x(r)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[l(D,{name:"numbers"}),y(" "+C(r.title),1)],2),g("div",Ne,C(r.remark||"-"),1),g("div",Re,[g("div",qe,C(c(ke)(r.createTime*1e3)),1),l(Be,{"workflow-id":r.id},null,8,["workflow-id"])])],2)]),_:2},1032,["to"]))),128))]),_:1})):B("v-if",!0),!c(m)&&(!c(o)||c(o).length===0)?(v(),V("div",Le,[l(D,{name:"outlet",style:{"font-size":"3rem"}}),ze])):B("v-if",!0)]),_:1})]),_:1},8,["thumb-style","bar-style"])])])}}});var Te=U(Me,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowList.vue"]]);const Pe={class:"lg:q-pa-md tw-box-border tw-flex tw-flex-row tw-gap-4 tw-h-full tw-w-full"},je={class:"tw-w-full tw-h-full tw-grow tw-overflow-hidden"},He=E({props:{orgId:{type:String,required:!0}},setup(i){const n=O(),e=I(()=>n.name&&n.name.toString()!=="workflows"?"tw-hidden lg:tw-block":"");return(d,_)=>{const m=X("router-view");return v(),V("div",Pe,[g("div",{class:A("xl:tw-basis-1/5 lg:tw-basis-1/4 tw-h-full tw-w-full tw-shrink-0 "+c(e))},[i.orgId?(v(),b(Te,{key:0,"org-id":i.orgId},null,8,["org-id"])):B("v-if",!0)],2),g("div",je,[l(m)])])}}});var Ze=U(He,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowList.vue"]]);export{Ze as default}; +var ee=Object.defineProperty;var R=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var q=(i,n,e)=>n in i?ee(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e,L=(i,n)=>{for(var e in n||(n={}))te.call(n,e)&&q(i,e,n[e]);if(R)for(var e of R(n))oe.call(n,e)&&q(i,e,n[e]);return i};import{_ as U,k as E,l as I,J as le,u as J,r as k,o as v,c as b,A as c,E as K,I as $,w as u,a as l,Q as z,K as V,a8 as Y,az as ae,d as y,t as C,Y as N,D as se,f as re,h as Q,i as ne,F as ue,b as g,aA as ie,aB as de,aC as we,al as G,x as M,C as T,T as P,U as j,ac as S,S as H,au as ce,H as O,m as fe,aD as me,ag as X,aq as pe,a2 as A,q as D,aj as ve,ay as _e,p as B,a4 as ge}from"./index.f89dd3dd.js";import{C as Z}from"./Confirm.4116c3bd.js";import{f as ke}from"./datetime.561112b0.js";import{t as he,b as ye}from"./thumbStyle.856de4cb.js";const be=E({props:{workflowId:{type:Number,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:p=>n("update:modelValue",p)}),_=le(),m=J(),a=I(()=>m.state.WorkFlow.workflows.get(e.workflowId)),o=k(!1);async function W(p){o.value=!0;try{m.commit("cleanError"),await m.dispatch("WorkFlow/deleteWorkFlow",{id:p}),m.state.Root.currentError===void 0&&(_.push({name:"workflows"}),d.value=!1)}catch(w){console.error(w),m.commit("error",{error:w})}o.value=!1}return(p,w)=>{var x;return v(),b(Z,{modelValue:c(d),"onUpdate:modelValue":w[0]||(w[0]=F=>K(d)?d.value=F:null),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1\u7F16\u6392 "+((x=c(a))==null?void 0:x.title)+" ?",type:"warning",loading:o.value,onConfirm:w[1]||(w[1]=F=>c(a)&&W(c(a).id))},null,8,["modelValue","content","loading"])}}});var xe=U(be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowDeleteConfirm.vue"]]);const Fe=g("div",{class:"text-h6"},"\u4EFB\u52A1\u7F16\u6392\u4EBA\u5458\u7BA1\u7406",-1),Ce=y(" \u6DFB\u52A0 "),Ve=E({props:{workflowId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:s=>n("update:modelValue",s)}),_=k([]);async function m(){_.value=await ie(e.workflowId)}$(()=>[e.workflowId,d.value],async([,s])=>{s&&m(),a.value=""});const a=k(""),o=k(!1);async function W(){o.value=!0;try{await de(e.workflowId,a.value),a.value="",await m()}finally{o.value=!1}}const p=k(),w=k(!1);function x(s){p.value=s,w.value=!0}function F(){p.value=void 0,w.value=!1}async function t(s){o.value=!0;try{await we(e.workflowId,s.id),await m()}finally{o.value=!1}}return(s,f)=>(v(),b(ue,{modelValue:c(d),"onUpdate:modelValue":f[3]||(f[3]=r=>K(d)?d.value=r:null)},{default:u(()=>{var r;return[l(Z,{modelValue:w.value,"onUpdate:modelValue":f[0]||(f[0]=h=>w.value=h),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(r=p.value)==null?void 0:r.name} \u5417\uFF1F`,onConfirm:f[1]||(f[1]=h=>p.value&&t(p.value).then(F))},null,8,["modelValue","content"]),l(ne,{class:"tw-w-96 q-pa-sm"},{default:u(()=>[l(z,null,{default:u(()=>[Fe]),_:1}),l(z,null,{default:u(()=>[(v(!0),V(N,null,Y(_.value,h=>(v(),b(ae,{key:h.id,removable:"",color:"primary","text-color":"black",onRemove:Je=>x(h)},{default:u(()=>[y(C(h.name),1)]),_:2},1032,["onRemove"]))),128))]),_:1}),l(se,null,{default:u(()=>[l(re,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=h=>a.value=h),class:"tw-w-full",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7"},{append:u(()=>[l(Q,{loading:o.value,flat:"",icon:"add","text-color":"primary",onClick:W},{default:u(()=>[Ce]),_:1},8,["loading"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]}),_:1},8,["modelValue"]))}});var Ie=U(Ve,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowUsersManage.vue"]]);const We=y("\u4EBA\u5458\u7BA1\u7406"),Ue=y("\u5220\u9664"),Ee=E({props:{workflowId:{type:Number,required:!0}},setup(i){const n=i,e=k(!1),d=k(!1),_=k(!1);return(m,a)=>(v(),V(N,null,[l(xe,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=o=>d.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(Ie,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=o=>_.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(ce,{modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=o=>e.value=o),dense:"",flat:"","dropdown-icon":"more_horiz","no-icon-animation":"",onClick:a[5]||(a[5]=S(()=>{},["stop","prevent"]))},{default:u(()=>[l(G,{dense:""},{default:u(()=>[M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[2]||(a[2]=S(o=>_.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[We]),_:1})]),_:1})]),_:1})),[[T,!0]]),M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[3]||(a[3]=S(o=>d.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[Ue]),_:1})]),_:1})]),_:1})),[[T,!0]])]),_:1})]),_:1},8,["modelValue"])],64))}});var Be=U(Ee,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DropdownWorkFlowManage.vue"]]);const Se={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},De={class:"q-pa-md tw-flex tw-flex-row-reverse tw-gap-4"},$e={class:"tw-w-full tw-grow tw-overflow-hidden tw-min-w-[280px]"},Qe={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},Ae={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},Ne={class:"task__remark"},Re={class:"task__bottom-box"},qe={class:"task__bottom-time"},Le={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},ze=y(" \u6682\u65E0\u6570\u636E "),Me=E({props:{orgId:{type:String,required:!0}},setup(i){const n=i,e=J(),d=O(),_=k(),m=I(()=>e.state.WorkFlow.loadingWorkflows);e.commit("WorkFlow/clearWorkFlows"),$(()=>d.name,t=>{(t==null?void 0:t.toString())==="workflows"&&w()});function a(t){const s=_.value;if(s===void 0)throw new Error("scroll-area instance is missing");if(!o.value)return;const f=o.value.findIndex(r=>r.id===t);setTimeout(()=>{if(f<0)s.setScrollPercentage("vertical",0);else{const r=1*f/o.value.length*s.getScroll().verticalSize-50;s.setScrollPosition("vertical",r)}},100)}fe(async()=>{e.watch(t=>[t.Root.eventWorkFlow],([t])=>{if(!t)return;const s=e.state.WorkFlow.workflows.get(t.workFlowId);s!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1\u7F16\u6392 ${s.title} \u5F53\u524D\u72B6\u6001: ${t.status}`}),w()}),$(()=>[o.value],()=>{const t=Number(d.params.workflowId);t!==0&&!isNaN(t)&&a(t)},{deep:!0}),w()});const o=I(()=>{const t=e.state.WorkFlow.workflows,s=Array.from(t.values());return s.sort((f,r)=>r.id-f.id),s});async function W(t,s){if(t===1)return;p.page=t,(await w()).length{const f=X("router-link");return v(),V("div",Se,[g("div",De,[l(Q,{flat:"",loading:c(m),icon:"refresh",onClick:w},null,8,["loading"]),l(Q,{flat:"",icon:"add",to:{name:"create_workflow"}})]),g("div",$e,[l(c(ge),{ref_key:"scrollArea",ref:_,visible:"","thumb-style":c(he),"bar-style":c(ye),class:"tw-w-full tw-h-full tw-px-[15px]"},{default:u(()=>[l(c(pe),{class:"tw-w-full tw-h-full",offset:100,onLoad:W},{default:u(()=>[c(o)&&c(o).length>0?(v(),b(G,{key:0,class:"tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:u(()=>[(v(!0),V(N,null,Y(c(o),r=>(v(),b(f,{key:r.id,to:{name:"workflow",params:{workflowId:r.id}}},{default:u(()=>[g("div",{class:A((x(r)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[g("div",Qe,[g("div",Ae,[l(D,{name:"schedule",class:"tw-inline"}),y(" "+C(r.cronExpr),1)]),l(ve),l(_e,{outline:"",color:r.status===1?"green":"red",class:"tw-w-[50px]"},{default:u(()=>[y(C(F(r)?"\u6267\u884C\u4E2D":r.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),B(`
`)]),g("div",{class:A((x(r)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[l(D,{name:"numbers"}),y(" "+C(r.title),1)],2),g("div",Ne,C(r.remark||"-"),1),g("div",Re,[g("div",qe,C(c(ke)(r.createTime*1e3)),1),l(Be,{"workflow-id":r.id},null,8,["workflow-id"])])],2)]),_:2},1032,["to"]))),128))]),_:1})):B("v-if",!0),!c(m)&&(!c(o)||c(o).length===0)?(v(),V("div",Le,[l(D,{name:"outlet",style:{"font-size":"3rem"}}),ze])):B("v-if",!0)]),_:1})]),_:1},8,["thumb-style","bar-style"])])])}}});var Te=U(Me,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowList.vue"]]);const Pe={class:"lg:q-pa-md tw-box-border tw-flex tw-flex-row tw-gap-4 tw-h-full tw-w-full"},je={class:"tw-w-full tw-h-full tw-grow tw-overflow-hidden"},He=E({props:{orgId:{type:String,required:!0}},setup(i){const n=O(),e=I(()=>n.name&&n.name.toString()!=="workflows"?"tw-hidden lg:tw-block":"");return(d,_)=>{const m=X("router-view");return v(),V("div",Pe,[g("div",{class:A("xl:tw-basis-1/5 lg:tw-basis-1/4 tw-h-full tw-w-full tw-shrink-0 "+c(e))},[i.orgId?(v(),b(Te,{key:0,"org-id":i.orgId},null,8,["org-id"])):B("v-if",!0)],2),g("div",je,[l(m)])])}}});var Ze=U(He,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowList.vue"]]);export{Ze as default}; diff --git a/dist/assets/WorkflowTabs.36c12950.js b/dist/assets/WorkflowTabs.9cd7e98f.js similarity index 99% rename from dist/assets/WorkflowTabs.36c12950.js rename to dist/assets/WorkflowTabs.9cd7e98f.js index ae39dbf..cacd464 100644 --- a/dist/assets/WorkflowTabs.36c12950.js +++ b/dist/assets/WorkflowTabs.9cd7e98f.js @@ -1 +1 @@ -var St=Object.defineProperty,Vt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var ze=Object.getOwnPropertySymbols;var Tt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Qe=(e,t,o)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,qe=(e,t)=>{for(var o in t||(t={}))Tt.call(t,o)&&Qe(e,o,t[o]);if(ze)for(var o of ze(t))Bt.call(t,o)&&Qe(e,o,t[o]);return e},Je=(e,t)=>Vt(e,Ot(t));import{I as Y,aE as Mt,_ as oe,k as ne,l as D,r as B,u as me,o as M,c as $,w as F,a as b,T as K,S as H,A as N,E as at,z as lt,d as P,m as ie,aF as Dt,aD as Ke,P as Ae,ap as Pt,ag as $t,K as ge,a2 as Lt,p as J,F as Wt,aG as Rt,Y as Ut,n as Se,i as st,Q as se,b as ue,D as zt,h as q,al as Qt,x as re,t as he,e as it,C as ae,aH as qt,aI as Jt,aJ as Kt,aK as Ht,J as Gt,H as ut,f as Ee,B as Yt,M as Xt,aL as Zt,aM as eo,R as to,U as ke,V as oo,a3 as He,a6 as no,a5 as le,a7 as Ie}from"./index.d76e71bf.js";import{u as ft}from"./index.650f2770.js";import{C as Ge}from"./Confirm.47315734.js";import{J as ro}from"./JSONViewer.6dded83c.js";import{f as Ye}from"./datetime.561112b0.js";var ao=Object.defineProperty,lo=Object.defineProperties,so=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,Ze=(e,t,o)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,je=(e,t)=>{for(var o in t||(t={}))io.call(t,o)&&Ze(e,o,t[o]);if(Xe)for(var o of Xe(t))uo.call(t,o)&&Ze(e,o,t[o]);return e},fo=(e,t)=>lo(e,so(t));function dt(e,t){var o,n=1;e==null&&(e=0),t==null&&(t=0);function r(){var s,i=o.length,l,u=0,a=0;for(s=0;s=(m=(l+a)/2))?l=m:a=m,(f=o>=(w=(u+d)/2))?u=w:d=w,r=s,!(s=s[c=f<<1|p]))return r[c]=i,e;if(h=+e._x.call(null,s.data),x=+e._y.call(null,s.data),t===h&&o===x)return i.next=s,r?r[c]=i:e._root=i,e;do r=r?r[c]=new Array(4):e._root=new Array(4),(p=t>=(m=(l+a)/2))?l=m:a=m,(f=o>=(w=(u+d)/2))?u=w:d=w;while((c=f<<1|p)===(v=(x>=w)<<1|h>=m));return r[v]=s,r[c]=i,e}function po(e){var t,o,n=e.length,r,s,i=new Array(n),l=new Array(n),u=1/0,a=1/0,d=-1/0,m=-1/0;for(o=0;od&&(d=r),sm&&(m=s));if(u>d||a>m)return this;for(this.cover(u,a).cover(d,m),o=0;oe||e>=r||n>t||t>=s;)switch(a=(td||(l=x.y0)>m||(u=x.x1)=c)<<1|e>=f)&&(x=w[w.length-1],w[w.length-1]=w[w.length-1-p],w[w.length-1-p]=x)}else{var v=e-+this._x.call(null,h.data),C=t-+this._y.call(null,h.data),k=v*v+C*C;if(k=(w=(i+u)/2))?i=w:u=w,(p=m>=(h=(l+a)/2))?l=h:a=h,t=o,!(o=o[f=p<<1|x]))return this;if(!o.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,c=f)}for(;o.data!==e;)if(r=o,!(o=o.next))return this;return(s=o.next)&&delete o.next,r?(s?r.next=s:delete r.next,this):t?(s?t[f]=s:delete t[f],(o=t[0]||t[1]||t[2]||t[3])&&o===(t[3]||t[2]||t[1]||t[0])&&!o.length&&(n?n[c]=o:this._root=o),this):(this._root=s,this)}function yo(e){for(var t=0,o=e.length;tw.index){var R=h-I.x-I.vx,W=x-I.y-I.vy,U=R*R+W*W;Uh+V||_x+V||Sa.r&&(a.r=a[d].r)}function u(){if(!!t){var a,d=t.length,m;for(o=new Array(d),a=0;a[t(j,_,i),j])),k;for(f=0,l=new Array(c);f{}};function ht(){for(var e=0,t=arguments.length,o={},n;e=0&&(n=o.slice(r+1),o=o.slice(0,r)),o&&!t.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:n}})}_e.prototype=ht.prototype={constructor:_e,on:function(e,t){var o=this._,n=Vo(e+"",o),r,s=-1,i=n.length;if(arguments.length<2){for(;++s0)for(var o=new Array(r),n=0,r,s;n=0&&e._call.call(void 0,t),e=e._next;--fe}function nt(){te=(be=we.now())+Ne,fe=pe=0;try{Bo()}finally{fe=0,Do(),te=0}}function Mo(){var e=we.now(),t=e-be;t>gt&&(Ne-=t,be=e)}function Do(){for(var e,t=xe,o,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(o=t._next,t._next=null,t=e?e._next=o:xe=o);ve=e,Oe(n)}function Oe(e){if(!fe){pe&&(pe=clearTimeout(pe));var t=e-te;t>24?(e<1/0&&(pe=setTimeout(nt,e-we.now()-Ne)),ce&&(ce=clearInterval(ce))):(ce||(be=we.now(),ce=setInterval(Mo,gt)),fe=1,wt(nt))}}const Po=1664525,$o=1013904223,rt=4294967296;function Lo(){let e=1;return()=>(e=(Po*e+$o)%rt)/rt}function Wo(e){return e.x}function Ro(e){return e.y}var Uo=10,zo=Math.PI*(3-Math.sqrt(5));function kt(e){var t,o=1,n=.001,r=1-Math.pow(n,1/300),s=0,i=.6,l=new Map,u=yt(m),a=ht("tick","end"),d=Lo();e==null&&(e=[]);function m(){w(),a.call("tick",t),o1?(f==null?l.delete(p):l.set(p,x(f)),t):l.get(p)},find:function(p,f,c){var v=0,C=e.length,k,j,_,S,I;for(c==null?c=1/0:c*=c,v=0;v1?(a.on(p,f),t):a.on(p)}}}function _t(){var e,t,o,n,r=L(-30),s,i=1,l=1/0,u=.81;function a(h){var x,p=e.length,f=Te(e,Wo,Ro).visitAfter(m);for(n=h,x=0;x=l)return;(h.data!==t||h.next)&&(c===0&&(c=G(o),k+=c*c),v===0&&(v=G(o),k+=v*v),k{var p,f;for(const c of l){const v=o==null?void 0:o[c.id];v&&(v.x=(p=c.x)!=null?p:0,v.y=(f=c.y)!=null?f:0)}});const d=()=>{a.alpha(.1).restart()},m=p=>{for(const[f,c]of Object.entries(p)){const v=u[f];v.fx=c.x,v.fy=c.y}d()},w=p=>{var f;for(const[c,v]of Object.entries(p)){const C=this.getNodeLayout(o,c),k=(f=u==null?void 0:u[c])!=null?f:{x:0,y:0};C.value.fixed||this.options.positionFixedByDrag?(k.fx=v.x,k.fy=v.y,C.value.fixed=!0):(k.x=v.x,k.y=v.y,delete k.fx,delete k.fy)}d()},h=({node:p,event:f})=>{if(this.options.positionFixedByClickWithAltKey&&f.altKey){const c=this.getNodeLayout(o,p);let v=u==null?void 0:u[p];v||(v={id:p,x:0,y:0},u[p]=v),c.value.fixed?(delete c.value.fixed,v.x=v.fx||v.x,v.y=v.fy||v.y,delete v.fx,delete v.fy):(c.value.fixed=!0,v.fx=v.x,v.fy=v.y),d()}},x=Y(()=>[Object.keys(n.value),r.value],()=>{const p=i.getViewArea();({nodeLayouts:l,nodeLayoutMap:u}=this.buildNodeLayouts(n.value,o,p.center)),a.nodes(l);const f=a.force("edge");f&&f.links(this.forceLayoutEdges(r.value)),d()},{deep:!0});s.on("node:dragstart",m),s.on("node:pointermove",m),s.on("node:dragend",w),s.on("node:click",h),this.onDeactivate=()=>{a.stop(),x(),s.off("node:dragstart",m),s.off("node:pointermove",m),s.off("node:dragend",w),s.off("node:click",h)}}deactivate(){this.onDeactivate&&this.onDeactivate()}createSimulation(t,o){if(this.options.createSimulation)return this.options.createSimulation(Ko,t,o);{const n=vt(o).id(r=>r.id);return kt(t).force("edge",n.distance(100)).force("charge",_t()).force("collide",pt(50).strength(.2)).force("center",dt().strength(.05)).alphaMin(.001)}}buildNodeLayouts(t,o,n){const r=Object.keys(t).filter(l=>!(l in o));for(const l of r)o[l]=je({},n);const s=this.forceNodeLayouts(o),i=Object.fromEntries(s.map(l=>[l.id,l]));return{nodeLayouts:s,nodeLayoutMap:i}}forceNodeLayouts(t){return Object.entries(t).map(([o,n])=>n.fixed?fo(je({id:o},n),{fx:n.x,fy:n.y}):je({id:o},n))}forceLayoutEdges(t){return Object.values(t).map(o=>({source:o.source,target:o.target}))}getNodeLayout(t,o){const n=Mt(t,o);return n.value||(n.value={x:0,y:0}),n}}const Go=P(" No results "),Yo=ne({props:{modelValue:{type:Object,default:null},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=D({get(){return o.modelValue},set(u){t("update:modelValue",u)}}),r=B(""),s=me(),i=D(()=>s.state.Project.projects.filter(u=>u.title.indexOf(r.value)>=0||u.id.toString().indexOf(r.value)>=0)),l=(u,a,d)=>{const m=()=>r.value=u;i.value.length===0?s.dispatch("Project/fetchProjects",{orgId:o.orgId}).then(()=>a(m)):a(m)};return(u,a)=>(M(),$(N(lt),{modelValue:N(n),"onUpdate:modelValue":a[0]||(a[0]=d=>at(n)?n.value=d:null),label:"\u9879\u76EE\u5217\u8868","map-options":"","emit-value":"",dark:"",color:"text-white",standout:"bg-white text-black",behavior:"menu",options:N(i).map(d=>({label:d.title,value:d})),onFilter:l},{"no-option":F(()=>[b(H,null,{default:F(()=>[b(K,{class:"text-grey"},{default:F(()=>[Go]),_:1})]),_:1})]),_:1},8,["modelValue","options"]))}});var Xo=oe(Yo,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/SelectProject.vue"]]);const Zo=ne({props:{modelValue:{type:Array,default:null},projectId:{type:Number,required:!0},workflowId:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=D({get(){return o.modelValue},set(u){t("update:modelValue",u)}}),r=B(""),s=me(),i=D(()=>{var u;return((u=s.state.WorkFlowTask.tasks.get(o.projectId))==null?void 0:u.filter(a=>(a.workflowId===0||a.workflowId===o.workflowId)&&(a.name.indexOf(r.value)>=0||a.id.indexOf(r.value)>=0)))||[]}),l=(u,a,d)=>{const m=()=>r.value=u;i.value.length===0?s.dispatch("WorkFlowTask/fetchTasks",{projectId:o.projectId}).then(()=>a(m)):a(m)};return ie(()=>{Y(()=>o.projectId,(u,a)=>{t("update:modelValue",void 0)})}),(u,a)=>(M(),$(N(lt),{modelValue:N(n),"onUpdate:modelValue":a[0]||(a[0]=d=>at(n)?n.value=d:null),label:"\u4EFB\u52A1\u5217\u8868","map-options":"","emit-value":"",dark:"",color:"text-white",standout:"bg-white text-black",behavior:"menu",multiple:"",disable:o.disabled,options:N(i).map(d=>({label:d.name,value:d})),onFilter:l},null,8,["modelValue","disable","options"]))}});var en=oe(Zo,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/SelectWorkFlowTask.vue"]]);function Ce(e){const t=Object.assign({},e);return t.deps&&(t.deps=Object.assign([],t.deps)),t}function tn(e){const t=new Map,o=new Map;for(const l of e)if(t.set(l.id,l.deps||[]),l.deps)for(const u of l.deps){const a=o.get(u)||[];a.push(l.id),o.set(u,a)}let n=[];const r=new Map;t.forEach((l,u)=>{r.set(u,l.length),r.get(u)===0&&n.push(u)});const s=[];s.push(Object.assign([],n)),n=n.reverse();let i=[];for(;;){const l=n.pop();if(l===void 0){if(i.length===0)break;n=i.reverse(),s.push(Object.assign([],i)),i=[]}else{const u=o.get(l);if(!u)continue;for(const a of u){let d=r.get(a);d!==void 0&&(d--,r.set(a,d),d===0&&i.push(a))}}}return s}const on=ue("div",{class:"text-h6"},"\u6DFB\u52A0\u65B0\u7684\u4EFB\u52A1\u8282\u70B9",-1),nn={class:"tw-flex tw-flex-col tw-gap-2"},rn=P("\u6DFB\u52A0"),an=P("\u6DFB\u52A0"),ln=P("\u91CD\u7F6E\u89C6\u56FE"),sn=P("\u91CD\u7F6E"),un=ne({props:{workflowId:{type:Number,required:!0},tasks:{type:Object,required:!0},modelValue:{type:Object,default:new Array(0)},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const n=e,r=B(!1),s=B(!1),i=B(),l=B(),u=B([]),a=B([]),d=y=>k[y].name||y,m=y=>y.join(" -> "),w=y=>y.map(g=>k[g].name).join(" -> "),h=y=>{const g=y.split(" -> ");if(g.length!==2)throw new Error(`Invalid edge name: ${y}`);return[g[0],g[1]]},x="#99F6e4",p=new Ho,f=y=>y?y.color:x,c=y=>y?y.color:x,v={view:{layoutHandler:p,scalingObjects:!1,fit:!1},node:{selectable:!0,label:{direction:Dt.NORTH,color:f},normal:{color:f},hover:{color:f},focusring:{color:x}},edge:{selectable:!0,normal:{color:c},hover:{color:c},selected:{color:c,width:4,dasharray:"10",linecap:"round",animate:!0,animationSpeed:10},marker:{source:{type:"none",width:4,height:4,margin:-1,units:"strokeWidth",color:null},target:{type:"arrow",width:4,height:4,margin:-1,units:"strokeWidth",color:null}}}},C=D(()=>{const y=()=>{var E;(E=l.value)==null||E.hide()};return{"view:load":()=>{},"view:contextmenu":E=>{const{event:A}=E;A.stopPropagation(),A.preventDefault();const O=l.value;O&&(y(),O.show(A))},"node:select":E=>{y()},"edge:select":E=>{y()}}}),k=Ke({}),j=y=>{var E;const g=(E=y.state)==null?void 0:E.currentStatus;return g==="done"?x:g==="running"?"green":g==="failed"?"red":g==="starting"?"white":"gray"},_=D(()=>{const y={};for(const g of n.modelValue)y[g.id]={id:g.id,name:g.name,color:j(g)};return y}),S=D(()=>{const y=new Map;for(const g of n.modelValue)y.set(g.id,g);return y});function I(y){for(const g of Object.keys(k))delete k[g];for(const g of Object.keys(y))k[g]=Object.assign({},y[g]);u.value=[]}const T=Ke({}),V=D(()=>{const y={};for(const g of n.modelValue)if(!!g.deps)for(const E of g.deps)y[m([E,g.id])]={source:E,target:g.id,color:j(g)};return y});function R(y){for(const g of Object.keys(T))delete T[g];for(const g of Object.keys(y))T[g]=Object.assign({},y[g]);a.value=[]}const W=B({nodes:{}}),U=D(()=>{const y={},g=tn(n.modelValue),E=50,A=50;let O=0;for(const ee of g){let de=0;for(const At of ee)y[At]={x:de*E+O*E/2,y:O*A,fixed:!1},de++;O++}return{nodes:y}});function Me(y){const g=W.value.nodes;for(const E of Object.keys(g))delete g[E];for(const E of Object.keys(y.nodes))g[E]=Object.assign({},y.nodes[E])}function De(){I(_.value),R(V.value),Me(U.value)}function xt(y,g){let E=0,A=!1;for(const O of y){if(O.id===g){y.splice(E,1),A=!0;break}E++}if(!A)throw new Error(`Can not remove node: ${g}`);for(const O of y)if(O.deps!==void 0){const ee=O.deps.indexOf(g,0);ee>-1&&(O.deps.splice(ee,1),O.deps.length===0&&delete O.deps)}}function Pe(y){const g=n.modelValue.map(Ce);y.forEach(E=>xt(g,E)),o("update:modelValue",g)}function Fe(y,g){const E=n.modelValue.map(Ce);for(const A of E)if(A.id===g){A.deps||(A.deps=[]),A.deps.push(y),Nt(),o("update:modelValue",E);return}throw new Error(`Can not add edge: ${m([y,g])}`)}function bt(y,g,E){for(const A of y)if(A.id===E&&A.deps!==void 0){const O=A.deps.indexOf(g,0);if(O>-1){A.deps.splice(O,1),A.deps.length===0&&delete A.deps;return}}throw new Error(`Can not remove edge: ${m([g,E])}`)}function $e(y){const g=n.modelValue.map(Ce);for(const E of y){const[A,O]=h(E);bt(g,A,O)}o("update:modelValue",g)}function Nt(){a.value.splice(0,a.value.length),u.value.splice(0,u.value.length)}function Le(){o("update:modelValue",n.tasks)}const We=(y,g)=>T[m([y,g])]===void 0&&T[m([g,y])]===void 0,Ft=D(()=>{const y=u.value;if(y.length===2){const[g,E]=y;return We(g,E)}return!1}),ye=B(!1),X=B(),Z=B([]);function Re(){ye.value=!0}function Ue(){X.value=void 0,Z.value=[],ye.value=!1}function Et(){const y=[];Z.value.forEach((g,E,A)=>{var O;y.push({name:g.name,id:`${(O=X.value)==null?void 0:O.id}_${g.id}`,origin:g})}),o("update:modelValue",[...n.modelValue,...y]),Ue()}ie(()=>{Y(()=>n.tasks,(E,A)=>{r.value=!1,s.value=!1,g.value=void 0,Le()}),Y(()=>n.modelValue,E=>{I(_.value),R(V.value),JSON.stringify(E)===JSON.stringify(n.tasks)&&Me(U.value),r.value=!0});function y(E,A){try{for(const O of Object.keys(E)){const ee=E[O],de=A[O];if(Math.abs(ee.x-de.x)>.5||Math.abs(ee.y-de.y)>.5)return!1}}catch{return!1}return!0}const g=B();Y(()=>[W.value,i.value,r.value],([E,A,O])=>{!s.value&&A&&O&&y(E.nodes,g.value)&&setTimeout(()=>{Ae(()=>{A.panToCenter(),s.value=!0})},500),g.value=JSON.parse(JSON.stringify(Pt(W.value.nodes)))},{deep:!0})});function It(){Pe(u.value)}function jt(){$e(a.value)}function Ct(){const[y]=u.value,g=Se(()=>{if(u.value.length!==1)return;const[E]=u.value;y===E||!We(y,E)||(Fe(y,E),g())})}return t({ShowAddNodeDialog:Re,RemoveSelectedNodes:It,SelectedNodes:u,RemoveSelectedEdges:jt,SelectedEdges:a,ResetView:De,AddEdge:Fe,SetAddEdgeMode:Ct,NodeMapTask:S}),(y,g)=>{const E=$t("v-network-graph");return M(),ge(Ut,null,[r.value?(M(),$(E,{key:0,ref_key:"graph",ref:i,"selected-nodes":u.value,"onUpdate:selected-nodes":g[0]||(g[0]=A=>u.value=A),"selected-edges":a.value,"onUpdate:selected-edges":g[1]||(g[1]=A=>a.value=A),layouts:W.value,"onUpdate:layouts":g[2]||(g[2]=A=>W.value=A),class:Lt(s.value?"":"tw-opacity-0"),nodes:N(k),edges:N(T),configs:v,"zoom-level":.75,"event-handlers":N(C)},null,8,["selected-nodes","selected-edges","layouts","class","nodes","edges","zoom-level","event-handlers"])):J("v-if",!0),b(Wt,{modelValue:ye.value,"onUpdate:modelValue":g[5]||(g[5]=A=>ye.value=A),class:"tw-w-screen tw-h-screen",onHide:Ue},{default:F(()=>[b(st,{class:"tw-w-96 q-pa-sm"},{default:F(()=>[b(se,null,{default:F(()=>[on]),_:1}),b(se,null,{default:F(()=>[ue("div",nn,[b(Xo,{modelValue:X.value,"onUpdate:modelValue":g[3]||(g[3]=A=>X.value=A),"org-id":e.orgId},null,8,["modelValue","org-id"]),b(en,{modelValue:Z.value,"onUpdate:modelValue":g[4]||(g[4]=A=>Z.value=A),disabled:X.value===void 0,"project-id":X.value?X.value.id:0,"workflow-id":n.workflowId},null,8,["modelValue","disabled","project-id","workflow-id"])])]),_:1}),b(zt,{align:"around"},{default:F(()=>[b(q,{class:"tw-w-full tw-mx-2 tw-my-3",color:Z.value?"primary":"","text-color":Z.value?"black":"white",disable:!Z.value,onClick:Et},{default:F(()=>[rn]),_:1},8,["color","text-color","disable"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),b(N(Rt),{ref_key:"viewMenu",ref:l,"touch-position":"","context-menu":""},{default:F(()=>[b(Qt,{dense:""},{default:F(()=>[re((M(),$(H,{key:"add-task",clickable:"",onClick:Re},{default:F(()=>[b(K,null,{default:F(()=>[an]),_:1})]),_:1})),[[ae,!0]]),N(Ft)?re((M(),$(H,{key:"add-edge",clickable:"",onClick:g[6]||(g[6]=()=>Fe(u.value[0],u.value[1]))},{default:F(()=>[b(K,null,{default:F(()=>[P("\u6DFB\u52A0\u6307\u5411\uFF1A"+he(w(u.value)),1)]),_:1})]),_:1})),[[ae,!0]]):J("v-if",!0),a.value.length>0?re((M(),$(H,{key:"remove-edge",clickable:"",onClick:g[7]||(g[7]=()=>$e(a.value))},{default:F(()=>[b(K,null,{default:F(()=>[P(" \u5220\u9664\u6307\u5411\uFF1A"+he(a.value.map(h).map(w).join(", ")),1)]),_:1})]),_:1})),[[ae,!0]]):J("v-if",!0),u.value.length>0?re((M(),$(H,{key:"remove-task",clickable:"",onClick:g[8]||(g[8]=()=>Pe(u.value))},{default:F(()=>[b(K,null,{default:F(()=>[P(" \u5220\u9664\u8282\u70B9\uFF1A"+he(u.value.map(d).join(", ")),1)]),_:1})]),_:1})),[[ae,!0]]):J("v-if",!0),b(it),re((M(),$(H,{key:"reset-view",clickable:"",onClick:De},{default:F(()=>[b(K,null,{default:F(()=>[ln]),_:1})]),_:1})),[[ae,!0]]),re((M(),$(H,{key:"reset",clickable:"",onClick:Le},{default:F(()=>[b(K,null,{default:F(()=>[sn]),_:1})]),_:1})),[[ae,!0]])]),_:1})]),_:1},512)],64)}}});var fn=oe(un,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowGraph.vue"]]);const dn={class:"tw-w-full tw-h-full tw-flex tw-flex-col"},cn={class:"tw-flex tw-flex-row tw-gap-4 tw-flex-wrap tw-grow-0"},pn=P(" \u8FD0\u884C "),vn=P(" Kill "),hn=P(" \u4FDD\u5B58 "),gn=P(" \u5237\u65B0 "),wn=P(" \u91CD\u7F6E\u89C6\u56FE "),mn=P(" \u6DFB\u52A0\u65B0\u4EFB\u52A1\u8282\u70B9 "),yn=P(" \u5173\u8054\u8282\u70B9 "),kn=P(" \u5220\u9664\u8282\u70B9\uFF08\u5173\u7CFB\uFF09 "),_n=P(" \u4EFB\u52A1\u8BE6\u60C5 "),xn=P(" \u4EFB\u52A1\u65E5\u5FD7 "),bn={class:"tw-grow tw-w-full tw-overflow-hidden"},Nn=ne({props:{id:{type:Number,required:!0},orgId:{type:String,required:!0}},setup(e){const t=e,{width:o}=ft(),n=D(()=>o.value<1024),r=B(),s=D(()=>r.value===void 0||r.value.SelectedNodes.length===0&&r.value.SelectedEdges.length===0),i=D(()=>{if(!r.value||r.value.SelectedNodes.length!==1)return;const j=r.value.SelectedNodes;return r.value.NodeMapTask.get(j[j.length-1])}),l=B([]),u=B([]),a=me(),d=B(!1),m=B(!1),w=B();async function h(){w.value=await Kt(t.id)}const x=D(()=>w.value!==void 0&&w.value.state!==null&&w.value.state.status==="running");async function p(j){const _=new Map,S=new Map;for(const I of j){const V=a.state.Root.workflowTasks.find(W=>W.id===I.taskId);if(V===void 0)throw new Error(`workflowTasks missing projectId=${I.projectId} taskId=${I.taskId}`);const R=`${I.projectId}_${I.taskId}`;if(S.set(R,V),_.has(R)||_.set(R,[]),I.dependencyProjectId>0&&I.dependencyTaskId!==""){const W=`${I.dependencyProjectId}_${I.dependencyTaskId}`,U=_.get(R);U!==void 0&&_.set(R,[...U,W])}}return Array.from(_.keys()).map(I=>{const T=S.get(I);if(T===void 0)throw new Error(`keyMapTask missing ${I}`);return{name:T.name,id:I,deps:_.get(I),origin:T,state:a.state.Root.workflowTaskStates.find(V=>V.projectId===T.projectId&&V.taskId===T.id)}})}function f(j){const _=[],S=new Map;for(const I of j)S.set(I.id,I.origin);for(const I of j)if(I.deps!==void 0&&I.deps.length>0)for(const T of I.deps){const V=S.get(T);if(V===void 0)throw new Error("original task object missing");_.push({id:0,workflowId:0,createTime:0,projectId:I.origin.projectId,taskId:I.origin.id,dependencyProjectId:V.projectId,dependencyTaskId:V.id})}else _.push({id:0,workflowId:0,createTime:0,projectId:I.origin.projectId,taskId:I.origin.id,dependencyProjectId:0,dependencyTaskId:""});return _}async function c(j=!1){await a.dispatch("fetchWorkflowEdges",{workflowId:t.id});const _=await p(a.state.Root.workflowEdges);j?u.value=_:l.value=_}ie(()=>{console.log("subscribe"),a.dispatch("subscribeTopic",["/workflow/status/"+t.id,"/workflow/task/status/"+t.id]),h(),c(),Y(()=>t.id,async j=>{console.log("subscribe"),a.dispatch("subscribeTopic",["/workflow/status/"+t.id,"/workflow/task/status/"+t.id]),await h(),await c()}),a.watch(j=>[j.Root.eventWorkFlowTask,j.Root.eventWorkFlow],async([j,_])=>{(j===void 0||j.workFlowId!==t.id)&&(_===void 0||_.workFlowId!==t.id)||(await h(),await c(!0))})});const v=D(()=>{const j=_=>_.map(S=>Je(qe({},S),{origin:void 0,state:void 0}));return JSON.stringify(j(l.value))!==JSON.stringify(j(u.value))}),C=B(!1);async function k(){C.value=!0,await a.dispatch("updateWorkFlowEdges",{workflowId:t.id,edges:f(u.value)}),await c(),C.value=!1}return(j,_)=>(M(),ge("div",dn,[b(Ge,{modelValue:d.value,"onUpdate:modelValue":_[0]||(_[0]=S=>d.value=S),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:_[1]||(_[1]=()=>N(qt)(N(a).getters.apiv1,t.id).then(()=>{d.value=!1,c()}))},null,8,["modelValue"]),b(Ge,{modelValue:m.value,"onUpdate:modelValue":_[2]||(_[2]=S=>m.value=S),type:"warning",content:"\u786E\u5B9A\u8981\u505C\u6B62\u6267\u884C\u5417\uFF1F",onConfirm:_[3]||(_[3]=()=>N(Jt)(t.id).then(()=>{m.value=!1,c()}))},null,8,["modelValue"]),ue("div",cn,[N(x)?(M(),$(q,{key:1,dense:N(n),color:"red",onClick:_[5]||(_[5]=S=>m.value=!0)},{default:F(()=>[vn]),_:1},8,["dense"])):(M(),$(q,{key:0,dense:N(n),color:"primary","text-color":"black",loading:N(x),onClick:_[4]||(_[4]=S=>d.value=!0)},{default:F(()=>[pn]),_:1},8,["dense","loading"])),b(q,{dense:N(n),color:N(v)?"primary":"","text-color":N(v)?"black":"white",disable:!N(v),loading:C.value,onClick:k},{default:F(()=>[hn]),_:1},8,["dense","color","text-color","disable","loading"]),b(q,{dense:N(n),flat:"",icon:"refresh",title:"\u5237\u65B0",onClick:_[6]||(_[6]=()=>c())},{default:F(()=>[gn]),_:1},8,["dense"]),b(q,{dense:N(n),flat:"",icon:"restart_alt",title:"\u91CD\u7F6E\u89C6\u56FE",onClick:_[7]||(_[7]=()=>r.value.ResetView())},{default:F(()=>[wn]),_:1},8,["dense"]),b(q,{dense:N(n),flat:"",icon:"add",title:"\u6DFB\u52A0\u65B0\u4EFB\u52A1\u8282\u70B9",onClick:_[8]||(_[8]=()=>r.value.ShowAddNodeDialog())},{default:F(()=>[mn]),_:1},8,["dense"]),N(i)!==void 0?(M(),$(q,{key:"create_relationship",dense:N(n),flat:"",icon:"north_east",title:"\u5173\u8054\u8282\u70B9",disable:!r.value||r.value.SelectedNodes.length!==1,onClick:_[9]||(_[9]=()=>{r.value.SetAddEdgeMode(),N(a).getters.$q.notify({type:"info",message:"\u8BF7\u9009\u62E9\u6709\u6548\u7684\u4E0B\u6E38\u8282\u70B9",icon:"tips_and_updates",position:"top-right"})})},{default:F(()=>[yn]),_:1},8,["dense","disable"])):J("v-if",!0),N(i)!==void 0?(M(),$(q,{key:"delete_task_or_relationship",dense:N(n),icon:"delete",disable:N(s),title:"\u5220\u9664\u5DF2\u9009\u7684\u8282\u70B9\u53CA\u8282\u70B9\u5173\u8054\u5173\u7CFB",flat:"",onClick:_[10]||(_[10]=()=>{r.value.SelectedNodes.length>0&&r.value.RemoveSelectedNodes(),r.value.SelectedEdges.length>0&&r.value.RemoveSelectedEdges()})},{default:F(()=>[kn]),_:1},8,["dense","disable"])):J("v-if",!0),N(i)!==void 0?(M(),$(q,{key:"jump_task_detail",dense:N(n),icon:"task_alt",flat:"",to:{name:"workflow_task",params:{projectId:N(i).origin.projectId,taskId:N(i).origin.id}}},{default:F(()=>[_n]),_:1},8,["dense","to"])):J("v-if",!0),N(i)!==void 0?(M(),$(q,{key:"jump_task_logs",dense:N(n),icon:"view_timeline",flat:"",to:{name:"workflow_task_logs",params:{projectId:N(i).origin.projectId,taskId:N(i).origin.id}}},{default:F(()=>[xn]),_:1},8,["dense","to"])):J("v-if",!0)]),ue("div",bn,[b(fn,{ref_key:"workflow",ref:r,modelValue:u.value,"onUpdate:modelValue":_[11]||(_[11]=S=>u.value=S),"org-id":e.orgId,"workflow-id":t.id,tasks:l.value},null,8,["modelValue","org-id","workflow-id","tasks"])])]))}});var Fn=oe(Nn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowGraph.vue"]]);const En={key:0,class:"text-h6"},In={key:1,class:"text-h6"},jn=ne({props:{id:{type:Number,default:0}},setup(e){const t=e,o=B({id:0,title:"",oid:"",cronExpr:"0 0 0 * * * *",remark:"",createTime:0,status:Ht,state:null}),n=Gt(),r=me(),s=D(()=>r.state.WorkFlow.workflows.get(t.id)),i=B(o.value),l=B(!0);Y(s,(f,c)=>{l.value&&(i.value=Object.assign({},s.value||o.value))});function u(){i.value=Object.assign({},s.value||o.value)}const a=B(!1);async function d(){a.value=!0;try{const f=i.value;w.value?(await Zt(r.getters.apiv1,r.getters.currentOrg,f.title.trim(),f.remark.trim(),f.cronExpr.trim(),f.status),n.push({name:"workflows"})):(await eo(r.getters.apiv1,i.value),l.value=!0,r.commit("success",{message:"\u66F4\u65B0\u6210\u529F"}),await h())}catch(f){console.error(f),r.commit("error",{error:f})}a.value=!1}const m=ut(),w=D(()=>m.name&&m.name.toString()==="create_workflow");async function h(){w.value||r.dispatch("WorkFlow/fetchWorkFlow",{id:t.id})}const x=D(()=>JSON.stringify(s.value)!==JSON.stringify(i.value)),p=D(()=>{const{title:f,cronExpr:c}=i.value;return f.trim()!==""&&c.trim()!==""});return ie(()=>{h(),Y(()=>t.id,async f=>{await h()})}),(f,c)=>(M(),$(Xt,{onSubmit:d,onReset:u},{default:F(()=>[b(se,null,{default:F(()=>[N(w)?(M(),ge("div",En,"\u521B\u5EFA\u4EFB\u52A1\u7F16\u6392")):(M(),ge("div",In,"\u4EFB\u52A1\u7F16\u6392\u8BE6\u60C5"))]),_:1}),b(se,null,{default:F(()=>[b(Ee,{modelValue:i.value.title,"onUpdate:modelValue":c[0]||(c[0]=v=>i.value.title=v),type:"text",label:"\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),b(Ee,{key:"cron",modelValue:i.value.cronExpr,"onUpdate:modelValue":c[1]||(c[1]=v=>i.value.cronExpr=v),label:"\u8C03\u5EA6\u8BA1\u5212 (*\u79D2 *\u5206 *\u65F6 *\u65E5 *\u6708 *\u5468 *\u5E74)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),b(Ee,{modelValue:i.value.remark,"onUpdate:modelValue":c[2]||(c[2]=v=>i.value.remark=v),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"]),b(Yt,{key:"status",modelValue:i.value.status,"onUpdate:modelValue":c[3]||(c[3]=v=>i.value.status=v),"false-value":2,"true-value":1,label:"\u662F\u5426\u542F\u7528",class:"tw-mb-4"},null,8,["modelValue"])]),_:1}),b(se,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:F(()=>[b(q,{type:"reset",flat:"",label:"\u91CD\u7F6E",class:"lg:tw-w-24 tw-w-full",disable:!N(x)},null,8,["disable"]),b(q,{color:"primary","text-color":"black",type:"submit",label:N(w)?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!N(x)||!N(p),loading:a.value,class:"lg:tw-w-24 tw-w-full"},null,8,["label","disable","loading"])]),_:1})]),_:1}))}});var Cn=oe(jn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowDetail.vue"]]);const An=P("\u5F00\u59CB\u65F6\u95F4"),Sn=P("\u7ED3\u675F\u65F6\u95F4"),Vn=ne({props:{id:{type:Number,required:!0}},setup(e){const t=e,o=me(),n=D(()=>o.state.Root.workflowLogs),r=D(()=>o.state.Root.workflowLogsTotal),s=D(()=>o.state.Root.loadingWorkflowLogs),i=B({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),l=B();ie(()=>{Ae(()=>{var d;(d=l.value)==null||d.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});const u=()=>{Ae(()=>{var m;const d=(m=l.value)==null?void 0:m.$el.querySelector(".scroll");d==null||d.scrollTo({top:0})})};function a({pagination:{page:d,rowsPerPage:m}}){const w=i.value;w.page=d,w.rowsPerPage=m,u()}return Se(()=>{const d=i.value;d.rowsNumber=r.value}),ie(async()=>{Se(async()=>{const d=i.value;await o.dispatch("fetchWorkFlowLogs",{workflowId:t.id,page:d.page,pageSize:d.rowsPerPage})})}),(d,m)=>(M(),$(N(oo),{ref_key:"table",ref:l,pagination:i.value,"onUpdate:pagination":m[0]||(m[0]=w=>i.value=w),class:"tw-w-full tw-h-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],title:"\u6267\u884C\u65E5\u5FD7",rows:N(n),loading:N(s),"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:a},{loading:F(()=>[b(to,{showing:"",color:"primary"})]),body:F(w=>[b(st,{class:"tw-my-4 tw-mx-4",flat:"",bordered:""},{default:F(()=>[b(H,null,{default:F(()=>[b(K,null,{default:F(()=>[b(ke,{overline:""},{default:F(()=>[An]),_:1}),b(ke,null,{default:F(()=>[P(he(N(Ye)(w.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),b(K,null,{default:F(()=>[b(ke,{overline:""},{default:F(()=>[Sn]),_:1}),b(ke,null,{default:F(()=>[P(he(N(Ye)(w.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),b(it),b(se,{class:"tw-w-full tw-overflow-x-auto"},{default:F(()=>[b(ro,{json:w.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var On=oe(Vn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowLogs.vue"]]);const Tn={class:"lg:tw-px-4 lg:tw-pt-2 tw-w-full tw-h-full tw-flex tw-flex-col tw-box-border"},Bn={class:"tw-flex tw-h-full tw-w-full tw-overflow-hidden"},Mn={class:"tw-hidden lg:tw-block"},Dn=ne({props:{id:{type:Number,default:0},orgId:{type:String,required:!0}},setup(e){const t=e,{width:o}=ft(),n=ut(),r=D(()=>n.name&&n.name.toString()==="create_workflow"),s=D(()=>{var i;if(r.value)return"detail";if(n.name){const l=n.name.toString();if(l==="workflow_logs")return"logs";if(l==="workflow_graph")return"graph";if(l==="workflow_detail")return"detail"}throw new Error(`Unknown route name ${(i=n.name)==null?void 0:i.toString()}`)});return(i,l)=>(M(),ge("div",Tn,[N(r)?J("v-if",!0):(M(),$(He,{key:0,"model-value":N(s),"active-color":"primary",align:"left",class:"lg:tw-hidden tw-display"},{default:F(()=>[b(le,{name:"graph",label:"\u6D41\u7A0B",to:{name:"workflow_graph",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"logs",label:"\u65E5\u5FD7",to:{name:"workflow_logs",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"detail",label:"\u8BE6\u60C5",to:{name:"workflow_detail",params:{workflowId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"])),ue("div",Bn,[b(no,{"model-value":N(s),animated:"",vertical:N(o)>=1024,class:"tw-w-full tw-h-full tw-bg-[#121212] tw-p-0 lg:tw-pr-4 tw-box-border"},{default:F(()=>[b(Ie,{name:"graph"},{default:F(()=>[b(Fn,{id:t.id,"org-id":e.orgId},null,8,["id","org-id"])]),_:1}),b(Ie,{name:"logs"},{default:F(()=>[b(On,{id:t.id},null,8,["id"])]),_:1}),b(Ie,{name:"detail"},{default:F(()=>[b(Cn,{id:t.id},null,8,["id"])]),_:1})]),_:1},8,["model-value","vertical"]),ue("div",Mn,[N(r)?J("v-if",!0):(M(),$(He,{key:0,"model-value":N(s),"active-color":"primary",vertical:"","switch-indicator":"",align:"left"},{default:F(()=>[b(le,{name:"graph",label:"\u6D41\u7A0B",to:{name:"workflow_graph",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"logs",label:"\u65E5\u5FD7",to:{name:"workflow_logs",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"detail",label:"\u8BE6\u60C5",to:{name:"workflow_detail",params:{workflowId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"]))])])]))}});var zn=oe(Dn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowTabs.vue"]]);export{zn as default}; +var St=Object.defineProperty,Vt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var ze=Object.getOwnPropertySymbols;var Tt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Qe=(e,t,o)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,qe=(e,t)=>{for(var o in t||(t={}))Tt.call(t,o)&&Qe(e,o,t[o]);if(ze)for(var o of ze(t))Bt.call(t,o)&&Qe(e,o,t[o]);return e},Je=(e,t)=>Vt(e,Ot(t));import{I as Y,aE as Mt,_ as oe,k as ne,l as D,r as B,u as me,o as M,c as $,w as F,a as b,T as K,S as H,A as N,E as at,z as lt,d as P,m as ie,aF as Dt,aD as Ke,P as Ae,ap as Pt,ag as $t,K as ge,a2 as Lt,p as J,F as Wt,aG as Rt,Y as Ut,n as Se,i as st,Q as se,b as ue,D as zt,h as q,al as Qt,x as re,t as he,e as it,C as ae,aH as qt,aI as Jt,aJ as Kt,aK as Ht,J as Gt,H as ut,f as Ee,B as Yt,M as Xt,aL as Zt,aM as eo,R as to,U as ke,V as oo,a3 as He,a6 as no,a5 as le,a7 as Ie}from"./index.f89dd3dd.js";import{u as ft}from"./index.c4564906.js";import{C as Ge}from"./Confirm.4116c3bd.js";import{J as ro}from"./JSONViewer.177a839e.js";import{f as Ye}from"./datetime.561112b0.js";var ao=Object.defineProperty,lo=Object.defineProperties,so=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,Ze=(e,t,o)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,je=(e,t)=>{for(var o in t||(t={}))io.call(t,o)&&Ze(e,o,t[o]);if(Xe)for(var o of Xe(t))uo.call(t,o)&&Ze(e,o,t[o]);return e},fo=(e,t)=>lo(e,so(t));function dt(e,t){var o,n=1;e==null&&(e=0),t==null&&(t=0);function r(){var s,i=o.length,l,u=0,a=0;for(s=0;s=(m=(l+a)/2))?l=m:a=m,(f=o>=(w=(u+d)/2))?u=w:d=w,r=s,!(s=s[c=f<<1|p]))return r[c]=i,e;if(h=+e._x.call(null,s.data),x=+e._y.call(null,s.data),t===h&&o===x)return i.next=s,r?r[c]=i:e._root=i,e;do r=r?r[c]=new Array(4):e._root=new Array(4),(p=t>=(m=(l+a)/2))?l=m:a=m,(f=o>=(w=(u+d)/2))?u=w:d=w;while((c=f<<1|p)===(v=(x>=w)<<1|h>=m));return r[v]=s,r[c]=i,e}function po(e){var t,o,n=e.length,r,s,i=new Array(n),l=new Array(n),u=1/0,a=1/0,d=-1/0,m=-1/0;for(o=0;od&&(d=r),sm&&(m=s));if(u>d||a>m)return this;for(this.cover(u,a).cover(d,m),o=0;oe||e>=r||n>t||t>=s;)switch(a=(td||(l=x.y0)>m||(u=x.x1)=c)<<1|e>=f)&&(x=w[w.length-1],w[w.length-1]=w[w.length-1-p],w[w.length-1-p]=x)}else{var v=e-+this._x.call(null,h.data),C=t-+this._y.call(null,h.data),k=v*v+C*C;if(k=(w=(i+u)/2))?i=w:u=w,(p=m>=(h=(l+a)/2))?l=h:a=h,t=o,!(o=o[f=p<<1|x]))return this;if(!o.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,c=f)}for(;o.data!==e;)if(r=o,!(o=o.next))return this;return(s=o.next)&&delete o.next,r?(s?r.next=s:delete r.next,this):t?(s?t[f]=s:delete t[f],(o=t[0]||t[1]||t[2]||t[3])&&o===(t[3]||t[2]||t[1]||t[0])&&!o.length&&(n?n[c]=o:this._root=o),this):(this._root=s,this)}function yo(e){for(var t=0,o=e.length;tw.index){var R=h-I.x-I.vx,W=x-I.y-I.vy,U=R*R+W*W;Uh+V||_x+V||Sa.r&&(a.r=a[d].r)}function u(){if(!!t){var a,d=t.length,m;for(o=new Array(d),a=0;a[t(j,_,i),j])),k;for(f=0,l=new Array(c);f{}};function ht(){for(var e=0,t=arguments.length,o={},n;e=0&&(n=o.slice(r+1),o=o.slice(0,r)),o&&!t.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:n}})}_e.prototype=ht.prototype={constructor:_e,on:function(e,t){var o=this._,n=Vo(e+"",o),r,s=-1,i=n.length;if(arguments.length<2){for(;++s0)for(var o=new Array(r),n=0,r,s;n=0&&e._call.call(void 0,t),e=e._next;--fe}function nt(){te=(be=we.now())+Ne,fe=pe=0;try{Bo()}finally{fe=0,Do(),te=0}}function Mo(){var e=we.now(),t=e-be;t>gt&&(Ne-=t,be=e)}function Do(){for(var e,t=xe,o,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(o=t._next,t._next=null,t=e?e._next=o:xe=o);ve=e,Oe(n)}function Oe(e){if(!fe){pe&&(pe=clearTimeout(pe));var t=e-te;t>24?(e<1/0&&(pe=setTimeout(nt,e-we.now()-Ne)),ce&&(ce=clearInterval(ce))):(ce||(be=we.now(),ce=setInterval(Mo,gt)),fe=1,wt(nt))}}const Po=1664525,$o=1013904223,rt=4294967296;function Lo(){let e=1;return()=>(e=(Po*e+$o)%rt)/rt}function Wo(e){return e.x}function Ro(e){return e.y}var Uo=10,zo=Math.PI*(3-Math.sqrt(5));function kt(e){var t,o=1,n=.001,r=1-Math.pow(n,1/300),s=0,i=.6,l=new Map,u=yt(m),a=ht("tick","end"),d=Lo();e==null&&(e=[]);function m(){w(),a.call("tick",t),o1?(f==null?l.delete(p):l.set(p,x(f)),t):l.get(p)},find:function(p,f,c){var v=0,C=e.length,k,j,_,S,I;for(c==null?c=1/0:c*=c,v=0;v1?(a.on(p,f),t):a.on(p)}}}function _t(){var e,t,o,n,r=L(-30),s,i=1,l=1/0,u=.81;function a(h){var x,p=e.length,f=Te(e,Wo,Ro).visitAfter(m);for(n=h,x=0;x=l)return;(h.data!==t||h.next)&&(c===0&&(c=G(o),k+=c*c),v===0&&(v=G(o),k+=v*v),k{var p,f;for(const c of l){const v=o==null?void 0:o[c.id];v&&(v.x=(p=c.x)!=null?p:0,v.y=(f=c.y)!=null?f:0)}});const d=()=>{a.alpha(.1).restart()},m=p=>{for(const[f,c]of Object.entries(p)){const v=u[f];v.fx=c.x,v.fy=c.y}d()},w=p=>{var f;for(const[c,v]of Object.entries(p)){const C=this.getNodeLayout(o,c),k=(f=u==null?void 0:u[c])!=null?f:{x:0,y:0};C.value.fixed||this.options.positionFixedByDrag?(k.fx=v.x,k.fy=v.y,C.value.fixed=!0):(k.x=v.x,k.y=v.y,delete k.fx,delete k.fy)}d()},h=({node:p,event:f})=>{if(this.options.positionFixedByClickWithAltKey&&f.altKey){const c=this.getNodeLayout(o,p);let v=u==null?void 0:u[p];v||(v={id:p,x:0,y:0},u[p]=v),c.value.fixed?(delete c.value.fixed,v.x=v.fx||v.x,v.y=v.fy||v.y,delete v.fx,delete v.fy):(c.value.fixed=!0,v.fx=v.x,v.fy=v.y),d()}},x=Y(()=>[Object.keys(n.value),r.value],()=>{const p=i.getViewArea();({nodeLayouts:l,nodeLayoutMap:u}=this.buildNodeLayouts(n.value,o,p.center)),a.nodes(l);const f=a.force("edge");f&&f.links(this.forceLayoutEdges(r.value)),d()},{deep:!0});s.on("node:dragstart",m),s.on("node:pointermove",m),s.on("node:dragend",w),s.on("node:click",h),this.onDeactivate=()=>{a.stop(),x(),s.off("node:dragstart",m),s.off("node:pointermove",m),s.off("node:dragend",w),s.off("node:click",h)}}deactivate(){this.onDeactivate&&this.onDeactivate()}createSimulation(t,o){if(this.options.createSimulation)return this.options.createSimulation(Ko,t,o);{const n=vt(o).id(r=>r.id);return kt(t).force("edge",n.distance(100)).force("charge",_t()).force("collide",pt(50).strength(.2)).force("center",dt().strength(.05)).alphaMin(.001)}}buildNodeLayouts(t,o,n){const r=Object.keys(t).filter(l=>!(l in o));for(const l of r)o[l]=je({},n);const s=this.forceNodeLayouts(o),i=Object.fromEntries(s.map(l=>[l.id,l]));return{nodeLayouts:s,nodeLayoutMap:i}}forceNodeLayouts(t){return Object.entries(t).map(([o,n])=>n.fixed?fo(je({id:o},n),{fx:n.x,fy:n.y}):je({id:o},n))}forceLayoutEdges(t){return Object.values(t).map(o=>({source:o.source,target:o.target}))}getNodeLayout(t,o){const n=Mt(t,o);return n.value||(n.value={x:0,y:0}),n}}const Go=P(" No results "),Yo=ne({props:{modelValue:{type:Object,default:null},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=D({get(){return o.modelValue},set(u){t("update:modelValue",u)}}),r=B(""),s=me(),i=D(()=>s.state.Project.projects.filter(u=>u.title.indexOf(r.value)>=0||u.id.toString().indexOf(r.value)>=0)),l=(u,a,d)=>{const m=()=>r.value=u;i.value.length===0?s.dispatch("Project/fetchProjects",{orgId:o.orgId}).then(()=>a(m)):a(m)};return(u,a)=>(M(),$(N(lt),{modelValue:N(n),"onUpdate:modelValue":a[0]||(a[0]=d=>at(n)?n.value=d:null),label:"\u9879\u76EE\u5217\u8868","map-options":"","emit-value":"",dark:"",color:"text-white",standout:"bg-white text-black",behavior:"menu",options:N(i).map(d=>({label:d.title,value:d})),onFilter:l},{"no-option":F(()=>[b(H,null,{default:F(()=>[b(K,{class:"text-grey"},{default:F(()=>[Go]),_:1})]),_:1})]),_:1},8,["modelValue","options"]))}});var Xo=oe(Yo,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/SelectProject.vue"]]);const Zo=ne({props:{modelValue:{type:Array,default:null},projectId:{type:Number,required:!0},workflowId:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=D({get(){return o.modelValue},set(u){t("update:modelValue",u)}}),r=B(""),s=me(),i=D(()=>{var u;return((u=s.state.WorkFlowTask.tasks.get(o.projectId))==null?void 0:u.filter(a=>(a.workflowId===0||a.workflowId===o.workflowId)&&(a.name.indexOf(r.value)>=0||a.id.indexOf(r.value)>=0)))||[]}),l=(u,a,d)=>{const m=()=>r.value=u;i.value.length===0?s.dispatch("WorkFlowTask/fetchTasks",{projectId:o.projectId}).then(()=>a(m)):a(m)};return ie(()=>{Y(()=>o.projectId,(u,a)=>{t("update:modelValue",void 0)})}),(u,a)=>(M(),$(N(lt),{modelValue:N(n),"onUpdate:modelValue":a[0]||(a[0]=d=>at(n)?n.value=d:null),label:"\u4EFB\u52A1\u5217\u8868","map-options":"","emit-value":"",dark:"",color:"text-white",standout:"bg-white text-black",behavior:"menu",multiple:"",disable:o.disabled,options:N(i).map(d=>({label:d.name,value:d})),onFilter:l},null,8,["modelValue","disable","options"]))}});var en=oe(Zo,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/SelectWorkFlowTask.vue"]]);function Ce(e){const t=Object.assign({},e);return t.deps&&(t.deps=Object.assign([],t.deps)),t}function tn(e){const t=new Map,o=new Map;for(const l of e)if(t.set(l.id,l.deps||[]),l.deps)for(const u of l.deps){const a=o.get(u)||[];a.push(l.id),o.set(u,a)}let n=[];const r=new Map;t.forEach((l,u)=>{r.set(u,l.length),r.get(u)===0&&n.push(u)});const s=[];s.push(Object.assign([],n)),n=n.reverse();let i=[];for(;;){const l=n.pop();if(l===void 0){if(i.length===0)break;n=i.reverse(),s.push(Object.assign([],i)),i=[]}else{const u=o.get(l);if(!u)continue;for(const a of u){let d=r.get(a);d!==void 0&&(d--,r.set(a,d),d===0&&i.push(a))}}}return s}const on=ue("div",{class:"text-h6"},"\u6DFB\u52A0\u65B0\u7684\u4EFB\u52A1\u8282\u70B9",-1),nn={class:"tw-flex tw-flex-col tw-gap-2"},rn=P("\u6DFB\u52A0"),an=P("\u6DFB\u52A0"),ln=P("\u91CD\u7F6E\u89C6\u56FE"),sn=P("\u91CD\u7F6E"),un=ne({props:{workflowId:{type:Number,required:!0},tasks:{type:Object,required:!0},modelValue:{type:Object,default:new Array(0)},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const n=e,r=B(!1),s=B(!1),i=B(),l=B(),u=B([]),a=B([]),d=y=>k[y].name||y,m=y=>y.join(" -> "),w=y=>y.map(g=>k[g].name).join(" -> "),h=y=>{const g=y.split(" -> ");if(g.length!==2)throw new Error(`Invalid edge name: ${y}`);return[g[0],g[1]]},x="#99F6e4",p=new Ho,f=y=>y?y.color:x,c=y=>y?y.color:x,v={view:{layoutHandler:p,scalingObjects:!1,fit:!1},node:{selectable:!0,label:{direction:Dt.NORTH,color:f},normal:{color:f},hover:{color:f},focusring:{color:x}},edge:{selectable:!0,normal:{color:c},hover:{color:c},selected:{color:c,width:4,dasharray:"10",linecap:"round",animate:!0,animationSpeed:10},marker:{source:{type:"none",width:4,height:4,margin:-1,units:"strokeWidth",color:null},target:{type:"arrow",width:4,height:4,margin:-1,units:"strokeWidth",color:null}}}},C=D(()=>{const y=()=>{var E;(E=l.value)==null||E.hide()};return{"view:load":()=>{},"view:contextmenu":E=>{const{event:A}=E;A.stopPropagation(),A.preventDefault();const O=l.value;O&&(y(),O.show(A))},"node:select":E=>{y()},"edge:select":E=>{y()}}}),k=Ke({}),j=y=>{var E;const g=(E=y.state)==null?void 0:E.currentStatus;return g==="done"?x:g==="running"?"green":g==="failed"?"red":g==="starting"?"white":"gray"},_=D(()=>{const y={};for(const g of n.modelValue)y[g.id]={id:g.id,name:g.name,color:j(g)};return y}),S=D(()=>{const y=new Map;for(const g of n.modelValue)y.set(g.id,g);return y});function I(y){for(const g of Object.keys(k))delete k[g];for(const g of Object.keys(y))k[g]=Object.assign({},y[g]);u.value=[]}const T=Ke({}),V=D(()=>{const y={};for(const g of n.modelValue)if(!!g.deps)for(const E of g.deps)y[m([E,g.id])]={source:E,target:g.id,color:j(g)};return y});function R(y){for(const g of Object.keys(T))delete T[g];for(const g of Object.keys(y))T[g]=Object.assign({},y[g]);a.value=[]}const W=B({nodes:{}}),U=D(()=>{const y={},g=tn(n.modelValue),E=50,A=50;let O=0;for(const ee of g){let de=0;for(const At of ee)y[At]={x:de*E+O*E/2,y:O*A,fixed:!1},de++;O++}return{nodes:y}});function Me(y){const g=W.value.nodes;for(const E of Object.keys(g))delete g[E];for(const E of Object.keys(y.nodes))g[E]=Object.assign({},y.nodes[E])}function De(){I(_.value),R(V.value),Me(U.value)}function xt(y,g){let E=0,A=!1;for(const O of y){if(O.id===g){y.splice(E,1),A=!0;break}E++}if(!A)throw new Error(`Can not remove node: ${g}`);for(const O of y)if(O.deps!==void 0){const ee=O.deps.indexOf(g,0);ee>-1&&(O.deps.splice(ee,1),O.deps.length===0&&delete O.deps)}}function Pe(y){const g=n.modelValue.map(Ce);y.forEach(E=>xt(g,E)),o("update:modelValue",g)}function Fe(y,g){const E=n.modelValue.map(Ce);for(const A of E)if(A.id===g){A.deps||(A.deps=[]),A.deps.push(y),Nt(),o("update:modelValue",E);return}throw new Error(`Can not add edge: ${m([y,g])}`)}function bt(y,g,E){for(const A of y)if(A.id===E&&A.deps!==void 0){const O=A.deps.indexOf(g,0);if(O>-1){A.deps.splice(O,1),A.deps.length===0&&delete A.deps;return}}throw new Error(`Can not remove edge: ${m([g,E])}`)}function $e(y){const g=n.modelValue.map(Ce);for(const E of y){const[A,O]=h(E);bt(g,A,O)}o("update:modelValue",g)}function Nt(){a.value.splice(0,a.value.length),u.value.splice(0,u.value.length)}function Le(){o("update:modelValue",n.tasks)}const We=(y,g)=>T[m([y,g])]===void 0&&T[m([g,y])]===void 0,Ft=D(()=>{const y=u.value;if(y.length===2){const[g,E]=y;return We(g,E)}return!1}),ye=B(!1),X=B(),Z=B([]);function Re(){ye.value=!0}function Ue(){X.value=void 0,Z.value=[],ye.value=!1}function Et(){const y=[];Z.value.forEach((g,E,A)=>{var O;y.push({name:g.name,id:`${(O=X.value)==null?void 0:O.id}_${g.id}`,origin:g})}),o("update:modelValue",[...n.modelValue,...y]),Ue()}ie(()=>{Y(()=>n.tasks,(E,A)=>{r.value=!1,s.value=!1,g.value=void 0,Le()}),Y(()=>n.modelValue,E=>{I(_.value),R(V.value),JSON.stringify(E)===JSON.stringify(n.tasks)&&Me(U.value),r.value=!0});function y(E,A){try{for(const O of Object.keys(E)){const ee=E[O],de=A[O];if(Math.abs(ee.x-de.x)>.5||Math.abs(ee.y-de.y)>.5)return!1}}catch{return!1}return!0}const g=B();Y(()=>[W.value,i.value,r.value],([E,A,O])=>{!s.value&&A&&O&&y(E.nodes,g.value)&&setTimeout(()=>{Ae(()=>{A.panToCenter(),s.value=!0})},500),g.value=JSON.parse(JSON.stringify(Pt(W.value.nodes)))},{deep:!0})});function It(){Pe(u.value)}function jt(){$e(a.value)}function Ct(){const[y]=u.value,g=Se(()=>{if(u.value.length!==1)return;const[E]=u.value;y===E||!We(y,E)||(Fe(y,E),g())})}return t({ShowAddNodeDialog:Re,RemoveSelectedNodes:It,SelectedNodes:u,RemoveSelectedEdges:jt,SelectedEdges:a,ResetView:De,AddEdge:Fe,SetAddEdgeMode:Ct,NodeMapTask:S}),(y,g)=>{const E=$t("v-network-graph");return M(),ge(Ut,null,[r.value?(M(),$(E,{key:0,ref_key:"graph",ref:i,"selected-nodes":u.value,"onUpdate:selected-nodes":g[0]||(g[0]=A=>u.value=A),"selected-edges":a.value,"onUpdate:selected-edges":g[1]||(g[1]=A=>a.value=A),layouts:W.value,"onUpdate:layouts":g[2]||(g[2]=A=>W.value=A),class:Lt(s.value?"":"tw-opacity-0"),nodes:N(k),edges:N(T),configs:v,"zoom-level":.75,"event-handlers":N(C)},null,8,["selected-nodes","selected-edges","layouts","class","nodes","edges","zoom-level","event-handlers"])):J("v-if",!0),b(Wt,{modelValue:ye.value,"onUpdate:modelValue":g[5]||(g[5]=A=>ye.value=A),class:"tw-w-screen tw-h-screen",onHide:Ue},{default:F(()=>[b(st,{class:"tw-w-96 q-pa-sm"},{default:F(()=>[b(se,null,{default:F(()=>[on]),_:1}),b(se,null,{default:F(()=>[ue("div",nn,[b(Xo,{modelValue:X.value,"onUpdate:modelValue":g[3]||(g[3]=A=>X.value=A),"org-id":e.orgId},null,8,["modelValue","org-id"]),b(en,{modelValue:Z.value,"onUpdate:modelValue":g[4]||(g[4]=A=>Z.value=A),disabled:X.value===void 0,"project-id":X.value?X.value.id:0,"workflow-id":n.workflowId},null,8,["modelValue","disabled","project-id","workflow-id"])])]),_:1}),b(zt,{align:"around"},{default:F(()=>[b(q,{class:"tw-w-full tw-mx-2 tw-my-3",color:Z.value?"primary":"","text-color":Z.value?"black":"white",disable:!Z.value,onClick:Et},{default:F(()=>[rn]),_:1},8,["color","text-color","disable"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),b(N(Rt),{ref_key:"viewMenu",ref:l,"touch-position":"","context-menu":""},{default:F(()=>[b(Qt,{dense:""},{default:F(()=>[re((M(),$(H,{key:"add-task",clickable:"",onClick:Re},{default:F(()=>[b(K,null,{default:F(()=>[an]),_:1})]),_:1})),[[ae,!0]]),N(Ft)?re((M(),$(H,{key:"add-edge",clickable:"",onClick:g[6]||(g[6]=()=>Fe(u.value[0],u.value[1]))},{default:F(()=>[b(K,null,{default:F(()=>[P("\u6DFB\u52A0\u6307\u5411\uFF1A"+he(w(u.value)),1)]),_:1})]),_:1})),[[ae,!0]]):J("v-if",!0),a.value.length>0?re((M(),$(H,{key:"remove-edge",clickable:"",onClick:g[7]||(g[7]=()=>$e(a.value))},{default:F(()=>[b(K,null,{default:F(()=>[P(" \u5220\u9664\u6307\u5411\uFF1A"+he(a.value.map(h).map(w).join(", ")),1)]),_:1})]),_:1})),[[ae,!0]]):J("v-if",!0),u.value.length>0?re((M(),$(H,{key:"remove-task",clickable:"",onClick:g[8]||(g[8]=()=>Pe(u.value))},{default:F(()=>[b(K,null,{default:F(()=>[P(" \u5220\u9664\u8282\u70B9\uFF1A"+he(u.value.map(d).join(", ")),1)]),_:1})]),_:1})),[[ae,!0]]):J("v-if",!0),b(it),re((M(),$(H,{key:"reset-view",clickable:"",onClick:De},{default:F(()=>[b(K,null,{default:F(()=>[ln]),_:1})]),_:1})),[[ae,!0]]),re((M(),$(H,{key:"reset",clickable:"",onClick:Le},{default:F(()=>[b(K,null,{default:F(()=>[sn]),_:1})]),_:1})),[[ae,!0]])]),_:1})]),_:1},512)],64)}}});var fn=oe(un,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowGraph.vue"]]);const dn={class:"tw-w-full tw-h-full tw-flex tw-flex-col"},cn={class:"tw-flex tw-flex-row tw-gap-4 tw-flex-wrap tw-grow-0"},pn=P(" \u8FD0\u884C "),vn=P(" Kill "),hn=P(" \u4FDD\u5B58 "),gn=P(" \u5237\u65B0 "),wn=P(" \u91CD\u7F6E\u89C6\u56FE "),mn=P(" \u6DFB\u52A0\u65B0\u4EFB\u52A1\u8282\u70B9 "),yn=P(" \u5173\u8054\u8282\u70B9 "),kn=P(" \u5220\u9664\u8282\u70B9\uFF08\u5173\u7CFB\uFF09 "),_n=P(" \u4EFB\u52A1\u8BE6\u60C5 "),xn=P(" \u4EFB\u52A1\u65E5\u5FD7 "),bn={class:"tw-grow tw-w-full tw-overflow-hidden"},Nn=ne({props:{id:{type:Number,required:!0},orgId:{type:String,required:!0}},setup(e){const t=e,{width:o}=ft(),n=D(()=>o.value<1024),r=B(),s=D(()=>r.value===void 0||r.value.SelectedNodes.length===0&&r.value.SelectedEdges.length===0),i=D(()=>{if(!r.value||r.value.SelectedNodes.length!==1)return;const j=r.value.SelectedNodes;return r.value.NodeMapTask.get(j[j.length-1])}),l=B([]),u=B([]),a=me(),d=B(!1),m=B(!1),w=B();async function h(){w.value=await Kt(t.id)}const x=D(()=>w.value!==void 0&&w.value.state!==null&&w.value.state.status==="running");async function p(j){const _=new Map,S=new Map;for(const I of j){const V=a.state.Root.workflowTasks.find(W=>W.id===I.taskId);if(V===void 0)throw new Error(`workflowTasks missing projectId=${I.projectId} taskId=${I.taskId}`);const R=`${I.projectId}_${I.taskId}`;if(S.set(R,V),_.has(R)||_.set(R,[]),I.dependencyProjectId>0&&I.dependencyTaskId!==""){const W=`${I.dependencyProjectId}_${I.dependencyTaskId}`,U=_.get(R);U!==void 0&&_.set(R,[...U,W])}}return Array.from(_.keys()).map(I=>{const T=S.get(I);if(T===void 0)throw new Error(`keyMapTask missing ${I}`);return{name:T.name,id:I,deps:_.get(I),origin:T,state:a.state.Root.workflowTaskStates.find(V=>V.projectId===T.projectId&&V.taskId===T.id)}})}function f(j){const _=[],S=new Map;for(const I of j)S.set(I.id,I.origin);for(const I of j)if(I.deps!==void 0&&I.deps.length>0)for(const T of I.deps){const V=S.get(T);if(V===void 0)throw new Error("original task object missing");_.push({id:0,workflowId:0,createTime:0,projectId:I.origin.projectId,taskId:I.origin.id,dependencyProjectId:V.projectId,dependencyTaskId:V.id})}else _.push({id:0,workflowId:0,createTime:0,projectId:I.origin.projectId,taskId:I.origin.id,dependencyProjectId:0,dependencyTaskId:""});return _}async function c(j=!1){await a.dispatch("fetchWorkflowEdges",{workflowId:t.id});const _=await p(a.state.Root.workflowEdges);j?u.value=_:l.value=_}ie(()=>{console.log("subscribe"),a.dispatch("subscribeTopic",["/workflow/status/"+t.id,"/workflow/task/status/"+t.id]),h(),c(),Y(()=>t.id,async j=>{console.log("subscribe"),a.dispatch("subscribeTopic",["/workflow/status/"+t.id,"/workflow/task/status/"+t.id]),await h(),await c()}),a.watch(j=>[j.Root.eventWorkFlowTask,j.Root.eventWorkFlow],async([j,_])=>{(j===void 0||j.workFlowId!==t.id)&&(_===void 0||_.workFlowId!==t.id)||(await h(),await c(!0))})});const v=D(()=>{const j=_=>_.map(S=>Je(qe({},S),{origin:void 0,state:void 0}));return JSON.stringify(j(l.value))!==JSON.stringify(j(u.value))}),C=B(!1);async function k(){C.value=!0,await a.dispatch("updateWorkFlowEdges",{workflowId:t.id,edges:f(u.value)}),await c(),C.value=!1}return(j,_)=>(M(),ge("div",dn,[b(Ge,{modelValue:d.value,"onUpdate:modelValue":_[0]||(_[0]=S=>d.value=S),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:_[1]||(_[1]=()=>N(qt)(N(a).getters.apiv1,t.id).then(()=>{d.value=!1,c()}))},null,8,["modelValue"]),b(Ge,{modelValue:m.value,"onUpdate:modelValue":_[2]||(_[2]=S=>m.value=S),type:"warning",content:"\u786E\u5B9A\u8981\u505C\u6B62\u6267\u884C\u5417\uFF1F",onConfirm:_[3]||(_[3]=()=>N(Jt)(t.id).then(()=>{m.value=!1,c()}))},null,8,["modelValue"]),ue("div",cn,[N(x)?(M(),$(q,{key:1,dense:N(n),color:"red",onClick:_[5]||(_[5]=S=>m.value=!0)},{default:F(()=>[vn]),_:1},8,["dense"])):(M(),$(q,{key:0,dense:N(n),color:"primary","text-color":"black",loading:N(x),onClick:_[4]||(_[4]=S=>d.value=!0)},{default:F(()=>[pn]),_:1},8,["dense","loading"])),b(q,{dense:N(n),color:N(v)?"primary":"","text-color":N(v)?"black":"white",disable:!N(v),loading:C.value,onClick:k},{default:F(()=>[hn]),_:1},8,["dense","color","text-color","disable","loading"]),b(q,{dense:N(n),flat:"",icon:"refresh",title:"\u5237\u65B0",onClick:_[6]||(_[6]=()=>c())},{default:F(()=>[gn]),_:1},8,["dense"]),b(q,{dense:N(n),flat:"",icon:"restart_alt",title:"\u91CD\u7F6E\u89C6\u56FE",onClick:_[7]||(_[7]=()=>r.value.ResetView())},{default:F(()=>[wn]),_:1},8,["dense"]),b(q,{dense:N(n),flat:"",icon:"add",title:"\u6DFB\u52A0\u65B0\u4EFB\u52A1\u8282\u70B9",onClick:_[8]||(_[8]=()=>r.value.ShowAddNodeDialog())},{default:F(()=>[mn]),_:1},8,["dense"]),N(i)!==void 0?(M(),$(q,{key:"create_relationship",dense:N(n),flat:"",icon:"north_east",title:"\u5173\u8054\u8282\u70B9",disable:!r.value||r.value.SelectedNodes.length!==1,onClick:_[9]||(_[9]=()=>{r.value.SetAddEdgeMode(),N(a).getters.$q.notify({type:"info",message:"\u8BF7\u9009\u62E9\u6709\u6548\u7684\u4E0B\u6E38\u8282\u70B9",icon:"tips_and_updates",position:"top-right"})})},{default:F(()=>[yn]),_:1},8,["dense","disable"])):J("v-if",!0),N(i)!==void 0?(M(),$(q,{key:"delete_task_or_relationship",dense:N(n),icon:"delete",disable:N(s),title:"\u5220\u9664\u5DF2\u9009\u7684\u8282\u70B9\u53CA\u8282\u70B9\u5173\u8054\u5173\u7CFB",flat:"",onClick:_[10]||(_[10]=()=>{r.value.SelectedNodes.length>0&&r.value.RemoveSelectedNodes(),r.value.SelectedEdges.length>0&&r.value.RemoveSelectedEdges()})},{default:F(()=>[kn]),_:1},8,["dense","disable"])):J("v-if",!0),N(i)!==void 0?(M(),$(q,{key:"jump_task_detail",dense:N(n),icon:"task_alt",flat:"",to:{name:"workflow_task",params:{projectId:N(i).origin.projectId,taskId:N(i).origin.id}}},{default:F(()=>[_n]),_:1},8,["dense","to"])):J("v-if",!0),N(i)!==void 0?(M(),$(q,{key:"jump_task_logs",dense:N(n),icon:"view_timeline",flat:"",to:{name:"workflow_task_logs",params:{projectId:N(i).origin.projectId,taskId:N(i).origin.id}}},{default:F(()=>[xn]),_:1},8,["dense","to"])):J("v-if",!0)]),ue("div",bn,[b(fn,{ref_key:"workflow",ref:r,modelValue:u.value,"onUpdate:modelValue":_[11]||(_[11]=S=>u.value=S),"org-id":e.orgId,"workflow-id":t.id,tasks:l.value},null,8,["modelValue","org-id","workflow-id","tasks"])])]))}});var Fn=oe(Nn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowGraph.vue"]]);const En={key:0,class:"text-h6"},In={key:1,class:"text-h6"},jn=ne({props:{id:{type:Number,default:0}},setup(e){const t=e,o=B({id:0,title:"",oid:"",cronExpr:"0 0 0 * * * *",remark:"",createTime:0,status:Ht,state:null}),n=Gt(),r=me(),s=D(()=>r.state.WorkFlow.workflows.get(t.id)),i=B(o.value),l=B(!0);Y(s,(f,c)=>{l.value&&(i.value=Object.assign({},s.value||o.value))});function u(){i.value=Object.assign({},s.value||o.value)}const a=B(!1);async function d(){a.value=!0;try{const f=i.value;w.value?(await Zt(r.getters.apiv1,r.getters.currentOrg,f.title.trim(),f.remark.trim(),f.cronExpr.trim(),f.status),n.push({name:"workflows"})):(await eo(r.getters.apiv1,i.value),l.value=!0,r.commit("success",{message:"\u66F4\u65B0\u6210\u529F"}),await h())}catch(f){console.error(f),r.commit("error",{error:f})}a.value=!1}const m=ut(),w=D(()=>m.name&&m.name.toString()==="create_workflow");async function h(){w.value||r.dispatch("WorkFlow/fetchWorkFlow",{id:t.id})}const x=D(()=>JSON.stringify(s.value)!==JSON.stringify(i.value)),p=D(()=>{const{title:f,cronExpr:c}=i.value;return f.trim()!==""&&c.trim()!==""});return ie(()=>{h(),Y(()=>t.id,async f=>{await h()})}),(f,c)=>(M(),$(Xt,{onSubmit:d,onReset:u},{default:F(()=>[b(se,null,{default:F(()=>[N(w)?(M(),ge("div",En,"\u521B\u5EFA\u4EFB\u52A1\u7F16\u6392")):(M(),ge("div",In,"\u4EFB\u52A1\u7F16\u6392\u8BE6\u60C5"))]),_:1}),b(se,null,{default:F(()=>[b(Ee,{modelValue:i.value.title,"onUpdate:modelValue":c[0]||(c[0]=v=>i.value.title=v),type:"text",label:"\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),b(Ee,{key:"cron",modelValue:i.value.cronExpr,"onUpdate:modelValue":c[1]||(c[1]=v=>i.value.cronExpr=v),label:"\u8C03\u5EA6\u8BA1\u5212 (*\u79D2 *\u5206 *\u65F6 *\u65E5 *\u6708 *\u5468 *\u5E74)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),b(Ee,{modelValue:i.value.remark,"onUpdate:modelValue":c[2]||(c[2]=v=>i.value.remark=v),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"]),b(Yt,{key:"status",modelValue:i.value.status,"onUpdate:modelValue":c[3]||(c[3]=v=>i.value.status=v),"false-value":2,"true-value":1,label:"\u662F\u5426\u542F\u7528",class:"tw-mb-4"},null,8,["modelValue"])]),_:1}),b(se,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:F(()=>[b(q,{type:"reset",flat:"",label:"\u91CD\u7F6E",class:"lg:tw-w-24 tw-w-full",disable:!N(x)},null,8,["disable"]),b(q,{color:"primary","text-color":"black",type:"submit",label:N(w)?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!N(x)||!N(p),loading:a.value,class:"lg:tw-w-24 tw-w-full"},null,8,["label","disable","loading"])]),_:1})]),_:1}))}});var Cn=oe(jn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowDetail.vue"]]);const An=P("\u5F00\u59CB\u65F6\u95F4"),Sn=P("\u7ED3\u675F\u65F6\u95F4"),Vn=ne({props:{id:{type:Number,required:!0}},setup(e){const t=e,o=me(),n=D(()=>o.state.Root.workflowLogs),r=D(()=>o.state.Root.workflowLogsTotal),s=D(()=>o.state.Root.loadingWorkflowLogs),i=B({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),l=B();ie(()=>{Ae(()=>{var d;(d=l.value)==null||d.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});const u=()=>{Ae(()=>{var m;const d=(m=l.value)==null?void 0:m.$el.querySelector(".scroll");d==null||d.scrollTo({top:0})})};function a({pagination:{page:d,rowsPerPage:m}}){const w=i.value;w.page=d,w.rowsPerPage=m,u()}return Se(()=>{const d=i.value;d.rowsNumber=r.value}),ie(async()=>{Se(async()=>{const d=i.value;await o.dispatch("fetchWorkFlowLogs",{workflowId:t.id,page:d.page,pageSize:d.rowsPerPage})})}),(d,m)=>(M(),$(N(oo),{ref_key:"table",ref:l,pagination:i.value,"onUpdate:pagination":m[0]||(m[0]=w=>i.value=w),class:"tw-w-full tw-h-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],title:"\u6267\u884C\u65E5\u5FD7",rows:N(n),loading:N(s),"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:a},{loading:F(()=>[b(to,{showing:"",color:"primary"})]),body:F(w=>[b(st,{class:"tw-my-4 tw-mx-4",flat:"",bordered:""},{default:F(()=>[b(H,null,{default:F(()=>[b(K,null,{default:F(()=>[b(ke,{overline:""},{default:F(()=>[An]),_:1}),b(ke,null,{default:F(()=>[P(he(N(Ye)(w.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),b(K,null,{default:F(()=>[b(ke,{overline:""},{default:F(()=>[Sn]),_:1}),b(ke,null,{default:F(()=>[P(he(N(Ye)(w.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),b(it),b(se,{class:"tw-w-full tw-overflow-x-auto"},{default:F(()=>[b(ro,{json:w.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var On=oe(Vn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowLogs.vue"]]);const Tn={class:"lg:tw-px-4 lg:tw-pt-2 tw-w-full tw-h-full tw-flex tw-flex-col tw-box-border"},Bn={class:"tw-flex tw-h-full tw-w-full tw-overflow-hidden"},Mn={class:"tw-hidden lg:tw-block"},Dn=ne({props:{id:{type:Number,default:0},orgId:{type:String,required:!0}},setup(e){const t=e,{width:o}=ft(),n=ut(),r=D(()=>n.name&&n.name.toString()==="create_workflow"),s=D(()=>{var i;if(r.value)return"detail";if(n.name){const l=n.name.toString();if(l==="workflow_logs")return"logs";if(l==="workflow_graph")return"graph";if(l==="workflow_detail")return"detail"}throw new Error(`Unknown route name ${(i=n.name)==null?void 0:i.toString()}`)});return(i,l)=>(M(),ge("div",Tn,[N(r)?J("v-if",!0):(M(),$(He,{key:0,"model-value":N(s),"active-color":"primary",align:"left",class:"lg:tw-hidden tw-display"},{default:F(()=>[b(le,{name:"graph",label:"\u6D41\u7A0B",to:{name:"workflow_graph",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"logs",label:"\u65E5\u5FD7",to:{name:"workflow_logs",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"detail",label:"\u8BE6\u60C5",to:{name:"workflow_detail",params:{workflowId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"])),ue("div",Bn,[b(no,{"model-value":N(s),animated:"",vertical:N(o)>=1024,class:"tw-w-full tw-h-full tw-bg-[#121212] tw-p-0 lg:tw-pr-4 tw-box-border"},{default:F(()=>[b(Ie,{name:"graph"},{default:F(()=>[b(Fn,{id:t.id,"org-id":e.orgId},null,8,["id","org-id"])]),_:1}),b(Ie,{name:"logs"},{default:F(()=>[b(On,{id:t.id},null,8,["id"])]),_:1}),b(Ie,{name:"detail"},{default:F(()=>[b(Cn,{id:t.id},null,8,["id"])]),_:1})]),_:1},8,["model-value","vertical"]),ue("div",Mn,[N(r)?J("v-if",!0):(M(),$(He,{key:0,"model-value":N(s),"active-color":"primary",vertical:"","switch-indicator":"",align:"left"},{default:F(()=>[b(le,{name:"graph",label:"\u6D41\u7A0B",to:{name:"workflow_graph",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"logs",label:"\u65E5\u5FD7",to:{name:"workflow_logs",params:{workflowId:t.id}},replace:""},null,8,["to"]),b(le,{name:"detail",label:"\u8BE6\u60C5",to:{name:"workflow_detail",params:{workflowId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"]))])])]))}});var zn=oe(Dn,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowTabs.vue"]]);export{zn as default}; diff --git a/dist/assets/index.650f2770.js b/dist/assets/index.c4564906.js similarity index 97% rename from dist/assets/index.650f2770.js rename to dist/assets/index.c4564906.js index 39d4a0b..1bc670a 100644 --- a/dist/assets/index.650f2770.js +++ b/dist/assets/index.c4564906.js @@ -1 +1 @@ -import{a9 as p}from"./index.d76e71bf.js";import{g as v}from"./datetime.561112b0.js";var h={},f=v(p),o={};Object.defineProperty(o,"__esModule",{value:!0});var b=function(){function e(t){this._observers=new Map,this._subscribed=!1;var i=(t!=null?t:{}).delay,n=i===void 0?33:i;this._delay=n,this._handler=this._handleResize.bind(this)}return e.prototype.addObserver=function(t,i){return this._observers.set(t,i),i(this._getEvent()),this},e.prototype.deleteObserver=function(t){return this._observers.delete(t),this},e.prototype.deleteObservers=function(){return this._observers.clear(),this},e.prototype.notifyObservers=function(t){return this._observers.forEach(function(i){i(t)}),this},e.prototype.subscribe=function(){return typeof window=="undefined"||this._subscribed||(window.addEventListener("resize",this._handler),window.addEventListener("orientationchange",this._handler),this._subscribed=!0),this},e.prototype.unsubscribe=function(){return this._subscribed?(window.removeEventListener("resize",this._handler),window.removeEventListener("orientationchange",this._handler),this._subscribed=!1,this):this},e.prototype.setDelay=function(t){return this._delay=t,this},e.prototype.hasObserver=function(){return this._observers.size>0},e.prototype.dispatch=function(){return this._dispatch(),this},e.prototype._getEvent=function(){return typeof window=="undefined"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}},e.prototype._dispatch=function(){var t=this._getEvent();this.notifyObservers(t)},e.prototype._handleResize=function(){var t=this;clearTimeout(this._timer),this._timer=setTimeout(function(){t._dispatch()},this._delay)},e}();o.WindowResizeSubject=b;Object.defineProperty(h,"__esModule",{value:!0});var s,r=f,_=o,d=typeof window!="undefined",w=function(e){return e!=null?e:d?window.innerWidth:0},l=function(e){return e!=null?e:d?window.innerHeight:0},y=function(e){var t=0,i=e(),n=r.reactive({width:w(void 0),height:l(void 0)});return i.addObserver("composition-api",function(u){var c=u.width,a=u.height;n.width=c,n.height=a}),function(){return t===0&&i.subscribe().dispatch(),++t,r.onUnmounted(function(){(t=Math.max(t-1,0))===0&&i.unsubscribe()}),{width:r.computed(function(){return n.width}),height:r.computed(function(){return n.height})}}}(function(){return s||(s=new _.WindowResizeSubject),s}),z=h.useWindowSize=y;export{z as u}; +import{a9 as p}from"./index.f89dd3dd.js";import{g as v}from"./datetime.561112b0.js";var h={},f=v(p),o={};Object.defineProperty(o,"__esModule",{value:!0});var b=function(){function e(t){this._observers=new Map,this._subscribed=!1;var i=(t!=null?t:{}).delay,n=i===void 0?33:i;this._delay=n,this._handler=this._handleResize.bind(this)}return e.prototype.addObserver=function(t,i){return this._observers.set(t,i),i(this._getEvent()),this},e.prototype.deleteObserver=function(t){return this._observers.delete(t),this},e.prototype.deleteObservers=function(){return this._observers.clear(),this},e.prototype.notifyObservers=function(t){return this._observers.forEach(function(i){i(t)}),this},e.prototype.subscribe=function(){return typeof window=="undefined"||this._subscribed||(window.addEventListener("resize",this._handler),window.addEventListener("orientationchange",this._handler),this._subscribed=!0),this},e.prototype.unsubscribe=function(){return this._subscribed?(window.removeEventListener("resize",this._handler),window.removeEventListener("orientationchange",this._handler),this._subscribed=!1,this):this},e.prototype.setDelay=function(t){return this._delay=t,this},e.prototype.hasObserver=function(){return this._observers.size>0},e.prototype.dispatch=function(){return this._dispatch(),this},e.prototype._getEvent=function(){return typeof window=="undefined"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}},e.prototype._dispatch=function(){var t=this._getEvent();this.notifyObservers(t)},e.prototype._handleResize=function(){var t=this;clearTimeout(this._timer),this._timer=setTimeout(function(){t._dispatch()},this._delay)},e}();o.WindowResizeSubject=b;Object.defineProperty(h,"__esModule",{value:!0});var s,r=f,_=o,d=typeof window!="undefined",w=function(e){return e!=null?e:d?window.innerWidth:0},l=function(e){return e!=null?e:d?window.innerHeight:0},y=function(e){var t=0,i=e(),n=r.reactive({width:w(void 0),height:l(void 0)});return i.addObserver("composition-api",function(u){var c=u.width,a=u.height;n.width=c,n.height=a}),function(){return t===0&&i.subscribe().dispatch(),++t,r.onUnmounted(function(){(t=Math.max(t-1,0))===0&&i.unsubscribe()}),{width:r.computed(function(){return n.width}),height:r.computed(function(){return n.height})}}}(function(){return s||(s=new _.WindowResizeSubject),s}),z=h.useWindowSize=y;export{z as u}; diff --git a/dist/assets/index.d76e71bf.js b/dist/assets/index.f89dd3dd.js similarity index 96% rename from dist/assets/index.d76e71bf.js rename to dist/assets/index.f89dd3dd.js index 845186e..edb0c74 100644 --- a/dist/assets/index.d76e71bf.js +++ b/dist/assets/index.f89dd3dd.js @@ -135,33 +135,33 @@ Component that was made reactive: `,e)),wa(e,t,n,r,o,a,i,!0)}function na(e){retu ${jn} ${me} - `,document.head.appendChild(Le);let Ae="normal";R.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}-from`,z!==void 0&&(z.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}-from-tween`),A.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}-to`,E.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}`;const je=He=>{He===Object(He)&&He.animationName!==Te||(E.removeEventListener("animationend",je),E.removeEventListener("animationcancel",je),se(),Le.remove())};a.qMorphCancel=()=>{a.qMorphCancel=void 0,n=!0,je()},E.qMorphCancel=()=>{E.qMorphCancel=void 0,n=!0,je()},E.addEventListener("animationend",je),E.addEventListener("animationcancel",je),t=He=>n===!0||!E||!R||!A?!1:He===!0?(je(),!0):(r=r!==!0,Ae=Ae==="normal"?"reverse":"normal",R.style.animationDirection=Ae,z.style.animationDirection=Ae,A.style.animationDirection=Ae,E.style.animationDirection=Ae,!0)}};i.waitFor>0||i.waitFor==="transitionend"||i.waitFor===Object(i.waitFor)&&typeof i.waitFor.then=="function"?(i.waitFor>0?new Promise(_e=>setTimeout(_e,i.waitFor)):i.waitFor==="transitionend"?new Promise(_e=>{const Y=()=>{A!==null&&(clearTimeout(A),A=null),E&&(E.removeEventListener("transitionend",Y),E.removeEventListener("transitioncancel",Y)),_e()};let A=setTimeout(Y,400);E.addEventListener("transitionend",Y),E.addEventListener("transitioncancel",Y)}):i.waitFor).then(W).catch(()=>{typeof E.qMorphCancel=="function"&&E.qMorphCancel()}):W()};return typeof e.onToggle=="function"&&e.onToggle(),requestAnimationFrame($),E=>t(E)}const Tu={},zP=["duration","delay","easing","fill","classes","style","duration","resize","useCSS","hideFromClone","keepToClone","tween","tweenFromOpacity","tweenToOpacity","waitFor","onEnd"],jP=["resize","useCSS","hideFromClone","keepToClone","tween"];function ra(e,t){e.clsAction!==t&&(e.clsAction=t,e.el.classList[t]("q-morph--invisible"))}function Zw(e){if(e.animating===!0||e.queue.length<2)return;const[t,n]=e.queue;e.animating=!0,t.animating=!0,n.animating=!0,ra(t,"remove"),ra(n,"remove");const r=FP(fe(B({from:t.el,to:n.el,onToggle(){ra(t,"add"),ra(n,"remove")}},n.opts),{onEnd(o,i){n.opts.onEnd!==void 0&&n.opts.onEnd(o,i),i!==!0&&(t.animating=!1,n.animating=!1,e.animating=!1,e.cancel=void 0,e.queue.shift(),Zw(e))}}));e.cancel=()=>{r(!0),e.cancel=void 0}}function Yw(e,t){const n=t.opts;jP.forEach(r=>{n[r]=e[r]===!0})}function DP(e,t){const n=typeof e=="string"&&e.length!==0?e.split(":"):[];t.name=n[0],t.group=n[1],Object.assign(t.opts,{duration:isNaN(n[2])===!0?300:parseFloat(n[2]),waitFor:n[3]})}function VP(e,t){e.group!==void 0&&(t.group=e.group),e.name!==void 0&&(t.name=e.name);const n=t.opts;zP.forEach(r=>{e[r]!==void 0&&(n[r]=e[r])})}function HP(e,t){if(t.name===e){const n=Tu[t.group];n===void 0?(Tu[t.group]={name:t.group,model:e,queue:[t],animating:!1},ra(t,"remove")):n.model!==e&&(n.model=e,n.queue.push(t),n.animating===!1&&n.queue.length===2&&Zw(n));return}t.animating===!1&&ra(t,"add")}function Ng(e,t){let n;Object(t)===t?(n=""+t.model,VP(t,e),Yw(t,e)):n=""+t,n!==e.model?(e.model=n,HP(n,e)):e.animating===!1&&e.clsAction!==void 0&&e.el.classList[e.clsAction]("q-morph--invisible")}hr({name:"morph",mounted(e,t){const n={el:e,animating:!1,opts:{}};Yw(t.modifiers,n),DP(t.arg,n),Ng(n,t.value),e.__qmorph=n},updated(e,t){Ng(e.__qmorph,t.value)},beforeUnmount(e){const t=e.__qmorph,n=Tu[t.group];n!==void 0&&n.queue.indexOf(t)!==-1&&(n.queue=n.queue.filter(o=>o!==t),n.queue.length===0&&(n.cancel!==void 0&&n.cancel(),delete Tu[t.group])),t.clsAction==="add"&&e.classList.remove("q-morph--invisible"),delete e.__qmorph}});const UP={childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0};function Fg(e,t,n){t.handler=n,t.observer!==void 0&&t.observer.disconnect(),t.observer=new MutationObserver(r=>{typeof t.handler=="function"&&(t.handler(r)===!1||t.once===!0)&&Xw(e)}),t.observer.observe(e,t.opts)}function Xw(e){const t=e.__qmutation;t!==void 0&&(t.observer!==void 0&&t.observer.disconnect(),delete e.__qmutation)}hr({name:"mutation",mounted(e,o){var i=o,{modifiers:a}=i,l=a,{once:t}=l,n=to(l,["once"]),{value:r}=i;const s={once:t,opts:Object.keys(n).length===0?UP:n};Fg(e,s,r),e.__qmutation=s},updated(e,{oldValue:t,value:n}){const r=e.__qmutation;r!==void 0&&t!==n&&Fg(e,r,n)},beforeUnmount:Xw});const{passive:Eu}=Tt;function zg(e,{value:t,oldValue:n}){if(typeof t!="function"){e.scrollTarget.removeEventListener("scroll",e.scroll,Eu);return}e.handler=t,typeof n!="function"&&(e.scrollTarget.addEventListener("scroll",e.scroll,Eu),e.scroll())}hr({name:"scroll-fire",mounted(e,t){const n={scrollTarget:Pr(e),scroll:Ia(()=>{let r,o;n.scrollTarget===window?(o=e.getBoundingClientRect().bottom,r=window.innerHeight):(o=hu(e).top+ka(e),r=hu(n.scrollTarget).top+ka(n.scrollTarget)),o>0&&o{r.styleCleanup=void 0;const c=()=>{document.body.classList.remove("non-selectable")};s===!0?(ur(),setTimeout(c,10)):c()}),r.triggered=!1,r.sensitivity=a===!0?r.mouseSensitivity:r.touchSensitivity,r.timer=setTimeout(()=>{r.timer=void 0,ur(),r.triggered=!0,r.handler({evt:i,touch:a!==!0,mouse:a===!0,position:r.origin,duration:Date.now()-l})},r.duration)},move(i){const{top:a,left:l}=Cn(i);r.timer!==void 0&&(Math.abs(l-r.origin.left)>=r.sensitivity||Math.abs(a-r.origin.top)>=r.sensitivity)&&(clearTimeout(r.timer),r.timer=void 0)},end(i){wn(r,"temp"),r.styleCleanup!==void 0&&r.styleCleanup(r.triggered),r.triggered===!0?i!==void 0&&Je(i):r.timer!==void 0&&(clearTimeout(r.timer),r.timer=void 0)}},o=[600,5,7];if(typeof t.arg=="string"&&t.arg.length!==0&&t.arg.split(":").forEach((i,a)=>{const l=parseInt(i,10);l&&(o[a]=l)}),[r.duration,r.touchSensitivity,r.mouseSensitivity]=o,e.__qtouchhold=r,n.mouse===!0){const i=n.mouseCapture===!0||n.mousecapture===!0?"Capture":"";zt(r,"main",[[e,"mousedown","mouseStart",`passive${i}`]])}Ze.has.touch===!0&&zt(r,"main",[[e,"touchstart","touchStart",`passive${n.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]])},updated(e,t){const n=e.__qtouchhold;n!==void 0&&t.oldValue!==t.value&&(typeof t.value!="function"&&n.end(),n.handler=t.value)},beforeUnmount(e){const t=e.__qtouchhold;t!==void 0&&(wn(t,"main"),wn(t,"temp"),t.timer!==void 0&&clearTimeout(t.timer),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchhold)}});const Gw={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},WP=new RegExp(`^([\\d+]+|${Object.keys(Gw).join("|")})$`,"i");function KP(e,t){const{top:n,left:r}=Cn(e);return Math.abs(r-t.left)>=7||Math.abs(n-t.top)>=7}hr({name:"touch-repeat",beforeMount(e,{modifiers:t,value:n,arg:r}){const o=Object.keys(t).reduce((s,c)=>{if(WP.test(c)===!0){const u=isNaN(parseInt(c,10))?Gw[c.toLowerCase()]:parseInt(c,10);u>=0&&s.push(u)}return s},[]);if(t.mouse!==!0&&Ze.has.touch!==!0&&o.length===0)return;const i=typeof r=="string"&&r.length!==0?r.split(":").map(s=>parseInt(s,10)):[0,600,300],a=i.length-1,l={keyboard:o,handler:n,noop:Zt,mouseStart(s){l.event===void 0&&typeof l.handler=="function"&&sc(s)===!0&&(zt(l,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(s,!0))},keyboardStart(s){if(typeof l.handler=="function"&&Xn(s,o)===!0){if((i[0]===0||l.event!==void 0)&&(Je(s),e.focus(),l.event!==void 0))return;zt(l,"temp",[[document,"keyup","end","notPassiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(s,!1,!0)}},touchStart(s){if(s.target!==void 0&&typeof l.handler=="function"){const c=s.target;zt(l,"temp",[[c,"touchmove","move","passiveCapture"],[c,"touchcancel","end","notPassiveCapture"],[c,"touchend","end","notPassiveCapture"]]),l.start(s)}},start(s,c,u){u!==!0&&(l.origin=Cn(s));function d(h){l.styleCleanup=void 0,document.documentElement.style.cursor="";const m=()=>{document.body.classList.remove("non-selectable")};h===!0?(ur(),setTimeout(m,10)):m()}Ze.is.mobile===!0&&(document.body.classList.add("non-selectable"),ur(),l.styleCleanup=d),l.event={touch:c!==!0&&u!==!0,mouse:c===!0,keyboard:u===!0,startTime:Date.now(),repeatCount:0};const f=()=>{if(l.timer=void 0,l.event===void 0)return;l.event.repeatCount===0&&(l.event.evt=s,u===!0?l.event.keyCode=s.keyCode:l.event.position=Cn(s),Ze.is.mobile!==!0&&(document.documentElement.style.cursor="pointer",document.body.classList.add("non-selectable"),ur(),l.styleCleanup=d)),l.event.duration=Date.now()-l.event.startTime,l.event.repeatCount+=1,l.handler(l.event);const h=a0&&Je(s),wn(l,"temp"),l.timer!==void 0&&(clearTimeout(l.timer),l.timer=void 0),l.event=void 0)}};if(e.__qtouchrepeat=l,t.mouse===!0){const s=t.mouseCapture===!0||t.mousecapture===!0?"Capture":"";zt(l,"main",[[e,"mousedown","mouseStart",`passive${s}`]])}if(Ze.has.touch===!0&&zt(l,"main",[[e,"touchstart","touchStart",`passive${t.capture===!0?"Capture":""}`],[e,"touchend","noop","passiveCapture"]]),o.length!==0){const s=t.keyCapture===!0||t.keycapture===!0?"Capture":"";zt(l,"main",[[e,"keydown","keyboardStart",`notPassive${s}`]])}},updated(e,{oldValue:t,value:n}){const r=e.__qtouchrepeat;r!==void 0&&t!==n&&(typeof n!="function"&&r.end(),r.handler=n)},beforeUnmount(e){const t=e.__qtouchrepeat;t!==void 0&&(t.timer!==void 0&&clearTimeout(t.timer),wn(t,"main"),wn(t,"temp"),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchrepeat)}});function QP(e,t=document.body){if(typeof e!="string")throw new TypeError("Expected a string as propName");if(!(t instanceof Element))throw new TypeError("Expected a DOM element");return getComputedStyle(t).getPropertyValue(`--q-${e}`).trim()||null}let As;function ZP(){return Ze.is.winphone?"msapplication-navbutton-color":Ze.is.safari?"apple-mobile-web-app-status-bar-style":"theme-color"}function YP(e){const t=document.getElementsByTagName("META");for(const n in t)if(t[n].name===e)return t[n]}function XP(e){As===void 0&&(As=ZP());let t=YP(As);const n=t===void 0;n&&(t=document.createElement("meta"),t.setAttribute("name",As)),t.setAttribute("content",e),n&&document.head.appendChild(t)}Ze.is.mobile===!0&&(Ze.is.nativeMobile===!0||Ze.is.winphone===!0||Ze.is.safari===!0||Ze.is.webkit===!0||Ze.is.vivaldi);const Ya={};function GP(e){Object.assign(yn,{request:e,exit:e,toggle:e})}function Jw(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||null}function e_(){const e=yn.activeEl=yn.isActive===!1?null:Jw();BT(e===null||e===document.documentElement?document.body:e)}function JP(){yn.isActive=yn.isActive===!1,e_()}function Dg(e,t){try{const n=e[t]();return n===void 0?Promise.resolve():n}catch(n){return Promise.reject(n)}}const yn=jo({isActive:!1,activeEl:null},{isCapable:!1,install({$q:e}){e.fullscreen=this}});Ya.request=["requestFullscreen","msRequestFullscreen","mozRequestFullScreen","webkitRequestFullscreen"].find(e=>document.documentElement[e]!==void 0),yn.isCapable=Ya.request!==void 0,yn.isCapable===!1?GP(()=>Promise.reject("Not capable")):(Object.assign(yn,{request(e){const t=e||document.documentElement,{activeEl:n}=yn;return t===n?Promise.resolve():(n!==null&&t.contains(n)===!0?yn.exit():Promise.resolve()).finally(()=>Dg(t,Ya.request))},exit(){return yn.isActive===!0?Dg(document,Ya.exit):Promise.resolve()},toggle(e){return yn.isActive===!0?yn.exit():yn.request(e)}}),Ya.exit=["exitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen"].find(e=>document[e]),yn.isActive=Boolean(Jw()),yn.isActive===!0&&e_(),["onfullscreenchange","onmsfullscreenchange","onwebkitfullscreenchange"].forEach(e=>{document[e]=JP}));const eq=jo({appVisible:!0},{install({$q:e}){ln(e,"appVisible",()=>this.appVisible)}});{let e,t;if(typeof document.hidden!="undefined"?(e="hidden",t="visibilitychange"):typeof document.msHidden!="undefined"?(e="msHidden",t="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(e="webkitHidden",t="webkitvisibilitychange"),t&&typeof document[e]!="undefined"){const n=()=>{eq.appVisible=!document[e]};document.addEventListener(t,n,!1)}}ge({name:"BottomSheetPlugin",props:fe(B({},ut),{title:String,message:String,actions:Array,grid:Boolean,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]}),emits:["ok","hide"],setup(e,{emit:t}){const{proxy:n}=$e(),r=ct(e,n.$q),o=U(null);function i(){o.value.show()}function a(){o.value.hide()}function l(h){t("ok",h),a()}function s(){t("hide")}function c(){return e.actions.map(h=>{const m=h.avatar||h.img;return h.label===void 0?v(xi,{class:"col-all",dark:r.value}):v("div",{class:["q-bottom-sheet__item q-hoverable q-focusable cursor-pointer relative-position",h.class],style:h.style,tabindex:0,role:"listitem",onClick(){l(h)},onKeyup(_){_.keyCode===13&&l(h)}},[v("div",{class:"q-focus-helper"}),h.icon?v(st,{name:h.icon,color:h.color}):m?v("img",{class:h.avatar?"q-bottom-sheet__avatar":"",src:m}):v("div",{class:"q-bottom-sheet__empty-icon"}),v("div",h.label)])})}function u(){return e.actions.map(h=>{const m=h.avatar||h.img;return h.label===void 0?v(xi,{spaced:!0,dark:r.value}):v(gc,{class:["q-bottom-sheet__item",h.classes],style:h.style,tabindex:0,clickable:!0,dark:r.value,onClick(){l(h)}},()=>[v($o,{avatar:!0},()=>h.icon?v(st,{name:h.icon,color:h.color}):m?v("img",{class:h.avatar?"q-bottom-sheet__avatar":"",src:m}):null),v($o,()=>h.label)])})}function d(){const h=[];return e.title&&h.push(v(ii,{class:"q-dialog__title"},()=>e.title)),e.message&&h.push(v(ii,{class:"q-dialog__message"},()=>e.message)),h.push(e.grid===!0?v("div",{class:"row items-stretch justify-start",role:"list"},c()):v("div",{role:"list"},u())),h}function f(){return[v(Nb,{class:[`q-bottom-sheet q-bottom-sheet--${e.grid===!0?"grid":"list"}`+(r.value===!0?" q-bottom-sheet--dark q-dark":""),e.cardClass],style:e.cardStyle},d)]}return Object.assign(n,{show:i,hide:a}),()=>v(mc,{ref:o,position:"bottom",onHide:s},f)}});function t_(e,t){for(const n in t)n!=="spinner"&&Object(t[n])===t[n]?(e[n]=Object(e[n])!==e[n]?{}:B({},e[n]),t_(e[n],t[n])):e[n]=t[n]}function tq(e,t,n){return r=>{let o,i;const a=t===!0&&r.component!==void 0;if(a===!0){const{component:y,componentProps:w}=r;o=typeof y=="string"?n.component(y):y,i=w||{}}else{const p=r,{class:y,style:w}=p,S=to(p,["class","style"]);o=e,i=S,y!==void 0&&(S.cardClass=y),w!==void 0&&(S.cardStyle=w)}let l,s=!1;const c=U(null),u=es(!1,"dialog"),d=y=>{if(c.value!==null&&c.value[y]!==void 0){c.value[y]();return}const w=l.$.subTree;if(w&&w.component){if(w.component.proxy&&w.component.proxy[y]){w.component.proxy[y]();return}if(w.component.subTree&&w.component.subTree.component&&w.component.subTree.component.proxy&&w.component.subTree.component.proxy[y]){w.component.subTree.component.proxy[y]();return}}console.error("[Quasar] Incorrectly defined Dialog component")},f=[],h=[],m={onOk(y){return f.push(y),m},onCancel(y){return h.push(y),m},onDismiss(y){return f.push(y),h.push(y),m},hide(){return d("hide"),m},update(y){if(l!==null){if(a===!0)Object.assign(i,y);else{const w=y,{class:S,style:C}=w,T=to(w,["class","style"]);S!==void 0&&(T.cardClass=S),C!==void 0&&(T.cardStyle=C),t_(i,T)}l.$forceUpdate()}return m}},_=y=>{s=!0,f.forEach(w=>{w(y)})},b=()=>{x.unmount(u),Mv(u),x=null,l=null,s!==!0&&h.forEach(y=>{y()})};let x=uc({name:"QGlobalDialog",setup:()=>()=>v(o,fe(B({},i),{ref:c,onOk:_,onHide:b,onVnodeMounted(...y){typeof i.onVnodeMounted=="function"&&i.onVnodeMounted(...y),Ge(()=>d("show"))}}))},n);return l=x.mount(u),m}}function n_(e){return encodeURIComponent(e)}function r_(e){return decodeURIComponent(e)}function nq(e){return n_(e===Object(e)?JSON.stringify(e):""+e)}function rq(e){if(e==="")return e;e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),e=r_(e.replace(/\+/g," "));try{const t=JSON.parse(e);(t===Object(t)||Array.isArray(t)===!0)&&(e=t)}catch{}return e}function o_(e){const t=new Date;return t.setMilliseconds(t.getMilliseconds()+e),t.toUTCString()}function oq(e){let t=0;const n=e.match(/(\d+)d/),r=e.match(/(\d+)h/),o=e.match(/(\d+)m/),i=e.match(/(\d+)s/);return n&&(t+=n[1]*864e5),r&&(t+=r[1]*36e5),o&&(t+=o[1]*6e4),i&&(t+=i[1]*1e3),t===0?e:o_(t)}function i_(e,t,n={},r){let o,i;n.expires!==void 0&&(Object.prototype.toString.call(n.expires)==="[object Date]"?o=n.expires.toUTCString():typeof n.expires=="string"?o=oq(n.expires):(i=parseFloat(n.expires),o=isNaN(i)===!1?o_(i*864e5):n.expires));const a=`${n_(e)}=${nq(t)}`,l=[a,o!==void 0?"; Expires="+o:"",n.path?"; Path="+n.path:"",n.domain?"; Domain="+n.domain:"",n.sameSite?"; SameSite="+n.sameSite:"",n.httpOnly?"; HttpOnly":"",n.secure?"; Secure":"",n.other?"; "+n.other:""].join("");if(r){r.req.qCookies?r.req.qCookies.push(l):r.req.qCookies=[l],r.res.setHeader("Set-Cookie",r.req.qCookies);let s=r.req.headers.cookie||"";if(o!==void 0&&i<0){const c=$u(e,r);c!==void 0&&(s=s.replace(`${e}=${c}; `,"").replace(`; ${e}=${c}`,"").replace(`${e}=${c}`,""))}else s=s?`${a}; ${s}`:l;r.req.headers.cookie=s}else document.cookie=l}function $u(e,t){const n=t?t.req.headers:document,r=n.cookie?n.cookie.split("; "):[],o=r.length;let i=e?null:{},a=0,l,s,c;for(;a$u(t,e),set:(t,n,r)=>i_(t,n,r,e),has:t=>aq(t,e),remove:(t,n)=>iq(t,n,e),getAll:()=>$u(null,e)}}const sq={install({$q:e,ssrContext:t}){e.cookies=this}};Object.assign(sq,lq());var uq=ge({name:"DialogPlugin",props:fe(B({},ut),{title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:e=>["ok","cancel","none"].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]}),emits:["ok","hide"],setup(e,{emit:t}){const{proxy:n}=$e(),{$q:r}=n,o=ct(e,r),i=U(null),a=U(e.prompt!==void 0?e.prompt.model:e.options!==void 0?e.options.model:void 0),l=g(()=>"q-dialog-plugin"+(o.value===!0?" q-dialog-plugin--dark q-dark":"")+(e.progress!==!1?" q-dialog-plugin--progress":"")),s=g(()=>e.color||(o.value===!0?"amber":"primary")),c=g(()=>e.progress===!1?null:tn(e.progress)===!0?{component:e.progress.spinner||Jn,props:{color:e.progress.color||s.value}}:{component:Jn,props:{color:s.value}}),u=g(()=>e.prompt!==void 0||e.options!==void 0),d=g(()=>{if(u.value!==!0)return{};const W=e.prompt!==void 0?e.prompt:e.options,{model:F,isValid:Q,items:J}=W;return to(W,["model","isValid","items"])}),f=g(()=>tn(e.ok)===!0||e.ok===!0?r.lang.label.ok:e.ok),h=g(()=>tn(e.cancel)===!0||e.cancel===!0?r.lang.label.cancel:e.cancel),m=g(()=>e.prompt!==void 0?e.prompt.isValid!==void 0&&e.prompt.isValid(a.value)!==!0:e.options!==void 0?e.options.isValid!==void 0&&e.options.isValid(a.value)!==!0:!1),_=g(()=>fe(B({color:s.value,label:f.value,ripple:!1,disable:m.value},tn(e.ok)===!0?e.ok:{flat:!0}),{"data-autofocus":e.focus==="ok"&&u.value!==!0||void 0,onClick:y})),b=g(()=>fe(B({color:s.value,label:h.value,ripple:!1},tn(e.cancel)===!0?e.cancel:{flat:!0}),{"data-autofocus":e.focus==="cancel"&&u.value!==!0||void 0,onClick:w}));de(()=>e.prompt&&e.prompt.model,C),de(()=>e.options&&e.options.model,C);function x(){i.value.show()}function p(){i.value.hide()}function y(){t("ok",We(a.value)),p()}function w(){p()}function S(){t("hide")}function C(F){a.value=F}function T(F){m.value!==!0&&e.prompt.type!=="textarea"&&Xn(F,13)===!0&&y()}function O(F,Q){return e.html===!0?v(ii,{class:F,innerHTML:Q}):v(ii,{class:F},()=>Q)}function L(){return[v(Ow,fe(B({color:s.value,dense:!0,autofocus:!0,dark:o.value},d.value),{modelValue:a.value,"onUpdate:modelValue":C,onKeyup:T}))]}function R(){return[v(b$,fe(B({color:s.value,options:e.options.items,dark:o.value},d.value),{modelValue:a.value,"onUpdate:modelValue":C}))]}function z(){const F=[];return e.cancel&&F.push(v(vt,b.value)),e.ok&&F.push(v(vt,_.value)),v(JT,{class:e.stackButtons===!0?"items-end":"",vertical:e.stackButtons,align:"right"},()=>F)}function $(){const F=[];return e.title&&F.push(O("q-dialog__title",e.title)),e.progress!==!1&&F.push(v(ii,{class:"q-dialog__progress"},()=>v(c.value.component,c.value.props))),e.message&&F.push(O("q-dialog__message",e.message)),e.prompt!==void 0?F.push(v(ii,{class:"scroll q-dialog-plugin__form"},L)):e.options!==void 0&&F.push(v(xi,{dark:o.value}),v(ii,{class:"scroll q-dialog-plugin__form"},R),v(xi,{dark:o.value})),(e.ok||e.cancel)&&F.push(z()),F}function E(){return[v(Nb,{class:[l.value,e.cardClass],style:e.cardStyle,dark:o.value},$)]}return Object.assign(n,{show:x,hide:p}),()=>v(mc,{ref:i,onHide:S},E)}}),cq={install({$q:e,parentApp:t}){e.dialog=tq(uq,!0,t),this.__installed!==!0&&(this.create=e.dialog)}};const Rs=U(null),Vg=jo({isActive:!1},{start:Zt,stop:Zt,increment:Zt,setDefaults:Zt,install({$q:e,parentApp:t}){if(e.loadingBar=this,this.__installed===!0){e.config.loadingBar!==void 0&&this.setDefaults(e.config.loadingBar);return}const n=U(e.config.loadingBar!==void 0?B({},e.config.loadingBar):{});function r(){Vg.isActive=!0}function o(){Vg.isActive=!1}const i=es("q-loading-bar");uc({name:"LoadingBar",devtools:{hide:!0},setup:()=>()=>v(hT,fe(B({},n.value),{onStart:r,onStop:o,ref:Rs}))},t).mount(i),Object.assign(this,{start(a){Rs.value.start(a)},stop(){Rs.value.stop()},increment(){Rs.value.increment.apply(null,arguments)},setDefaults(a){tn(a)===!0&&Object.assign(n.value,a)}})}});let Ki,md,Hg=0,Xo=null,dn={},ui={};const a_={group:"__default_quasar_group__",delay:0,message:!1,html:!1,spinnerSize:80,spinnerColor:"",messageColor:"",backgroundColor:"",boxClass:"",spinner:Jn,customClass:""},l_=B({},a_);function dq(e){if(e&&e.group!==void 0&&ui[e.group]!==void 0)return Object.assign(ui[e.group],e);const t=tn(e)===!0&&e.ignoreDefaults===!0?B(B({},a_),e):B(B({},l_),e);return ui[t.group]=t,t}const br=jo({isActive:!1},{show(e){dn=dq(e);const{group:t}=dn;return br.isActive=!0,Ki!==void 0?(dn.uid=Hg,md.$forceUpdate()):(dn.uid=++Hg,Xo!==null&&clearTimeout(Xo),Xo=setTimeout(()=>{Xo=null;const n=es("q-loading");Ki=uc({name:"QLoading",setup(){_t(()=>{mf(!0)});function r(){br.isActive!==!0&&Ki!==void 0&&(mf(!1),Ki.unmount(n),Mv(n),Ki=void 0,md=void 0)}function o(){if(br.isActive!==!0)return null;const i=[v(dn.spinner,{class:"q-loading__spinner",color:dn.spinnerColor,size:dn.spinnerSize})];return dn.message&&i.push(v("div",{class:"q-loading__message"+(dn.messageColor?` text-${dn.messageColor}`:""),[dn.html===!0?"innerHTML":"textContent"]:dn.message})),v("div",{class:"q-loading fullscreen flex flex-center z-max "+dn.customClass.trim(),key:dn.uid},[v("div",{class:"q-loading__backdrop"+(dn.backgroundColor?` bg-${dn.backgroundColor}`:"")}),v("div",{class:"q-loading__box column items-center "+dn.boxClass},i)])}return()=>v(Wt,{name:"q-transition--fade",appear:!0,onAfterLeave:r},o)}},br.__parentApp),md=Ki.mount(n)},dn.delay)),n=>{if(n===void 0||Object(n)!==n){br.hide(t);return}br.show(fe(B({},n),{group:t}))}},hide(e){if(br.isActive===!0){if(e===void 0)ui={};else{if(ui[e]===void 0)return;{delete ui[e];const t=Object.keys(ui);if(t.length!==0){const n=t[t.length-1];br.show({group:n});return}}}Xo!==null&&(clearTimeout(Xo),Xo=null),br.isActive=!1}},setDefaults(e){tn(e)===!0&&Object.assign(l_,e)},install({$q:e,parentApp:t}){e.loading=this,br.__parentApp=t,e.config.loading!==void 0&&this.setDefaults(e.config.loading)}});let fq=0;const Qs={},Zs={},or={},s_={},vq=/^\s*$/,u_=[],Xv=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],hq=["top-left","top-right","bottom-left","bottom-right"],ta={positive:{icon:e=>e.iconSet.type.positive,color:"positive"},negative:{icon:e=>e.iconSet.type.negative,color:"negative"},warning:{icon:e=>e.iconSet.type.warning,color:"warning",textColor:"dark"},info:{icon:e=>e.iconSet.type.info,color:"info"},ongoing:{group:!1,timeout:0,spinner:!0,color:"grey-8"}};function c_(e,t,n){if(!e)return Xa("parameter required");let r;const o={textColor:"white"};if(e.ignoreDefaults!==!0&&Object.assign(o,Qs),tn(e)===!1&&(o.type&&Object.assign(o,ta[o.type]),e={message:e}),Object.assign(o,ta[e.type||o.type],e),typeof o.icon=="function"&&(o.icon=o.icon(t)),o.spinner?(o.spinner===!0&&(o.spinner=Jn),o.spinner=Aa(o.spinner)):o.spinner=!1,o.meta={hasMedia:Boolean(o.spinner!==!1||o.icon||o.avatar),hasText:Ug(o.message)||Ug(o.caption)},o.position){if(Xv.includes(o.position)===!1)return Xa("wrong position",e)}else o.position="bottom";if(o.timeout===void 0)o.timeout=5e3;else{const s=parseInt(o.timeout,10);if(isNaN(s)||s<0)return Xa("wrong timeout",e);o.timeout=s}o.timeout===0?o.progress=!1:o.progress===!0&&(o.meta.progressClass="q-notification__progress"+(o.progressClass?` ${o.progressClass}`:""),o.meta.progressStyle={animationDuration:`${o.timeout+1e3}ms`});const i=(Array.isArray(e.actions)===!0?e.actions:[]).concat(e.ignoreDefaults!==!0&&Array.isArray(Qs.actions)===!0?Qs.actions:[]).concat(ta[e.type]!==void 0&&Array.isArray(ta[e.type].actions)===!0?ta[e.type].actions:[]),{closeBtn:a}=o;if(a&&i.push({label:typeof a=="string"?a:t.lang.label.close}),o.actions=i.map(d=>{var f=d,{handler:s,noDismiss:c}=f,u=to(f,["handler","noDismiss"]);return fe(B({flat:!0},u),{onClick:typeof s=="function"?()=>{s(),c!==!0&&l()}:()=>{l()}})}),o.multiLine===void 0&&(o.multiLine=o.actions.length>1),Object.assign(o.meta,{class:`q-notification row items-stretch q-notification--${o.multiLine===!0?"multi-line":"standard"}`+(o.color!==void 0?` bg-${o.color}`:"")+(o.textColor!==void 0?` text-${o.textColor}`:"")+(o.classes!==void 0?` ${o.classes}`:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(o.multiLine===!0?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(o.multiLine===!0?"":" col"),leftClass:o.meta.hasText===!0?"additional":"single",attrs:B({role:"alert"},o.attrs)}),o.group===!1?(o.group=void 0,o.meta.group=void 0):((o.group===void 0||o.group===!0)&&(o.group=[o.message,o.caption,o.multiline].concat(o.actions.map(s=>`${s.label}*${s.icon}`)).join("|")),o.meta.group=o.group+"|"+o.position),o.actions.length===0?o.actions=void 0:o.meta.actionsClass="q-notification__actions row items-center "+(o.multiLine===!0?"justify-end":"col-auto")+(o.meta.hasMedia===!0?" q-notification__actions--with-media":""),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),o.meta.uid=n.notif.meta.uid;const s=or[o.position].value.indexOf(n.notif);or[o.position].value[s]=o}else{const s=Zs[o.meta.group];if(s===void 0){if(o.meta.uid=fq++,o.meta.badge=1,["left","right","center"].indexOf(o.position)!==-1)or[o.position].value.splice(Math.floor(or[o.position].value.length/2),0,o);else{const c=o.position.indexOf("top")>-1?"unshift":"push";or[o.position].value[c](o)}o.group!==void 0&&(Zs[o.meta.group]=o)}else{if(s.meta.timer&&(clearTimeout(s.meta.timer),s.meta.timer=void 0),o.badgePosition!==void 0){if(hq.includes(o.badgePosition)===!1)return Xa("wrong badgePosition",e)}else o.badgePosition=`top-${o.position.indexOf("left")>-1?"right":"left"}`;o.meta.uid=s.meta.uid,o.meta.badge=s.meta.badge+1,o.meta.badgeClass=`q-notification__badge q-notification__badge--${o.badgePosition}`+(o.badgeColor!==void 0?` bg-${o.badgeColor}`:"")+(o.badgeTextColor!==void 0?` text-${o.badgeTextColor}`:"")+(o.badgeClass?` ${o.badgeClass}`:"");const c=or[o.position].value.indexOf(s);or[o.position].value[c]=Zs[o.meta.group]=o}}const l=()=>{mq(o),r=void 0};if(o.timeout>0&&(o.meta.timer=setTimeout(()=>{o.meta.timer=void 0,l()},o.timeout+1e3)),o.group!==void 0)return s=>{s!==void 0?Xa("trying to update a grouped one which is forbidden",e):l()};if(r={dismiss:l,config:e,notif:o},n!==void 0){Object.assign(n,r);return}return s=>{if(r!==void 0)if(s===void 0)r.dismiss();else{const c=Object.assign({},r.config,s,{group:!1,position:o.position});c_(c,t,r)}}}function mq(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);const t=or[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete Zs[e.meta.group];const n=u_[""+e.meta.uid];if(n){const{width:r,height:o}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=r,n.style.height=o}or[e.position].value.splice(t,1),typeof e.onDismiss=="function"&&e.onDismiss()}}function Ug(e){return e!=null&&vq.test(e)!==!0}function Xa(e,t){return console.error(`Notify: ${e}`,t),!1}function gq(){return ge({name:"QNotifications",devtools:{hide:!0},setup(){return()=>v("div",{class:"q-notifications"},Xv.map(e=>v(ic,{key:e,class:s_[e],tag:"div",name:`q-notification--${e}`},()=>or[e].value.map(t=>{const n=t.meta,r=[];if(n.hasMedia===!0&&(t.spinner!==!1?r.push(v(t.spinner,{class:"q-notification__spinner q-notification__spinner--"+n.leftClass,color:t.spinnerColor,size:t.spinnerSize})):t.icon?r.push(v(st,{class:"q-notification__icon q-notification__icon--"+n.leftClass,name:t.icon,color:t.iconColor,size:t.iconSize,role:"img"})):t.avatar&&r.push(v(xT,{class:"q-notification__avatar q-notification__avatar--"+n.leftClass},()=>v("img",{src:t.avatar,"aria-hidden":"true"})))),n.hasText===!0){let i;const a={class:"q-notification__message col"};if(t.html===!0)a.innerHTML=t.caption?`
${t.message}
${t.caption}
`:t.message;else{const l=[t.message];i=t.caption?[v("div",l),v("div",{class:"q-notification__caption"},[t.caption])]:l}r.push(v("div",a,i))}const o=[v("div",{class:n.contentClass},r)];return t.progress===!0&&o.push(v("div",{key:`${n.uid}|p|${n.badge}`,class:n.progressClass,style:n.progressStyle})),t.actions!==void 0&&o.push(v("div",{class:n.actionsClass},t.actions.map(i=>v(vt,i)))),n.badge>1&&o.push(v("div",{key:`${n.uid}|${n.badge}`,class:t.meta.badgeClass,style:t.badgeStyle},[n.badge])),v("div",B({ref:i=>{u_[""+n.uid]=i},key:n.uid,class:n.class},n.attrs),[v("div",{class:n.wrapperClass},o)])}))))}})}var pq={setDefaults(e){tn(e)===!0&&Object.assign(Qs,e)},registerType(e,t){tn(t)===!0&&(ta[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=n=>c_(n,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),this.__installed!==!0){Xv.forEach(r=>{or[r]=U([]);const o=["left","center","right"].includes(r)===!0?"center":r.indexOf("top")>-1?"top":"bottom",i=r.indexOf("left")>-1?"start":r.indexOf("right")>-1?"end":"center",a=["left","right"].includes(r)?`items-${r==="left"?"start":"end"} justify-center`:r==="center"?"flex-center":`items-${i}`;s_[r]=`q-notifications__list q-notifications__list--${o} fixed column no-wrap ${a}`});const n=es("q-notify");uc(gq(),t).mount(n)}}};function yq(e){return af(e)===!0?"__q_date|"+e.toUTCString():aT(e)===!0?"__q_expr|"+e.source:typeof e=="number"?"__q_numb|"+e:typeof e=="boolean"?"__q_bool|"+(e?"1":"0"):typeof e=="string"?"__q_strn|"+e:typeof e=="function"?"__q_strn|"+e.toString():e===Object(e)?"__q_objt|"+JSON.stringify(e):e}function bq(e){if(e.length<9)return e;const n=e.substring(0,8),r=e.substring(9);switch(n){case"__q_date":return new Date(r);case"__q_expr":return new RegExp(r);case"__q_numb":return Number(r);case"__q_bool":return Boolean(r==="1");case"__q_strn":return""+r;case"__q_objt":return JSON.parse(r);default:return e}}function d_(){const e=()=>null;return{has:()=>!1,getLength:()=>0,getItem:e,getIndex:e,getKey:e,getAll:()=>{},getAllKeys:()=>[],set:Zt,remove:Zt,clear:Zt,isEmpty:()=>!0}}function f_(e){const t=window[e+"Storage"],n=r=>{const o=t.getItem(r);return o?bq(o):null};return{has:r=>t.getItem(r)!==null,getLength:()=>t.length,getItem:n,getIndex:r=>rr{let r;const o={},i=t.length;for(let a=0;a{const r=[],o=t.length;for(let i=0;i{t.setItem(r,yq(o))},remove:r=>{t.removeItem(r)},clear:()=>{t.clear()},isEmpty:()=>t.length===0}}const v_=Ze.has.webStorage===!1?d_():f_("local"),wq={install({$q:e}){e.localStorage=v_}};Object.assign(wq,v_);const h_=Ze.has.webStorage===!1?d_():f_("session"),_q={install({$q:e}){e.sessionStorage=h_}};Object.assign(_q,h_);const xq=["ok","hide"];Qw(xq);function O3(){return gt(sb)}function Sq(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const n=()=>{};Av(n),document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return t.remove(),pu(n),r}function A3(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,n)=>{const r=Sq(e);r?t(!0):n(r)})}const kq={version:"2.14.1",install:sT,lang:Rn,iconSet:cu};var Cq={isoName:"zh-CN",nativeName:"\u4E2D\u6587(\u7B80\u4F53)",label:{clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",cancel:"\u53D6\u6D88",close:"\u5173\u95ED",set:"\u8BBE\u7F6E",select:"\u9009\u62E9",reset:"\u91CD\u7F6E",remove:"\u79FB\u9664",update:"\u66F4\u65B0",create:"\u521B\u5EFA",search:"\u641C\u7D22",filter:"\u8FC7\u6EE4",refresh:"\u5237\u65B0",expand:e=>e?`\u5C55\u5F00"${e}"`:"\u6269\u5F20",collapse:e=>e?`\u6298\u53E0"${e}"`:"\u574D\u584C"},date:{days:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),daysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),headerTitle:e=>new Intl.DateTimeFormat("zh-CN",{weekday:"short",month:"short",day:"numeric"}).format(e),firstDayOfWeek:0,format24h:!1,pluralDay:"\u5929"},table:{noData:"\u6CA1\u6709\u53EF\u7528\u6570\u636E",noResults:"\u627E\u4E0D\u5230\u5339\u914D\u7684\u6570\u636E",loading:"\u6B63\u5728\u52A0\u8F7D...",selectedRecords:e=>"\u5DF2\u9009\u62E9"+e+"\u884C",recordsPerPage:"\u6BCF\u9875\u7684\u884C\u6570:",allRows:"\u5168\u90E8",pagination:(e,t,n)=>e+"-"+t+" / "+n,columns:"\u5217"},editor:{url:"URL",bold:"\u7C97\u4F53",italic:"\u659C\u4F53",strikethrough:"\u5220\u9664\u7EBF",underline:"\u4E0B\u5212\u7EBF",unorderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868",subscript:"\u4E0B\u6807",superscript:"\u4E0A\u6807",hyperlink:"\u8D85\u94FE\u63A5",toggleFullscreen:"\u5168\u5C4F\u5207\u6362",quote:"\u5F15\u53F7",left:"\u5DE6\u5BF9\u9F50",center:"\u5C45\u4E2D\u5BF9\u9F50",right:"\u53F3\u5BF9\u9F50",justify:"\u4E24\u7AEF\u5BF9\u9F50",print:"\u6253\u5370",outdent:"\u51CF\u5C11\u7F29\u8FDB",indent:"\u589E\u52A0\u7F29\u8FDB",removeFormat:"\u6E05\u9664\u6837\u5F0F",formatting:"\u683C\u5F0F\u5316",fontSize:"\u5B57\u4F53\u5927\u5C0F",align:"\u5BF9\u9F50",hr:"\u63D2\u5165\u6C34\u5E73\u7EBF",undo:"\u64A4\u6D88",redo:"\u91CD\u505A",heading1:"\u6807\u9898\u4E00",heading2:"\u6807\u9898\u4E8C",heading3:"\u6807\u9898\u4E09",heading4:"\u6807\u9898\u56DB",heading5:"\u6807\u9898\u4E94",heading6:"\u6807\u9898\u516D",paragraph:"\u6BB5\u843D",code:"\u4EE3\u7801",size1:"\u975E\u5E38\u5C0F",size2:"\u6BD4\u8F83\u5C0F",size3:"\u6B63\u5E38",size4:"\u4E2D\u7B49\u504F\u5927",size5:"\u5927",size6:"\u975E\u5E38\u5927",size7:"\u8D85\u7EA7\u5927",defaultFont:"\u9ED8\u8BA4\u5B57\u4F53",viewSource:"\u67E5\u770B\u8D44\u6599"},tree:{noNodes:"\u6CA1\u6709\u53EF\u7528\u8282\u70B9",noResults:"\u627E\u4E0D\u5230\u5339\u914D\u7684\u8282\u70B9"}};var Tq=Object.defineProperty,Eq=Object.defineProperties,$q=Object.getOwnPropertyDescriptors,Wg=Object.getOwnPropertySymbols,Pq=Object.prototype.hasOwnProperty,qq=Object.prototype.propertyIsEnumerable,sr=Math.pow,Kg=(e,t,n)=>t in e?Tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kr=(e,t)=>{for(var n in t||(t={}))Pq.call(t,n)&&Kg(e,n,t[n]);if(Wg)for(var n of Wg(t))qq.call(t,n)&&Kg(e,n,t[n]);return e},Gv=(e,t)=>Eq(e,$q(t));function Mq(){this.__data__=[],this.size=0}function is(e,t){return e===t||e!==e&&t!==t}function wc(e,t){for(var n=e.length;n--;)if(is(e[n][0],t))return n;return-1}var Oq=Array.prototype,Aq=Oq.splice;function Rq(e){var t=this.__data__,n=wc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Aq.call(t,n,1),--this.size,!0}function Iq(e){var t=this.__data__,n=wc(t,e);return n<0?void 0:t[n][1]}function Lq(e){return wc(this.__data__,e)>-1}function Bq(e,t){var n=this.__data__,r=wc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Jr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&H2?new Pu:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=$M}var PM="[object Arguments]",qM="[object Array]",MM="[object Boolean]",OM="[object Date]",AM="[object Error]",RM="[object Function]",IM="[object Map]",LM="[object Number]",BM="[object Object]",NM="[object RegExp]",FM="[object Set]",zM="[object String]",jM="[object WeakMap]",DM="[object ArrayBuffer]",VM="[object DataView]",HM="[object Float32Array]",UM="[object Float64Array]",WM="[object Int8Array]",KM="[object Int16Array]",QM="[object Int32Array]",ZM="[object Uint8Array]",YM="[object Uint8ClampedArray]",XM="[object Uint16Array]",GM="[object Uint32Array]",It={};It[HM]=It[UM]=It[WM]=It[KM]=It[QM]=It[ZM]=It[YM]=It[XM]=It[GM]=!0;It[PM]=It[qM]=It[DM]=It[MM]=It[VM]=It[OM]=It[AM]=It[RM]=It[IM]=It[LM]=It[BM]=It[NM]=It[FM]=It[zM]=It[jM]=!1;function JM(e){return No(e)&&th(e.length)&&!!It[Oi(e)]}function eO(e){return function(t){return e(t)}}var w_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cl=w_&&typeof module=="object"&&module&&!module.nodeType&&module,tO=Cl&&Cl.exports===w_,yd=tO&&m_.process,nO=function(){try{var e=Cl&&Cl.require&&Cl.require("util").types;return e||yd&&yd.binding&&yd.binding("util")}catch{}}(),tp=nO,np=tp&&tp.isTypedArray,rO=np?eO(np):JM,nh=rO,oO=Object.prototype,iO=oO.hasOwnProperty;function __(e,t){var n=dr(e),r=!n&&Mu(e),o=!n&&!r&&Ou(e),i=!n&&!r&&!o&&nh(e),a=n||r||o||i,l=a?pM(e.length,String):[],s=l.length;for(var c in e)(t||iO.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||eh(c,s)))&&l.push(c);return l}var aO=Object.prototype;function rh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||aO;return e===n}function x_(e,t){return function(n){return e(t(n))}}var lO=x_(Object.keys,Object),sO=lO,uO=Object.prototype,cO=uO.hasOwnProperty;function dO(e){if(!rh(e))return sO(e);var t=[];for(var n in Object(e))cO.call(e,n)&&n!="constructor"&&t.push(n);return t}function xc(e){return e!=null&&th(e.length)&&!Jv(e)}function S_(e){return xc(e)?__(e):dO(e)}function rp(e){return cM(e,S_,gM)}var fO=1,vO=Object.prototype,hO=vO.hasOwnProperty;function mO(e,t,n,r,o,i){var a=n&fO,l=rp(e),s=l.length,c=rp(t),u=c.length;if(s!=u&&!a)return!1;for(var d=s;d--;){var f=l[d];if(!(a?f in t:hO.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var _=!0;i.set(e,t),i.set(t,e);for(var b=a;++d{ci(l,i.value)||(i.value=l),ci(l,e[t])||n(`update:${t}`,l)};return de(()=>r(i.value),a),de(()=>e[t],l=>a(r(l))),i.value!==e[t]&&n(`update:${t}`,i.value),i}const o=U(e[t]);return de(()=>e[t],i=>{ci(i,o.value)||(o.value=i)}),de(o,i=>{ci(i,e[t])||n(`update:${t}`,i)}),o}function vp(e,t,n,r){const o=Kt(new Set);return de(()=>e[t],()=>{const a=e[t].filter(l=>l in n.value);ci(a,o)||(o.clear(),a.forEach(o.add,o))},{immediate:!0}),de(o,()=>{const i=Array.from(o);ci(e[t],i)||r(`update:${t}`,i)}),oa(o)}const k_=Symbol("containers");function qO(e){nn(k_,e)}function C_(){const e=on(gt(k_),"containers");return{container:e.container,svg:e.svg,viewport:e.viewport,svgPanZoom:e.svgPanZoom}}class it{static value(t,n){return t instanceof Function?t(n):t}static values(t,n){return Object.values(t).filter(r=>r instanceof Function).length===0?t:Object.fromEntries(Object.entries(t).map(([r,o])=>[r,o instanceof Function?o(n):o]))}}var ot;(function(e){e.CENTER="center",e.NORTH="north",e.NORTH_EAST="north-east",e.EAST="east",e.SOUTH_EAST="south-east",e.SOUTH="south",e.SOUTH_WEST="south-west",e.WEST="west",e.NORTH_WEST="north-west"})(ot||(ot={}));function hp(e){const t={};return Object.assign(t,e(t))}function nr(e){return Object.entries(e)}function bd(e,t){const n=new Set(Object.keys(e));nr(t).forEach(([r,o])=>{ci(e[r],o)||(e[r]=o),n.delete(r)}),n.forEach(r=>delete e[r])}function mp(e,t,n){const r=it.values(t.normal,e);return r.type=="circle"?{width:r.radius*2*n,height:r.radius*2*n}:{width:r.width*n,height:r.height*n}}function MO(e,t,n,r){const i=Math.abs(e.x-n.x)parseInt(r)*t).filter(r=>!isNaN(r)).join(" "):n=e*t,n&&n!=="0"?n:void 0}function oh(e){let t=0;if(e===void 0||e==="none")t=0;else if(typeof e=="string"){const n=e.split(/\s+/).map(r=>parseInt(r)).filter(r=>!isNaN(r));n.length%2===0?t=n.reduce((r,o)=>r+o,0):t=n.reduce((r,o)=>r+o,0)*2}else t=e*2;return t}class Ls{static valueOf(t){return Array.from(t.values())}}function Bs(...e){return e.find(t=>!!t)}function OO(e){return typeof btoa===void 0?Buffer.from(e).toString("base64").replaceAll("=",""):btoa(e).replaceAll("=","")}function AO(e,t,n){var r;const o=e.createSVGPoint();o.x=n.x,o.y=n.y;const i=o.matrixTransform((r=t.getCTM())==null?void 0:r.inverse());return{x:i.x,y:i.y}}function RO(e,t,n){const r=e.createSVGPoint();r.x=n.x,r.y=n.y;const o=r.matrixTransform(t.getCTM());return{x:o.x,y:o.y}}var IO=/\s/;function LO(e){for(var t=e.length;t--&&IO.test(e.charAt(t)););return t}var BO=/^\s+/;function NO(e){return e&&e.slice(0,LO(e)+1).replace(BO,"")}var FO="[object Symbol]";function as(e){return typeof e=="symbol"||No(e)&&Oi(e)==FO}var gp=0/0,zO=/^[-+]0x[0-9a-f]+$/i,jO=/^0b[01]+$/i,DO=/^0o[0-7]+$/i,VO=parseInt;function T_(e){if(typeof e=="number")return e;if(as(e))return gp;if(Er(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Er(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=NO(e);var n=jO.test(e);return n||DO.test(e)?VO(e.slice(2),n?2:8):zO.test(e)?gp:+e}var pp=1/0,HO=17976931348623157e292;function UO(e){if(!e)return e===0?e:0;if(e=T_(e),e===pp||e===-pp){var t=e<0?-1:1;return t*HO}return e===e?e:0}function E_(e){var t=UO(e),n=t%1;return t===t?n?t-n:t:0}function WO(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n{for(const[f,h]of Object.entries(d)){const m=this.getOrCreateNodePosition(n,f);this.setNodePosition(m,h)}},c=d=>{const f=d.filter(_=>!(_ in n)),h=l.getViewArea(),m=a.value;for(const _ of f){const b=r.value[_],x=mp(b,o.node,m),p=Kr({},h.center);for(;;){let w=!1;for(const[S,C]of Object.entries(n)){if(_===S)continue;const T=r.value[S];if(!T)continue;const O=mp(T,o.node,m);if(w=MO(p,x,C,O),w)break}if(w)p.x+=x.width+_p*m,p.x+x.width/2>h.box.right&&(p.x=h.center.x,p.y+=x.height+_p*m);else break}const y=this.getOrCreateNodePosition(n,_);this.setNodePosition(y,p)}};c(Object.keys(r.value));const u=de(()=>Object.keys(r.value),c);i.on("node:dragstart",s),i.on("node:pointermove",s),i.on("node:dragend",s),this.onDeactivate=()=>{u(),i.off("node:dragstart",s),i.off("node:pointermove",s),i.off("node:dragend",s)}}deactivate(){this.onDeactivate&&this.onDeactivate()}setNodePosition(t,n){t.value.x=wp(n.x,3),t.value.y=wp(n.y,3)}getOrCreateNodePosition(t,n){const r=So(t,n);return r.value||(r.value={x:0,y:0}),r}}var JO=function(){try{var e=Ri(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Au=JO;function ih(e,t,n){t=="__proto__"&&Au?Au(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function xf(e,t,n){(n!==void 0&&!is(e[t],n)||n===void 0&&!(t in e))&&ih(e,t,n)}function eA(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(n(i[s],s,i)===!1)break}return t}}var tA=eA(),nA=tA,P_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xp=P_&&typeof module=="object"&&module&&!module.nodeType&&module,rA=xp&&xp.exports===P_,Sp=rA?mr.Buffer:void 0,kp=Sp?Sp.allocUnsafe:void 0;function oA(e,t){if(t)return e.slice();var n=e.length,r=kp?kp(n):new e.constructor(n);return e.copy(r),r}function iA(e){var t=new e.constructor(e.byteLength);return new qu(t).set(new qu(e)),t}function aA(e,t){var n=t?iA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function lA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++t>=RA)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var NA=BA(AA),FA=NA;function zA(e,t){return FA(qA(e,t,ah),e+"")}function R_(e,t,n){if(!Er(n))return!1;var r=typeof t;return(r=="number"?xc(n)&&eh(t,n.length):r=="string"&&t in n)?is(n[t],e):!1}function jA(e){return zA(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&R_(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r({normal:{type:"circle",radius:16,width:32,height:32,borderRadius:4,color:"#4466cc",strokeWidth:0,strokeColor:"#000000",strokeDasharray:0},hover:{type:t=>it.value(e.normal.type,t),radius:t=>{var n;return((n=it.value(e.normal.radius,t))!=null?n:0)+2},width:t=>{var n;return((n=it.value(e.normal.width,t))!=null?n:0)+2},height:t=>{var n;return((n=it.value(e.normal.height,t))!=null?n:0)+2},borderRadius:t=>{var n;return(n=it.value(e.normal.borderRadius,t))!=null?n:0},strokeWidth:t=>it.value(e.normal.strokeWidth,t),strokeColor:t=>it.value(e.normal.strokeColor,t),strokeDasharray:t=>it.value(e.normal.strokeDasharray,t),color:"#3355bb"},selected:void 0,draggable:!0,selectable:!1,label:{visible:!0,fontFamily:void 0,fontSize:11,lineHeight:1.1,color:"#000000",background:void 0,margin:4,direction:ot.SOUTH,text:"name"},focusring:{visible:!0,width:4,padding:3,color:"#eebb00"},transition:void 0})),edge:hp(e=>({normal:{width:2,color:"#4466cc",dasharray:0,linecap:"butt",animate:!1,animationSpeed:50},hover:{width:t=>it.value(e.normal.width,t)+1,color:"#3355bb",dasharray:t=>it.value(e.normal.dasharray,t),linecap:t=>it.value(e.normal.linecap,t),animate:t=>it.value(e.normal.animate,t),animationSpeed:t=>it.value(e.normal.animationSpeed,t)},selected:{width:t=>it.value(e.normal.width,t)+1,color:"#dd8800",dasharray:t=>{const n=it.value(e.normal.width,t);return`${n*1.5} ${n*2}`},linecap:t=>it.value(e.normal.linecap,t),animate:t=>it.value(e.normal.animate,t),animationSpeed:t=>it.value(e.normal.animationSpeed,t)},selectable:!1,gap:3,type:"straight",marker:{source:{type:"none",width:5,height:5,margin:-1,units:"strokeWidth",color:null},target:{type:"none",width:5,height:5,margin:-1,units:"strokeWidth",color:null}},margin:null,summarize:(t,n)=>n.edge.type=="curve"?!1:null,summarized:{label:{fontSize:10,lineHeight:1,color:"#4466cc"},shape:{type:"rect",radius:6,width:12,height:12,borderRadius:3,color:"#ffffff",strokeWidth:1,strokeColor:"#4466cc",strokeDasharray:void 0},stroke:{width:5,color:"#4466cc",dasharray:void 0,linecap:void 0,animate:!1,animationSpeed:50}},keepOrder:"clock",label:{fontFamily:void 0,fontSize:11,lineHeight:1.1,color:"#000000",background:void 0,margin:4,padding:4}})),path:{visible:!1,clickable:!1,curveInNode:!1,end:"centerOfNode",margin:0,path:{width:6,color:e=>{const t=["#d5000088","#c5116288","#aa00ff88","#6200ea88","#304ffe88","#2962ff88","#0091ea88","#00b8d488","#00bfa588","#00c85388","#64dd1788","#aeea0088","#ffd60088","#ffab0088","#ff6d0088","#dd2c0088"],n=e.edges.map(r=>r.split("").reduce((o,i)=>(o=(o<<5)-o+i.charCodeAt(0),o&o),0)).reduce((r,o)=>r+o,0);return t[Math.abs(n)%t.length]},dasharray:void 0,linecap:"round",linejoin:"round",animate:!1,animationSpeed:50},transition:void 0}}}const I_=Symbol("style");function UA(e){const t=Kt(HA()),n=Object.keys(t);for(const r of n)de(()=>e.value[r],()=>{VA(t[r],e.value[r]||{})},{immediate:!0,deep:!0});return nn(I_,t),t}function Cc(e){return on(gt(I_),`Configs(${e})`)[e]}function WA(){return Cc("view")}function L_(){return Cc("node")}function Tc(){return Cc("edge")}function B_(){return Cc("path")}const Ru=Kt({}),Tl={},KA=Symbol("markers");function QA(){return nn(KA,Ru),Ru}function ZA(e,t,n){var r;return Gv(Kr({},e),{color:(r=e.color)!=null?r:n,isSource:t})}function YA(e){const t=OO(e.color);return`marker_${e.type}_${e.width}_${e.height}_${e.margin}_${t}_${e.isSource?"L":"R"}_${e.units==="strokeWidth"?"rel":"abs"}`}function XA(e,t){var n;const r=(n=Tl[e])!=null?n:0;Tl[e]=r+1,r||(Ru[e]=t)}function GA(e){var t;const n=(t=Tl[e])!=null?t:0;n&&(n-1===0?(delete Ru[e],delete Tl[e]):Tl[e]=n-1)}function El(e){e&&GA(e)}function Ep(e,t,n,r){if(e.type==="none"){El(n);return}if(e.type==="custom")return El(n),e.customId;const o=ZA(e,t,r),i=YA(o);return i===n||(El(n),XA(i,o)),i}function JA(e,t,n){const r=oa({edgeLayoutPoints:{},edgeGroups:{},summarizedEdges:{}});return Zn(()=>{const{edgeLayoutPoints:o,edgeGroups:i}=t5(n,e.value,t.value);bd(r.edgeLayoutPoints,o),bd(r.edgeGroups,i)}),Zn(()=>{const o={};for(const[i,{edges:a,groupWidth:l}]of Object.entries(r.edgeGroups)){let s=!1;if(l==0)s=!1;else if(n.edge.summarize instanceof Function){const c=n.edge.summarize(a,n);c===null?s=$p(e.value,a,n,l):s=c}else n.edge.summarize?s=$p(e.value,a,n,l):s=!1;r.edgeGroups[i].summarize=s,s&&Object.keys(a).forEach(c=>o[c]=!0)}bd(r.summarizedEdges,o)}),r}function e5(e,t,n,r,o,i){return e?t?Pp(e.edge,n,r,o,0,0,i):Pp(e.edge,n,r,o,e.groupWidth,e.pointInGroup,i):{x1:0,y1:0,x2:0,y2:0}}function t5(e,t,n){const r={},o={},i={};for(const[l,s]of Object.entries(n)){if(!(s.source in t&&s.target in t))continue;const c=[s.source,s.target].sort().join("<=>"),u=i[c]||{};u[l]=s,i[c]=u}const a=e.edge.gap instanceof Function?e.edge.gap:(l,s)=>e.edge.gap;for(const[l,s]of Object.entries(i)){const c=Object.keys(s).length;if(c==0)continue;const u=a(s,e),[d,f]=Object.entries(s)[0];if(c===1)r[d]={edge:f,pointInGroup:0,groupWidth:0},o[l]={edges:s,groupWidth:0,summarize:!1};else{let h=0;const m=Object.values(s).map(x=>it.value(e.edge.normal.width,x)/2),_=Object.entries(s).map(([x,p],y)=>(y>0&&(h+=m[y-1]+u+m[y]),[x,p,h])),b=h;_.forEach(([x,p,y])=>{r[x]={edge:p,pointInGroup:y,groupWidth:b}}),o[l]={edges:s,groupWidth:b,summarize:!1}}}return{edgeLayoutPoints:r,edgeGroups:o}}function $p(e,t,n,r){if(Object.entries(t).length===1)return!1;const i=Math.min(...Object.values(t).flatMap(a=>[e[a.source],e[a.target]]).filter(a=>a).map(a=>{const l=it.values(n.node.normal,a);return l.type==="circle"?l.radius*2:Math.min(l.width,l.height)}));return r>i}function Pp(e,t,n,r,o,i,a){var l,s,c,u,d,f,h,m;let _,b,x,p;return e.source=f)&&(u*=-1)}else l==="horizontal"&&d<0&&(u*=-1)}if(s===0){const d=c<0?-1:1;return[e+u*d,t,n+u*d,r]}else if(c===0){const d=s<0?1:-1;return[e,t+u*d,n,r+u*d]}else{const d=c/s,f=-1/d;c<0&&(u=-u);const h=u/Math.sqrt(1+Math.pow(f,2));return[e+h,t+h*f,n+h,r+h*f]}}var Iu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},N_={exports:{}};(function(e,t){e.exports=n;function n(l,s){if(!(this instanceof n))return new n(l,s);this.x=l||0,this.y=s||0}n.fromArray=function(l){return new n(l[0]||0,l[1]||0)},n.fromObject=function(l){return new n(l.x||0,l.y||0)},n.prototype.addX=function(l){return this.x+=l.x,this},n.prototype.addY=function(l){return this.y+=l.y,this},n.prototype.add=function(l){return this.x+=l.x,this.y+=l.y,this},n.prototype.addScalar=function(l){return this.x+=l,this.y+=l,this},n.prototype.addScalarX=function(l){return this.x+=l,this},n.prototype.addScalarY=function(l){return this.y+=l,this},n.prototype.subtractX=function(l){return this.x-=l.x,this},n.prototype.subtractY=function(l){return this.y-=l.y,this},n.prototype.subtract=function(l){return this.x-=l.x,this.y-=l.y,this},n.prototype.subtractScalar=function(l){return this.x-=l,this.y-=l,this},n.prototype.subtractScalarX=function(l){return this.x-=l,this},n.prototype.subtractScalarY=function(l){return this.y-=l,this},n.prototype.divideX=function(l){return this.x/=l.x,this},n.prototype.divideY=function(l){return this.y/=l.y,this},n.prototype.divide=function(l){return this.x/=l.x,this.y/=l.y,this},n.prototype.divideScalar=function(l){return l!==0?(this.x/=l,this.y/=l):(this.x=0,this.y=0),this},n.prototype.divideScalarX=function(l){return l!==0?this.x/=l:this.x=0,this},n.prototype.divideScalarY=function(l){return l!==0?this.y/=l:this.y=0,this},n.prototype.invertX=function(){return this.x*=-1,this},n.prototype.invertY=function(){return this.y*=-1,this},n.prototype.invert=function(){return this.invertX(),this.invertY(),this},n.prototype.multiplyX=function(l){return this.x*=l.x,this},n.prototype.multiplyY=function(l){return this.y*=l.y,this},n.prototype.multiply=function(l){return this.x*=l.x,this.y*=l.y,this},n.prototype.multiplyScalar=function(l){return this.x*=l,this.y*=l,this},n.prototype.multiplyScalarX=function(l){return this.x*=l,this},n.prototype.multiplyScalarY=function(l){return this.y*=l,this},n.prototype.normalize=function(){var l=this.length();return l===0?(this.x=1,this.y=0):this.divide(n(l,l)),this},n.prototype.norm=n.prototype.normalize,n.prototype.limit=function(l,s){return Math.abs(this.x)>l&&(this.x*=s),Math.abs(this.y)>l&&(this.y*=s),this},n.prototype.randomize=function(l,s){return this.randomizeX(l,s),this.randomizeY(l,s),this},n.prototype.randomizeX=function(l,s){var c=Math.min(l.x,s.x),u=Math.max(l.x,s.x);return this.x=o(c,u),this},n.prototype.randomizeY=function(l,s){var c=Math.min(l.y,s.y),u=Math.max(l.y,s.y);return this.y=o(c,u),this},n.prototype.randomizeAny=function(l,s){return Math.round(Math.random())?this.randomizeX(l,s):this.randomizeY(l,s),this},n.prototype.unfloat=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},n.prototype.toFixed=function(l){return typeof l=="undefined"&&(l=8),this.x=this.x.toFixed(l),this.y=this.y.toFixed(l),this},n.prototype.mixX=function(l,s){return typeof s=="undefined"&&(s=.5),this.x=(1-s)*this.x+s*l.x,this},n.prototype.mixY=function(l,s){return typeof s=="undefined"&&(s=.5),this.y=(1-s)*this.y+s*l.y,this},n.prototype.mix=function(l,s){return this.mixX(l,s),this.mixY(l,s),this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.copyX=function(l){return this.x=l.x,this},n.prototype.copyY=function(l){return this.y=l.y,this},n.prototype.copy=function(l){return this.copyX(l),this.copyY(l),this},n.prototype.zero=function(){return this.x=this.y=0,this},n.prototype.dot=function(l){return this.x*l.x+this.y*l.y},n.prototype.cross=function(l){return this.x*l.y-this.y*l.x},n.prototype.projectOnto=function(l){var s=(this.x*l.x+this.y*l.y)/(l.x*l.x+l.y*l.y);return this.x=s*l.x,this.y=s*l.y,this},n.prototype.horizontalAngle=function(){return Math.atan2(this.y,this.x)},n.prototype.horizontalAngleDeg=function(){return i(this.horizontalAngle())},n.prototype.verticalAngle=function(){return Math.atan2(this.x,this.y)},n.prototype.verticalAngleDeg=function(){return i(this.verticalAngle())},n.prototype.angle=n.prototype.horizontalAngle,n.prototype.angleDeg=n.prototype.horizontalAngleDeg,n.prototype.direction=n.prototype.horizontalAngle,n.prototype.rotate=function(l){var s=this.x*Math.cos(l)-this.y*Math.sin(l),c=this.x*Math.sin(l)+this.y*Math.cos(l);return this.x=s,this.y=c,this},n.prototype.rotateDeg=function(l){return l=a(l),this.rotate(l)},n.prototype.rotateTo=function(l){return this.rotate(l-this.angle())},n.prototype.rotateToDeg=function(l){return l=a(l),this.rotateTo(l)},n.prototype.rotateBy=function(l){var s=this.angle()+l;return this.rotate(s)},n.prototype.rotateByDeg=function(l){return l=a(l),this.rotateBy(l)},n.prototype.distanceX=function(l){return this.x-l.x},n.prototype.absDistanceX=function(l){return Math.abs(this.distanceX(l))},n.prototype.distanceY=function(l){return this.y-l.y},n.prototype.absDistanceY=function(l){return Math.abs(this.distanceY(l))},n.prototype.distance=function(l){return Math.sqrt(this.distanceSq(l))},n.prototype.distanceSq=function(l){var s=this.distanceX(l),c=this.distanceY(l);return s*s+c*c},n.prototype.length=function(){return Math.sqrt(this.lengthSq())},n.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y},n.prototype.magnitude=n.prototype.length,n.prototype.isZero=function(){return this.x===0&&this.y===0},n.prototype.isEqualTo=function(l){return this.x===l.x&&this.y===l.y},n.prototype.toString=function(){return"x:"+this.x+", y:"+this.y},n.prototype.toArray=function(){return[this.x,this.y]},n.prototype.toObject=function(){return{x:this.x,y:this.y}};var r=180/Math.PI;function o(l,s){return Math.floor(Math.random()*(s-l+1)+l)}function i(l){return l*r}function a(l){return l/r}})(N_);var lt=N_.exports;function Vl(e){const t=lt.fromArray([e.x1,e.y1]),n=lt.fromArray([e.x2,e.y2]);return{source:t,target:n,v:Ea(t,n)}}function Lu(e,t){const n=lt.fromObject(e),r=lt.fromObject(t);return{source:n,target:r,v:Ea(n,r)}}function Wn(e,t){return{source:e,target:t,v:Ea(e,t)}}function Ea(e,t){return t.clone().subtract(e)}function n5(e){return[lt.fromArray([e.x1,e.y1]),lt.fromArray([e.x2,e.y2])]}function r5(e){return lt.fromArray([(e.x1+e.x2)/2,(e.y1+e.y2)/2])}function lh(e,t){const n=t.v.clone().normalize(),r=t.source,o=e.clone().subtract(r),i=n.dot(o);return r.clone().add(n.multiplyScalar(i))}function wd(e,t,n,r){if(!(t.clone().subtract(n).lengthSq()-r*r<=Math.pow(1,-10)))return null;const l=Wn(e,t),s=lh(n,l),u=s.clone().subtract(n).length();if(rr;return e.clone().add(O.multiplyScalar(L?t:-t))}const d=t,f=r,h=(sr(s,2)+sr(d,2)-sr(f,2))/(2*s*d),m=d*h,_=Math.sqrt(sr(d,2)-sr(m,2)),b=l.clone().normalize(),x=lt.fromArray([-b.y,b.x]),p=b.clone().multiplyScalar(m),y=x.clone().multiplyScalar(_),w=e.clone().add(p).add(y),S=e.clone().add(p).subtract(y),C=ir(w,o),T=ir(S,o);return Clh(m,i)),h=(o=R5(f,m=>Ea(i.source,m).lengthSq()))!=null?o:i.target;return Ea(h,i.target).length()}function Ap(e,t,n,r,o){const i=Vl(e),a=i.v.clone().normalize(),l=r===0?i.source:i.source.clone().add(a.clone().multiplyScalar(r*o)),s=r===0?i.target:i.target.clone().subtract(a.clone().multiplyScalar(r*o)),c=(t.width/2+n)*o,u=lt.fromArray([-a.y,a.x]).multiplyScalar(c);let d=l.clone().subtract(u).toObject(),f=l.clone().add(u).toObject(),h=s.clone().subtract(u).toObject(),m=s.clone().add(u).toObject();const _=i.v.angleDeg();return(_<-90||_>=90)&&([d,f]=[f,d],[h,m]=[m,h]),{source:{above:d,below:f},target:{above:h,below:m}}}function I5(e,t,n,r){let o;n.type==="circle"?o=n.radius:o=Op(t,e,n,1);let i;return r.type==="circle"?i=r.radius:i=Op(e,t,r,1),[o,i]}function Cf(e,t,n){const r=Vl(e);return L5(r,t,n)}function L5(e,t,n){const r=e.v.clone().normalize();e.v.angle();const o=e.source.clone().add(r.clone().multiplyScalar(t)),i=e.target.clone().subtract(r.clone().multiplyScalar(n));let[a,l]=o.toArray(),[s,c]=i.toArray();const u=Ea(o,i);if(e.v.angle()*u.angle()<0){const d=lt.fromArray([(a+s)/2,(l+c)/2]),f=d.clone().add(r.multiplyScalar(.5));[a,l]=d.toArray(),[s,c]=f.toArray()}return{x1:a,y1:l,x2:s,y2:c}}function ga(e,t,n){const{x:r,y:o}=e,i=r-t.x,a=o-t.y;return{x:i*Math.cos(n)-a*Math.sin(n)+t.x,y:i*Math.sin(n)+a*Math.cos(n)+t.y}}function Tf(e){return e>0?-(Math.PI*2-e):Math.PI*2+e}function B5(e){return{x1:e.x2,y1:e.y2,x2:e.x1,y2:e.y1}}function Ef(e,t,n,r){const o=[],i=Wn(t,e),a=Wn(t,n);let l=ma(i,a);r*l<0&&(l=Tf(l));const s=lt.fromObject(ga(e,t,-l/2)),c=Wn(t,s),u=Ja(c),d=ma(i,c);let f=Ja(i);if(Math.abs(d){Rp(c,e,m,n.has(m),!1,a.node)}),de(()=>[...n],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=c[p];y&&!y.selected&&(y.selected=!0)}),x.forEach(p=>{const y=c[p];y&&y.selected&&(y.selected=!1)})}),de(()=>[...o],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=c[p];y&&!y.hovered&&(y.hovered=!0)}),x.forEach(p=>{const y=c[p];y&&y.hovered&&(y.hovered=!1)})}),de(()=>new Set(Object.keys(e.value)),(m,_)=>{for(const x of m)_.has(x)||Rp(c,e,x,!1,!1,a.node);const b=l.nodes;for(const x of _)m.has(x)||(delete b[x],n.delete(x),o.delete(x),delete c[x])});const f=JA(e,t,a);Object.keys(t.value).forEach(m=>{Lp(u,f,c,t,m,r.has(m),a.edge,l.nodes,s)}),de(f.edgeGroups,m=>V5(d,f,a),{immediate:!0}),de(()=>[...r],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=u[p];y&&!y.selected&&(y.selected=!0)}),x.forEach(p=>{const y=u[p];y&&y.selected&&(y.selected=!1)})}),de(()=>[...i],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=u[p];y&&!y.hovered&&(y.hovered=!0)}),x.forEach(p=>{const y=u[p];y&&y.hovered&&(y.hovered=!1)})}),de(()=>new Set(Object.keys(t.value)),(m,_)=>{for(const b of m)_.has(b)||Lp(u,f,c,t,b,!1,a.edge,l.nodes,s);for(const b of _)m.has(b)||(r.delete(b),i.delete(b),u[b].stopWatchHandle(),delete u[b])});const h={nodeStates:c,edgeStates:u,edgeGroupStates:f,summarizedEdgeStates:d,layouts:l};return nn(V_,h),h}function ls(){return on(gt(V_),"states")}function z5(e,t,n,r){return n&&r.hover?it.values(r.hover,e):H_(e,t,r)}function H_(e,t,n){return t&&n.selected?it.values(n.selected,e):it.values(n.normal,e)}function j5(e,t,n,r){return t?it.values(r.selected,e):n&&r.hover?it.values(r.hover,e):it.values(r.normal,e)}function Rp(e,t,n,r,o,i){e[n]={selected:r,hovered:o};const a=e[n];a.shape=g(()=>t.value[n]?z5(t.value[n],a.selected,a.hovered,i):be(a.shape)),a.staticShape=g(()=>t.value[n]?H_(t.value[n],a.selected,i):be(a.staticShape)),a.label=g(()=>t.value[n]?it.values(i.label,t.value[n]):be(a.label)),a.labelText=g(()=>{var l,s;return i.label.text instanceof Function?be(a.label).text:t.value[n]?(s=(l=t.value[n])==null?void 0:l[be(a.label).text])!=null?s:"":be(a.labelText)}),a.draggable=g(()=>t.value[n]?it.value(i.draggable,t.value[n]):be(a.draggable)),a.selectable=g(()=>t.value[n]?it.value(i.selectable,t.value[n]):be(a.selectable))}function Ip(e){return e.type==="none"?N5:e}function Lp(e,t,n,r,o,i,a,l,s){if(!r.value[o])return;e[o]={line:void 0,selectable:!1,selected:i,hovered:!1,curve:void 0,origin:{x1:0,y1:0,x2:0,y2:0},labelPosition:{x1:0,y1:0,x2:0,y2:0},position:{x1:0,y1:0,x2:0,y2:0},stopWatchHandle:()=>{}};const u=e[o],d=g(()=>{const b=r.value[o],x=j5(b,u.selected,u.hovered,a),p=it.value(a.normal.width,b),y=Ip(it.values(a.marker.source,[b,x])),w=Ip(it.values(a.marker.target,[b,x]));return{stroke:x,normalWidth:p,source:y,target:w}});u.line=d,u.selectable=g(()=>it.value(a.selectable,r.value[o]));const f=So(t.edgeLayoutPoints,o),h=So(t.summarizedEdges,o),m=Zn(()=>{var b,x;const p=r.value[o];if(!p)return;const y=l[p==null?void 0:p.source],w=l[p==null?void 0:p.target],S=(b=n[p==null?void 0:p.source])==null?void 0:b.staticShape,C=(x=n[p==null?void 0:p.target])==null?void 0:x.staticShape;if(!y||!w||!S||!C)return;const T=e5(f.value,h.value,y,w,s.value,a.keepOrder),[O,L]=I5(y,w,S,C),R=s.value;u.labelPosition=Cf(T,O*R,L*R);let z=0,$=0;const E=d.value;if(E.source.type!=="none"){const Q=E.source;z=Q.margin+Q.width,Q.units==="strokeWidth"&&(z*=E.normalWidth)}if(E.target.type!=="none"){const Q=E.target;$=Q.margin+Q.width,Q.units==="strokeWidth"&&($*=E.normalWidth)}if(a.margin===null||a.margin===void 0?(E.source.type!=="none"||E.target.type!=="none")&&(z+=O,$+=L):(z+=a.margin+O,$+=a.margin+L),a.type==="straight")u.origin=T,u.curve=void 0,z===0&&$===0?u.position=u.origin:u.position=Cf(u.origin,z*R,$*R);else{u.origin=kf(y,w);const Q=f.value.groupWidth/2-f.value.pointInGroup,[J,I]=D5(u.origin,T,Q,z*R,$*R);u.position=J,u.curve=I}}),_=Zn(()=>{!r.value[o]||(u.sourceMarkerId=Ep(d.value.source,!0,u.sourceMarkerId,d.value.stroke.color),u.targetMarkerId=Ep(d.value.target,!1,u.targetMarkerId,d.value.stroke.color))});e[o].stopWatchHandle=()=>{m(),_(),El(u.sourceMarkerId),El(u.targetMarkerId)}}function D5(e,t,n,r,o){const i=Vl(e),a=Vl(t),l=r5(t),[s,c]=i5(i.source,i.target,l);let u,d;if(n===0)return r===0&&o===0?u=e:u=Cf(e,r,o),[u,d];const f=Wn(s,l),h=ma(Wn(s,i.source),f);if(r===0&&o===0)u=e;else{let x=r/c,p=o/c;h>0&&(x*=-1,p*=-1),u=kf(ga(i.source,s,x),ga(i.target,s,-p));let y=ma(Wn(s,i.source),Wn(s,i.target)),w=ma(Lu(s,{x:u.x1,y:u.y1}),Lu(s,{x:u.x2,y:u.y2}));if(h*y<0&&(y=Tf(y),h*w<0&&(w=Tf(w))),y*w<0){const S=l.clone().add(a.v.normalize().multiplyScalar(.5));return u=kf(l,S),[u,d]}}const[m,_]=n5(u),b=Ef(m,s,_,h).map(x=>x.toObject());return d={center:l,theta:h,circle:{center:s,radius:c},control:b},[u,d]}function V5(e,t,n){const r=t.edgeGroups;Object.entries(r).filter(([o,i])=>i.summarize&&!(o in e)).forEach(([o,i])=>{const a={stroke:void 0};a.stroke=g(()=>it.values(n.edge.summarized.stroke,i.edges)),e[o]=a}),Object.keys(e).forEach(o=>{var i;(i=t.edgeGroups[o])!=null&&i.summarize||delete e[o]})}const U_=Symbol("mouseEventHandlers"),el=3;function _d(e,t){var n;const r=(n=e[t])!=null?n:{x:0,y:0};return Kr({},r)}function tr(e,t){return e instanceof Array?{edges:e,event:t,summarized:!0}:{edge:e,edges:[e],event:t,summarized:!1}}function H5(e,t,n,r,o,i,a,l,s,c){_t(()=>{var N,q;(N=e.value)==null||N.addEventListener("pointerdown",m,{passive:!0}),(q=e.value)==null||q.addEventListener("contextmenu",x,{passive:!1})}),$r(()=>{var N,q;(N=e.value)==null||N.removeEventListener("pointerdown",m),(q=e.value)==null||q.removeEventListener("contextmenu",x)});const u={container:{moveCounter:0,pointerCounter:0},nodePointers:new Map,follow:{followedPointerId:-1,nodeBasePositions:{}},hoveredNodes:l,hoveredNodesPre:new Set,hoveredEdges:s,edgePointers:new Map,edgePointerPeekCount:0},d={pointermove:_,pointerup:b,pointercancel:b},f={pointermove:S,pointerup:T,pointercancel:C},h={pointerup:E,pointercancel:F};function m(N){u.container.moveCounter=0,u.container.pointerCounter===0&&nr(d).forEach(([q,M])=>{var D;(D=e.value)==null||D.addEventListener(q,M,{passive:!0})}),u.container.pointerCounter++}function _(N){u.container.moveCounter++}function b(N){if(u.container.pointerCounter--,u.container.pointerCounter===0&&(nr(d).forEach(([q,M])=>{var D;(D=e.value)==null||D.removeEventListener(q,M)}),u.container.moveCounter<=el)){if(N.shiftKey&&(i.size>0||a.size>0))return;i.clear(),a.clear(),c.emit("view:click",{event:N})}}function x(N){c.emit("view:contextmenu",{event:N}),u.container.pointerCounter>0&&(u.container.pointerCounter=0,nr(d).forEach(([q,M])=>{var D;(D=e.value)==null||D.removeEventListener(q,M)}))}function p(N){const q=u.follow.followedPointerId===N.pointerId,M=i.has(N.nodeId),D=!(N.pointerId in u.nodePointers);if(q&&D||q&&!M){const j=Ls.valueOf(u.nodePointers).find(k=>i.has(k.nodeId));if(!j){u.follow={followedPointerId:-1,nodeBasePositions:{}};return}N=j,u.follow.followedPointerId=N.pointerId}else{const j=u.nodePointers.get(u.follow.followedPointerId);if(!j){u.follow={followedPointerId:-1,nodeBasePositions:{}};return}N=j}if(q||M){const j=Ls.valueOf(u.nodePointers).map(k=>k.nodeId);u.follow.nodeBasePositions=Object.fromEntries(Array.from(i).filter(k=>!j.includes(k)).filter(k=>{var Z;return(Z=r[k])==null?void 0:Z.draggable}).map(k=>[k,_d(t,k)])),N.dragBasePosition=Kr({},N.latestPosition),N.nodeBasePosition=_d(t,N.nodeId)}}de(i,()=>{const N=u.nodePointers.get(u.follow.followedPointerId);N&&p(N)});function y(N,q){const M=N.dragBasePosition.x-q.pageX,D=N.dragBasePosition.y-q.pageY,j=u.follow.followedPointerId==N.pointerId?Kr({[N.nodeId]:N.nodeBasePosition},u.follow.nodeBasePositions):{[N.nodeId]:N.nodeBasePosition},k=n.value;return Object.fromEntries(Object.entries(j).map(([Z,oe])=>[Z,{x:oe.x-M/k,y:oe.y-D/k}]))}function w(N,q){var M,D;if(q.shiftKey&&a.size>0)return;a.clear();const j=(D=(M=r[N])==null?void 0:M.selectable)!=null?D:!1;if(j){const k=Ls.valueOf(u.nodePointers).filter(Z=>Z.pointerId!=q.pointerId&&i.has(Z.nodeId)).length>0;q.shiftKey||k?i.has(N)?i.delete(N):typeof j=="number"&&i.size>=j||i.add(N):i.has(N)||(i.clear(),i.add(N))}c.emit("node:click",{node:N,event:q})}function S(N){var q;N.preventDefault(),N.stopPropagation();const M=u.nodePointers.get(N.pointerId);if(!M||(M.latestPosition={x:N.pageX,y:N.pageY},M.moveCounter++,M.moveCounter<=el)||!((q=r[M.nodeId])!=null&&q.draggable))return;if(M.moveCounter===el+1){const j=y(M,{pointerId:M.pointerId,pageX:M.dragBasePosition.x,pageY:M.dragBasePosition.y});c.emit("node:dragstart",j)}const D=y(M,N);c.emit("node:pointermove",D)}function C(N){N.preventDefault(),N.stopPropagation();let q=u.nodePointers.get(N.pointerId);if(!!q){for(q of u.nodePointers.values()){const M=q.nodeId;if(q.moveCounter>el){const j=y(q,{pointerId:q.pointerId,pageX:q.latestPosition.x,pageY:q.latestPosition.y});c.emit("node:dragend",j)}c.emit("node:pointerup",{node:M,event:N})}u.nodePointers.clear(),u.follow={followedPointerId:-1,nodeBasePositions:{}},nr(f).forEach(([M,D])=>{document.removeEventListener(M,D)}),c.emit("view:mode","default")}}function T(N){var q;N.preventDefault(),N.stopPropagation();const M=u.nodePointers.get(N.pointerId);if(!M)return;u.nodePointers.delete(N.pointerId);const D=M.nodeId;if(M.moveCounter>el){if((q=r[M.nodeId])!=null&&q.draggable){const k=y(M,N);c.emit("node:dragend",k),c.emit("node:pointerup",{node:D,event:N})}}else c.emit("node:pointerup",{node:D,event:N}),w(D,N);u.nodePointers.size==0?(u.follow={followedPointerId:-1,nodeBasePositions:{}},nr(f).forEach(([k,Z])=>{document.removeEventListener(k,Z)}),c.emit("view:mode","default")):p(M),u.hoveredNodes.clear(),u.hoveredNodesPre.forEach(u.hoveredNodes.add,u.hoveredNodes)}function O(N,q){if(q.button==2||(q.preventDefault(),q.stopPropagation(),u.edgePointers.size!==0))return;u.nodePointers.size==0&&(c.emit("view:mode","node"),nr(f).forEach(([D,j])=>{document.addEventListener(D,j)}));const M={pointerId:q.pointerId,nodeId:N,moveCounter:0,nodeBasePosition:_d(t,N),dragBasePosition:{x:q.pageX,y:q.pageY},latestPosition:{x:q.pageX,y:q.pageY}};u.nodePointers.set(q.pointerId,M),i.has(N)&&(u.follow.followedPointerId<0?(u.follow.followedPointerId=q.pointerId,p(M)):delete u.follow.nodeBasePositions[M.nodeId]),c.emit("node:pointerdown",{node:N,event:q})}function L(N,q){u.hoveredNodesPre.add(N),!(u.nodePointers.size>0)&&(u.hoveredNodes.add(N),c.emit("node:pointerover",{node:N,event:q}))}function R(N,q){u.hoveredNodesPre.delete(N),!(u.nodePointers.size>0)&&(u.hoveredNodes.delete(N),c.emit("node:pointerout",{node:N,event:q}))}function z(N,q){c.emit("node:contextmenu",{node:N,event:q})}function $(N,q){if(q.button==2||(q.preventDefault(),q.stopPropagation(),u.nodePointers.size!==0))return;u.edgePointers.size==0&&(c.emit("view:mode","edge"),nr(h).forEach(([D,j])=>{document.addEventListener(D,j)}),u.edgePointerPeekCount=0),u.edgePointerPeekCount++;const M={pointerId:q.pointerId,edgeId:N};u.edgePointers.set(q.pointerId,M),c.emit("edge:pointerdown",tr(N,q))}function E(N){N.preventDefault(),N.stopPropagation();const q=u.edgePointers.get(N.pointerId);if(!q)return;u.edgePointers.delete(N.pointerId);const M=q.edgeId;c.emit("edge:pointerup",tr(M,N)),(u.edgePointers.size>0||u.edgePointerPeekCount===1)&&Q(M,N),u.edgePointers.size===0&&(u.edgePointerPeekCount=0,nr(h).forEach(([D,j])=>{document.removeEventListener(D,j)}),c.emit("view:mode","default"))}function F(N){if(N.preventDefault(),N.stopPropagation(),!!u.edgePointers.get(N.pointerId)){for(const M of u.edgePointers.values()){const D=M.edgeId;c.emit("edge:pointerup",tr(D,N))}u.edgePointers.clear(),u.edgePointerPeekCount=0,nr(h).forEach(([M,D])=>{document.removeEventListener(M,D)}),c.emit("view:mode","default")}}function Q(N,q){var M;if(q.shiftKey&&i.size>0)return;i.clear();const D=N instanceof Array?N:[N],j=Ls.valueOf(u.edgePointers).filter(k=>{const Z=k.edgeId instanceof Array?k.edgeId:[k.edgeId];return k.pointerId!=q.pointerId&&Z.every(oe=>a.has(oe))}).length>0;if(N instanceof Array)D.find(Z=>{var oe;return(oe=o[Z])==null?void 0:oe.selectable})&&(q.shiftKey||j?D.some(Z=>a.has(Z))?D.forEach(Z=>a.delete(Z)):D.forEach(Z=>{var oe;const ce=(oe=o[Z])==null?void 0:oe.selectable;typeof ce=="number"&&a.size>=ce||a.add(Z)}):(a.clear(),D.forEach(Z=>a.add(Z))));else{const k=(M=o[N])==null?void 0:M.selectable;k&&(q.shiftKey||j?a.has(N)?a.delete(N):typeof k=="number"&&a.size>=k||a.add(N):(a.clear(),a.add(N)))}c.emit("edge:click",tr(N,q))}function J(N,q){u.hoveredEdges.add(N),c.emit("edge:pointerover",tr(N,q))}function I(N,q){u.hoveredEdges.delete(N),c.emit("edge:pointerout",tr(N,q))}function W(N,q){c.emit("edge:contextmenu",tr(N,q))}function ae(N,q){if(q.button==2||(q.preventDefault(),q.stopPropagation(),u.nodePointers.size!==0))return;u.edgePointers.size==0&&(c.emit("view:mode","edge"),nr(h).forEach(([D,j])=>{document.addEventListener(D,j)}),u.edgePointerPeekCount=0),u.edgePointerPeekCount++;const M={pointerId:q.pointerId,edgeId:N};u.edgePointers.set(q.pointerId,M),c.emit("edge:pointerdown",tr(N,q))}function _e(N,q){N.forEach(M=>u.hoveredEdges.add(M)),c.emit("edge:pointerover",tr(N,q))}function Y(N,q){N.forEach(M=>u.hoveredEdges.delete(M)),c.emit("edge:pointerout",tr(N,q))}function A(N,q){c.emit("edge:contextmenu",tr(N,q))}const G={selectedNodes:i,hoveredNodes:l,selectedEdges:a,hoveredEdges:s,handleNodePointerDownEvent:O,handleNodePointerOverEvent:L,handleNodePointerOutEvent:R,handleNodeContextMenu:z,handleEdgePointerDownEvent:$,handleEdgePointerOverEvent:J,handleEdgePointerOutEvent:I,handleEdgeContextMenu:W,handleEdgesPointerDownEvent:ae,handleEdgesPointerOverEvent:_e,handleEdgesPointerOutEvent:Y,handleEdgesContextMenu:A};return nn(U_,G),G}function ch(){return on(gt(U_),"mouseEventHandlers")}function U5(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const W_=Symbol("emitter");function W5(){const e=U5();return nn(W_,e),e}function K_(){return{emitter:on(gt(W_),"event emitter")}}var $c={getGlobalThis:function(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof Iu!="undefined")return Iu;if(typeof this!="undefined")return this;throw new Error("Unable to locate global `this`")},extend:function(e,t){e=e||{};for(var n in t)this.isObject(t[n])?e[n]=this.extend(e[n],t[n]):e[n]=t[n];return e},isElement:function(e){return e instanceof HTMLElement||e instanceof SVGElement||e instanceof SVGSVGElement||e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},isObject:function(e){return Object.prototype.toString.call(e)==="[object Object]"},isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},getSvg:function(e){var t,n;if(this.isElement(e))t=e;else if(typeof e=="string"||e instanceof String){if(t=document.querySelector(e),!t)throw new Error("Provided selector did not find any elements. Selector: "+e)}else throw new Error("Provided selector is not an HTML object nor String");if(t.tagName.toLowerCase()==="svg")n=t;else if(t.tagName.toLowerCase()==="object")n=t.contentDocument.documentElement;else if(t.tagName.toLowerCase()==="embed")n=t.getSVGDocument().documentElement;else throw t.tagName.toLowerCase()==="img"?new Error('Cannot script an SVG in an "img" element. Please use an "object" element or an in-line SVG.'):new Error("Cannot get SVG.");return n},proxy:function(e,t){return function(){return e.apply(t,arguments)}},getType:function(e){return Object.prototype.toString.apply(e).replace(/^\[object\s/,"").replace(/\]$/,"")},mouseAndTouchNormalize:function(e,t){if(e.clientX===void 0||e.clientX===null)if(e.clientX=0,e.clientY=0,e.touches!==void 0&&e.touches.length){if(e.touches[0].clientX!==void 0)e.clientX=e.touches[0].clientX,e.clientY=e.touches[0].clientY;else if(e.touches[0].pageX!==void 0){var n=t.getBoundingClientRect();e.clientX=e.touches[0].pageX-n.left,e.clientY=e.touches[0].pageY-n.top}}else e.originalEvent!==void 0&&e.originalEvent.clientX!==void 0&&(e.clientX=e.originalEvent.clientX,e.clientY=e.originalEvent.clientY)},touchNormalize:function(e,t,n){if(e.touches!==void 0&&e.touches.length){if(e.touches[n].clientX!==void 0)e.clientX=e.touches[n].clientX,e.clientY=e.touches[n].clientY;else if(e.touches[n].pageX!==void 0){var r=t.getBoundingClientRect();e.clientX=e.touches[n].pageX-r.left,e.clientY=e.touches[n].pageY-r.top}}else(e.clientX===void 0||e.clientX===null)&&(e.clientX=0,e.clientY=0,e.originalEvent!==void 0&&e.originalEvent.clientX!==void 0&&(e.clientX=e.originalEvent.clientX,e.clientY=e.originalEvent.clientY))},isDblClick:function(e,t){if(e.detail===2)return!0;if(t!=null){var n=e.timeStamp-t.timeStamp,r=Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2));return n<250&&r<10}return!1},now:Date.now||function(){return new Date().getTime()},throttle:function(e,t,n){var r=this,o,i,a,l=null,s=0;n||(n={});var c=function(){s=n.leading===!1?0:r.now(),l=null,a=e.apply(o,i),l||(o=i=null)};return function(){var u=r.now();!s&&n.leading===!1&&(s=u);var d=t-(u-s);return o=this,i=arguments,d<=0||d>t?(clearTimeout(l),l=null,s=u,a=e.apply(o,i),l||(o=i=null)):!l&&n.trailing!==!1&&(l=setTimeout(c,d)),a}},createRequestAnimationFrame:function(e){var t=null;return e!=="auto"&&e<60&&e>1&&(t=Math.floor(1e3/e)),t===null?window.requestAnimationFrame||Bp(33):Bp(t)},calculateDistance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}};function Bp(e){return function(t){window.setTimeout(t,e)}}var K5=$c,Q5=function(){var e="",t,n,r,o=[],i={passive:!0},a={passive:!1};K5.getGlobalThis().addEventListener?(t="addEventListener",n="removeEventListener"):(t="attachEvent",n="detachEvent",e="on");function l(){return r||(r="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll"),r}function s(_,b){var x=function(p){!p&&(p=window.event);var y={originalEvent:p,target:p.target||p.srcElement,type:"wheel",deltaMode:p.type=="MozMousePixelScroll"?0:1,deltaX:0,delatZ:0,preventDefault:function(){p.preventDefault?p.preventDefault():p.returnValue=!1}};return l()=="mousewheel"?(y.deltaY=-.025*p.wheelDelta,p.wheelDeltaX&&(y.deltaX=-.025*p.wheelDeltaX)):y.deltaY=p.detail,b(y)};return o.push({element:_,fn:x}),x}function c(_){for(var b=0;b0)for(var a=i.length;a>0;a--)i[i.length-a].nodeName!=="defs"&&n.appendChild(i[i.length-a]);e.appendChild(n)}var l=[];return n.getAttribute("class")&&(l=n.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),n.setAttribute("class",l.join(" "))),n},setupSvgAttributes:function(e){if(e.setAttribute("xmlns",this.svgNS),e.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),e.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),e.parentNode!==null){var t=e.getAttribute("style")||"";t.toLowerCase().indexOf("overflow")===-1&&e.setAttribute("style","overflow: hidden; "+t)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:Ns.throttle(function(){for(var e=document.querySelectorAll("defs"),t=e.length,n=0;n=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var o in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(o,this.eventListeners[o],this.options.preventMouseEventsDefault?X_:Y_);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())};pt.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var e=this;this.wheelListener=function(n){return e.handleMouseWheel(n)};var t=!this.options.preventMouseEventsDefault;Z_.on(this.options.eventsListenerElement||this.svg,this.wheelListener,t),this.options.mouseWheelZoomEnabled=!0}};pt.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var e=!this.options.preventMouseEventsDefault;Z_.off(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!1}};pt.prototype.handleMouseWheel=function(e){if(!(!this.options.zoomEnabled||this.state!=="none")){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var t=e.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in e&&e.deltaMode===0&&e.wheelDelta&&(t=e.deltaY===0?0:Math.abs(e.wheelDelta)/e.deltaY),t=-.30?1:-1)*Math.log(Math.abs(t)+10)/r;var o=this.svg.getScreenCTM().inverse(),i=gn.getEventPoint(e,this.svg).matrixTransform(o),a=Math.pow(1+this.options.zoomScaleSensitivity,-1*t);this.zoomAtPoint(a,i)}};pt.prototype.zoomAtPoint=function(e,t,n){var r=this.viewport.getOriginalState();n?(e=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,e)),e=e/this.getZoom()):this.getZoom()*ethis.options.maxZoom*r.zoom&&(e=this.options.maxZoom*r.zoom/this.getZoom());var o=this.viewport.getCTM(),i=t.matrixTransform(o.inverse()),a=this.svg.createSVGMatrix().translate(i.x,i.y).scale(e).translate(-i.x,-i.y),l=o.multiply(a);l.a!==o.a&&this.viewport.setCTM(l)};pt.prototype.zoom=function(e,t){this.zoomAtPoint(e,gn.getSvgCenterPoint(this.svg,this.width,this.height),t)};pt.prototype.publicZoom=function(e,t){t&&(e=this.computeFromRelativeZoom(e)),this.zoom(e,t)};pt.prototype.publicZoomAtPoint=function(e,t,n){if(n&&(e=this.computeFromRelativeZoom(e)),Pn.getType(t)!=="SVGPoint")if("x"in t&&"y"in t)t=gn.createSVGPoint(this.svg,t.x,t.y);else throw new Error("Given point is invalid");this.zoomAtPoint(e,t,n)};pt.prototype.getZoom=function(){return this.viewport.getZoom()};pt.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()};pt.prototype.computeFromRelativeZoom=function(e){return e*this.viewport.getOriginalState().zoom};pt.prototype.resetZoom=function(){var e=this.viewport.getOriginalState();this.zoom(e.zoom,!0)};pt.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())};pt.prototype.reset=function(){this.resetZoom(),this.resetPan()};pt.prototype.handleDblClick=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.options.controlIconsEnabled){var t=e.target.getAttribute("class")||"";if(t.indexOf("svg-pan-zoom-control")>-1)return!1}var n;e.shiftKey?n=1/((1+this.options.zoomScaleSensitivity)*2):n=(1+this.options.zoomScaleSensitivity)*2;var r=gn.getEventPoint(e,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(n,r)};pt.prototype.handleMouseDown=function(e,t){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),Pn.mouseAndTouchNormalize(e,this.svg),this.options.dblClickZoomEnabled&&Pn.isDblClick(e,t)?this.handleDblClick(e):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=gn.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()))};pt.prototype.handleMouseMove=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.state==="pan"&&this.options.panEnabled){var t=gn.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(t.x-this.stateOrigin.x,t.y-this.stateOrigin.y);this.viewport.setCTM(n)}};pt.prototype.handleMouseUp=function(e){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.state==="pan"&&(this.state="none")};pt.prototype.handleTouchStart=function(e,t){if(e.touches.length==1)this.handleMouseDown(e,t);else{this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.firstEventCTM=this.viewport.getCTM();var n=gn.getTouchPoint(e,this.svg,0),r=gn.getTouchPoint(e,this.svg,1);this.firstDistance=Pn.calculateDistance(n,r),n.x=(n.x+r.x)/2,n.y=(n.y+r.y)/2,this.stateOrigin=n.matrixTransform(this.firstEventCTM.inverse()),this.firstZoomLevel=this.getZoom()}};pt.prototype.handleTouchMove=function(e){if(e.touches.length==1)this.handleMouseMove(e);else{if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),!this.options.panEnabled&&!this.options.zoomEnabled)return;var t=gn.getTouchPoint(e,this.svg,0),n=gn.getTouchPoint(e,this.svg,1),r=this.svg.createSVGPoint();if(r.x=(t.x+n.x)/2,r.y=(t.y+n.y)/2,this.state==="pan"&&this.options.panEnabled){var o=r.matrixTransform(this.firstEventCTM.inverse()),i=this.firstEventCTM.translate(o.x-this.stateOrigin.x,o.y-this.stateOrigin.y);this.viewport.setCTM(i)}if(this.options.zoomEnabled){var a=Pn.calculateDistance(t,n),l=a/this.firstDistance,s=this.svg.getScreenCTM().inverse(),c=r.matrixTransform(s);this.zoomAtPoint(this.firstZoomLevel*l,c,!0)}}};pt.prototype.handleTouchEnd=function(e){if(e.touches.length==0)this.handleMouseUp(e);else if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.firstEventCTM=this.viewport.getCTM(),e.touches.length==1)this.stateOrigin=gn.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse());else{var t=gn.getTouchPoint(e,this.svg,0),n=gn.getTouchPoint(e,this.svg,1);this.firstDistance=Pn.calculateDistance(t,n),t.x=(t.x+n.x)/2,t.y=(t.y+n.y)/2,this.stateOrigin=t.matrixTransform(this.firstEventCTM.inverse())}};pt.prototype.fit=function(){var e=this.viewport.getViewBox(),t=Math.min(this.width/e.width,this.height/e.height);this.zoom(t,!0)};pt.prototype.contain=function(){var e=this.viewport.getViewBox(),t=Math.max(this.width/e.width,this.height/e.height);this.zoom(t,!0)};pt.prototype.center=function(){var e=this.viewport.getViewBox(),t=(this.width-(e.width+e.x*2)*this.getZoom())*.5,n=(this.height-(e.height+e.y*2)*this.getZoom())*.5;this.getPublicInstance().pan({x:t,y:n})};pt.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()};pt.prototype.pan=function(e){var t=this.viewport.getCTM();t.e=e.x,t.f=e.y,this.viewport.setCTM(t)};pt.prototype.panBy=function(e){var t=this.viewport.getCTM();t.e+=e.x,t.f+=e.y,this.viewport.setCTM(t)};pt.prototype.getPan=function(){var e=this.viewport.getState();return{x:e.x,y:e.y}};pt.prototype.resize=function(){var e=gn.getBoundingClientRectNormalized(this.svg);this.width=e.width,this.height=e.height;var t=this.viewport;t.options.width=this.width,t.options.height=this.height,t.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())};pt.prototype.destroy=function(){var e=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,this.options.customEventsHandler!=null&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var t in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],this.options.preventMouseEventsDefault?X_:Y_);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),ho=ho.filter(function(n){return n.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}};pt.prototype.getPublicInstance=function(){var e=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return e.options.panEnabled=!0,e.pi},disablePan:function(){return e.options.panEnabled=!1,e.pi},isPanEnabled:function(){return!!e.options.panEnabled},pan:function(t){return e.pan(t),e.pi},panBy:function(t){return e.panBy(t),e.pi},getPan:function(){return e.getPan()},setBeforePan:function(t){return e.options.beforePan=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},setOnPan:function(t){return e.options.onPan=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},enableZoom:function(){return e.options.zoomEnabled=!0,e.pi},disableZoom:function(){return e.options.zoomEnabled=!1,e.pi},isZoomEnabled:function(){return!!e.options.zoomEnabled},enableControlIcons:function(){return e.options.controlIconsEnabled||(e.options.controlIconsEnabled=!0,$f.enable(e)),e.pi},disableControlIcons:function(){return e.options.controlIconsEnabled&&(e.options.controlIconsEnabled=!1,$f.disable(e)),e.pi},isControlIconsEnabled:function(){return!!e.options.controlIconsEnabled},enableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!0,e.pi},disableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!1,e.pi},isDblClickZoomEnabled:function(){return!!e.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return e.enableMouseWheelZoom(),e.pi},disableMouseWheelZoom:function(){return e.disableMouseWheelZoom(),e.pi},isMouseWheelZoomEnabled:function(){return!!e.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return e.options.zoomScaleSensitivity=t,e.pi},setMinZoom:function(t){return e.options.minZoom=t,e.pi},setMaxZoom:function(t){return e.options.maxZoom=t,e.pi},setBeforeZoom:function(t){return e.options.beforeZoom=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},setOnZoom:function(t){return e.options.onZoom=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},zoom:function(t){return e.publicZoom(t,!0),e.pi},zoomBy:function(t){return e.publicZoom(t,!1),e.pi},zoomAtPoint:function(t,n){return e.publicZoomAtPoint(t,n,!0),e.pi},zoomAtPointBy:function(t,n){return e.publicZoomAtPoint(t,n,!1),e.pi},zoomIn:function(){return this.zoomBy(1+e.options.zoomScaleSensitivity),e.pi},zoomOut:function(){return this.zoomBy(1/(1+e.options.zoomScaleSensitivity)),e.pi},getZoom:function(){return e.getRelativeZoom()},setOnUpdatedCTM:function(t){return e.options.onUpdatedCTM=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},resetZoom:function(){return e.resetZoom(),e.pi},resetPan:function(){return e.resetPan(),e.pi},reset:function(){return e.reset(),e.pi},fit:function(){return e.fit(),e.pi},contain:function(){return e.contain(),e.pi},center:function(){return e.center(),e.pi},updateBBox:function(){return e.updateBBox(),e.pi},resize:function(){return e.resize(),e.pi},getSizes:function(){return{width:e.width,height:e.height,realZoom:e.getZoom(),viewBox:e.viewport.getViewBox()}},destroy:function(){return e.destroy(),e.pi}}),this.publicInstance};var ho=[],eR=function(e,t){var n=Pn.getSvg(e);if(n===null)return null;for(var r=ho.length-1;r>=0;r--)if(ho[r].svg===n)return ho[r].instance.getPublicInstance();return ho.push({svg:n,instance:new pt(n,t)}),ho[ho.length-1].instance.getPublicInstance()},tR=eR;const nR={fitToContents(){return this.fit().center().zoomOut().zoomOut(),this},getViewArea(){const e=this.getSizes(),t=this.getPan(),n=e.realZoom;t.x/=n,t.y/=n;const r={width:e.width/n,height:e.height/n};return{box:{top:-t.y,bottom:r.height-t.y,left:-t.x,right:r.width-t.x},center:{x:r.width/2-t.x,y:r.height/2-t.y}}},getRealZoom(){return this.getSizes().realZoom},applyAbsoluteZoomLevel(e,t,n){const r=Math.max(1e-4,t),o=Math.max(r,n),i=Math.max(Math.min(o,e),r),a=this.getRealZoom(),l=this.getZoom(),s=a/l;this.setMinZoom(r/s).setMaxZoom(o/s).zoom(i/s)},isPanEnabled(){return this._isPanEnabled},enablePan(){return this._isPanEnabled=!0,this._internalEnablePan(),this},disablePan(){return this._isPanEnabled=!1,this._internalDisablePan(),this},isZoomEnabled(){return this._isZoomEnabled},enableZoom(){return this._isZoomEnabled=!0,this._internalEnableZoom(),this},disableZoom(){return this._isZoomEnabled=!1,this._internalDisableZoom(),this},setPanEnabled(e){return e?this.enablePan():this.disablePan(),this},setZoomEnabled(e){return e?(this.enableZoom(),this.enableDblClickZoom()):(this.disableZoom(),this.disableDblClickZoom()),this}};function rR(e,t){var n,r;const o=e;return o._isPanEnabled=(n=t.panEnabled)!=null?n:!0,o._isZoomEnabled=(r=t==null?void 0:t.zoomEnabled)!=null?r:!0,o._internalIsPanEnabled=o.isPanEnabled,o._internalEnablePan=o.enablePan,o._internalDisablePan=o.disablePan,o._internalIsZoomEnabled=o.isZoomEnabled,o._internalEnableZoom=o.enableZoom,o._internalDisableZoom=o.disableZoom,Object.assign(e,nR),o}function oR(e,t){var n,r,o,i,a,l;const s=(r=(n=t.customEventsHandler)==null?void 0:n.init)!=null?r:d=>{},c=(i=(o=t.customEventsHandler)==null?void 0:o.destroy)!=null?i:d=>{},u=(l=(a=t.customEventsHandler)==null?void 0:a.haltEventListeners)!=null?l:[];return t.mouseWheelZoomEnabled===void 0&&(t.mouseWheelZoomEnabled=t.zoomEnabled),t.customEventsHandler={init:d=>{rR(d.instance,t),s(d)},destroy:d=>c(d),haltEventListeners:u},tR(e,t)}var Np;(function(e){e[e.INITIAL=0]="INITIAL",e[e.MOUNTED=1]="MOUNTED",e[e.UNMOUNTED=2]="UNMOUNTED"})(Np||(Np={}));function iR(e,t){const n=U();let r=0;const o=[],i=[],a=()=>{r=1,o.forEach(u=>u()),o.length=0},l=()=>{r=2,i.forEach(u=>u()),i.length=0};return _t(()=>{var u,d,f,h,m,_;const b=on(e.value,""),x=(d=(u=t.customEventsHandler)==null?void 0:u.init)!=null?d:w=>{},p=(h=(f=t.customEventsHandler)==null?void 0:f.destroy)!=null?h:w=>{},y=(_=(m=t.customEventsHandler)==null?void 0:m.haltEventListeners)!=null?_:[];t.customEventsHandler={init:w=>{n.value=w.instance,x(w),a()},destroy:w=>{l(),p(w)},haltEventListeners:y},oR(b,t)}),$r(()=>{var u;(u=n.value)==null||u.destroy(),n.value=void 0}),{svgPanZoom:n,onSvgPanZoomMounted:u=>{r===0?o.push(u):r===1&&u()},onSvgPanZoomUnmounted:u=>{r===0||r===1?i.push(u):u()}}}const G_=Symbol("zoomLevel");function aR(e,t){const n=g(()=>t.scalingObjects?1:1/e.value);return nn(G_,{zoomLevel:e,scale:n}),{scale:n}}function qr(){return on(gt(G_),"zoomLevel")}const lR=["paths","nodes","focusring","edges","base","grid","background","root"],sR=["cx","cy","r","fill","stroke","stroke-width","stroke-dasharray"],uR=["x","y","width","height","rx","ry","fill","stroke","stroke-width","stroke-dasharray"],fh=$t({props:{baseX:{type:Number,default:0},baseY:{type:Number,default:0},config:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=U(n.baseX),i=U(n.baseY),a=U(0),l=U("#000000"),s=U(void 0),c=U(0),u=U(0),d=U(0),f=U(0);return Zn(()=>{var h;const m=r.value;a.value=n.config.strokeWidth*m,l.value=(h=n.config.strokeColor)!=null?h:"none",s.value=kc(n.config.strokeDasharray,m),n.config.type==="circle"?(o.value=n.baseX,i.value=n.baseY,c.value=n.config.radius*m):(u.value=n.config.width*m,d.value=n.config.height*m,f.value=n.config.borderRadius*m,o.value=n.baseX-u.value/2,i.value=n.baseY-d.value/2)}),t({x:o,y:i,strokeWidth:a,strokeColor:l,strokeDasharray:s,radius:c,width:u,height:d,borderRadius:f}),(h,m)=>e.config.type==="circle"?(qe(),ze("circle",{key:0,class:"v-shape-circle",cx:o.value,cy:i.value,r:c.value,fill:e.config.color,stroke:l.value,"stroke-width":a.value,"stroke-dasharray":s.value},null,8,sR)):(qe(),ze("rect",{key:1,class:"v-shape-rect",x:o.value,y:i.value,width:u.value,height:d.value,rx:f.value,ry:f.value,fill:e.config.color,stroke:l.value,"stroke-width":a.value,"stroke-dasharray":s.value},null,8,uR))}}),cR=["rx","ry","fill","transform"],dR=["x","y","dominant-baseline","font-family","font-size","fill"],fR=["x","dy","dominant-baseline"],Pc=$t({props:{text:{type:String,required:!0},x:{type:Number,required:!0},y:{type:Number,required:!0},dominantBaseline:{type:String,required:!1,default:"central"},config:{type:Object,required:!0}},setup(e,{expose:t}){const n=e;function r(x,p,y){var w;const S=x.getBBox();p.x=S.x,p.y=S.y,p.width=S.width,p.height=S.height,y.value=(w=x.getAttribute("transform"))!=null?w:void 0}function o(x,p,y){const w=new MutationObserver(()=>{r(x,p,y)});return w.observe(x,{attributes:!0,attributeFilter:["x","y","transform","font-size"]}),r(x,p,y),w}const i=I0(),{scale:a}=qr(),l=g(()=>{var x,p;return(p=(x=n.text)==null?void 0:x.toString().split(/\r?\n/))!=null?p:""}),s=g(()=>{var x;return(x=i["font-size"])!=null?x:n.config.fontSize*a.value}),c=g(()=>s.value*n.config.lineHeight),u=g(()=>{const x=n.dominantBaseline;return x==="hanging"?0:x==="central"?-(c.value*(l.value.length-1))/2:-c.value*(l.value.length-1)}),d=U(),f=U(""),h=Kt({x:0,y:0,width:0,height:0}),m=g(()=>{var x,p;const y=n.config.background;if(!y)return h;let w,S;y.padding instanceof Object?(w=y.padding.vertical,S=y.padding.horizontal):(w=(x=y.padding)!=null?x:0,S=(p=y.padding)!=null?p:0);const C=c.value-s.value;return{x:h.x-S*a.value,y:h.y-w*a.value-C/2,width:h.width+S*2*a.value,height:h.height+w*2*a.value+C}});let _;const b=()=>{n.config.background&&n.config.background.visible?!_&&d.value&&(_=o(d.value,h,f)):(_==null||_.disconnect(),_=void 0)};return _t(()=>b()),de(()=>n.config.background&&n.config.background.visible,(x,p)=>{x!=p&&b()}),$r(()=>{_==null||_.disconnect(),_=void 0}),t({fontSize:s,element:d,transform:f,backgroundRectPos:m,scale:a}),(x,p)=>{var y,w,S,C,T,O;return qe(),ze(Xe,null,[e.config.background&&e.config.background.visible?(qe(),ze("rect",Sr({key:0,class:"v-text-background"},be(m),{rx:((w=(y=e.config.background)==null?void 0:y.borderRadius)!=null?w:0)*be(a),ry:((C=(S=e.config.background)==null?void 0:S.borderRadius)!=null?C:0)*be(a),fill:(O=(T=e.config.background)==null?void 0:T.color)!=null?O:"#ffffff",transform:f.value}),null,16,cR)):Un("",!0),wa("text",Sr({ref_key:"element",ref:d,class:"v-text"},x.$attrs,{x:e.x,y:e.y,"dominant-baseline":e.dominantBaseline,"font-family":x.$attrs["font-family"]?`${x.$attrs["font-family"]}`:e.config.fontFamily,"font-size":be(s),fill:x.$attrs.fill?`${x.$attrs.fill}`:e.config.color}),[be(l).length<=1?(qe(),ze(Xe,{key:0},[ec(Od(e.text),1)],64)):(qe(!0),ze(Xe,{key:1},Lt(be(l),(L,R)=>(qe(),ze("tspan",{key:R,x:e.x,dy:R==0?be(u):be(c),"dominant-baseline":e.dominantBaseline},Od(L),9,fR))),128))],16,dR)],64)}}});var gr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const vR=["transform"],hR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},pos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,r=g(()=>{var S;return((S=n.pos)==null?void 0:S.x)||0}),o=g(()=>{var S;return((S=n.pos)==null?void 0:S.y)||0}),i=L_(),{scale:a}=qr(),{handleNodePointerDownEvent:l,handleNodePointerOverEvent:s,handleNodePointerOutEvent:c,handleNodeContextMenu:u}=ch(),d=g(()=>{var S;return n.state.label.visible&&(S=n.state.labelText)!=null?S:!1}),f=g(()=>n.state.label.direction===ot.CENTER?0:n.state.label.margin*a.value),h=U(0),m=U(0),_=U(0),b=U(0);Zn(()=>{const S=a.value,C=n.state.shape;if(C.type=="circle"){const T=C.radius*S,O=T+f.value,L=Math.sqrt(sr(O,2)/2);h.value=T+f.value,m.value=T+f.value,_.value=L,b.value=L}else{const T=C.borderRadius*S,O=C.width*S,L=C.height*S,R=T+f.value,z=Math.sqrt(sr(R,2)/2);h.value=L/2+f.value,m.value=O/2+f.value,_.value=L/2-T+z,b.value=O/2-T+z}});const x=g(()=>{switch(n.state.label.direction){case ot.CENTER:case ot.NORTH:case ot.SOUTH:return"middle";case ot.EAST:case ot.NORTH_EAST:case ot.SOUTH_EAST:return"start";case ot.WEST:case ot.NORTH_WEST:case ot.SOUTH_WEST:default:return"end"}}),p=g(()=>{switch(n.state.label.direction){case ot.NORTH:case ot.NORTH_EAST:case ot.NORTH_WEST:return"text-top";case ot.SOUTH:case ot.SOUTH_EAST:case ot.SOUTH_WEST:return"hanging";case ot.CENTER:case ot.EAST:case ot.WEST:default:return"central"}}),y=g(()=>{switch(n.state.label.direction){case ot.CENTER:case ot.NORTH:case ot.SOUTH:return 0;case ot.EAST:return m.value;case ot.WEST:return-m.value;case ot.NORTH_EAST:case ot.SOUTH_EAST:return b.value;case ot.NORTH_WEST:case ot.SOUTH_WEST:default:return-b.value}}),w=g(()=>{switch(n.state.label.direction){case ot.NORTH:return-h.value;case ot.SOUTH:return h.value;case ot.CENTER:case ot.EAST:case ot.WEST:return 0;case ot.NORTH_EAST:case ot.NORTH_WEST:return-_.value;case ot.SOUTH_EAST:case ot.SOUTH_WEST:default:return _.value}});return t({x:r,y:o,config:i,labelVisibility:d,handleNodePointerDownEvent:l,handleNodePointerOverEvent:s,handleNodePointerOutEvent:c,handleNodeContextMenu:u,textAnchor:x,dominantBaseline:p,labelX:y,labelY:w,scale:a}),(S,C)=>(qe(),ze("g",{class:bn({"v-node":!0,hover:e.state.hovered,selected:e.state.selected}),transform:`translate(${be(r)} ${be(o)})`,onPointerdown:C[0]||(C[0]=Xl(T=>be(l)(e.id,T),["prevent","stop"])),onPointerenterPassive:C[1]||(C[1]=T=>be(s)(e.id,T)),onPointerleavePassive:C[2]||(C[2]=T=>be(c)(e.id,T)),onContextmenu:C[3]||(C[3]=T=>be(u)(e.id,T))},[fn(S.$slots,"override-node",{nodeId:e.id,scale:be(a),config:e.state.shape,class:bn({draggable:e.state.draggable,selectable:e.state.selectable})},()=>[mt(fh,{config:e.state.shape,class:bn({draggable:e.state.draggable,selectable:e.state.selectable})},null,8,["config","class"])],!0),be(d)?fn(S.$slots,"override-node-label",{key:0,nodeId:e.id,scale:be(a),text:e.state.labelText,x:be(y),y:be(w),config:e.state.label,shape:e.state.shape,textAnchor:be(x),dominantBaseline:be(p)},()=>[mt(Pc,{text:e.state.labelText,x:be(y),y:be(w),config:e.state.label,"text-anchor":be(x),"dominant-baseline":be(p)},null,8,["text","x","y","config","text-anchor","dominant-baseline"])],!0):Un("",!0)],42,vR))}});var mR=gr(hR,[["__scopeId","data-v-20ea340e"]]);const gR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},pos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,r=g(()=>{var l;return((l=n.pos)==null?void 0:l.x)||0}),o=g(()=>{var l;return((l=n.pos)==null?void 0:l.y)||0}),i=L_(),a=Kt({});return Zn(()=>{var l,s,c;const u=n.state.shape;if(u.type==="circle"){const d={type:"circle",radius:u.radius+((l=u.strokeWidth)!=null?l:0)/2+i.focusring.padding+i.focusring.width/2,color:"none",strokeWidth:i.focusring.width,strokeColor:i.focusring.color,strokeDasharray:i.focusring.dasharray};Object.assign(a,d)}else{const d={type:"rect",width:u.width+((s=u.strokeWidth)!=null?s:0)+i.focusring.padding*2+i.focusring.width,height:u.height+((c=u.strokeWidth)!=null?c:0)+i.focusring.padding*2+i.focusring.width,borderRadius:u.borderRadius>0?u.borderRadius+i.focusring.padding:0,color:"none",strokeWidth:i.focusring.width,strokeColor:i.focusring.color,strokeDasharray:i.focusring.dasharray};Object.assign(a,d)}}),t({x:r,y:o,shapeConfig:a}),(l,s)=>(qe(),Ut(fh,{class:"v-node-focus-ring","base-x":be(r),"base-y":be(o),config:be(a)},null,8,["base-x","base-y","config"]))}});var pR=gr(gR,[["__scopeId","data-v-4f2bee14"]]);const yR=["d","stroke","stroke-width","stroke-dasharray","stroke-linecap"],bR=$t({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},config:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=g(()=>n.config.width*r.value),i=g(()=>kc(n.config.dasharray,r.value)),a=g(()=>{const l=n.config.animate?oh(n.config.dasharray)*n.config.animationSpeed*r.value:!1;return l?`--animation-speed:${l}`:void 0});return t({strokeWidth:o,strokeDasharray:i,animationSpeed:a}),(l,s)=>(qe(),ze("path",{class:bn({"v-line":!0,animate:e.config.animate}),d:`M ${e.x1} ${e.y1} L ${e.x2} ${e.y2}`,stroke:e.config.color,"stroke-width":be(o),"stroke-dasharray":be(i),"stroke-linecap":e.config.linecap,style:zo(be(a))},null,14,yR))}});var J_=gr(bR,[["__scopeId","data-v-1809a5d0"]]);function wR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r{var s,c;const u=n.state.position,d=[...(c=(s=n.state.curve)==null?void 0:s.control)!=null?c:[],{x:u.x2,y:u.y2}],f=[];return f.push(`M ${u.x1} ${u.y1}`),vh(d,2).forEach(([h,m])=>f.push(`Q ${h.x} ${h.y} ${m.x} ${m.y}`)),f.join(" ")}),i=g(()=>n.config.width*r.value),a=g(()=>kc(n.config.dasharray,r.value)),l=g(()=>{const s=n.config.animate?oh(n.config.dasharray)*n.config.animationSpeed*r.value:!1;return s?`--animation-speed:${s}`:void 0});return t({strokeWidth:i,strokeDasharray:a,animationSpeed:l}),(s,c)=>(qe(),ze("path",{class:bn({"v-line":!0,animate:e.config.animate}),d:be(o),fill:"none",stroke:e.config.color,"stroke-width":be(i),"stroke-dasharray":be(a),"stroke-linecap":e.config.linecap,style:zo(be(l)),"marker-start":e.markerStart,"marker-end":e.markerEnd},null,14,SR))}});var CR=gr(kR,[["__scopeId","data-v-1fa4fd0c"]]);const TR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},sourcePos:{type:Object,required:!1,default:void 0},targetPos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=Tc();return t({config:n}),(r,o)=>be(n).type=="straight"||!e.state.curve?(qe(),Ut(J_,Sr({key:0},e.state.position,{class:{selectable:e.state.selectable,hover:e.state.hovered,selected:e.state.selected},config:e.state.line.stroke,"marker-start":e.state.sourceMarkerId?`url('#${e.state.sourceMarkerId}')`:void 0,"marker-end":e.state.targetMarkerId?`url('#${e.state.targetMarkerId}')`:void 0}),null,16,["class","config","marker-start","marker-end"])):(qe(),Ut(CR,{key:1,class:bn({selectable:e.state.selectable,hover:e.state.hovered,selected:e.state.selected}),state:e.state,config:e.state.line.stroke,"marker-start":e.state.sourceMarkerId?`url('#${e.state.sourceMarkerId}')`:void 0,"marker-end":e.state.targetMarkerId?`url('#${e.state.targetMarkerId}')`:void 0},null,8,["class","state","config","marker-start","marker-end"]))}});var ER=gr(TR,[["__scopeId","data-v-f407a16e"]]);const $R=$t({props:{edges:{type:Object,required:!0},layouts:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,r=Tc(),{handleEdgesPointerDownEvent:o,handleEdgesPointerOverEvent:i,handleEdgesPointerOutEvent:a,handleEdgesContextMenu:l}=ch(),{edgeStates:s}=ls(),c=U({x1:0,y1:0,x2:0,y2:0}),u=U({x:0,y:0});Zn(()=>{const p=Object.keys(n.edges).find(y=>y in s);p&&(c.value=s[p].position,u.value={x:(c.value.x1+c.value.x2)/2,y:(c.value.y1+c.value.y2)/2})});const d=g(()=>Object.keys(n.edges)),f=g(()=>it.values(r.summarized.label,n.edges)),h=g(()=>it.values(r.summarized.shape,n.edges)),m=g(()=>it.values(r.summarized.stroke,n.edges)),_=g(()=>d.value.some(p=>s[p].hovered)),b=g(()=>d.value.some(p=>s[p].selectable)),x=g(()=>d.value.some(p=>s[p].selected));return t({config:r,pos:c,centerPos:u,handleEdgesPointerDownEvent:o,handleEdgesPointerOverEvent:i,handleEdgesPointerOutEvent:a,handleEdgesContextMenu:l,hovered:_,selectable:b,selected:x}),(p,y)=>(qe(),ze("g",{class:bn({"v-line-summarized":!0,hovered:be(_),selectable:be(b),selected:be(x)}),onPointerdown:y[0]||(y[0]=Xl(w=>be(o)(be(d),w),["prevent","stop"])),onPointerenterPassive:y[1]||(y[1]=w=>be(i)(be(d),w)),onPointerleavePassive:y[2]||(y[2]=w=>be(a)(be(d),w)),onContextmenu:y[3]||(y[3]=w=>be(l)(be(d),w))},[mt(J_,Sr(c.value,{config:be(m)}),null,16,["config"]),mt(fh,{"base-x":u.value.x,"base-y":u.value.y,config:be(h)},null,8,["base-x","base-y","config"]),mt(Pc,{text:Object.keys(e.edges).length.toString(),x:u.value.x,y:u.value.y,config:be(f),"text-anchor":"middle","dominant-baseline":"central"},null,8,["text","x","y","config"])],34))}});var PR=gr($R,[["__scopeId","data-v-3b805f24"]]);const qR=$t({setup(e,{expose:t}){const{edgeStates:n,edgeGroupStates:r,layouts:o}=ls();return t({edgeStates:n,edgeGroupStates:r,layouts:o}),(i,a)=>(qe(!0),ze(Xe,null,Lt(be(r).edgeGroups,({summarize:l,edges:s},c)=>(qe(),ze(Xe,null,[l?(qe(),Ut(PR,{key:c,edges:s,layouts:be(o).nodes},null,8,["edges","layouts"])):(qe(!0),ze(Xe,{key:1},Lt(s,(u,d)=>(qe(),Ut(ER,{key:d,id:d,state:be(n)[d],"source-pos":be(o).nodes[u.source],"target-pos":be(o).nodes[u.target]},null,8,["id","state","source-pos","target-pos"]))),128))],64))),256))}}),MR=["d","stroke-width"],OR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},sourcePos:{type:Object,required:!1,default:void 0},targetPos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=Tc(),{handleEdgePointerDownEvent:i,handleEdgePointerOverEvent:a,handleEdgePointerOutEvent:l,handleEdgeContextMenu:s}=ch(),c=g(()=>{const d=n.state.position;if(o.type==="straight"||!n.state.curve)return`M ${d.x1} ${d.y1} L ${d.x2} ${d.y2}`;{const f=[...n.state.curve.control,{x:d.x2,y:d.y2}],h=[];return h.push(`M ${d.x1} ${d.y1}`),vh(f,2).forEach(([m,_])=>h.push(`Q ${m.x} ${m.y} ${_.x} ${_.y}`)),h.join(" ")}}),u=g(()=>(n.state.line.stroke.width+10)*r.value);return t({config:o,handleEdgePointerDownEvent:i,handleEdgePointerOverEvent:a,handleEdgePointerOutEvent:l,handleEdgeContextMenu:s}),(d,f)=>(qe(),ze("path",{class:bn({"v-line-background":!0,selectable:e.state.selectable}),d:be(c),stroke:"transparent","stroke-width":be(u),fill:"none",onPointerdown:f[0]||(f[0]=Xl(h=>be(i)(e.id,h),["prevent","stop"])),onPointerenterPassive:f[1]||(f[1]=h=>be(a)(e.id,h)),onPointerleavePassive:f[2]||(f[2]=h=>be(l)(e.id,h)),onContextmenu:f[3]||(f[3]=h=>be(s)(e.id,h))},null,42,MR))}});var AR=gr(OR,[["__scopeId","data-v-1b4a2a82"]]);const RR=$t({setup(e,{expose:t}){const{edgeStates:n,edgeGroupStates:r,layouts:o}=ls();return t({edgeStates:n,edgeGroupStates:r,layouts:o}),(i,a)=>(qe(!0),ze(Xe,null,Lt(be(r).edgeGroups,({summarize:l,edges:s})=>(qe(),ze(Xe,null,[l?Un("",!0):(qe(!0),ze(Xe,{key:0},Lt(s,(c,u)=>(qe(),Ut(AR,{key:u,id:u,state:be(n)[u],"source-pos":be(o).nodes[c.source],"target-pos":be(o).nodes[c.target]},null,8,["id","state","source-pos","target-pos"]))),128))],64))),256))}}),IR={class:"v-edge-labels"},LR=$t({setup(e,{expose:t}){const n=Tc(),{nodeStates:r,edgeStates:o,edgeGroupStates:i,summarizedEdgeStates:a,layouts:l}=ls(),{scale:s}=qr(),c=g(()=>Object.fromEntries(Object.entries(i.edgeGroups).filter(([_,b])=>!b.summarize&&Object.keys(b.edges).length>0))),u=g(()=>{const _={},b={};return Object.entries(i.edgeGroups).forEach(([x,p])=>{Object.keys(p.edges).length>0&&(p.summarize?b[x]=p:_[x]=p)}),{indivisual:_,summarized:b}}),d=g(()=>_=>{var b;return{pos:(b=l.nodes[_])!=null?b:{x:0,y:0},shape:r[_].shape}}),f=g(()=>(_,b,x,p)=>Ap(o[_].labelPosition,p,n.label.margin,n.label.padding,s.value)),h=g(()=>(_,b)=>{var x,p;const y=Object.keys(b.edges)[0];return Ap(o[y].labelPosition,(p=(x=a[_])==null?void 0:x.stroke)!=null?p:o[y].line.stroke,n.label.margin,n.label.padding,s.value)}),m=g(()=>_=>o[Object.keys(_.edges)[0]]);return t({indivisualEdgeGroups:c,edgeGroups:u,nodeShape:d,labelAreaPosition:f,groupLabelAreaPosition:h,representativeEdgeState:m,edgeStates:o,edgeConfig:n,scale:s}),(_,b)=>(qe(),ze("g",IR,[(qe(!0),ze(Xe,null,Lt(be(u).indivisual,(x,p)=>(qe(),ze(Xe,{key:p},[(qe(!0),ze(Xe,null,Lt(x.edges,(y,w)=>fn(_.$slots,"edge-label",{key:w,edgeId:w,edge:y,config:be(n).label,area:be(f)(w,be(d)(y.source),be(d)(y.target),be(o)[w].line.stroke),hovered:be(o)[w].hovered,selected:be(o)[w].selected,scale:be(s)},void 0,!0)),128))],64))),128)),(qe(!0),ze(Xe,null,Lt(be(u).summarized,(x,p)=>fn(_.$slots,"edges-label",{key:p,edges:x.edges,config:be(n).label,area:be(h)(p,x),hovered:be(m)(x).hovered,selected:be(m)(x).selected,scale:be(s)},void 0,!0)),128))]))}});var BR=gr(LR,[["__scopeId","data-v-15f17dbf"]]);const NR=$t({setup(e,{expose:t}){const{viewport:n}=C_(),r=U(),o=(a,l,s)=>{a.forEach(c=>{var u;return l.setAttribute(c,(u=s.getAttribute(c))!=null?u:"")})},i=new MutationObserver(a=>{if(!r.value)return;const l=a.map(s=>{var c;return(c=s.attributeName)!=null?c:""}).filter(Boolean);o(l,r.value,n.value)});return _t(()=>{const a=["transform","style"];i.observe(n.value,{attributes:!0,attributeFilter:a}),r.value&&o(a,r.value,n.value)}),$r(()=>{i.disconnect()}),t({background:r}),(a,l)=>(qe(),ze("g",{ref_key:"background",ref:r,class:"v-background-viewport"},[fn(a.$slots,"default")],512))}}),FR={class:"v-background-grid","shape-rendering":"crispEdges"},zR=["d"],jR=["d"],DR=["d"],VR=["d"],HR=$t({setup(e,{expose:t}){const{emitter:n}=K_(),{container:r,svgPanZoom:o}=C_(),{zoomLevel:i}=qr(),a=WA(),l=U({x:0,y:0}),s=U({width:500,height:500});_t(()=>{var h;const m=(h=o.value)==null?void 0:h.getPan();m&&(l.value={x:-m.x,y:-m.y});const _=r.value.getBoundingClientRect();s.value={width:_.width,height:_.height}}),n.on("view:resize",h=>{s.value={width:h.width,height:h.height}}),n.on("view:pan",h=>{l.value={x:-h.x,y:-h.y}}),n.on("view:zoom",()=>{var h;const m=(h=o.value)==null?void 0:h.getPan();m&&(l.value={x:-m.x,y:-m.y})});const c=U([]),u=U([]),d=U([]),f=U([]);return Zn(()=>{const h=[],m=[],_=[],b=[],x=1/i.value,p=a.grid.interval,y=l.value.x*x,w=l.value.y*x,S=Math.floor(s.value.width/p+1)*p,C=Math.floor(s.value.height/p+1)*p,T=(l.value.x+S)*x,O=(l.value.y+C)*x,L=a.grid.thickIncrements,R=a.grid.line.dasharray,z=a.grid.thick.dasharray;let $={stroke:a.grid.thick.color,"stroke-width":a.grid.thick.width,"stroke-dasharray":z,"stroke-dashoffset":z?y/x:void 0},E={stroke:a.grid.line.color,"stroke-width":a.grid.line.width,"stroke-dasharray":R,"stroke-dashoffset":R?y/x:void 0};const F=(l.value.x+S)*x;for(let J=w;J<=O;J+=p){const I=Math.floor(J/p);L&&I%L===0?h.push([I,I*p,y,F,$]):_.push([I,I*p,y,F,E])}$=Kr({},$),$["stroke-dashoffset"]=z?w/x:void 0,E=Kr({},E),E["stroke-dashoffset"]=R?w/x:void 0;const Q=(l.value.y+C)*x;for(let J=y;J<=T;J+=p){const I=Math.floor(J/p);L&&I%L===0?m.push([I,I*p,w,Q,$]):b.push([I,I*p,w,Q,E])}u.value=h,c.value=m,f.value=_,d.value=b}),t({thickVerticals:c,thickHorizontals:u,normalVerticals:d,normalHorizontals:f}),(h,m)=>(qe(),ze("g",FR,[(qe(!0),ze(Xe,null,Lt(f.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`nv${_}`,d:`M ${x} ${b} L ${p} ${b}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,zR))),128)),(qe(!0),ze(Xe,null,Lt(d.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`nh${_}`,d:`M ${b} ${x} L ${b} ${p}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,jR))),128)),(qe(!0),ze(Xe,null,Lt(u.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`tv${_}`,d:`M ${x} ${b} L ${p} ${b}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,DR))),128)),(qe(!0),ze(Xe,null,Lt(c.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`th${_}`,d:`M ${b} ${x} L ${b} ${p}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,VR))),128))]))}}),UR=["d","stroke","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin"],WR=$t({props:{points:{type:Array,required:!0},path:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=B_(),i=g(()=>{let c=!0;return n.points.map(u=>{if(u===null)c=!0;else if(u instanceof Array){u=[...u];const d=[];if(u.length%2===1){const f=u[0];u=u.slice(1),d.push(`L ${f.x} ${f.y}`)}return vh(u,2).map(([f,h])=>d.push(`Q ${f.x} ${f.y} ${h.x} ${h.y}`)),d.join(" ")}else{const d=c;return c=!1,`${d?"M ":"L "}${u.x} ${u.y}`}}).join(" ")}),a=g(()=>it.values(o.path,n.path)),l=g(()=>kc(a.value.dasharray,r.value)),s=g(()=>{const c=a.value.animate?oh(a.value.dasharray)*a.value.animationSpeed*r.value:!1;return c?`--animation-speed:${c}`:void 0});return t({d:i,scale:r,config:a,strokeDasharray:l,animationSpeed:s}),(c,u)=>(qe(),ze("path",{class:bn({"v-path-line":!0,animate:be(a).animate}),d:be(i),fill:"none",stroke:be(a).color,"stroke-width":be(a).width*be(r),"stroke-dasharray":be(l),"stroke-linecap":be(a).linecap,"stroke-linejoin":be(a).linejoin,style:zo(be(s))},null,14,UR))}});var KR=gr(WR,[["__scopeId","data-v-d5817f5c"]]);const QR=$t({props:{paths:{type:Array,required:!0},edges:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,r=Number.EPSILON*100,o=B_(),{nodeStates:i,edgeStates:a,layouts:l}=ls(),{scale:s}=qr(),{emitter:c}=K_(),u=g(()=>{const C=[];for(const T of n.paths){const O=T.edges.map(L=>({edgeId:L,edge:n.edges[L]})).filter(L=>L.edge);O.length===T.edges.length&&C.push({path:T,edges:O})}return C}),d=g(()=>C=>{if(C.edges.length===0)return[];const T=it.value(o.margin,C.path)*s.value;return m(C,i,l.nodes,a,s.value,o.curveInNode,o.end,T)}),f=(C,T)=>{!o.clickable||c.emit("path:click",{path:C,event:T})},h=(C,T)=>{!o.clickable||c.emit("path:contextmenu",{path:C,event:T})};function m(C,T,O,L,R,z,$,E){var F;const Q=C.edges,J=b(Q),I=Q.map((A,G)=>w(A,J[G],L[A.edgeId])),W=[];let ae=!1,_e=!1;{const A=I[0];let G=_(T[A.source].shape)*R;const N=E+($==="edgeOfNode"?G:0),q=N<=0?A.line.source:x(A,N,O,!0);W.push(q),G=_(T[A.target].shape)*R,E>0&&ir(A.line.source,A.line.target)<=N+G&&(ae=!0)}const Y=Q.length;for(let A=1;A0&&ir(A.line.source,A.line.target)<=N+G&&(_e=!0)}return ae&&(W.shift(),W[0]instanceof Array&&W.unshift(W[0][0])),_e&&W.pop(),W}function _(C){return C.type=="circle"?C.radius:Math.min(C.width,C.height)/2}function b(C){const T=C.length;if(T<=1)return[!0];const O=[];let L=null;for(let R=0;R2){const F=[z,$].sort(),Q=[C[1].edge.source,C[1].edge.target].sort();F[0]===Q[0]&&F[1]===Q[1]?[C[2].edge.source,C[2].edge.target].includes(C[1].edge.target)?E=$===C[1].edge.source:E=$===C[1].edge.target:E=[C[1].edge.source,C[1].edge.target].includes($)}else E=[C[1].edge.source,C[1].edge.target].includes($);else E=L===z;O.push(E),L=E?$:z}return O}function x(C,T,O,L){const R=L?C.source:C.target,z=C.curve;if(z){let $=T/z.circle.radius;return z.theta>0&&($*=-1),L||($*=-1),lt.fromObject(ga(L?C.line.source:C.line.target,z.circle.center,$))}else{let $,E;L?($=C.line.target,E=C.line.source):($=C.line.source,E=C.line.target);const F=wd($,E,lt.fromObject(O[R]),T);return F===null?$:F}}function p(C,T,O){let L=null;if(C.curve)if(T.curve){if(C.line.target.isEqualTo(T.line.source))return C.line.target.clone();L=Mp(C.curve.circle.center,C.curve.circle.radius,T.curve.circle.center,T.curve.circle.radius,C.curve.center)}else L=o5(T.line.target,T.line.source,C.curve.circle.center,C.curve.circle.radius,O);else if(T.curve)L=wd(C.line.source,C.line.target,T.curve.circle.center,T.curve.circle.radius);else{const R=S(C.line),z=S(T.line);!isFinite(R)&&!isFinite(z)||Math.abs(R-z)(qe(),Ut(ic,{name:be(o).transition,css:!!be(o).transition,tag:"g",class:"v-paths"},{default:_r(()=>[(qe(!0),ze(Xe,null,Lt(be(u),(O,L)=>(qe(),Ut(KR,{key:L,points:be(d)(O),class:bn({clickable:be(o).clickable}),path:O.path,onClick:Xl(R=>f(O.path,R),["prevent","stop"]),onContextmenu:R=>h(O.path,R)},null,8,["points","class","path","onClick","onContextmenu"]))),128))]),_:1},8,["name","css"]))}});var ZR=gr(QR,[["__scopeId","data-v-7191e492"]]);const YR=["points","fill"],XR=$t({props:{width:{type:Number,required:!0},height:{type:Number,required:!0},refX:{type:Number,required:!0},color:{type:String,required:!0},isSource:{type:Boolean,required:!0},units:{type:String,required:!0}},setup(e){const t=e,n=g(()=>{const r=t.width,o=t.height;return t.isSource?`${r} ${o}, 0 ${o/2}, ${r} 0`:`0 0, ${r} ${o/2}, 0 ${o}`});return(r,o)=>(qe(),ze("polygon",{points:be(n),fill:e.color},null,8,YR))}}),GR=["points","stroke-width","stroke"],JR=$t({props:{width:{type:Number,required:!0},height:{type:Number,required:!0},refX:{type:Number,required:!0},color:{type:String,required:!0},isSource:{type:Boolean,required:!0},units:{type:String,required:!0}},setup(e){const t=e,n=g(()=>t.units==="strokeWidth"?1:Math.min(t.width,t.height)/5),r=g(()=>{const o=n.value/2,i=t.width,a=t.height;return t.isSource?`${i-o} ${a-o}, ${o} ${a/2}, ${i-o} ${o}`:`${o} ${o}, ${i-o} ${a/2}, ${o} ${a-o}`});return(o,i)=>(qe(),ze("polyline",{points:be(r),fill:"none","stroke-width":be(n),stroke:e.color,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,GR))}}),eI=["fill","cx","cy","rx","ry"],tI=$t({props:{width:{type:Number,required:!0},height:{type:Number,required:!0},refX:{type:Number,required:!0},color:{type:String,required:!0},isSource:{type:Boolean,required:!0},units:{type:String,required:!0}},setup(e){return(t,n)=>(qe(),ze("ellipse",{fill:e.color,cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2},null,8,eI))}}),nI=["id","markerWidth","markerHeight","refX","refY","markerUnits"],rI=$t({props:{id:{type:String,required:!0},marker:{type:Object,required:!0},scale:{type:Number,required:!0}},setup(e){const t=e,n={arrow:XR,angle:JR,circle:tI},r=g(()=>t.marker.width*(t.marker.units==="strokeWidth"?1:t.scale)),o=g(()=>t.marker.height*(t.marker.units==="strokeWidth"?1:t.scale)),i=g(()=>{const a=t.marker.margin*(t.marker.units==="strokeWidth"?1:t.scale);return t.marker.isSource?r.value+a:-a});return(a,l)=>e.marker.type!=="none"&&e.marker.type!=="custom"?(qe(),ze("marker",{key:0,id:e.id,markerWidth:be(r),markerHeight:be(o),refX:be(i),refY:be(o)/2,orient:"auto",markerUnits:e.marker.units,class:"v-marker"},[(qe(),Ut(x0(n[e.marker.type]),{width:be(r),height:be(o),refX:be(i),color:e.marker.color,"is-source":e.marker.isSource,units:e.marker.units},null,8,["width","height","refX","color","is-source","units"]))],8,nI)):Un("",!0)}}),oI=["override-node","override-node-label","edge-label","edges-label"];var Fp;(function(e){e[e.INITIAL=0]="INITIAL",e[e.LOADED=1]="LOADED",e[e.UNLOADED=2]="UNLOADED"})(Fp||(Fp={}));const iI=$t({components:{VNode:mR,VNodeFocusRing:pR,VEdgeGroups:qR,VEdgeBackgrounds:RR,VEdgeLabels:BR,VBackgroundViewport:NR,VBackgroundGrid:HR,VPaths:ZR,VMarkerHead:rI},props:{nodes:{type:Object,default:()=>({})},edges:{type:Object,default:()=>({})},layouts:{type:Object,default:()=>({})},zoomLevel:{type:Number,default:1},selectedNodes:{type:Array,default:()=>[]},selectedEdges:{type:Array,default:()=>[]},configs:{type:Object,default:()=>({})},paths:{type:Array,default:()=>[]},layers:{type:Object,default:()=>({})},eventHandlers:{type:Object,default:()=>({})}},emits:["update:zoomLevel","update:selectedNodes","update:selectedEdges","update:layouts"],setup(e,{emit:t,slots:n}){const r=So(e,"nodes"),o=So(e,"edges"),i=W5();Object.entries(e.eventHandlers).forEach(([M,D])=>{i.on(M,D)});const a=UA(So(e,"configs")),l=g(()=>{const M=new Set(Object.keys(n));oI.forEach(j=>M.delete(j));const D=Object.fromEntries(lR.map(j=>[j,[]]));return Object.assign(D,Object.entries(e.layers).reduce((j,[k,Z])=>(M.delete(k),Z in j?j[Z].push(k):j[Z]=[k],j),{})),D.root.push(...M),D}),s=g(()=>a.view.grid.visible),c=g(()=>{const M=l.value;return s.value||M.background.length>0||M.grid.length>0}),u=g(()=>"override-node"in n),d=g(()=>"override-node-label"in n),f=g(()=>"edge-label"in n),h=g(()=>"edges-label"in n),m=U(),_=U(),b=U(),x=U(0),p=g(()=>x.value!==0),y=PO(e,"zoomLevel",t,M=>(M=Math.max(M,a.view.minZoomLevel),M=Math.min(M,a.view.maxZoomLevel),M)),{svgPanZoom:w,onSvgPanZoomMounted:S,onSvgPanZoomUnmounted:C}=iR(_,{viewportSelector:".v-viewport",minZoom:a.view.minZoomLevel,maxZoom:a.view.maxZoomLevel,fit:!0,center:!0,zoomEnabled:a.view.zoomEnabled,onZoom:M=>{var D,j;if(x.value===2)return;const k=(j=(D=w.value)==null?void 0:D.getRealZoom())!=null?j:1;Math.abs(y.value-k)>=1e-6&&(y.value=k,i.emit("view:zoom",k))},panEnabled:a.view.panEnabled,onPan:M=>{x.value!==2&&i.emit("view:pan",M)}});qO({container:m,svg:_,viewport:b,svgPanZoom:w});const T={width:0,height:0},O=new ResizeObserver(()=>{var M,D,j;(M=w.value)==null||M.resize();const k=(D=m.value)==null?void 0:D.getBoundingClientRect();if(k){const Z=-(T.width-k.width)/2,oe=-(T.height-k.height)/2;(j=w.value)==null||j.panBy({x:Z,y:oe});const{width:ce,height:ke}=k;Object.assign(T,{width:ce,height:ke}),i.emit("view:resize",{x:k.x,y:k.y,width:ce,height:ke})}});S(()=>{var M,D;const j=on(m.value,"svg-pan-zoom container");O.observe(j),(D=(M=a.view).onSvgPanZoomInitialized)==null||D.call(M,on(w.value,"svg-pan-zoom instance"));const k=j.getBoundingClientRect(),{width:Z,height:oe}=k;Object.assign(T,{width:Z,height:oe})}),C(()=>{O.disconnect()});const L=M=>{var D;(D=w.value)==null||D.applyAbsoluteZoomLevel(M,a.view.minZoomLevel,a.view.maxZoomLevel)};de(()=>a.view.panEnabled,M=>{var D;(D=w.value)==null||D.setPanEnabled(M)}),de(()=>a.view.zoomEnabled,M=>{var D;(D=w.value)==null||D.setZoomEnabled(M)}),de(y,M=>L(M)),de(()=>[a.view.minZoomLevel,a.view.maxZoomLevel],M=>{L(y.value)});const{scale:R}=aR(y,a.view);S(()=>{const M=e.zoomLevel;L(M)});const z=M=>{var D;Object.keys(e.nodes).length>0?((D=w.value)==null||D.updateBBox(),Ge(M)):M()},$=()=>{z(()=>{w.value&&(w.value.fitToContents(),i.emit("view:fit",void 0))})},E=()=>{z(()=>{var M;(M=w.value)==null||M.center()})},F=vp(e,"selectedNodes",r,t);de(F,M=>i.emit("node:select",Array.from(M)));const Q=vp(e,"selectedEdges",o,t);de(Q,M=>i.emit("edge:select",Array.from(M)));const J=oa(new Set),I=oa(new Set),W=oa({nodes:{}});de(()=>e.layouts,()=>Object.assign(W,e.layouts),{deep:!0,immediate:!0}),de(W,()=>t("update:layouts",W),{deep:!0});const ae=g(()=>a.node.focusring.visible),_e=QA(),Y=U(!1);i.on("node:dragstart",M=>Y.value=!0),i.on("node:dragend",M=>Y.value=!1),i.on("view:mode",M=>{var D,j,k,Z;a.view.panEnabled&&(M==="default"?(D=w.value)==null||D.enablePan():(j=w.value)==null||j.disablePan()),a.view.zoomEnabled&&(M==="default"?(k=w.value)==null||k.enableZoom():(Z=w.value)==null||Z.disableZoom())});const{nodeStates:A,edgeStates:G}=F5(r,o,F,Q,J,I,yo(a),W,R);H5(_,yo(W.nodes),yo(y),A,G,F,Q,J,I,i);const N=g(()=>a.path.visible),q=()=>({layouts:oa(W.nodes),nodes:r,edges:o,configs:yo(a),scale:yo(R),emitter:i,svgPanZoom:on(w.value)});return de(()=>a.view.layoutHandler,(M,D)=>{D.deactivate(),M.activate(q())}),S(()=>{z(()=>{const M=on(w.value,"svg-pan-zoom");M.center(),a.view.layoutHandler.activate(q()),Ge(()=>{if(Object.keys(e.nodes).length>0)a.view.fit?$():E();else{const D=M.getSizes();M.pan({x:D.width/2,y:D.height/2})}i.emit("view:load"),x.value=1})})}),C(()=>{x.value=2,i.emit("view:unload"),a.view.layoutHandler.deactivate()}),{container:m,svg:_,viewport:b,show:p,svgPanZoom:w,allConfigs:a,layerDefs:l,isShowGrid:s,isShowBackgroundViewport:c,overrideNodes:u,overrideNodeLabels:d,overrideEdgeLabels:f,overrideEdgesLabels:h,scale:R,nodeStates:A,currentSelectedNodes:F,markers:_e,dragging:Y,currentLayouts:W,visibleNodeFocusRing:ae,visiblePaths:N,fitToContents:$,panToCenter:E}},methods:{zoomIn(){var e;(e=this.svgPanZoom)==null||e.zoomIn()},zoomOut(){var e;(e=this.svgPanZoom)==null||e.zoomOut()},panTo(e){var t;(t=this.svgPanZoom)==null||t.pan(e)},panBy(e){var t;(t=this.svgPanZoom)==null||t.panBy(e)},getPan(){return on(this.svgPanZoom).getPan()},getSizes(){const e=on(this.svgPanZoom).getSizes();return{width:e.width,height:e.height,viewBox:e.viewBox}},translateFromDomToSvgCoordinates(e){return AO(on(this.svg,"svg"),on(this.viewport,"viewport"),e)},translateFromSvgToDomCoordinates(e){return RO(on(this.svg,"svg"),on(this.viewport,"viewport"),e)},getAsSvg(){const e=on(this.svg,"svg"),t=on(this.viewport,"svg viewport"),n=e.cloneNode(!0),r=t.getBBox(),o=1/this.scale,i={x:Math.floor((r.x-10)*o),y:Math.floor((r.y-10)*o),width:Math.ceil((r.width+20)*o),height:Math.ceil((r.height+20)*o)};n.setAttribute("width",i.width.toString()),n.setAttribute("height",i.height.toString());const a=n.querySelector(".v-viewport");a.setAttribute("transform",`translate(${-i.x} ${-i.y}), scale(${o})`),a.removeAttribute("style"),n.setAttribute("viewBox",`0 0 ${i.width} ${i.height}`);let l=n.outerHTML;return l=l.replaceAll(/ data-v-[0-9a-z]+=""/g,""),l=l.replaceAll(//gm,""),l}}}),aI={ref:"container",class:"v-network-graph"},lI={key:0},sI={ref:"viewport",class:"v-viewport"},uI={class:"v-layer-edges"},cI={key:2,class:"v-layer-nodes-selections"};function dI(e,t,n,r,o,i){const a=rr("v-marker-head"),l=rr("v-background-grid"),s=rr("v-background-viewport"),c=rr("v-edge-backgrounds"),u=rr("v-edge-groups"),d=rr("v-edge-labels"),f=rr("v-node-focus-ring"),h=rr("v-node"),m=rr("v-paths");return qe(),ze("div",aI,[(qe(),ze("svg",{ref:"svg",class:bn(["v-canvas",{show:e.show,dragging:e.dragging}]),width:"500",height:"500",viewBox:"0 0 500 500"},[(qe(!0),ze(Xe,null,Lt(e.layerDefs.root,_=>fn(e.$slots,_,{key:_,scale:e.scale},void 0,!0)),128)),Object.keys(e.markers).length>0?(qe(),ze("defs",lI,[(qe(!0),ze(Xe,null,Lt(e.markers,(_,b)=>(qe(),Ut(a,{id:b,key:b,marker:_,scale:e.scale},null,8,["id","marker","scale"]))),128))])):Un("",!0),e.isShowBackgroundViewport?(qe(),Ut(s,{key:1},{default:_r(()=>[(qe(!0),ze(Xe,null,Lt(e.layerDefs.background,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),e.isShowGrid?(qe(),Ut(l,{key:0})):Un("",!0),(qe(!0),ze(Xe,null,Lt(e.layerDefs.grid,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128))]),_:3})):Un("",!0),wa("g",sI,[(qe(!0),ze(Xe,null,Lt(e.layerDefs.base,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),wa("g",uI,[mt(c),mt(u)]),(qe(!0),ze(Xe,null,Lt(e.layerDefs.edges,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),e.overrideEdgeLabels?(qe(),Ut(d,{key:0},{"edge-label":_r(_=>[fn(e.$slots,"edge-label",ol(na(_)),void 0,!0)]),_:3})):Un("",!0),e.overrideEdgesLabels?(qe(),Ut(d,{key:1},{"edges-label":_r(_=>[fn(e.$slots,"edges-label",ol(na(_)),void 0,!0)]),_:3})):Un("",!0),e.visibleNodeFocusRing?(qe(),ze("g",cI,[(qe(!0),ze(Xe,null,Lt(e.currentSelectedNodes,_=>(qe(),Ut(f,{id:_,key:_,state:e.nodeStates[_],pos:e.currentLayouts.nodes[_]},null,8,["id","state","pos"]))),128))])):Un("",!0),(qe(!0),ze(Xe,null,Lt(e.layerDefs.focusring,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),mt(ic,{name:e.allConfigs.node.transition,css:!!e.allConfigs.node.transition,tag:"g",class:"v-layer-nodes"},{default:_r(()=>[(qe(!0),ze(Xe,null,Lt(e.nodeStates,(_,b)=>(qe(),Ut(h,{id:b.toString(),key:b,state:_,pos:e.currentLayouts.nodes[b]},E0({_:2},[e.overrideNodes?{name:"override-node",fn:_r(x=>[fn(e.$slots,"override-node",ol(na(x)),void 0,!0)])}:void 0,e.overrideNodeLabels?{name:"override-node-label",fn:_r(x=>[fn(e.$slots,"override-node-label",ol(na(x)),void 0,!0)])}:void 0]),1032,["id","state","pos"]))),128))]),_:3},8,["name","css"]),(qe(!0),ze(Xe,null,Lt(e.layerDefs.nodes,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),e.visiblePaths?(qe(),Ut(m,{key:3,paths:e.paths,edges:e.edges},null,8,["paths","edges"])):Un("",!0),(qe(!0),ze(Xe,null,Lt(e.layerDefs.paths,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128))],512)],2))],512)}var fI=gr(iI,[["render",dI],["__scopeId","data-v-03e831bc"]]);const vI=$t({props:{area:{type:Object,required:!0},config:{type:Object,required:!0},text:{type:String,required:!1,default:""},align:{type:String,required:!1,default:"center"},verticalAlign:{type:String,required:!1,default:"center"},edge:{type:Object,required:!1,default:void 0},hovered:{type:Boolean,required:!1,default:!1},selected:{type:Boolean,required:!1,default:!1},scale:{type:Number,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,r=U(0),o=U(0),i=U("middle"),a=U("central"),l=U(0);Zn(()=>{const c=n.area.source,u=n.area.target;n.align==="source"?(c.above.x==u.above.x?i.value=c.above.y>u.above.y?"start":"end":i.value=c.above.xu.above.x?"start":"end",n.verticalAlign==="above"?(r.value=u.above.x,o.value=u.above.y,a.value="text-top"):n.verticalAlign==="below"?(r.value=u.below.x,o.value=u.below.y,a.value="hanging"):(r.value=(u.above.x+u.below.x)/2,o.value=(u.above.y+u.below.y)/2,a.value="central")):(i.value="middle",n.verticalAlign==="above"?(r.value=(c.above.x+u.above.x)/2,o.value=(c.above.y+u.above.y)/2,a.value="text-top"):n.verticalAlign==="below"?(r.value=(c.below.x+u.below.x)/2,o.value=(c.below.y+u.below.y)/2,a.value="hanging"):(r.value=(c.above.x+u.below.x)/2,o.value=(c.above.y+u.below.y)/2,a.value="central"));let d=Lu(c.above,u.above).v.angleDeg();(d<-90||d>=90)&&(d=d+180,d>180&&(d-=360)),l.value=d});const s=g(()=>a.value==="central"&&!n.config.background?Gv(Kr({},n.config),{background:{visible:!0,color:"#ffffff",padding:{vertical:1,horizontal:4},borderRadius:2}}):n.config);return t({x:r,y:o,textAnchor:i,dominantBaseline:a,angle:l,updatedConfig:s}),(c,u)=>(qe(),Ut(Pc,{class:"v-edge-label",text:e.text,x:r.value,y:o.value,config:be(s),"text-anchor":i.value,"dominant-baseline":a.value,transform:`rotate(${l.value} ${r.value} ${o.value})`},null,8,["text","x","y","config","text-anchor","dominant-baseline","transform"]))}});var hI=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",VNetworkGraph:fI,VEdgeLabel:vI,VLabelText:Pc});const mI=function(e){Object.entries(hI).forEach(([t,n])=>{e.component(t,n)})};var gI=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const pI={};function yI(e,t){const n=rr("router-view");return qe(),Ut(n)}var bI=gI(pI,[["render",yI],["__file","/Users/boyan/development/opensource/gopherCronFE/src/App.vue"]]),hh={exports:{}},e1=function(t,n){return function(){return t.apply(n,arguments)}},wI=e1,mh=Object.prototype.toString,gh=function(e){return function(t){var n=mh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function Vo(e){return e=e.toLowerCase(),function(n){return gh(n)===e}}function qc(e){return Array.isArray(e)}function Pf(e){return typeof e=="undefined"}function _I(e){return e!==null&&!Pf(e)&&e.constructor!==null&&!Pf(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var t1=Vo("ArrayBuffer");function xI(e){var t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&t1(e.buffer),t}function SI(e){return typeof e=="string"}function n1(e){return typeof e=="number"}function r1(e){return e!==null&&typeof e=="object"}function Ys(e){if(gh(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function kI(e){return e&&Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}var CI=Vo("Date"),TI=Vo("File"),EI=Vo("Blob"),$I=Vo("FileList");function ph(e){return mh.call(e)==="[object Function]"}function PI(e){return r1(e)&&ph(e.pipe)}function qI(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||mh.call(e)===t||ph(e.toString)&&e.toString()===t)}var MI=Vo("URLSearchParams");function OI(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function AI(){var e;return typeof navigator!="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function yh(e,t){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),qc(e))for(var n=0,r=e.length;n0;)a=o[i],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function NI(e,t,n){e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return r!==-1&&r===n}function FI(e){if(!e)return null;if(qc(e))return e;var t=e.length;if(!n1(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n}var zI=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!="undefined"&&Object.getPrototypeOf(Uint8Array));function jI(e,t){for(var n=e&&e[Symbol.iterator],r=n.call(e),o;(o=r.next())&&!o.done;){var i=o.value;t.call(e,i[0],i[1])}}function DI(e,t){for(var n,r=[];(n=e.exec(t))!==null;)r.push(n);return r}var VI=Vo("HTMLFormElement"),HI=function(t){return function(n,r){return t.call(n,r)}}(Object.prototype.hasOwnProperty),cn={isArray:qc,isArrayBuffer:t1,isBuffer:_I,isFormData:qI,isArrayBufferView:xI,isString:SI,isNumber:n1,isObject:r1,isPlainObject:Ys,isEmptyObject:kI,isUndefined:Pf,isDate:CI,isFile:TI,isBlob:EI,isFunction:ph,isStream:PI,isURLSearchParams:MI,isStandardBrowserEnv:AI,forEach:yh,merge:qf,extend:RI,trim:OI,stripBOM:II,inherits:LI,toFlatObject:BI,kindOf:gh,kindOfTest:Vo,endsWith:NI,toArray:FI,isTypedArray:zI,isFileList:$I,forEachEntry:jI,matchAll:DI,isHTMLForm:VI,hasOwnProperty:HI},o1=cn;function $a(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}o1.inherits($a,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i1=$a.prototype,a1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){a1[e]={value:e}});Object.defineProperties($a,a1);Object.defineProperty(i1,"isAxiosError",{value:!0});$a.from=function(e,t,n,r,o,i){var a=Object.create(i1);return o1.toFlatObject(e,a,function(s){return s!==Error.prototype}),$a.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Ii=$a,UI=typeof self=="object"?self.FormData:window.FormData,WI=UI,Mt=cn,KI=Ii,QI=WI;function Mf(e){return Mt.isPlainObject(e)||Mt.isArray(e)}function l1(e){return Mt.endsWith(e,"[]")?e.slice(0,-2):e}function zp(e,t,n){return e?e.concat(t).map(function(o,i){return o=l1(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ZI(e){return Mt.isArray(e)&&!e.some(Mf)}var YI=Mt.toFlatObject(Mt,{},null,function(t){return/^is[A-Z]/.test(t)});function XI(e){return e&&Mt.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function GI(e,t,n){if(!Mt.isObject(e))throw new TypeError("target must be an object");t=t||new(QI||FormData),n=Mt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,b){return!Mt.isUndefined(b[_])});var r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,s=l&&XI(t);if(!Mt.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(Mt.isDate(m))return m.toISOString();if(!s&&Mt.isBlob(m))throw new KI("Blob is not supported. Use a Buffer instead.");return Mt.isArrayBuffer(m)||Mt.isTypedArray(m)?s&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,_,b){var x=m;if(m&&!b&&typeof m=="object"){if(Mt.endsWith(_,"{}"))_=r?_:_.slice(0,-2),m=JSON.stringify(m);else if(Mt.isArray(m)&&ZI(m)||Mt.isFileList(m)||Mt.endsWith(_,"[]")&&(x=Mt.toArray(m)))return _=l1(_),x.forEach(function(y,w){!Mt.isUndefined(y)&&t.append(a===!0?zp([_],w,i):a===null?_:_+"[]",c(y))}),!1}return Mf(m)?!0:(t.append(zp(b,_,i),c(m)),!1)}var d=[],f=Object.assign(YI,{defaultVisitor:u,convertValue:c,isVisitable:Mf});function h(m,_){if(!Mt.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(m),Mt.forEach(m,function(x,p){var y=!Mt.isUndefined(x)&&o.call(t,x,Mt.isString(p)?p.trim():p,_,f);y===!0&&h(x,_?_.concat(p):[p])}),d.pop()}}if(!Mt.isObject(e))throw new TypeError("data must be an object");return h(e),t}var Mc=GI,JI=Mc;function jp(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(r){return t[r]})}function s1(e,t){this._pairs=[],e&&JI(e,this,t)}var u1=s1.prototype;u1.append=function(t,n){this._pairs.push([t,n])};u1.toString=function(t){var n=t?function(r){return t.call(this,r,jp)}:jp;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var c1=s1,eL=cn,tL=c1;function nL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var d1=function(t,n,r){if(!n)return t;var o=t.indexOf("#");o!==-1&&(t=t.slice(0,o));var i=r&&r.encode||nL,a=eL.isURLSearchParams(n)?n.toString():new tL(n,r).toString(i);return a&&(t+=(t.indexOf("?")===-1?"?":"&")+a),t},rL=cn;function ss(){this.handlers=[]}ss.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};ss.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};ss.prototype.clear=function(){this.handlers&&(this.handlers=[])};ss.prototype.forEach=function(t){rL.forEach(this.handlers,function(r){r!==null&&t(r)})};var oL=ss,iL=cn,f1=function(t,n){iL.forEach(t,function(o,i){i!==n&&i.toUpperCase()===n.toUpperCase()&&(t[n]=o,delete t[i])})},v1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},aL=c1,lL=typeof URLSearchParams!="undefined"?URLSearchParams:aL,sL=FormData,uL={isBrowser:!0,classes:{URLSearchParams:lL,FormData:sL,Blob},protocols:["http","https","file","blob","url","data"]},bh=uL,cL=cn,dL=Mc,Dp=bh,fL=function(t,n){return dL(t,new Dp.classes.URLSearchParams,Object.assign({visitor:function(r,o,i,a){return Dp.isNode&&cL.isBuffer(r)?(this.append(o,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},n))},fo=cn;function vL(e){return fo.matchAll(/\w+|\[(\w*)]/g,e).map(function(t){return t[0]==="[]"?"":t[1]||t[0]})}function hL(e){var t={},n=Object.keys(e),r,o=n.length,i;for(r=0;r=r.length;if(l=!l&&fo.isArray(i)?i.length:l,c)return fo.hasOwnProperty(i,l)?i[l]=[i[l],o]:i[l]=o,!s;(!i[l]||!fo.isObject(i[l]))&&(i[l]=[]);var u=t(r,o,i[l],a);return u&&fo.isArray(i[l])&&(i[l]=hL(i[l])),!s}if(fo.isFormData(e)&&fo.isFunction(e.entries)){var n={};return fo.forEachEntry(e,function(r,o){t(vL(r),o,n,0)}),n}return null}var h1=mL,xd=Ii,gL=function(t,n,r){var o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):n(new xd("Request failed with status code "+r.status,[xd.ERR_BAD_REQUEST,xd.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))},Fs=cn,pL=Fs.isStandardBrowserEnv()?function(){return{write:function(n,r,o,i,a,l){var s=[];s.push(n+"="+encodeURIComponent(r)),Fs.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),Fs.isString(i)&&s.push("path="+i),Fs.isString(a)&&s.push("domain="+a),l===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){var r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),yL=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},bL=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},wL=yL,_L=bL,m1=function(t,n){return t&&!wL(n)?_L(t,n):n},Sd=cn,xL=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],SL=function(t){var n={},r,o,i;return t&&Sd.forEach(t.split(` -`),function(l){if(i=l.indexOf(":"),r=Sd.trim(l.slice(0,i)).toLowerCase(),o=Sd.trim(l.slice(i+1)),r){if(n[r]&&xL.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([o]):n[r]=n[r]?n[r]+", "+o:o}}),n},Vp=cn,kL=Vp.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function o(i){var a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){var l=Vp.isString(a)?o(a):a;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}(),Of=Ii,CL=cn;function g1(e,t,n){Of.call(this,e==null?"canceled":e,Of.ERR_CANCELED,t,n),this.name="CanceledError"}CL.inherits(g1,Of,{__CANCEL__:!0});var Oc=g1,TL=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""},Qi=cn,EL=gL,$L=pL,PL=d1,qL=m1,ML=SL,OL=kL,AL=v1,Ar=Ii,RL=Oc,IL=TL,LL=bh,Hp=function(t){return new Promise(function(r,o){var i=t.data,a=t.headers,l=t.responseType,s=t.withXSRFToken,c;function u(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}Qi.isFormData(i)&&Qi.isStandardBrowserEnv()&&delete a["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var f=t.auth.username||"",h=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.Authorization="Basic "+btoa(f+":"+h)}var m=qL(t.baseURL,t.url);d.open(t.method.toUpperCase(),PL(m,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function _(){if(!!d){var p="getAllResponseHeaders"in d?ML(d.getAllResponseHeaders()):null,y=!l||l==="text"||l==="json"?d.responseText:d.response,w={data:y,status:d.status,statusText:d.statusText,headers:p,config:t,request:d};EL(function(C){r(C),u()},function(C){o(C),u()},w),d=null}}if("onloadend"in d?d.onloadend=_:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(_)},d.onabort=function(){!d||(o(new Ar("Request aborted",Ar.ECONNABORTED,t,d)),d=null)},d.onerror=function(){o(new Ar("Network Error",Ar.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){var y=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",w=t.transitional||AL;t.timeoutErrorMessage&&(y=t.timeoutErrorMessage),o(new Ar(y,w.clarifyTimeoutError?Ar.ETIMEDOUT:Ar.ECONNABORTED,t,d)),d=null},Qi.isStandardBrowserEnv()&&(s&&Qi.isFunction(s)&&(s=s(t)),s||s!==!1&&OL(m))){var b=t.xsrfHeaderName&&t.xsrfCookieName&&$L.read(t.xsrfCookieName);b&&(a[t.xsrfHeaderName]=b)}"setRequestHeader"in d&&Qi.forEach(a,function(y,w){typeof i=="undefined"&&w.toLowerCase()==="content-type"?delete a[w]:d.setRequestHeader(w,y)}),Qi.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),l&&l!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(c=function(p){!d||(o(!p||p.type?new RL(null,t,req):p),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c))),!i&&i!==!1&&i!==0&&i!==""&&(i=null);var x=IL(m);if(x&&LL.protocols.indexOf(x)===-1){o(new Ar("Unsupported protocol "+x+":",Ar.ERR_BAD_REQUEST,t));return}d.send(i)})},an=cn,Up=f1,Wp=Ii,BL=v1,NL=Mc,FL=fL,Kp=bh,zL=h1,jL={"Content-Type":"application/x-www-form-urlencoded"};function Qp(e,t){!an.isUndefined(e)&&an.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function DL(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Hp),e}function VL(e,t,n){if(an.isString(e))try{return(t||JSON.parse)(e),an.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Ac={transitional:BL,adapter:DL(),transformRequest:[function(t,n){Up(n,"Accept"),Up(n,"Content-Type");var r=n&&n["Content-Type"]||"",o=r.indexOf("application/json")>-1,i=an.isObject(t);i&&an.isHTMLForm(t)&&(t=new FormData(t));var a=an.isFormData(t);if(a)return o?JSON.stringify(zL(t)):t;if(an.isArrayBuffer(t)||an.isBuffer(t)||an.isStream(t)||an.isFile(t)||an.isBlob(t))return t;if(an.isArrayBufferView(t))return t.buffer;if(an.isURLSearchParams(t))return Qp(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var l;if(i){if(r.indexOf("application/x-www-form-urlencoded")!==-1)return FL(t,this.formSerializer).toString();if((l=an.isFileList(t))||r.indexOf("multipart/form-data")>-1){var s=this.env&&this.env.FormData;return NL(l?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(Qp(n,"application/json"),VL(t)):t}],transformResponse:[function(t){var n=this.transitional||Ac.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&an.isString(t)&&(r&&!this.responseType||o)){var i=n&&n.silentJSONParsing,a=!i&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?Wp.from(l,Wp.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kp.classes.FormData,Blob:Kp.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};an.forEach(["delete","get","head"],function(t){Ac.headers[t]={}});an.forEach(["post","put","patch"],function(t){Ac.headers[t]=an.merge(jL)});var wh=Ac,HL=cn,UL=wh,WL=function(t,n,r,o){var i=this||UL;return HL.forEach(o,function(l){t=l.call(i,t,n,r)}),t},p1=function(t){return!!(t&&t.__CANCEL__)},Zp=cn,kd=WL,KL=p1,QL=wh,ZL=Oc,Yp=f1;function Cd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ZL}var YL=function(t){Cd(t),t.headers=t.headers||{},t.data=kd.call(t,t.data,t.headers,null,t.transformRequest),Yp(t.headers,"Accept"),Yp(t.headers,"Content-Type"),t.headers=Zp.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Zp.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var n=t.adapter||QL.adapter;return n(t).then(function(o){return Cd(t),o.data=kd.call(t,o.data,o.headers,o.status,t.transformResponse),o},function(o){return KL(o)||(Cd(t),o&&o.response&&(o.response.data=kd.call(t,o.response.data,o.response.headers,o.response.status,t.transformResponse))),Promise.reject(o)})},xn=cn,y1=function(t,n){n=n||{};var r={};function o(u,d){return xn.isPlainObject(u)&&xn.isPlainObject(d)?xn.merge(u,d):xn.isEmptyObject(d)?xn.merge({},u):xn.isPlainObject(d)?xn.merge({},d):xn.isArray(d)?d.slice():d}function i(u){if(xn.isUndefined(n[u])){if(!xn.isUndefined(t[u]))return o(void 0,t[u])}else return o(t[u],n[u])}function a(u){if(!xn.isUndefined(n[u]))return o(void 0,n[u])}function l(u){if(xn.isUndefined(n[u])){if(!xn.isUndefined(t[u]))return o(void 0,t[u])}else return o(void 0,n[u])}function s(u){if(u in n)return o(t[u],n[u]);if(u in t)return o(void 0,t[u])}var c={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s};return xn.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var f=c[d]||i,h=f(d);xn.isUndefined(h)&&f!==s||(r[d]=h)}),r},b1={version:"0.28.0"},XL=b1.version,mo=Ii,_h={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){_h[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Xp={};_h.transitional=function(t,n,r){function o(i,a){return"[Axios v"+XL+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return function(i,a,l){if(t===!1)throw new mo(o(a," has been removed"+(n?" in "+n:"")),mo.ERR_DEPRECATED);return n&&!Xp[a]&&(Xp[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function GL(e,t,n){if(typeof e!="object")throw new mo("options must be an object",mo.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new mo("option "+i+" must be "+s,mo.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new mo("Unknown option "+i,mo.ERR_BAD_OPTION)}}var JL={assertOptions:GL,validators:_h},xh=cn,eB=d1,Gp=oL,Jp=YL,Rc=y1,tB=m1,w1=JL,Zi=w1.validators;function Pa(e){this.defaults=e,this.interceptors={request:new Gp,response:new Gp}}Pa.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rc(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&w1.assertOptions(r,{silentJSONParsing:Zi.transitional(Zi.boolean),forcedJSONParsing:Zi.transitional(Zi.boolean),clarifyTimeoutError:Zi.transitional(Zi.boolean)},!1);var o=n.paramsSerializer;xh.isFunction(o)&&(n.paramsSerializer={serialize:o});var i=[],a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(a=a&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});var l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});var s;if(!a){var c=[Jp,void 0];for(Array.prototype.unshift.apply(c,i),c=c.concat(l),s=Promise.resolve(n);c.length;)s=s.then(c.shift(),c.shift());return s}for(var u=n;i.length;){var d=i.shift(),f=i.shift();try{u=d(u)}catch(h){f(h);break}}try{s=Jp(u)}catch(h){return Promise.reject(h)}for(;l.length;)s=s.then(l.shift(),l.shift());return s};Pa.prototype.getUri=function(t){t=Rc(this.defaults,t);var n=tB(t.baseURL,t.url);return eB(n,t.params,t.paramsSerializer)};xh.forEach(["delete","get","head","options"],function(t){Pa.prototype[t]=function(n,r){return this.request(Rc(r||{},{method:t,url:n,data:(r||{}).data}))}});xh.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(Rc(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Pa.prototype[t]=n(),Pa.prototype[t+"Form"]=n(!0)});var nB=Pa,rB=Oc;function qa(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(o){t=o});var n=this;this.promise.then(function(r){if(!!n._listeners){for(var o=n._listeners.length;o-- >0;)n._listeners[o](r);n._listeners=null}}),this.promise.then=function(r){var o,i=new Promise(function(a){n.subscribe(a),o=a}).then(r);return i.cancel=function(){n.unsubscribe(o)},i},e(function(o,i,a){n.reason||(n.reason=new rB(o,i,a),t(n.reason))})}qa.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};qa.prototype.subscribe=function(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]};qa.prototype.unsubscribe=function(t){if(!!this._listeners){var n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}};qa.source=function(){var t,n=new qa(function(o){t=o});return{token:n,cancel:t}};var oB=qa,iB=function(t){return function(r){return t.apply(null,r)}},aB=cn,lB=function(t){return aB.isObject(t)&&t.isAxiosError===!0},Af=cn,sB=e1,Xs=nB,uB=y1,cB=wh,dB=h1;function _1(e){var t=new Xs(e),n=sB(Xs.prototype.request,t);return Af.extend(n,Xs.prototype,t),Af.extend(n,t),n.create=function(o){return _1(uB(e,o))},n}var Tn=_1(cB);Tn.Axios=Xs;Tn.CanceledError=Oc;Tn.CancelToken=oB;Tn.isCancel=p1;Tn.VERSION=b1.version;Tn.toFormData=Mc;Tn.AxiosError=Ii;Tn.Cancel=Tn.CanceledError;Tn.all=function(t){return Promise.all(t)};Tn.spread=iB;Tn.isAxiosError=lB;Tn.formToJSON=function(e){return dB(Af.isHTMLForm(e)?new FormData(e):e)};hh.exports=Tn;hh.exports.default=Tn;var fB=hh.exports;const vB="modulepreload",ey={},hB="./",Ht=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${hB}${r}`,r in ey)return;ey[r]=!0;const o=r.endsWith(".css"),i=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${i}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":vB,o||(a.as="script",a.crossOrigin=""),a.href=r,document.head.appendChild(a),o)return new Promise((l,s)=>{a.addEventListener("load",l),a.addEventListener("error",()=>s(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function mB(){return x1().__VUE_DEVTOOLS_GLOBAL_HOOK__}function x1(){return typeof navigator!="undefined"&&typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const gB=typeof Proxy=="function",pB="devtools-plugin:setup",yB="plugin:settings:set";let Yi,Rf;function bB(){var e;return Yi!==void 0||(typeof window!="undefined"&&window.performance?(Yi=!0,Rf=window.performance):typeof global!="undefined"&&((e=global.perf_hooks)===null||e===void 0?void 0:e.performance)?(Yi=!0,Rf=global.perf_hooks.performance):Yi=!1),Yi}function wB(){return bB()?Rf.now():Date.now()}class _B{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const a in t.settings){const l=t.settings[a];r[a]=l.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let i=Object.assign({},r);try{const a=localStorage.getItem(o),l=JSON.parse(a);Object.assign(i,l)}catch{}this.fallbacks={getSettings(){return i},setSettings(a){try{localStorage.setItem(o,JSON.stringify(a))}catch{}i=a},now(){return wB()}},n&&n.on(yB,(a,l)=>{a===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(a,l)=>this.target?this.target.on[l]:(...s)=>{this.onQueue.push({method:l,args:s})}}),this.proxiedTarget=new Proxy({},{get:(a,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...s)=>(this.targetQueue.push({method:l,args:s,resolve:()=>{}}),this.fallbacks[l](...s)):(...s)=>new Promise(c=>{this.targetQueue.push({method:l,args:s,resolve:c})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function S1(e,t){const n=e,r=x1(),o=mB(),i=gB&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!i))o.emit(pB,e,t);else{const a=i?new _B(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:a}),a&&t(a.proxiedTarget)}}/*! + `,document.head.appendChild(Le);let Ae="normal";R.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}-from`,z!==void 0&&(z.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}-from-tween`),A.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}-to`,E.style.animation=`${i.duration}ms ${i.easing} ${i.delay}ms ${Ae} ${i.fill} ${Te}`;const je=He=>{He===Object(He)&&He.animationName!==Te||(E.removeEventListener("animationend",je),E.removeEventListener("animationcancel",je),se(),Le.remove())};a.qMorphCancel=()=>{a.qMorphCancel=void 0,n=!0,je()},E.qMorphCancel=()=>{E.qMorphCancel=void 0,n=!0,je()},E.addEventListener("animationend",je),E.addEventListener("animationcancel",je),t=He=>n===!0||!E||!R||!A?!1:He===!0?(je(),!0):(r=r!==!0,Ae=Ae==="normal"?"reverse":"normal",R.style.animationDirection=Ae,z.style.animationDirection=Ae,A.style.animationDirection=Ae,E.style.animationDirection=Ae,!0)}};i.waitFor>0||i.waitFor==="transitionend"||i.waitFor===Object(i.waitFor)&&typeof i.waitFor.then=="function"?(i.waitFor>0?new Promise(_e=>setTimeout(_e,i.waitFor)):i.waitFor==="transitionend"?new Promise(_e=>{const Y=()=>{A!==null&&(clearTimeout(A),A=null),E&&(E.removeEventListener("transitionend",Y),E.removeEventListener("transitioncancel",Y)),_e()};let A=setTimeout(Y,400);E.addEventListener("transitionend",Y),E.addEventListener("transitioncancel",Y)}):i.waitFor).then(W).catch(()=>{typeof E.qMorphCancel=="function"&&E.qMorphCancel()}):W()};return typeof e.onToggle=="function"&&e.onToggle(),requestAnimationFrame($),E=>t(E)}const Tu={},zP=["duration","delay","easing","fill","classes","style","duration","resize","useCSS","hideFromClone","keepToClone","tween","tweenFromOpacity","tweenToOpacity","waitFor","onEnd"],jP=["resize","useCSS","hideFromClone","keepToClone","tween"];function ra(e,t){e.clsAction!==t&&(e.clsAction=t,e.el.classList[t]("q-morph--invisible"))}function Zw(e){if(e.animating===!0||e.queue.length<2)return;const[t,n]=e.queue;e.animating=!0,t.animating=!0,n.animating=!0,ra(t,"remove"),ra(n,"remove");const r=FP(fe(B({from:t.el,to:n.el,onToggle(){ra(t,"add"),ra(n,"remove")}},n.opts),{onEnd(o,i){n.opts.onEnd!==void 0&&n.opts.onEnd(o,i),i!==!0&&(t.animating=!1,n.animating=!1,e.animating=!1,e.cancel=void 0,e.queue.shift(),Zw(e))}}));e.cancel=()=>{r(!0),e.cancel=void 0}}function Yw(e,t){const n=t.opts;jP.forEach(r=>{n[r]=e[r]===!0})}function DP(e,t){const n=typeof e=="string"&&e.length!==0?e.split(":"):[];t.name=n[0],t.group=n[1],Object.assign(t.opts,{duration:isNaN(n[2])===!0?300:parseFloat(n[2]),waitFor:n[3]})}function VP(e,t){e.group!==void 0&&(t.group=e.group),e.name!==void 0&&(t.name=e.name);const n=t.opts;zP.forEach(r=>{e[r]!==void 0&&(n[r]=e[r])})}function HP(e,t){if(t.name===e){const n=Tu[t.group];n===void 0?(Tu[t.group]={name:t.group,model:e,queue:[t],animating:!1},ra(t,"remove")):n.model!==e&&(n.model=e,n.queue.push(t),n.animating===!1&&n.queue.length===2&&Zw(n));return}t.animating===!1&&ra(t,"add")}function Ng(e,t){let n;Object(t)===t?(n=""+t.model,VP(t,e),Yw(t,e)):n=""+t,n!==e.model?(e.model=n,HP(n,e)):e.animating===!1&&e.clsAction!==void 0&&e.el.classList[e.clsAction]("q-morph--invisible")}hr({name:"morph",mounted(e,t){const n={el:e,animating:!1,opts:{}};Yw(t.modifiers,n),DP(t.arg,n),Ng(n,t.value),e.__qmorph=n},updated(e,t){Ng(e.__qmorph,t.value)},beforeUnmount(e){const t=e.__qmorph,n=Tu[t.group];n!==void 0&&n.queue.indexOf(t)!==-1&&(n.queue=n.queue.filter(o=>o!==t),n.queue.length===0&&(n.cancel!==void 0&&n.cancel(),delete Tu[t.group])),t.clsAction==="add"&&e.classList.remove("q-morph--invisible"),delete e.__qmorph}});const UP={childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0};function Fg(e,t,n){t.handler=n,t.observer!==void 0&&t.observer.disconnect(),t.observer=new MutationObserver(r=>{typeof t.handler=="function"&&(t.handler(r)===!1||t.once===!0)&&Xw(e)}),t.observer.observe(e,t.opts)}function Xw(e){const t=e.__qmutation;t!==void 0&&(t.observer!==void 0&&t.observer.disconnect(),delete e.__qmutation)}hr({name:"mutation",mounted(e,o){var i=o,{modifiers:a}=i,l=a,{once:t}=l,n=to(l,["once"]),{value:r}=i;const s={once:t,opts:Object.keys(n).length===0?UP:n};Fg(e,s,r),e.__qmutation=s},updated(e,{oldValue:t,value:n}){const r=e.__qmutation;r!==void 0&&t!==n&&Fg(e,r,n)},beforeUnmount:Xw});const{passive:Eu}=Tt;function zg(e,{value:t,oldValue:n}){if(typeof t!="function"){e.scrollTarget.removeEventListener("scroll",e.scroll,Eu);return}e.handler=t,typeof n!="function"&&(e.scrollTarget.addEventListener("scroll",e.scroll,Eu),e.scroll())}hr({name:"scroll-fire",mounted(e,t){const n={scrollTarget:Pr(e),scroll:Ia(()=>{let r,o;n.scrollTarget===window?(o=e.getBoundingClientRect().bottom,r=window.innerHeight):(o=hu(e).top+ka(e),r=hu(n.scrollTarget).top+ka(n.scrollTarget)),o>0&&o{r.styleCleanup=void 0;const c=()=>{document.body.classList.remove("non-selectable")};s===!0?(ur(),setTimeout(c,10)):c()}),r.triggered=!1,r.sensitivity=a===!0?r.mouseSensitivity:r.touchSensitivity,r.timer=setTimeout(()=>{r.timer=void 0,ur(),r.triggered=!0,r.handler({evt:i,touch:a!==!0,mouse:a===!0,position:r.origin,duration:Date.now()-l})},r.duration)},move(i){const{top:a,left:l}=Cn(i);r.timer!==void 0&&(Math.abs(l-r.origin.left)>=r.sensitivity||Math.abs(a-r.origin.top)>=r.sensitivity)&&(clearTimeout(r.timer),r.timer=void 0)},end(i){wn(r,"temp"),r.styleCleanup!==void 0&&r.styleCleanup(r.triggered),r.triggered===!0?i!==void 0&&Je(i):r.timer!==void 0&&(clearTimeout(r.timer),r.timer=void 0)}},o=[600,5,7];if(typeof t.arg=="string"&&t.arg.length!==0&&t.arg.split(":").forEach((i,a)=>{const l=parseInt(i,10);l&&(o[a]=l)}),[r.duration,r.touchSensitivity,r.mouseSensitivity]=o,e.__qtouchhold=r,n.mouse===!0){const i=n.mouseCapture===!0||n.mousecapture===!0?"Capture":"";zt(r,"main",[[e,"mousedown","mouseStart",`passive${i}`]])}Ze.has.touch===!0&&zt(r,"main",[[e,"touchstart","touchStart",`passive${n.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]])},updated(e,t){const n=e.__qtouchhold;n!==void 0&&t.oldValue!==t.value&&(typeof t.value!="function"&&n.end(),n.handler=t.value)},beforeUnmount(e){const t=e.__qtouchhold;t!==void 0&&(wn(t,"main"),wn(t,"temp"),t.timer!==void 0&&clearTimeout(t.timer),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchhold)}});const Gw={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},WP=new RegExp(`^([\\d+]+|${Object.keys(Gw).join("|")})$`,"i");function KP(e,t){const{top:n,left:r}=Cn(e);return Math.abs(r-t.left)>=7||Math.abs(n-t.top)>=7}hr({name:"touch-repeat",beforeMount(e,{modifiers:t,value:n,arg:r}){const o=Object.keys(t).reduce((s,c)=>{if(WP.test(c)===!0){const u=isNaN(parseInt(c,10))?Gw[c.toLowerCase()]:parseInt(c,10);u>=0&&s.push(u)}return s},[]);if(t.mouse!==!0&&Ze.has.touch!==!0&&o.length===0)return;const i=typeof r=="string"&&r.length!==0?r.split(":").map(s=>parseInt(s,10)):[0,600,300],a=i.length-1,l={keyboard:o,handler:n,noop:Zt,mouseStart(s){l.event===void 0&&typeof l.handler=="function"&&sc(s)===!0&&(zt(l,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(s,!0))},keyboardStart(s){if(typeof l.handler=="function"&&Xn(s,o)===!0){if((i[0]===0||l.event!==void 0)&&(Je(s),e.focus(),l.event!==void 0))return;zt(l,"temp",[[document,"keyup","end","notPassiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(s,!1,!0)}},touchStart(s){if(s.target!==void 0&&typeof l.handler=="function"){const c=s.target;zt(l,"temp",[[c,"touchmove","move","passiveCapture"],[c,"touchcancel","end","notPassiveCapture"],[c,"touchend","end","notPassiveCapture"]]),l.start(s)}},start(s,c,u){u!==!0&&(l.origin=Cn(s));function d(h){l.styleCleanup=void 0,document.documentElement.style.cursor="";const m=()=>{document.body.classList.remove("non-selectable")};h===!0?(ur(),setTimeout(m,10)):m()}Ze.is.mobile===!0&&(document.body.classList.add("non-selectable"),ur(),l.styleCleanup=d),l.event={touch:c!==!0&&u!==!0,mouse:c===!0,keyboard:u===!0,startTime:Date.now(),repeatCount:0};const f=()=>{if(l.timer=void 0,l.event===void 0)return;l.event.repeatCount===0&&(l.event.evt=s,u===!0?l.event.keyCode=s.keyCode:l.event.position=Cn(s),Ze.is.mobile!==!0&&(document.documentElement.style.cursor="pointer",document.body.classList.add("non-selectable"),ur(),l.styleCleanup=d)),l.event.duration=Date.now()-l.event.startTime,l.event.repeatCount+=1,l.handler(l.event);const h=a0&&Je(s),wn(l,"temp"),l.timer!==void 0&&(clearTimeout(l.timer),l.timer=void 0),l.event=void 0)}};if(e.__qtouchrepeat=l,t.mouse===!0){const s=t.mouseCapture===!0||t.mousecapture===!0?"Capture":"";zt(l,"main",[[e,"mousedown","mouseStart",`passive${s}`]])}if(Ze.has.touch===!0&&zt(l,"main",[[e,"touchstart","touchStart",`passive${t.capture===!0?"Capture":""}`],[e,"touchend","noop","passiveCapture"]]),o.length!==0){const s=t.keyCapture===!0||t.keycapture===!0?"Capture":"";zt(l,"main",[[e,"keydown","keyboardStart",`notPassive${s}`]])}},updated(e,{oldValue:t,value:n}){const r=e.__qtouchrepeat;r!==void 0&&t!==n&&(typeof n!="function"&&r.end(),r.handler=n)},beforeUnmount(e){const t=e.__qtouchrepeat;t!==void 0&&(t.timer!==void 0&&clearTimeout(t.timer),wn(t,"main"),wn(t,"temp"),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchrepeat)}});function QP(e,t=document.body){if(typeof e!="string")throw new TypeError("Expected a string as propName");if(!(t instanceof Element))throw new TypeError("Expected a DOM element");return getComputedStyle(t).getPropertyValue(`--q-${e}`).trim()||null}let As;function ZP(){return Ze.is.winphone?"msapplication-navbutton-color":Ze.is.safari?"apple-mobile-web-app-status-bar-style":"theme-color"}function YP(e){const t=document.getElementsByTagName("META");for(const n in t)if(t[n].name===e)return t[n]}function XP(e){As===void 0&&(As=ZP());let t=YP(As);const n=t===void 0;n&&(t=document.createElement("meta"),t.setAttribute("name",As)),t.setAttribute("content",e),n&&document.head.appendChild(t)}Ze.is.mobile===!0&&(Ze.is.nativeMobile===!0||Ze.is.winphone===!0||Ze.is.safari===!0||Ze.is.webkit===!0||Ze.is.vivaldi);const Ya={};function GP(e){Object.assign(yn,{request:e,exit:e,toggle:e})}function Jw(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||null}function e1(){const e=yn.activeEl=yn.isActive===!1?null:Jw();BT(e===null||e===document.documentElement?document.body:e)}function JP(){yn.isActive=yn.isActive===!1,e1()}function Dg(e,t){try{const n=e[t]();return n===void 0?Promise.resolve():n}catch(n){return Promise.reject(n)}}const yn=jo({isActive:!1,activeEl:null},{isCapable:!1,install({$q:e}){e.fullscreen=this}});Ya.request=["requestFullscreen","msRequestFullscreen","mozRequestFullScreen","webkitRequestFullscreen"].find(e=>document.documentElement[e]!==void 0),yn.isCapable=Ya.request!==void 0,yn.isCapable===!1?GP(()=>Promise.reject("Not capable")):(Object.assign(yn,{request(e){const t=e||document.documentElement,{activeEl:n}=yn;return t===n?Promise.resolve():(n!==null&&t.contains(n)===!0?yn.exit():Promise.resolve()).finally(()=>Dg(t,Ya.request))},exit(){return yn.isActive===!0?Dg(document,Ya.exit):Promise.resolve()},toggle(e){return yn.isActive===!0?yn.exit():yn.request(e)}}),Ya.exit=["exitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen"].find(e=>document[e]),yn.isActive=Boolean(Jw()),yn.isActive===!0&&e1(),["onfullscreenchange","onmsfullscreenchange","onwebkitfullscreenchange"].forEach(e=>{document[e]=JP}));const eq=jo({appVisible:!0},{install({$q:e}){ln(e,"appVisible",()=>this.appVisible)}});{let e,t;if(typeof document.hidden!="undefined"?(e="hidden",t="visibilitychange"):typeof document.msHidden!="undefined"?(e="msHidden",t="msvisibilitychange"):typeof document.webkitHidden!="undefined"&&(e="webkitHidden",t="webkitvisibilitychange"),t&&typeof document[e]!="undefined"){const n=()=>{eq.appVisible=!document[e]};document.addEventListener(t,n,!1)}}ge({name:"BottomSheetPlugin",props:fe(B({},ut),{title:String,message:String,actions:Array,grid:Boolean,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]}),emits:["ok","hide"],setup(e,{emit:t}){const{proxy:n}=$e(),r=ct(e,n.$q),o=U(null);function i(){o.value.show()}function a(){o.value.hide()}function l(h){t("ok",h),a()}function s(){t("hide")}function c(){return e.actions.map(h=>{const m=h.avatar||h.img;return h.label===void 0?v(xi,{class:"col-all",dark:r.value}):v("div",{class:["q-bottom-sheet__item q-hoverable q-focusable cursor-pointer relative-position",h.class],style:h.style,tabindex:0,role:"listitem",onClick(){l(h)},onKeyup(_){_.keyCode===13&&l(h)}},[v("div",{class:"q-focus-helper"}),h.icon?v(st,{name:h.icon,color:h.color}):m?v("img",{class:h.avatar?"q-bottom-sheet__avatar":"",src:m}):v("div",{class:"q-bottom-sheet__empty-icon"}),v("div",h.label)])})}function u(){return e.actions.map(h=>{const m=h.avatar||h.img;return h.label===void 0?v(xi,{spaced:!0,dark:r.value}):v(gc,{class:["q-bottom-sheet__item",h.classes],style:h.style,tabindex:0,clickable:!0,dark:r.value,onClick(){l(h)}},()=>[v($o,{avatar:!0},()=>h.icon?v(st,{name:h.icon,color:h.color}):m?v("img",{class:h.avatar?"q-bottom-sheet__avatar":"",src:m}):null),v($o,()=>h.label)])})}function d(){const h=[];return e.title&&h.push(v(ii,{class:"q-dialog__title"},()=>e.title)),e.message&&h.push(v(ii,{class:"q-dialog__message"},()=>e.message)),h.push(e.grid===!0?v("div",{class:"row items-stretch justify-start",role:"list"},c()):v("div",{role:"list"},u())),h}function f(){return[v(Nb,{class:[`q-bottom-sheet q-bottom-sheet--${e.grid===!0?"grid":"list"}`+(r.value===!0?" q-bottom-sheet--dark q-dark":""),e.cardClass],style:e.cardStyle},d)]}return Object.assign(n,{show:i,hide:a}),()=>v(mc,{ref:o,position:"bottom",onHide:s},f)}});function t1(e,t){for(const n in t)n!=="spinner"&&Object(t[n])===t[n]?(e[n]=Object(e[n])!==e[n]?{}:B({},e[n]),t1(e[n],t[n])):e[n]=t[n]}function tq(e,t,n){return r=>{let o,i;const a=t===!0&&r.component!==void 0;if(a===!0){const{component:y,componentProps:w}=r;o=typeof y=="string"?n.component(y):y,i=w||{}}else{const p=r,{class:y,style:w}=p,S=to(p,["class","style"]);o=e,i=S,y!==void 0&&(S.cardClass=y),w!==void 0&&(S.cardStyle=w)}let l,s=!1;const c=U(null),u=es(!1,"dialog"),d=y=>{if(c.value!==null&&c.value[y]!==void 0){c.value[y]();return}const w=l.$.subTree;if(w&&w.component){if(w.component.proxy&&w.component.proxy[y]){w.component.proxy[y]();return}if(w.component.subTree&&w.component.subTree.component&&w.component.subTree.component.proxy&&w.component.subTree.component.proxy[y]){w.component.subTree.component.proxy[y]();return}}console.error("[Quasar] Incorrectly defined Dialog component")},f=[],h=[],m={onOk(y){return f.push(y),m},onCancel(y){return h.push(y),m},onDismiss(y){return f.push(y),h.push(y),m},hide(){return d("hide"),m},update(y){if(l!==null){if(a===!0)Object.assign(i,y);else{const w=y,{class:S,style:C}=w,T=to(w,["class","style"]);S!==void 0&&(T.cardClass=S),C!==void 0&&(T.cardStyle=C),t1(i,T)}l.$forceUpdate()}return m}},_=y=>{s=!0,f.forEach(w=>{w(y)})},b=()=>{x.unmount(u),Mv(u),x=null,l=null,s!==!0&&h.forEach(y=>{y()})};let x=uc({name:"QGlobalDialog",setup:()=>()=>v(o,fe(B({},i),{ref:c,onOk:_,onHide:b,onVnodeMounted(...y){typeof i.onVnodeMounted=="function"&&i.onVnodeMounted(...y),Ge(()=>d("show"))}}))},n);return l=x.mount(u),m}}function n1(e){return encodeURIComponent(e)}function r1(e){return decodeURIComponent(e)}function nq(e){return n1(e===Object(e)?JSON.stringify(e):""+e)}function rq(e){if(e==="")return e;e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),e=r1(e.replace(/\+/g," "));try{const t=JSON.parse(e);(t===Object(t)||Array.isArray(t)===!0)&&(e=t)}catch{}return e}function o1(e){const t=new Date;return t.setMilliseconds(t.getMilliseconds()+e),t.toUTCString()}function oq(e){let t=0;const n=e.match(/(\d+)d/),r=e.match(/(\d+)h/),o=e.match(/(\d+)m/),i=e.match(/(\d+)s/);return n&&(t+=n[1]*864e5),r&&(t+=r[1]*36e5),o&&(t+=o[1]*6e4),i&&(t+=i[1]*1e3),t===0?e:o1(t)}function i1(e,t,n={},r){let o,i;n.expires!==void 0&&(Object.prototype.toString.call(n.expires)==="[object Date]"?o=n.expires.toUTCString():typeof n.expires=="string"?o=oq(n.expires):(i=parseFloat(n.expires),o=isNaN(i)===!1?o1(i*864e5):n.expires));const a=`${n1(e)}=${nq(t)}`,l=[a,o!==void 0?"; Expires="+o:"",n.path?"; Path="+n.path:"",n.domain?"; Domain="+n.domain:"",n.sameSite?"; SameSite="+n.sameSite:"",n.httpOnly?"; HttpOnly":"",n.secure?"; Secure":"",n.other?"; "+n.other:""].join("");if(r){r.req.qCookies?r.req.qCookies.push(l):r.req.qCookies=[l],r.res.setHeader("Set-Cookie",r.req.qCookies);let s=r.req.headers.cookie||"";if(o!==void 0&&i<0){const c=$u(e,r);c!==void 0&&(s=s.replace(`${e}=${c}; `,"").replace(`; ${e}=${c}`,"").replace(`${e}=${c}`,""))}else s=s?`${a}; ${s}`:l;r.req.headers.cookie=s}else document.cookie=l}function $u(e,t){const n=t?t.req.headers:document,r=n.cookie?n.cookie.split("; "):[],o=r.length;let i=e?null:{},a=0,l,s,c;for(;a$u(t,e),set:(t,n,r)=>i1(t,n,r,e),has:t=>aq(t,e),remove:(t,n)=>iq(t,n,e),getAll:()=>$u(null,e)}}const sq={install({$q:e,ssrContext:t}){e.cookies=this}};Object.assign(sq,lq());var uq=ge({name:"DialogPlugin",props:fe(B({},ut),{title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:e=>["ok","cancel","none"].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]}),emits:["ok","hide"],setup(e,{emit:t}){const{proxy:n}=$e(),{$q:r}=n,o=ct(e,r),i=U(null),a=U(e.prompt!==void 0?e.prompt.model:e.options!==void 0?e.options.model:void 0),l=g(()=>"q-dialog-plugin"+(o.value===!0?" q-dialog-plugin--dark q-dark":"")+(e.progress!==!1?" q-dialog-plugin--progress":"")),s=g(()=>e.color||(o.value===!0?"amber":"primary")),c=g(()=>e.progress===!1?null:tn(e.progress)===!0?{component:e.progress.spinner||Jn,props:{color:e.progress.color||s.value}}:{component:Jn,props:{color:s.value}}),u=g(()=>e.prompt!==void 0||e.options!==void 0),d=g(()=>{if(u.value!==!0)return{};const W=e.prompt!==void 0?e.prompt:e.options,{model:F,isValid:Q,items:J}=W;return to(W,["model","isValid","items"])}),f=g(()=>tn(e.ok)===!0||e.ok===!0?r.lang.label.ok:e.ok),h=g(()=>tn(e.cancel)===!0||e.cancel===!0?r.lang.label.cancel:e.cancel),m=g(()=>e.prompt!==void 0?e.prompt.isValid!==void 0&&e.prompt.isValid(a.value)!==!0:e.options!==void 0?e.options.isValid!==void 0&&e.options.isValid(a.value)!==!0:!1),_=g(()=>fe(B({color:s.value,label:f.value,ripple:!1,disable:m.value},tn(e.ok)===!0?e.ok:{flat:!0}),{"data-autofocus":e.focus==="ok"&&u.value!==!0||void 0,onClick:y})),b=g(()=>fe(B({color:s.value,label:h.value,ripple:!1},tn(e.cancel)===!0?e.cancel:{flat:!0}),{"data-autofocus":e.focus==="cancel"&&u.value!==!0||void 0,onClick:w}));de(()=>e.prompt&&e.prompt.model,C),de(()=>e.options&&e.options.model,C);function x(){i.value.show()}function p(){i.value.hide()}function y(){t("ok",We(a.value)),p()}function w(){p()}function S(){t("hide")}function C(F){a.value=F}function T(F){m.value!==!0&&e.prompt.type!=="textarea"&&Xn(F,13)===!0&&y()}function O(F,Q){return e.html===!0?v(ii,{class:F,innerHTML:Q}):v(ii,{class:F},()=>Q)}function L(){return[v(Ow,fe(B({color:s.value,dense:!0,autofocus:!0,dark:o.value},d.value),{modelValue:a.value,"onUpdate:modelValue":C,onKeyup:T}))]}function R(){return[v(b$,fe(B({color:s.value,options:e.options.items,dark:o.value},d.value),{modelValue:a.value,"onUpdate:modelValue":C}))]}function z(){const F=[];return e.cancel&&F.push(v(vt,b.value)),e.ok&&F.push(v(vt,_.value)),v(JT,{class:e.stackButtons===!0?"items-end":"",vertical:e.stackButtons,align:"right"},()=>F)}function $(){const F=[];return e.title&&F.push(O("q-dialog__title",e.title)),e.progress!==!1&&F.push(v(ii,{class:"q-dialog__progress"},()=>v(c.value.component,c.value.props))),e.message&&F.push(O("q-dialog__message",e.message)),e.prompt!==void 0?F.push(v(ii,{class:"scroll q-dialog-plugin__form"},L)):e.options!==void 0&&F.push(v(xi,{dark:o.value}),v(ii,{class:"scroll q-dialog-plugin__form"},R),v(xi,{dark:o.value})),(e.ok||e.cancel)&&F.push(z()),F}function E(){return[v(Nb,{class:[l.value,e.cardClass],style:e.cardStyle,dark:o.value},$)]}return Object.assign(n,{show:x,hide:p}),()=>v(mc,{ref:i,onHide:S},E)}}),cq={install({$q:e,parentApp:t}){e.dialog=tq(uq,!0,t),this.__installed!==!0&&(this.create=e.dialog)}};const Rs=U(null),Vg=jo({isActive:!1},{start:Zt,stop:Zt,increment:Zt,setDefaults:Zt,install({$q:e,parentApp:t}){if(e.loadingBar=this,this.__installed===!0){e.config.loadingBar!==void 0&&this.setDefaults(e.config.loadingBar);return}const n=U(e.config.loadingBar!==void 0?B({},e.config.loadingBar):{});function r(){Vg.isActive=!0}function o(){Vg.isActive=!1}const i=es("q-loading-bar");uc({name:"LoadingBar",devtools:{hide:!0},setup:()=>()=>v(hT,fe(B({},n.value),{onStart:r,onStop:o,ref:Rs}))},t).mount(i),Object.assign(this,{start(a){Rs.value.start(a)},stop(){Rs.value.stop()},increment(){Rs.value.increment.apply(null,arguments)},setDefaults(a){tn(a)===!0&&Object.assign(n.value,a)}})}});let Ki,md,Hg=0,Xo=null,dn={},ui={};const a1={group:"__default_quasar_group__",delay:0,message:!1,html:!1,spinnerSize:80,spinnerColor:"",messageColor:"",backgroundColor:"",boxClass:"",spinner:Jn,customClass:""},l1=B({},a1);function dq(e){if(e&&e.group!==void 0&&ui[e.group]!==void 0)return Object.assign(ui[e.group],e);const t=tn(e)===!0&&e.ignoreDefaults===!0?B(B({},a1),e):B(B({},l1),e);return ui[t.group]=t,t}const br=jo({isActive:!1},{show(e){dn=dq(e);const{group:t}=dn;return br.isActive=!0,Ki!==void 0?(dn.uid=Hg,md.$forceUpdate()):(dn.uid=++Hg,Xo!==null&&clearTimeout(Xo),Xo=setTimeout(()=>{Xo=null;const n=es("q-loading");Ki=uc({name:"QLoading",setup(){_t(()=>{mf(!0)});function r(){br.isActive!==!0&&Ki!==void 0&&(mf(!1),Ki.unmount(n),Mv(n),Ki=void 0,md=void 0)}function o(){if(br.isActive!==!0)return null;const i=[v(dn.spinner,{class:"q-loading__spinner",color:dn.spinnerColor,size:dn.spinnerSize})];return dn.message&&i.push(v("div",{class:"q-loading__message"+(dn.messageColor?` text-${dn.messageColor}`:""),[dn.html===!0?"innerHTML":"textContent"]:dn.message})),v("div",{class:"q-loading fullscreen flex flex-center z-max "+dn.customClass.trim(),key:dn.uid},[v("div",{class:"q-loading__backdrop"+(dn.backgroundColor?` bg-${dn.backgroundColor}`:"")}),v("div",{class:"q-loading__box column items-center "+dn.boxClass},i)])}return()=>v(Wt,{name:"q-transition--fade",appear:!0,onAfterLeave:r},o)}},br.__parentApp),md=Ki.mount(n)},dn.delay)),n=>{if(n===void 0||Object(n)!==n){br.hide(t);return}br.show(fe(B({},n),{group:t}))}},hide(e){if(br.isActive===!0){if(e===void 0)ui={};else{if(ui[e]===void 0)return;{delete ui[e];const t=Object.keys(ui);if(t.length!==0){const n=t[t.length-1];br.show({group:n});return}}}Xo!==null&&(clearTimeout(Xo),Xo=null),br.isActive=!1}},setDefaults(e){tn(e)===!0&&Object.assign(l1,e)},install({$q:e,parentApp:t}){e.loading=this,br.__parentApp=t,e.config.loading!==void 0&&this.setDefaults(e.config.loading)}});let fq=0;const Qs={},Zs={},or={},s1={},vq=/^\s*$/,u1=[],Xv=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],hq=["top-left","top-right","bottom-left","bottom-right"],ta={positive:{icon:e=>e.iconSet.type.positive,color:"positive"},negative:{icon:e=>e.iconSet.type.negative,color:"negative"},warning:{icon:e=>e.iconSet.type.warning,color:"warning",textColor:"dark"},info:{icon:e=>e.iconSet.type.info,color:"info"},ongoing:{group:!1,timeout:0,spinner:!0,color:"grey-8"}};function c1(e,t,n){if(!e)return Xa("parameter required");let r;const o={textColor:"white"};if(e.ignoreDefaults!==!0&&Object.assign(o,Qs),tn(e)===!1&&(o.type&&Object.assign(o,ta[o.type]),e={message:e}),Object.assign(o,ta[e.type||o.type],e),typeof o.icon=="function"&&(o.icon=o.icon(t)),o.spinner?(o.spinner===!0&&(o.spinner=Jn),o.spinner=Aa(o.spinner)):o.spinner=!1,o.meta={hasMedia:Boolean(o.spinner!==!1||o.icon||o.avatar),hasText:Ug(o.message)||Ug(o.caption)},o.position){if(Xv.includes(o.position)===!1)return Xa("wrong position",e)}else o.position="bottom";if(o.timeout===void 0)o.timeout=5e3;else{const s=parseInt(o.timeout,10);if(isNaN(s)||s<0)return Xa("wrong timeout",e);o.timeout=s}o.timeout===0?o.progress=!1:o.progress===!0&&(o.meta.progressClass="q-notification__progress"+(o.progressClass?` ${o.progressClass}`:""),o.meta.progressStyle={animationDuration:`${o.timeout+1e3}ms`});const i=(Array.isArray(e.actions)===!0?e.actions:[]).concat(e.ignoreDefaults!==!0&&Array.isArray(Qs.actions)===!0?Qs.actions:[]).concat(ta[e.type]!==void 0&&Array.isArray(ta[e.type].actions)===!0?ta[e.type].actions:[]),{closeBtn:a}=o;if(a&&i.push({label:typeof a=="string"?a:t.lang.label.close}),o.actions=i.map(d=>{var f=d,{handler:s,noDismiss:c}=f,u=to(f,["handler","noDismiss"]);return fe(B({flat:!0},u),{onClick:typeof s=="function"?()=>{s(),c!==!0&&l()}:()=>{l()}})}),o.multiLine===void 0&&(o.multiLine=o.actions.length>1),Object.assign(o.meta,{class:`q-notification row items-stretch q-notification--${o.multiLine===!0?"multi-line":"standard"}`+(o.color!==void 0?` bg-${o.color}`:"")+(o.textColor!==void 0?` text-${o.textColor}`:"")+(o.classes!==void 0?` ${o.classes}`:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(o.multiLine===!0?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(o.multiLine===!0?"":" col"),leftClass:o.meta.hasText===!0?"additional":"single",attrs:B({role:"alert"},o.attrs)}),o.group===!1?(o.group=void 0,o.meta.group=void 0):((o.group===void 0||o.group===!0)&&(o.group=[o.message,o.caption,o.multiline].concat(o.actions.map(s=>`${s.label}*${s.icon}`)).join("|")),o.meta.group=o.group+"|"+o.position),o.actions.length===0?o.actions=void 0:o.meta.actionsClass="q-notification__actions row items-center "+(o.multiLine===!0?"justify-end":"col-auto")+(o.meta.hasMedia===!0?" q-notification__actions--with-media":""),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),o.meta.uid=n.notif.meta.uid;const s=or[o.position].value.indexOf(n.notif);or[o.position].value[s]=o}else{const s=Zs[o.meta.group];if(s===void 0){if(o.meta.uid=fq++,o.meta.badge=1,["left","right","center"].indexOf(o.position)!==-1)or[o.position].value.splice(Math.floor(or[o.position].value.length/2),0,o);else{const c=o.position.indexOf("top")>-1?"unshift":"push";or[o.position].value[c](o)}o.group!==void 0&&(Zs[o.meta.group]=o)}else{if(s.meta.timer&&(clearTimeout(s.meta.timer),s.meta.timer=void 0),o.badgePosition!==void 0){if(hq.includes(o.badgePosition)===!1)return Xa("wrong badgePosition",e)}else o.badgePosition=`top-${o.position.indexOf("left")>-1?"right":"left"}`;o.meta.uid=s.meta.uid,o.meta.badge=s.meta.badge+1,o.meta.badgeClass=`q-notification__badge q-notification__badge--${o.badgePosition}`+(o.badgeColor!==void 0?` bg-${o.badgeColor}`:"")+(o.badgeTextColor!==void 0?` text-${o.badgeTextColor}`:"")+(o.badgeClass?` ${o.badgeClass}`:"");const c=or[o.position].value.indexOf(s);or[o.position].value[c]=Zs[o.meta.group]=o}}const l=()=>{mq(o),r=void 0};if(o.timeout>0&&(o.meta.timer=setTimeout(()=>{o.meta.timer=void 0,l()},o.timeout+1e3)),o.group!==void 0)return s=>{s!==void 0?Xa("trying to update a grouped one which is forbidden",e):l()};if(r={dismiss:l,config:e,notif:o},n!==void 0){Object.assign(n,r);return}return s=>{if(r!==void 0)if(s===void 0)r.dismiss();else{const c=Object.assign({},r.config,s,{group:!1,position:o.position});c1(c,t,r)}}}function mq(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);const t=or[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete Zs[e.meta.group];const n=u1[""+e.meta.uid];if(n){const{width:r,height:o}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=r,n.style.height=o}or[e.position].value.splice(t,1),typeof e.onDismiss=="function"&&e.onDismiss()}}function Ug(e){return e!=null&&vq.test(e)!==!0}function Xa(e,t){return console.error(`Notify: ${e}`,t),!1}function gq(){return ge({name:"QNotifications",devtools:{hide:!0},setup(){return()=>v("div",{class:"q-notifications"},Xv.map(e=>v(ic,{key:e,class:s1[e],tag:"div",name:`q-notification--${e}`},()=>or[e].value.map(t=>{const n=t.meta,r=[];if(n.hasMedia===!0&&(t.spinner!==!1?r.push(v(t.spinner,{class:"q-notification__spinner q-notification__spinner--"+n.leftClass,color:t.spinnerColor,size:t.spinnerSize})):t.icon?r.push(v(st,{class:"q-notification__icon q-notification__icon--"+n.leftClass,name:t.icon,color:t.iconColor,size:t.iconSize,role:"img"})):t.avatar&&r.push(v(xT,{class:"q-notification__avatar q-notification__avatar--"+n.leftClass},()=>v("img",{src:t.avatar,"aria-hidden":"true"})))),n.hasText===!0){let i;const a={class:"q-notification__message col"};if(t.html===!0)a.innerHTML=t.caption?`
${t.message}
${t.caption}
`:t.message;else{const l=[t.message];i=t.caption?[v("div",l),v("div",{class:"q-notification__caption"},[t.caption])]:l}r.push(v("div",a,i))}const o=[v("div",{class:n.contentClass},r)];return t.progress===!0&&o.push(v("div",{key:`${n.uid}|p|${n.badge}`,class:n.progressClass,style:n.progressStyle})),t.actions!==void 0&&o.push(v("div",{class:n.actionsClass},t.actions.map(i=>v(vt,i)))),n.badge>1&&o.push(v("div",{key:`${n.uid}|${n.badge}`,class:t.meta.badgeClass,style:t.badgeStyle},[n.badge])),v("div",B({ref:i=>{u1[""+n.uid]=i},key:n.uid,class:n.class},n.attrs),[v("div",{class:n.wrapperClass},o)])}))))}})}var pq={setDefaults(e){tn(e)===!0&&Object.assign(Qs,e)},registerType(e,t){tn(t)===!0&&(ta[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=n=>c1(n,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),this.__installed!==!0){Xv.forEach(r=>{or[r]=U([]);const o=["left","center","right"].includes(r)===!0?"center":r.indexOf("top")>-1?"top":"bottom",i=r.indexOf("left")>-1?"start":r.indexOf("right")>-1?"end":"center",a=["left","right"].includes(r)?`items-${r==="left"?"start":"end"} justify-center`:r==="center"?"flex-center":`items-${i}`;s1[r]=`q-notifications__list q-notifications__list--${o} fixed column no-wrap ${a}`});const n=es("q-notify");uc(gq(),t).mount(n)}}};function yq(e){return af(e)===!0?"__q_date|"+e.toUTCString():aT(e)===!0?"__q_expr|"+e.source:typeof e=="number"?"__q_numb|"+e:typeof e=="boolean"?"__q_bool|"+(e?"1":"0"):typeof e=="string"?"__q_strn|"+e:typeof e=="function"?"__q_strn|"+e.toString():e===Object(e)?"__q_objt|"+JSON.stringify(e):e}function bq(e){if(e.length<9)return e;const n=e.substring(0,8),r=e.substring(9);switch(n){case"__q_date":return new Date(r);case"__q_expr":return new RegExp(r);case"__q_numb":return Number(r);case"__q_bool":return Boolean(r==="1");case"__q_strn":return""+r;case"__q_objt":return JSON.parse(r);default:return e}}function d1(){const e=()=>null;return{has:()=>!1,getLength:()=>0,getItem:e,getIndex:e,getKey:e,getAll:()=>{},getAllKeys:()=>[],set:Zt,remove:Zt,clear:Zt,isEmpty:()=>!0}}function f1(e){const t=window[e+"Storage"],n=r=>{const o=t.getItem(r);return o?bq(o):null};return{has:r=>t.getItem(r)!==null,getLength:()=>t.length,getItem:n,getIndex:r=>rr{let r;const o={},i=t.length;for(let a=0;a{const r=[],o=t.length;for(let i=0;i{t.setItem(r,yq(o))},remove:r=>{t.removeItem(r)},clear:()=>{t.clear()},isEmpty:()=>t.length===0}}const v1=Ze.has.webStorage===!1?d1():f1("local"),wq={install({$q:e}){e.localStorage=v1}};Object.assign(wq,v1);const h1=Ze.has.webStorage===!1?d1():f1("session"),_q={install({$q:e}){e.sessionStorage=h1}};Object.assign(_q,h1);const xq=["ok","hide"];Qw(xq);function O3(){return gt(sb)}function Sq(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const n=()=>{};Av(n),document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return t.remove(),pu(n),r}function A3(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,n)=>{const r=Sq(e);r?t(!0):n(r)})}const kq={version:"2.14.1",install:sT,lang:Rn,iconSet:cu};var Cq={isoName:"zh-CN",nativeName:"\u4E2D\u6587(\u7B80\u4F53)",label:{clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",cancel:"\u53D6\u6D88",close:"\u5173\u95ED",set:"\u8BBE\u7F6E",select:"\u9009\u62E9",reset:"\u91CD\u7F6E",remove:"\u79FB\u9664",update:"\u66F4\u65B0",create:"\u521B\u5EFA",search:"\u641C\u7D22",filter:"\u8FC7\u6EE4",refresh:"\u5237\u65B0",expand:e=>e?`\u5C55\u5F00"${e}"`:"\u6269\u5F20",collapse:e=>e?`\u6298\u53E0"${e}"`:"\u574D\u584C"},date:{days:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),daysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),headerTitle:e=>new Intl.DateTimeFormat("zh-CN",{weekday:"short",month:"short",day:"numeric"}).format(e),firstDayOfWeek:0,format24h:!1,pluralDay:"\u5929"},table:{noData:"\u6CA1\u6709\u53EF\u7528\u6570\u636E",noResults:"\u627E\u4E0D\u5230\u5339\u914D\u7684\u6570\u636E",loading:"\u6B63\u5728\u52A0\u8F7D...",selectedRecords:e=>"\u5DF2\u9009\u62E9"+e+"\u884C",recordsPerPage:"\u6BCF\u9875\u7684\u884C\u6570:",allRows:"\u5168\u90E8",pagination:(e,t,n)=>e+"-"+t+" / "+n,columns:"\u5217"},editor:{url:"URL",bold:"\u7C97\u4F53",italic:"\u659C\u4F53",strikethrough:"\u5220\u9664\u7EBF",underline:"\u4E0B\u5212\u7EBF",unorderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868",subscript:"\u4E0B\u6807",superscript:"\u4E0A\u6807",hyperlink:"\u8D85\u94FE\u63A5",toggleFullscreen:"\u5168\u5C4F\u5207\u6362",quote:"\u5F15\u53F7",left:"\u5DE6\u5BF9\u9F50",center:"\u5C45\u4E2D\u5BF9\u9F50",right:"\u53F3\u5BF9\u9F50",justify:"\u4E24\u7AEF\u5BF9\u9F50",print:"\u6253\u5370",outdent:"\u51CF\u5C11\u7F29\u8FDB",indent:"\u589E\u52A0\u7F29\u8FDB",removeFormat:"\u6E05\u9664\u6837\u5F0F",formatting:"\u683C\u5F0F\u5316",fontSize:"\u5B57\u4F53\u5927\u5C0F",align:"\u5BF9\u9F50",hr:"\u63D2\u5165\u6C34\u5E73\u7EBF",undo:"\u64A4\u6D88",redo:"\u91CD\u505A",heading1:"\u6807\u9898\u4E00",heading2:"\u6807\u9898\u4E8C",heading3:"\u6807\u9898\u4E09",heading4:"\u6807\u9898\u56DB",heading5:"\u6807\u9898\u4E94",heading6:"\u6807\u9898\u516D",paragraph:"\u6BB5\u843D",code:"\u4EE3\u7801",size1:"\u975E\u5E38\u5C0F",size2:"\u6BD4\u8F83\u5C0F",size3:"\u6B63\u5E38",size4:"\u4E2D\u7B49\u504F\u5927",size5:"\u5927",size6:"\u975E\u5E38\u5927",size7:"\u8D85\u7EA7\u5927",defaultFont:"\u9ED8\u8BA4\u5B57\u4F53",viewSource:"\u67E5\u770B\u8D44\u6599"},tree:{noNodes:"\u6CA1\u6709\u53EF\u7528\u8282\u70B9",noResults:"\u627E\u4E0D\u5230\u5339\u914D\u7684\u8282\u70B9"}};var Tq=Object.defineProperty,Eq=Object.defineProperties,$q=Object.getOwnPropertyDescriptors,Wg=Object.getOwnPropertySymbols,Pq=Object.prototype.hasOwnProperty,qq=Object.prototype.propertyIsEnumerable,sr=Math.pow,Kg=(e,t,n)=>t in e?Tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kr=(e,t)=>{for(var n in t||(t={}))Pq.call(t,n)&&Kg(e,n,t[n]);if(Wg)for(var n of Wg(t))qq.call(t,n)&&Kg(e,n,t[n]);return e},Gv=(e,t)=>Eq(e,$q(t));function Mq(){this.__data__=[],this.size=0}function is(e,t){return e===t||e!==e&&t!==t}function wc(e,t){for(var n=e.length;n--;)if(is(e[n][0],t))return n;return-1}var Oq=Array.prototype,Aq=Oq.splice;function Rq(e){var t=this.__data__,n=wc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Aq.call(t,n,1),--this.size,!0}function Iq(e){var t=this.__data__,n=wc(t,e);return n<0?void 0:t[n][1]}function Lq(e){return wc(this.__data__,e)>-1}function Bq(e,t){var n=this.__data__,r=wc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Jr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&H2?new Pu:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=$M}var PM="[object Arguments]",qM="[object Array]",MM="[object Boolean]",OM="[object Date]",AM="[object Error]",RM="[object Function]",IM="[object Map]",LM="[object Number]",BM="[object Object]",NM="[object RegExp]",FM="[object Set]",zM="[object String]",jM="[object WeakMap]",DM="[object ArrayBuffer]",VM="[object DataView]",HM="[object Float32Array]",UM="[object Float64Array]",WM="[object Int8Array]",KM="[object Int16Array]",QM="[object Int32Array]",ZM="[object Uint8Array]",YM="[object Uint8ClampedArray]",XM="[object Uint16Array]",GM="[object Uint32Array]",It={};It[HM]=It[UM]=It[WM]=It[KM]=It[QM]=It[ZM]=It[YM]=It[XM]=It[GM]=!0;It[PM]=It[qM]=It[DM]=It[MM]=It[VM]=It[OM]=It[AM]=It[RM]=It[IM]=It[LM]=It[BM]=It[NM]=It[FM]=It[zM]=It[jM]=!1;function JM(e){return No(e)&&th(e.length)&&!!It[Oi(e)]}function eO(e){return function(t){return e(t)}}var w1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cl=w1&&typeof module=="object"&&module&&!module.nodeType&&module,tO=Cl&&Cl.exports===w1,yd=tO&&m1.process,nO=function(){try{var e=Cl&&Cl.require&&Cl.require("util").types;return e||yd&&yd.binding&&yd.binding("util")}catch{}}(),tp=nO,np=tp&&tp.isTypedArray,rO=np?eO(np):JM,nh=rO,oO=Object.prototype,iO=oO.hasOwnProperty;function _1(e,t){var n=dr(e),r=!n&&Mu(e),o=!n&&!r&&Ou(e),i=!n&&!r&&!o&&nh(e),a=n||r||o||i,l=a?pM(e.length,String):[],s=l.length;for(var c in e)(t||iO.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||eh(c,s)))&&l.push(c);return l}var aO=Object.prototype;function rh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||aO;return e===n}function x1(e,t){return function(n){return e(t(n))}}var lO=x1(Object.keys,Object),sO=lO,uO=Object.prototype,cO=uO.hasOwnProperty;function dO(e){if(!rh(e))return sO(e);var t=[];for(var n in Object(e))cO.call(e,n)&&n!="constructor"&&t.push(n);return t}function xc(e){return e!=null&&th(e.length)&&!Jv(e)}function S1(e){return xc(e)?_1(e):dO(e)}function rp(e){return cM(e,S1,gM)}var fO=1,vO=Object.prototype,hO=vO.hasOwnProperty;function mO(e,t,n,r,o,i){var a=n&fO,l=rp(e),s=l.length,c=rp(t),u=c.length;if(s!=u&&!a)return!1;for(var d=s;d--;){var f=l[d];if(!(a?f in t:hO.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var _=!0;i.set(e,t),i.set(t,e);for(var b=a;++d{ci(l,i.value)||(i.value=l),ci(l,e[t])||n(`update:${t}`,l)};return de(()=>r(i.value),a),de(()=>e[t],l=>a(r(l))),i.value!==e[t]&&n(`update:${t}`,i.value),i}const o=U(e[t]);return de(()=>e[t],i=>{ci(i,o.value)||(o.value=i)}),de(o,i=>{ci(i,e[t])||n(`update:${t}`,i)}),o}function vp(e,t,n,r){const o=Kt(new Set);return de(()=>e[t],()=>{const a=e[t].filter(l=>l in n.value);ci(a,o)||(o.clear(),a.forEach(o.add,o))},{immediate:!0}),de(o,()=>{const i=Array.from(o);ci(e[t],i)||r(`update:${t}`,i)}),oa(o)}const k1=Symbol("containers");function qO(e){nn(k1,e)}function C1(){const e=on(gt(k1),"containers");return{container:e.container,svg:e.svg,viewport:e.viewport,svgPanZoom:e.svgPanZoom}}class it{static value(t,n){return t instanceof Function?t(n):t}static values(t,n){return Object.values(t).filter(r=>r instanceof Function).length===0?t:Object.fromEntries(Object.entries(t).map(([r,o])=>[r,o instanceof Function?o(n):o]))}}var ot;(function(e){e.CENTER="center",e.NORTH="north",e.NORTH_EAST="north-east",e.EAST="east",e.SOUTH_EAST="south-east",e.SOUTH="south",e.SOUTH_WEST="south-west",e.WEST="west",e.NORTH_WEST="north-west"})(ot||(ot={}));function hp(e){const t={};return Object.assign(t,e(t))}function nr(e){return Object.entries(e)}function bd(e,t){const n=new Set(Object.keys(e));nr(t).forEach(([r,o])=>{ci(e[r],o)||(e[r]=o),n.delete(r)}),n.forEach(r=>delete e[r])}function mp(e,t,n){const r=it.values(t.normal,e);return r.type=="circle"?{width:r.radius*2*n,height:r.radius*2*n}:{width:r.width*n,height:r.height*n}}function MO(e,t,n,r){const i=Math.abs(e.x-n.x)parseInt(r)*t).filter(r=>!isNaN(r)).join(" "):n=e*t,n&&n!=="0"?n:void 0}function oh(e){let t=0;if(e===void 0||e==="none")t=0;else if(typeof e=="string"){const n=e.split(/\s+/).map(r=>parseInt(r)).filter(r=>!isNaN(r));n.length%2===0?t=n.reduce((r,o)=>r+o,0):t=n.reduce((r,o)=>r+o,0)*2}else t=e*2;return t}class Ls{static valueOf(t){return Array.from(t.values())}}function Bs(...e){return e.find(t=>!!t)}function OO(e){return typeof btoa===void 0?Buffer.from(e).toString("base64").replaceAll("=",""):btoa(e).replaceAll("=","")}function AO(e,t,n){var r;const o=e.createSVGPoint();o.x=n.x,o.y=n.y;const i=o.matrixTransform((r=t.getCTM())==null?void 0:r.inverse());return{x:i.x,y:i.y}}function RO(e,t,n){const r=e.createSVGPoint();r.x=n.x,r.y=n.y;const o=r.matrixTransform(t.getCTM());return{x:o.x,y:o.y}}var IO=/\s/;function LO(e){for(var t=e.length;t--&&IO.test(e.charAt(t)););return t}var BO=/^\s+/;function NO(e){return e&&e.slice(0,LO(e)+1).replace(BO,"")}var FO="[object Symbol]";function as(e){return typeof e=="symbol"||No(e)&&Oi(e)==FO}var gp=0/0,zO=/^[-+]0x[0-9a-f]+$/i,jO=/^0b[01]+$/i,DO=/^0o[0-7]+$/i,VO=parseInt;function T1(e){if(typeof e=="number")return e;if(as(e))return gp;if(Er(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Er(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=NO(e);var n=jO.test(e);return n||DO.test(e)?VO(e.slice(2),n?2:8):zO.test(e)?gp:+e}var pp=1/0,HO=17976931348623157e292;function UO(e){if(!e)return e===0?e:0;if(e=T1(e),e===pp||e===-pp){var t=e<0?-1:1;return t*HO}return e===e?e:0}function E1(e){var t=UO(e),n=t%1;return t===t?n?t-n:t:0}function WO(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n{for(const[f,h]of Object.entries(d)){const m=this.getOrCreateNodePosition(n,f);this.setNodePosition(m,h)}},c=d=>{const f=d.filter(_=>!(_ in n)),h=l.getViewArea(),m=a.value;for(const _ of f){const b=r.value[_],x=mp(b,o.node,m),p=Kr({},h.center);for(;;){let w=!1;for(const[S,C]of Object.entries(n)){if(_===S)continue;const T=r.value[S];if(!T)continue;const O=mp(T,o.node,m);if(w=MO(p,x,C,O),w)break}if(w)p.x+=x.width+_p*m,p.x+x.width/2>h.box.right&&(p.x=h.center.x,p.y+=x.height+_p*m);else break}const y=this.getOrCreateNodePosition(n,_);this.setNodePosition(y,p)}};c(Object.keys(r.value));const u=de(()=>Object.keys(r.value),c);i.on("node:dragstart",s),i.on("node:pointermove",s),i.on("node:dragend",s),this.onDeactivate=()=>{u(),i.off("node:dragstart",s),i.off("node:pointermove",s),i.off("node:dragend",s)}}deactivate(){this.onDeactivate&&this.onDeactivate()}setNodePosition(t,n){t.value.x=wp(n.x,3),t.value.y=wp(n.y,3)}getOrCreateNodePosition(t,n){const r=So(t,n);return r.value||(r.value={x:0,y:0}),r}}var JO=function(){try{var e=Ri(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Au=JO;function ih(e,t,n){t=="__proto__"&&Au?Au(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function xf(e,t,n){(n!==void 0&&!is(e[t],n)||n===void 0&&!(t in e))&&ih(e,t,n)}function eA(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(n(i[s],s,i)===!1)break}return t}}var tA=eA(),nA=tA,P1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xp=P1&&typeof module=="object"&&module&&!module.nodeType&&module,rA=xp&&xp.exports===P1,Sp=rA?mr.Buffer:void 0,kp=Sp?Sp.allocUnsafe:void 0;function oA(e,t){if(t)return e.slice();var n=e.length,r=kp?kp(n):new e.constructor(n);return e.copy(r),r}function iA(e){var t=new e.constructor(e.byteLength);return new qu(t).set(new qu(e)),t}function aA(e,t){var n=t?iA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function lA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++t>=RA)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var NA=BA(AA),FA=NA;function zA(e,t){return FA(qA(e,t,ah),e+"")}function R1(e,t,n){if(!Er(n))return!1;var r=typeof t;return(r=="number"?xc(n)&&eh(t,n.length):r=="string"&&t in n)?is(n[t],e):!1}function jA(e){return zA(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&R1(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r({normal:{type:"circle",radius:16,width:32,height:32,borderRadius:4,color:"#4466cc",strokeWidth:0,strokeColor:"#000000",strokeDasharray:0},hover:{type:t=>it.value(e.normal.type,t),radius:t=>{var n;return((n=it.value(e.normal.radius,t))!=null?n:0)+2},width:t=>{var n;return((n=it.value(e.normal.width,t))!=null?n:0)+2},height:t=>{var n;return((n=it.value(e.normal.height,t))!=null?n:0)+2},borderRadius:t=>{var n;return(n=it.value(e.normal.borderRadius,t))!=null?n:0},strokeWidth:t=>it.value(e.normal.strokeWidth,t),strokeColor:t=>it.value(e.normal.strokeColor,t),strokeDasharray:t=>it.value(e.normal.strokeDasharray,t),color:"#3355bb"},selected:void 0,draggable:!0,selectable:!1,label:{visible:!0,fontFamily:void 0,fontSize:11,lineHeight:1.1,color:"#000000",background:void 0,margin:4,direction:ot.SOUTH,text:"name"},focusring:{visible:!0,width:4,padding:3,color:"#eebb00"},transition:void 0})),edge:hp(e=>({normal:{width:2,color:"#4466cc",dasharray:0,linecap:"butt",animate:!1,animationSpeed:50},hover:{width:t=>it.value(e.normal.width,t)+1,color:"#3355bb",dasharray:t=>it.value(e.normal.dasharray,t),linecap:t=>it.value(e.normal.linecap,t),animate:t=>it.value(e.normal.animate,t),animationSpeed:t=>it.value(e.normal.animationSpeed,t)},selected:{width:t=>it.value(e.normal.width,t)+1,color:"#dd8800",dasharray:t=>{const n=it.value(e.normal.width,t);return`${n*1.5} ${n*2}`},linecap:t=>it.value(e.normal.linecap,t),animate:t=>it.value(e.normal.animate,t),animationSpeed:t=>it.value(e.normal.animationSpeed,t)},selectable:!1,gap:3,type:"straight",marker:{source:{type:"none",width:5,height:5,margin:-1,units:"strokeWidth",color:null},target:{type:"none",width:5,height:5,margin:-1,units:"strokeWidth",color:null}},margin:null,summarize:(t,n)=>n.edge.type=="curve"?!1:null,summarized:{label:{fontSize:10,lineHeight:1,color:"#4466cc"},shape:{type:"rect",radius:6,width:12,height:12,borderRadius:3,color:"#ffffff",strokeWidth:1,strokeColor:"#4466cc",strokeDasharray:void 0},stroke:{width:5,color:"#4466cc",dasharray:void 0,linecap:void 0,animate:!1,animationSpeed:50}},keepOrder:"clock",label:{fontFamily:void 0,fontSize:11,lineHeight:1.1,color:"#000000",background:void 0,margin:4,padding:4}})),path:{visible:!1,clickable:!1,curveInNode:!1,end:"centerOfNode",margin:0,path:{width:6,color:e=>{const t=["#d5000088","#c5116288","#aa00ff88","#6200ea88","#304ffe88","#2962ff88","#0091ea88","#00b8d488","#00bfa588","#00c85388","#64dd1788","#aeea0088","#ffd60088","#ffab0088","#ff6d0088","#dd2c0088"],n=e.edges.map(r=>r.split("").reduce((o,i)=>(o=(o<<5)-o+i.charCodeAt(0),o&o),0)).reduce((r,o)=>r+o,0);return t[Math.abs(n)%t.length]},dasharray:void 0,linecap:"round",linejoin:"round",animate:!1,animationSpeed:50},transition:void 0}}}const I1=Symbol("style");function UA(e){const t=Kt(HA()),n=Object.keys(t);for(const r of n)de(()=>e.value[r],()=>{VA(t[r],e.value[r]||{})},{immediate:!0,deep:!0});return nn(I1,t),t}function Cc(e){return on(gt(I1),`Configs(${e})`)[e]}function WA(){return Cc("view")}function L1(){return Cc("node")}function Tc(){return Cc("edge")}function B1(){return Cc("path")}const Ru=Kt({}),Tl={},KA=Symbol("markers");function QA(){return nn(KA,Ru),Ru}function ZA(e,t,n){var r;return Gv(Kr({},e),{color:(r=e.color)!=null?r:n,isSource:t})}function YA(e){const t=OO(e.color);return`marker_${e.type}_${e.width}_${e.height}_${e.margin}_${t}_${e.isSource?"L":"R"}_${e.units==="strokeWidth"?"rel":"abs"}`}function XA(e,t){var n;const r=(n=Tl[e])!=null?n:0;Tl[e]=r+1,r||(Ru[e]=t)}function GA(e){var t;const n=(t=Tl[e])!=null?t:0;n&&(n-1===0?(delete Ru[e],delete Tl[e]):Tl[e]=n-1)}function El(e){e&&GA(e)}function Ep(e,t,n,r){if(e.type==="none"){El(n);return}if(e.type==="custom")return El(n),e.customId;const o=ZA(e,t,r),i=YA(o);return i===n||(El(n),XA(i,o)),i}function JA(e,t,n){const r=oa({edgeLayoutPoints:{},edgeGroups:{},summarizedEdges:{}});return Zn(()=>{const{edgeLayoutPoints:o,edgeGroups:i}=t5(n,e.value,t.value);bd(r.edgeLayoutPoints,o),bd(r.edgeGroups,i)}),Zn(()=>{const o={};for(const[i,{edges:a,groupWidth:l}]of Object.entries(r.edgeGroups)){let s=!1;if(l==0)s=!1;else if(n.edge.summarize instanceof Function){const c=n.edge.summarize(a,n);c===null?s=$p(e.value,a,n,l):s=c}else n.edge.summarize?s=$p(e.value,a,n,l):s=!1;r.edgeGroups[i].summarize=s,s&&Object.keys(a).forEach(c=>o[c]=!0)}bd(r.summarizedEdges,o)}),r}function e5(e,t,n,r,o,i){return e?t?Pp(e.edge,n,r,o,0,0,i):Pp(e.edge,n,r,o,e.groupWidth,e.pointInGroup,i):{x1:0,y1:0,x2:0,y2:0}}function t5(e,t,n){const r={},o={},i={};for(const[l,s]of Object.entries(n)){if(!(s.source in t&&s.target in t))continue;const c=[s.source,s.target].sort().join("<=>"),u=i[c]||{};u[l]=s,i[c]=u}const a=e.edge.gap instanceof Function?e.edge.gap:(l,s)=>e.edge.gap;for(const[l,s]of Object.entries(i)){const c=Object.keys(s).length;if(c==0)continue;const u=a(s,e),[d,f]=Object.entries(s)[0];if(c===1)r[d]={edge:f,pointInGroup:0,groupWidth:0},o[l]={edges:s,groupWidth:0,summarize:!1};else{let h=0;const m=Object.values(s).map(x=>it.value(e.edge.normal.width,x)/2),_=Object.entries(s).map(([x,p],y)=>(y>0&&(h+=m[y-1]+u+m[y]),[x,p,h])),b=h;_.forEach(([x,p,y])=>{r[x]={edge:p,pointInGroup:y,groupWidth:b}}),o[l]={edges:s,groupWidth:b,summarize:!1}}}return{edgeLayoutPoints:r,edgeGroups:o}}function $p(e,t,n,r){if(Object.entries(t).length===1)return!1;const i=Math.min(...Object.values(t).flatMap(a=>[e[a.source],e[a.target]]).filter(a=>a).map(a=>{const l=it.values(n.node.normal,a);return l.type==="circle"?l.radius*2:Math.min(l.width,l.height)}));return r>i}function Pp(e,t,n,r,o,i,a){var l,s,c,u,d,f,h,m;let _,b,x,p;return e.source=f)&&(u*=-1)}else l==="horizontal"&&d<0&&(u*=-1)}if(s===0){const d=c<0?-1:1;return[e+u*d,t,n+u*d,r]}else if(c===0){const d=s<0?1:-1;return[e,t+u*d,n,r+u*d]}else{const d=c/s,f=-1/d;c<0&&(u=-u);const h=u/Math.sqrt(1+Math.pow(f,2));return[e+h,t+h*f,n+h,r+h*f]}}var Iu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},N1={exports:{}};(function(e,t){e.exports=n;function n(l,s){if(!(this instanceof n))return new n(l,s);this.x=l||0,this.y=s||0}n.fromArray=function(l){return new n(l[0]||0,l[1]||0)},n.fromObject=function(l){return new n(l.x||0,l.y||0)},n.prototype.addX=function(l){return this.x+=l.x,this},n.prototype.addY=function(l){return this.y+=l.y,this},n.prototype.add=function(l){return this.x+=l.x,this.y+=l.y,this},n.prototype.addScalar=function(l){return this.x+=l,this.y+=l,this},n.prototype.addScalarX=function(l){return this.x+=l,this},n.prototype.addScalarY=function(l){return this.y+=l,this},n.prototype.subtractX=function(l){return this.x-=l.x,this},n.prototype.subtractY=function(l){return this.y-=l.y,this},n.prototype.subtract=function(l){return this.x-=l.x,this.y-=l.y,this},n.prototype.subtractScalar=function(l){return this.x-=l,this.y-=l,this},n.prototype.subtractScalarX=function(l){return this.x-=l,this},n.prototype.subtractScalarY=function(l){return this.y-=l,this},n.prototype.divideX=function(l){return this.x/=l.x,this},n.prototype.divideY=function(l){return this.y/=l.y,this},n.prototype.divide=function(l){return this.x/=l.x,this.y/=l.y,this},n.prototype.divideScalar=function(l){return l!==0?(this.x/=l,this.y/=l):(this.x=0,this.y=0),this},n.prototype.divideScalarX=function(l){return l!==0?this.x/=l:this.x=0,this},n.prototype.divideScalarY=function(l){return l!==0?this.y/=l:this.y=0,this},n.prototype.invertX=function(){return this.x*=-1,this},n.prototype.invertY=function(){return this.y*=-1,this},n.prototype.invert=function(){return this.invertX(),this.invertY(),this},n.prototype.multiplyX=function(l){return this.x*=l.x,this},n.prototype.multiplyY=function(l){return this.y*=l.y,this},n.prototype.multiply=function(l){return this.x*=l.x,this.y*=l.y,this},n.prototype.multiplyScalar=function(l){return this.x*=l,this.y*=l,this},n.prototype.multiplyScalarX=function(l){return this.x*=l,this},n.prototype.multiplyScalarY=function(l){return this.y*=l,this},n.prototype.normalize=function(){var l=this.length();return l===0?(this.x=1,this.y=0):this.divide(n(l,l)),this},n.prototype.norm=n.prototype.normalize,n.prototype.limit=function(l,s){return Math.abs(this.x)>l&&(this.x*=s),Math.abs(this.y)>l&&(this.y*=s),this},n.prototype.randomize=function(l,s){return this.randomizeX(l,s),this.randomizeY(l,s),this},n.prototype.randomizeX=function(l,s){var c=Math.min(l.x,s.x),u=Math.max(l.x,s.x);return this.x=o(c,u),this},n.prototype.randomizeY=function(l,s){var c=Math.min(l.y,s.y),u=Math.max(l.y,s.y);return this.y=o(c,u),this},n.prototype.randomizeAny=function(l,s){return Math.round(Math.random())?this.randomizeX(l,s):this.randomizeY(l,s),this},n.prototype.unfloat=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},n.prototype.toFixed=function(l){return typeof l=="undefined"&&(l=8),this.x=this.x.toFixed(l),this.y=this.y.toFixed(l),this},n.prototype.mixX=function(l,s){return typeof s=="undefined"&&(s=.5),this.x=(1-s)*this.x+s*l.x,this},n.prototype.mixY=function(l,s){return typeof s=="undefined"&&(s=.5),this.y=(1-s)*this.y+s*l.y,this},n.prototype.mix=function(l,s){return this.mixX(l,s),this.mixY(l,s),this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.copyX=function(l){return this.x=l.x,this},n.prototype.copyY=function(l){return this.y=l.y,this},n.prototype.copy=function(l){return this.copyX(l),this.copyY(l),this},n.prototype.zero=function(){return this.x=this.y=0,this},n.prototype.dot=function(l){return this.x*l.x+this.y*l.y},n.prototype.cross=function(l){return this.x*l.y-this.y*l.x},n.prototype.projectOnto=function(l){var s=(this.x*l.x+this.y*l.y)/(l.x*l.x+l.y*l.y);return this.x=s*l.x,this.y=s*l.y,this},n.prototype.horizontalAngle=function(){return Math.atan2(this.y,this.x)},n.prototype.horizontalAngleDeg=function(){return i(this.horizontalAngle())},n.prototype.verticalAngle=function(){return Math.atan2(this.x,this.y)},n.prototype.verticalAngleDeg=function(){return i(this.verticalAngle())},n.prototype.angle=n.prototype.horizontalAngle,n.prototype.angleDeg=n.prototype.horizontalAngleDeg,n.prototype.direction=n.prototype.horizontalAngle,n.prototype.rotate=function(l){var s=this.x*Math.cos(l)-this.y*Math.sin(l),c=this.x*Math.sin(l)+this.y*Math.cos(l);return this.x=s,this.y=c,this},n.prototype.rotateDeg=function(l){return l=a(l),this.rotate(l)},n.prototype.rotateTo=function(l){return this.rotate(l-this.angle())},n.prototype.rotateToDeg=function(l){return l=a(l),this.rotateTo(l)},n.prototype.rotateBy=function(l){var s=this.angle()+l;return this.rotate(s)},n.prototype.rotateByDeg=function(l){return l=a(l),this.rotateBy(l)},n.prototype.distanceX=function(l){return this.x-l.x},n.prototype.absDistanceX=function(l){return Math.abs(this.distanceX(l))},n.prototype.distanceY=function(l){return this.y-l.y},n.prototype.absDistanceY=function(l){return Math.abs(this.distanceY(l))},n.prototype.distance=function(l){return Math.sqrt(this.distanceSq(l))},n.prototype.distanceSq=function(l){var s=this.distanceX(l),c=this.distanceY(l);return s*s+c*c},n.prototype.length=function(){return Math.sqrt(this.lengthSq())},n.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y},n.prototype.magnitude=n.prototype.length,n.prototype.isZero=function(){return this.x===0&&this.y===0},n.prototype.isEqualTo=function(l){return this.x===l.x&&this.y===l.y},n.prototype.toString=function(){return"x:"+this.x+", y:"+this.y},n.prototype.toArray=function(){return[this.x,this.y]},n.prototype.toObject=function(){return{x:this.x,y:this.y}};var r=180/Math.PI;function o(l,s){return Math.floor(Math.random()*(s-l+1)+l)}function i(l){return l*r}function a(l){return l/r}})(N1);var lt=N1.exports;function Vl(e){const t=lt.fromArray([e.x1,e.y1]),n=lt.fromArray([e.x2,e.y2]);return{source:t,target:n,v:Ea(t,n)}}function Lu(e,t){const n=lt.fromObject(e),r=lt.fromObject(t);return{source:n,target:r,v:Ea(n,r)}}function Wn(e,t){return{source:e,target:t,v:Ea(e,t)}}function Ea(e,t){return t.clone().subtract(e)}function n5(e){return[lt.fromArray([e.x1,e.y1]),lt.fromArray([e.x2,e.y2])]}function r5(e){return lt.fromArray([(e.x1+e.x2)/2,(e.y1+e.y2)/2])}function lh(e,t){const n=t.v.clone().normalize(),r=t.source,o=e.clone().subtract(r),i=n.dot(o);return r.clone().add(n.multiplyScalar(i))}function wd(e,t,n,r){if(!(t.clone().subtract(n).lengthSq()-r*r<=Math.pow(1,-10)))return null;const l=Wn(e,t),s=lh(n,l),u=s.clone().subtract(n).length();if(rr;return e.clone().add(O.multiplyScalar(L?t:-t))}const d=t,f=r,h=(sr(s,2)+sr(d,2)-sr(f,2))/(2*s*d),m=d*h,_=Math.sqrt(sr(d,2)-sr(m,2)),b=l.clone().normalize(),x=lt.fromArray([-b.y,b.x]),p=b.clone().multiplyScalar(m),y=x.clone().multiplyScalar(_),w=e.clone().add(p).add(y),S=e.clone().add(p).subtract(y),C=ir(w,o),T=ir(S,o);return Clh(m,i)),h=(o=R5(f,m=>Ea(i.source,m).lengthSq()))!=null?o:i.target;return Ea(h,i.target).length()}function Ap(e,t,n,r,o){const i=Vl(e),a=i.v.clone().normalize(),l=r===0?i.source:i.source.clone().add(a.clone().multiplyScalar(r*o)),s=r===0?i.target:i.target.clone().subtract(a.clone().multiplyScalar(r*o)),c=(t.width/2+n)*o,u=lt.fromArray([-a.y,a.x]).multiplyScalar(c);let d=l.clone().subtract(u).toObject(),f=l.clone().add(u).toObject(),h=s.clone().subtract(u).toObject(),m=s.clone().add(u).toObject();const _=i.v.angleDeg();return(_<-90||_>=90)&&([d,f]=[f,d],[h,m]=[m,h]),{source:{above:d,below:f},target:{above:h,below:m}}}function I5(e,t,n,r){let o;n.type==="circle"?o=n.radius:o=Op(t,e,n,1);let i;return r.type==="circle"?i=r.radius:i=Op(e,t,r,1),[o,i]}function Cf(e,t,n){const r=Vl(e);return L5(r,t,n)}function L5(e,t,n){const r=e.v.clone().normalize();e.v.angle();const o=e.source.clone().add(r.clone().multiplyScalar(t)),i=e.target.clone().subtract(r.clone().multiplyScalar(n));let[a,l]=o.toArray(),[s,c]=i.toArray();const u=Ea(o,i);if(e.v.angle()*u.angle()<0){const d=lt.fromArray([(a+s)/2,(l+c)/2]),f=d.clone().add(r.multiplyScalar(.5));[a,l]=d.toArray(),[s,c]=f.toArray()}return{x1:a,y1:l,x2:s,y2:c}}function ga(e,t,n){const{x:r,y:o}=e,i=r-t.x,a=o-t.y;return{x:i*Math.cos(n)-a*Math.sin(n)+t.x,y:i*Math.sin(n)+a*Math.cos(n)+t.y}}function Tf(e){return e>0?-(Math.PI*2-e):Math.PI*2+e}function B5(e){return{x1:e.x2,y1:e.y2,x2:e.x1,y2:e.y1}}function Ef(e,t,n,r){const o=[],i=Wn(t,e),a=Wn(t,n);let l=ma(i,a);r*l<0&&(l=Tf(l));const s=lt.fromObject(ga(e,t,-l/2)),c=Wn(t,s),u=Ja(c),d=ma(i,c);let f=Ja(i);if(Math.abs(d){Rp(c,e,m,n.has(m),!1,a.node)}),de(()=>[...n],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=c[p];y&&!y.selected&&(y.selected=!0)}),x.forEach(p=>{const y=c[p];y&&y.selected&&(y.selected=!1)})}),de(()=>[...o],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=c[p];y&&!y.hovered&&(y.hovered=!0)}),x.forEach(p=>{const y=c[p];y&&y.hovered&&(y.hovered=!1)})}),de(()=>new Set(Object.keys(e.value)),(m,_)=>{for(const x of m)_.has(x)||Rp(c,e,x,!1,!1,a.node);const b=l.nodes;for(const x of _)m.has(x)||(delete b[x],n.delete(x),o.delete(x),delete c[x])});const f=JA(e,t,a);Object.keys(t.value).forEach(m=>{Lp(u,f,c,t,m,r.has(m),a.edge,l.nodes,s)}),de(f.edgeGroups,m=>V5(d,f,a),{immediate:!0}),de(()=>[...r],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=u[p];y&&!y.selected&&(y.selected=!0)}),x.forEach(p=>{const y=u[p];y&&y.selected&&(y.selected=!1)})}),de(()=>[...i],(m,_)=>{const b=m.filter(p=>!_.includes(p)),x=_.filter(p=>!m.includes(p));b.forEach(p=>{const y=u[p];y&&!y.hovered&&(y.hovered=!0)}),x.forEach(p=>{const y=u[p];y&&y.hovered&&(y.hovered=!1)})}),de(()=>new Set(Object.keys(t.value)),(m,_)=>{for(const b of m)_.has(b)||Lp(u,f,c,t,b,!1,a.edge,l.nodes,s);for(const b of _)m.has(b)||(r.delete(b),i.delete(b),u[b].stopWatchHandle(),delete u[b])});const h={nodeStates:c,edgeStates:u,edgeGroupStates:f,summarizedEdgeStates:d,layouts:l};return nn(V1,h),h}function ls(){return on(gt(V1),"states")}function z5(e,t,n,r){return n&&r.hover?it.values(r.hover,e):H1(e,t,r)}function H1(e,t,n){return t&&n.selected?it.values(n.selected,e):it.values(n.normal,e)}function j5(e,t,n,r){return t?it.values(r.selected,e):n&&r.hover?it.values(r.hover,e):it.values(r.normal,e)}function Rp(e,t,n,r,o,i){e[n]={selected:r,hovered:o};const a=e[n];a.shape=g(()=>t.value[n]?z5(t.value[n],a.selected,a.hovered,i):be(a.shape)),a.staticShape=g(()=>t.value[n]?H1(t.value[n],a.selected,i):be(a.staticShape)),a.label=g(()=>t.value[n]?it.values(i.label,t.value[n]):be(a.label)),a.labelText=g(()=>{var l,s;return i.label.text instanceof Function?be(a.label).text:t.value[n]?(s=(l=t.value[n])==null?void 0:l[be(a.label).text])!=null?s:"":be(a.labelText)}),a.draggable=g(()=>t.value[n]?it.value(i.draggable,t.value[n]):be(a.draggable)),a.selectable=g(()=>t.value[n]?it.value(i.selectable,t.value[n]):be(a.selectable))}function Ip(e){return e.type==="none"?N5:e}function Lp(e,t,n,r,o,i,a,l,s){if(!r.value[o])return;e[o]={line:void 0,selectable:!1,selected:i,hovered:!1,curve:void 0,origin:{x1:0,y1:0,x2:0,y2:0},labelPosition:{x1:0,y1:0,x2:0,y2:0},position:{x1:0,y1:0,x2:0,y2:0},stopWatchHandle:()=>{}};const u=e[o],d=g(()=>{const b=r.value[o],x=j5(b,u.selected,u.hovered,a),p=it.value(a.normal.width,b),y=Ip(it.values(a.marker.source,[b,x])),w=Ip(it.values(a.marker.target,[b,x]));return{stroke:x,normalWidth:p,source:y,target:w}});u.line=d,u.selectable=g(()=>it.value(a.selectable,r.value[o]));const f=So(t.edgeLayoutPoints,o),h=So(t.summarizedEdges,o),m=Zn(()=>{var b,x;const p=r.value[o];if(!p)return;const y=l[p==null?void 0:p.source],w=l[p==null?void 0:p.target],S=(b=n[p==null?void 0:p.source])==null?void 0:b.staticShape,C=(x=n[p==null?void 0:p.target])==null?void 0:x.staticShape;if(!y||!w||!S||!C)return;const T=e5(f.value,h.value,y,w,s.value,a.keepOrder),[O,L]=I5(y,w,S,C),R=s.value;u.labelPosition=Cf(T,O*R,L*R);let z=0,$=0;const E=d.value;if(E.source.type!=="none"){const Q=E.source;z=Q.margin+Q.width,Q.units==="strokeWidth"&&(z*=E.normalWidth)}if(E.target.type!=="none"){const Q=E.target;$=Q.margin+Q.width,Q.units==="strokeWidth"&&($*=E.normalWidth)}if(a.margin===null||a.margin===void 0?(E.source.type!=="none"||E.target.type!=="none")&&(z+=O,$+=L):(z+=a.margin+O,$+=a.margin+L),a.type==="straight")u.origin=T,u.curve=void 0,z===0&&$===0?u.position=u.origin:u.position=Cf(u.origin,z*R,$*R);else{u.origin=kf(y,w);const Q=f.value.groupWidth/2-f.value.pointInGroup,[J,I]=D5(u.origin,T,Q,z*R,$*R);u.position=J,u.curve=I}}),_=Zn(()=>{!r.value[o]||(u.sourceMarkerId=Ep(d.value.source,!0,u.sourceMarkerId,d.value.stroke.color),u.targetMarkerId=Ep(d.value.target,!1,u.targetMarkerId,d.value.stroke.color))});e[o].stopWatchHandle=()=>{m(),_(),El(u.sourceMarkerId),El(u.targetMarkerId)}}function D5(e,t,n,r,o){const i=Vl(e),a=Vl(t),l=r5(t),[s,c]=i5(i.source,i.target,l);let u,d;if(n===0)return r===0&&o===0?u=e:u=Cf(e,r,o),[u,d];const f=Wn(s,l),h=ma(Wn(s,i.source),f);if(r===0&&o===0)u=e;else{let x=r/c,p=o/c;h>0&&(x*=-1,p*=-1),u=kf(ga(i.source,s,x),ga(i.target,s,-p));let y=ma(Wn(s,i.source),Wn(s,i.target)),w=ma(Lu(s,{x:u.x1,y:u.y1}),Lu(s,{x:u.x2,y:u.y2}));if(h*y<0&&(y=Tf(y),h*w<0&&(w=Tf(w))),y*w<0){const S=l.clone().add(a.v.normalize().multiplyScalar(.5));return u=kf(l,S),[u,d]}}const[m,_]=n5(u),b=Ef(m,s,_,h).map(x=>x.toObject());return d={center:l,theta:h,circle:{center:s,radius:c},control:b},[u,d]}function V5(e,t,n){const r=t.edgeGroups;Object.entries(r).filter(([o,i])=>i.summarize&&!(o in e)).forEach(([o,i])=>{const a={stroke:void 0};a.stroke=g(()=>it.values(n.edge.summarized.stroke,i.edges)),e[o]=a}),Object.keys(e).forEach(o=>{var i;(i=t.edgeGroups[o])!=null&&i.summarize||delete e[o]})}const U1=Symbol("mouseEventHandlers"),el=3;function _d(e,t){var n;const r=(n=e[t])!=null?n:{x:0,y:0};return Kr({},r)}function tr(e,t){return e instanceof Array?{edges:e,event:t,summarized:!0}:{edge:e,edges:[e],event:t,summarized:!1}}function H5(e,t,n,r,o,i,a,l,s,c){_t(()=>{var N,q;(N=e.value)==null||N.addEventListener("pointerdown",m,{passive:!0}),(q=e.value)==null||q.addEventListener("contextmenu",x,{passive:!1})}),$r(()=>{var N,q;(N=e.value)==null||N.removeEventListener("pointerdown",m),(q=e.value)==null||q.removeEventListener("contextmenu",x)});const u={container:{moveCounter:0,pointerCounter:0},nodePointers:new Map,follow:{followedPointerId:-1,nodeBasePositions:{}},hoveredNodes:l,hoveredNodesPre:new Set,hoveredEdges:s,edgePointers:new Map,edgePointerPeekCount:0},d={pointermove:_,pointerup:b,pointercancel:b},f={pointermove:S,pointerup:T,pointercancel:C},h={pointerup:E,pointercancel:F};function m(N){u.container.moveCounter=0,u.container.pointerCounter===0&&nr(d).forEach(([q,M])=>{var D;(D=e.value)==null||D.addEventListener(q,M,{passive:!0})}),u.container.pointerCounter++}function _(N){u.container.moveCounter++}function b(N){if(u.container.pointerCounter--,u.container.pointerCounter===0&&(nr(d).forEach(([q,M])=>{var D;(D=e.value)==null||D.removeEventListener(q,M)}),u.container.moveCounter<=el)){if(N.shiftKey&&(i.size>0||a.size>0))return;i.clear(),a.clear(),c.emit("view:click",{event:N})}}function x(N){c.emit("view:contextmenu",{event:N}),u.container.pointerCounter>0&&(u.container.pointerCounter=0,nr(d).forEach(([q,M])=>{var D;(D=e.value)==null||D.removeEventListener(q,M)}))}function p(N){const q=u.follow.followedPointerId===N.pointerId,M=i.has(N.nodeId),D=!(N.pointerId in u.nodePointers);if(q&&D||q&&!M){const j=Ls.valueOf(u.nodePointers).find(k=>i.has(k.nodeId));if(!j){u.follow={followedPointerId:-1,nodeBasePositions:{}};return}N=j,u.follow.followedPointerId=N.pointerId}else{const j=u.nodePointers.get(u.follow.followedPointerId);if(!j){u.follow={followedPointerId:-1,nodeBasePositions:{}};return}N=j}if(q||M){const j=Ls.valueOf(u.nodePointers).map(k=>k.nodeId);u.follow.nodeBasePositions=Object.fromEntries(Array.from(i).filter(k=>!j.includes(k)).filter(k=>{var Z;return(Z=r[k])==null?void 0:Z.draggable}).map(k=>[k,_d(t,k)])),N.dragBasePosition=Kr({},N.latestPosition),N.nodeBasePosition=_d(t,N.nodeId)}}de(i,()=>{const N=u.nodePointers.get(u.follow.followedPointerId);N&&p(N)});function y(N,q){const M=N.dragBasePosition.x-q.pageX,D=N.dragBasePosition.y-q.pageY,j=u.follow.followedPointerId==N.pointerId?Kr({[N.nodeId]:N.nodeBasePosition},u.follow.nodeBasePositions):{[N.nodeId]:N.nodeBasePosition},k=n.value;return Object.fromEntries(Object.entries(j).map(([Z,oe])=>[Z,{x:oe.x-M/k,y:oe.y-D/k}]))}function w(N,q){var M,D;if(q.shiftKey&&a.size>0)return;a.clear();const j=(D=(M=r[N])==null?void 0:M.selectable)!=null?D:!1;if(j){const k=Ls.valueOf(u.nodePointers).filter(Z=>Z.pointerId!=q.pointerId&&i.has(Z.nodeId)).length>0;q.shiftKey||k?i.has(N)?i.delete(N):typeof j=="number"&&i.size>=j||i.add(N):i.has(N)||(i.clear(),i.add(N))}c.emit("node:click",{node:N,event:q})}function S(N){var q;N.preventDefault(),N.stopPropagation();const M=u.nodePointers.get(N.pointerId);if(!M||(M.latestPosition={x:N.pageX,y:N.pageY},M.moveCounter++,M.moveCounter<=el)||!((q=r[M.nodeId])!=null&&q.draggable))return;if(M.moveCounter===el+1){const j=y(M,{pointerId:M.pointerId,pageX:M.dragBasePosition.x,pageY:M.dragBasePosition.y});c.emit("node:dragstart",j)}const D=y(M,N);c.emit("node:pointermove",D)}function C(N){N.preventDefault(),N.stopPropagation();let q=u.nodePointers.get(N.pointerId);if(!!q){for(q of u.nodePointers.values()){const M=q.nodeId;if(q.moveCounter>el){const j=y(q,{pointerId:q.pointerId,pageX:q.latestPosition.x,pageY:q.latestPosition.y});c.emit("node:dragend",j)}c.emit("node:pointerup",{node:M,event:N})}u.nodePointers.clear(),u.follow={followedPointerId:-1,nodeBasePositions:{}},nr(f).forEach(([M,D])=>{document.removeEventListener(M,D)}),c.emit("view:mode","default")}}function T(N){var q;N.preventDefault(),N.stopPropagation();const M=u.nodePointers.get(N.pointerId);if(!M)return;u.nodePointers.delete(N.pointerId);const D=M.nodeId;if(M.moveCounter>el){if((q=r[M.nodeId])!=null&&q.draggable){const k=y(M,N);c.emit("node:dragend",k),c.emit("node:pointerup",{node:D,event:N})}}else c.emit("node:pointerup",{node:D,event:N}),w(D,N);u.nodePointers.size==0?(u.follow={followedPointerId:-1,nodeBasePositions:{}},nr(f).forEach(([k,Z])=>{document.removeEventListener(k,Z)}),c.emit("view:mode","default")):p(M),u.hoveredNodes.clear(),u.hoveredNodesPre.forEach(u.hoveredNodes.add,u.hoveredNodes)}function O(N,q){if(q.button==2||(q.preventDefault(),q.stopPropagation(),u.edgePointers.size!==0))return;u.nodePointers.size==0&&(c.emit("view:mode","node"),nr(f).forEach(([D,j])=>{document.addEventListener(D,j)}));const M={pointerId:q.pointerId,nodeId:N,moveCounter:0,nodeBasePosition:_d(t,N),dragBasePosition:{x:q.pageX,y:q.pageY},latestPosition:{x:q.pageX,y:q.pageY}};u.nodePointers.set(q.pointerId,M),i.has(N)&&(u.follow.followedPointerId<0?(u.follow.followedPointerId=q.pointerId,p(M)):delete u.follow.nodeBasePositions[M.nodeId]),c.emit("node:pointerdown",{node:N,event:q})}function L(N,q){u.hoveredNodesPre.add(N),!(u.nodePointers.size>0)&&(u.hoveredNodes.add(N),c.emit("node:pointerover",{node:N,event:q}))}function R(N,q){u.hoveredNodesPre.delete(N),!(u.nodePointers.size>0)&&(u.hoveredNodes.delete(N),c.emit("node:pointerout",{node:N,event:q}))}function z(N,q){c.emit("node:contextmenu",{node:N,event:q})}function $(N,q){if(q.button==2||(q.preventDefault(),q.stopPropagation(),u.nodePointers.size!==0))return;u.edgePointers.size==0&&(c.emit("view:mode","edge"),nr(h).forEach(([D,j])=>{document.addEventListener(D,j)}),u.edgePointerPeekCount=0),u.edgePointerPeekCount++;const M={pointerId:q.pointerId,edgeId:N};u.edgePointers.set(q.pointerId,M),c.emit("edge:pointerdown",tr(N,q))}function E(N){N.preventDefault(),N.stopPropagation();const q=u.edgePointers.get(N.pointerId);if(!q)return;u.edgePointers.delete(N.pointerId);const M=q.edgeId;c.emit("edge:pointerup",tr(M,N)),(u.edgePointers.size>0||u.edgePointerPeekCount===1)&&Q(M,N),u.edgePointers.size===0&&(u.edgePointerPeekCount=0,nr(h).forEach(([D,j])=>{document.removeEventListener(D,j)}),c.emit("view:mode","default"))}function F(N){if(N.preventDefault(),N.stopPropagation(),!!u.edgePointers.get(N.pointerId)){for(const M of u.edgePointers.values()){const D=M.edgeId;c.emit("edge:pointerup",tr(D,N))}u.edgePointers.clear(),u.edgePointerPeekCount=0,nr(h).forEach(([M,D])=>{document.removeEventListener(M,D)}),c.emit("view:mode","default")}}function Q(N,q){var M;if(q.shiftKey&&i.size>0)return;i.clear();const D=N instanceof Array?N:[N],j=Ls.valueOf(u.edgePointers).filter(k=>{const Z=k.edgeId instanceof Array?k.edgeId:[k.edgeId];return k.pointerId!=q.pointerId&&Z.every(oe=>a.has(oe))}).length>0;if(N instanceof Array)D.find(Z=>{var oe;return(oe=o[Z])==null?void 0:oe.selectable})&&(q.shiftKey||j?D.some(Z=>a.has(Z))?D.forEach(Z=>a.delete(Z)):D.forEach(Z=>{var oe;const ce=(oe=o[Z])==null?void 0:oe.selectable;typeof ce=="number"&&a.size>=ce||a.add(Z)}):(a.clear(),D.forEach(Z=>a.add(Z))));else{const k=(M=o[N])==null?void 0:M.selectable;k&&(q.shiftKey||j?a.has(N)?a.delete(N):typeof k=="number"&&a.size>=k||a.add(N):(a.clear(),a.add(N)))}c.emit("edge:click",tr(N,q))}function J(N,q){u.hoveredEdges.add(N),c.emit("edge:pointerover",tr(N,q))}function I(N,q){u.hoveredEdges.delete(N),c.emit("edge:pointerout",tr(N,q))}function W(N,q){c.emit("edge:contextmenu",tr(N,q))}function ae(N,q){if(q.button==2||(q.preventDefault(),q.stopPropagation(),u.nodePointers.size!==0))return;u.edgePointers.size==0&&(c.emit("view:mode","edge"),nr(h).forEach(([D,j])=>{document.addEventListener(D,j)}),u.edgePointerPeekCount=0),u.edgePointerPeekCount++;const M={pointerId:q.pointerId,edgeId:N};u.edgePointers.set(q.pointerId,M),c.emit("edge:pointerdown",tr(N,q))}function _e(N,q){N.forEach(M=>u.hoveredEdges.add(M)),c.emit("edge:pointerover",tr(N,q))}function Y(N,q){N.forEach(M=>u.hoveredEdges.delete(M)),c.emit("edge:pointerout",tr(N,q))}function A(N,q){c.emit("edge:contextmenu",tr(N,q))}const G={selectedNodes:i,hoveredNodes:l,selectedEdges:a,hoveredEdges:s,handleNodePointerDownEvent:O,handleNodePointerOverEvent:L,handleNodePointerOutEvent:R,handleNodeContextMenu:z,handleEdgePointerDownEvent:$,handleEdgePointerOverEvent:J,handleEdgePointerOutEvent:I,handleEdgeContextMenu:W,handleEdgesPointerDownEvent:ae,handleEdgesPointerOverEvent:_e,handleEdgesPointerOutEvent:Y,handleEdgesContextMenu:A};return nn(U1,G),G}function ch(){return on(gt(U1),"mouseEventHandlers")}function U5(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const W1=Symbol("emitter");function W5(){const e=U5();return nn(W1,e),e}function K1(){return{emitter:on(gt(W1),"event emitter")}}var $c={getGlobalThis:function(){if(typeof globalThis!="undefined")return globalThis;if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof Iu!="undefined")return Iu;if(typeof this!="undefined")return this;throw new Error("Unable to locate global `this`")},extend:function(e,t){e=e||{};for(var n in t)this.isObject(t[n])?e[n]=this.extend(e[n],t[n]):e[n]=t[n];return e},isElement:function(e){return e instanceof HTMLElement||e instanceof SVGElement||e instanceof SVGSVGElement||e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},isObject:function(e){return Object.prototype.toString.call(e)==="[object Object]"},isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},getSvg:function(e){var t,n;if(this.isElement(e))t=e;else if(typeof e=="string"||e instanceof String){if(t=document.querySelector(e),!t)throw new Error("Provided selector did not find any elements. Selector: "+e)}else throw new Error("Provided selector is not an HTML object nor String");if(t.tagName.toLowerCase()==="svg")n=t;else if(t.tagName.toLowerCase()==="object")n=t.contentDocument.documentElement;else if(t.tagName.toLowerCase()==="embed")n=t.getSVGDocument().documentElement;else throw t.tagName.toLowerCase()==="img"?new Error('Cannot script an SVG in an "img" element. Please use an "object" element or an in-line SVG.'):new Error("Cannot get SVG.");return n},proxy:function(e,t){return function(){return e.apply(t,arguments)}},getType:function(e){return Object.prototype.toString.apply(e).replace(/^\[object\s/,"").replace(/\]$/,"")},mouseAndTouchNormalize:function(e,t){if(e.clientX===void 0||e.clientX===null)if(e.clientX=0,e.clientY=0,e.touches!==void 0&&e.touches.length){if(e.touches[0].clientX!==void 0)e.clientX=e.touches[0].clientX,e.clientY=e.touches[0].clientY;else if(e.touches[0].pageX!==void 0){var n=t.getBoundingClientRect();e.clientX=e.touches[0].pageX-n.left,e.clientY=e.touches[0].pageY-n.top}}else e.originalEvent!==void 0&&e.originalEvent.clientX!==void 0&&(e.clientX=e.originalEvent.clientX,e.clientY=e.originalEvent.clientY)},touchNormalize:function(e,t,n){if(e.touches!==void 0&&e.touches.length){if(e.touches[n].clientX!==void 0)e.clientX=e.touches[n].clientX,e.clientY=e.touches[n].clientY;else if(e.touches[n].pageX!==void 0){var r=t.getBoundingClientRect();e.clientX=e.touches[n].pageX-r.left,e.clientY=e.touches[n].pageY-r.top}}else(e.clientX===void 0||e.clientX===null)&&(e.clientX=0,e.clientY=0,e.originalEvent!==void 0&&e.originalEvent.clientX!==void 0&&(e.clientX=e.originalEvent.clientX,e.clientY=e.originalEvent.clientY))},isDblClick:function(e,t){if(e.detail===2)return!0;if(t!=null){var n=e.timeStamp-t.timeStamp,r=Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2));return n<250&&r<10}return!1},now:Date.now||function(){return new Date().getTime()},throttle:function(e,t,n){var r=this,o,i,a,l=null,s=0;n||(n={});var c=function(){s=n.leading===!1?0:r.now(),l=null,a=e.apply(o,i),l||(o=i=null)};return function(){var u=r.now();!s&&n.leading===!1&&(s=u);var d=t-(u-s);return o=this,i=arguments,d<=0||d>t?(clearTimeout(l),l=null,s=u,a=e.apply(o,i),l||(o=i=null)):!l&&n.trailing!==!1&&(l=setTimeout(c,d)),a}},createRequestAnimationFrame:function(e){var t=null;return e!=="auto"&&e<60&&e>1&&(t=Math.floor(1e3/e)),t===null?window.requestAnimationFrame||Bp(33):Bp(t)},calculateDistance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}};function Bp(e){return function(t){window.setTimeout(t,e)}}var K5=$c,Q5=function(){var e="",t,n,r,o=[],i={passive:!0},a={passive:!1};K5.getGlobalThis().addEventListener?(t="addEventListener",n="removeEventListener"):(t="attachEvent",n="detachEvent",e="on");function l(){return r||(r="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll"),r}function s(_,b){var x=function(p){!p&&(p=window.event);var y={originalEvent:p,target:p.target||p.srcElement,type:"wheel",deltaMode:p.type=="MozMousePixelScroll"?0:1,deltaX:0,delatZ:0,preventDefault:function(){p.preventDefault?p.preventDefault():p.returnValue=!1}};return l()=="mousewheel"?(y.deltaY=-.025*p.wheelDelta,p.wheelDeltaX&&(y.deltaX=-.025*p.wheelDeltaX)):y.deltaY=p.detail,b(y)};return o.push({element:_,fn:x}),x}function c(_){for(var b=0;b0)for(var a=i.length;a>0;a--)i[i.length-a].nodeName!=="defs"&&n.appendChild(i[i.length-a]);e.appendChild(n)}var l=[];return n.getAttribute("class")&&(l=n.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),n.setAttribute("class",l.join(" "))),n},setupSvgAttributes:function(e){if(e.setAttribute("xmlns",this.svgNS),e.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),e.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),e.parentNode!==null){var t=e.getAttribute("style")||"";t.toLowerCase().indexOf("overflow")===-1&&e.setAttribute("style","overflow: hidden; "+t)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:Ns.throttle(function(){for(var e=document.querySelectorAll("defs"),t=e.length,n=0;n=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var o in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(o,this.eventListeners[o],this.options.preventMouseEventsDefault?X1:Y1);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())};pt.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var e=this;this.wheelListener=function(n){return e.handleMouseWheel(n)};var t=!this.options.preventMouseEventsDefault;Z1.on(this.options.eventsListenerElement||this.svg,this.wheelListener,t),this.options.mouseWheelZoomEnabled=!0}};pt.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var e=!this.options.preventMouseEventsDefault;Z1.off(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!1}};pt.prototype.handleMouseWheel=function(e){if(!(!this.options.zoomEnabled||this.state!=="none")){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var t=e.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in e&&e.deltaMode===0&&e.wheelDelta&&(t=e.deltaY===0?0:Math.abs(e.wheelDelta)/e.deltaY),t=-.30?1:-1)*Math.log(Math.abs(t)+10)/r;var o=this.svg.getScreenCTM().inverse(),i=gn.getEventPoint(e,this.svg).matrixTransform(o),a=Math.pow(1+this.options.zoomScaleSensitivity,-1*t);this.zoomAtPoint(a,i)}};pt.prototype.zoomAtPoint=function(e,t,n){var r=this.viewport.getOriginalState();n?(e=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,e)),e=e/this.getZoom()):this.getZoom()*ethis.options.maxZoom*r.zoom&&(e=this.options.maxZoom*r.zoom/this.getZoom());var o=this.viewport.getCTM(),i=t.matrixTransform(o.inverse()),a=this.svg.createSVGMatrix().translate(i.x,i.y).scale(e).translate(-i.x,-i.y),l=o.multiply(a);l.a!==o.a&&this.viewport.setCTM(l)};pt.prototype.zoom=function(e,t){this.zoomAtPoint(e,gn.getSvgCenterPoint(this.svg,this.width,this.height),t)};pt.prototype.publicZoom=function(e,t){t&&(e=this.computeFromRelativeZoom(e)),this.zoom(e,t)};pt.prototype.publicZoomAtPoint=function(e,t,n){if(n&&(e=this.computeFromRelativeZoom(e)),Pn.getType(t)!=="SVGPoint")if("x"in t&&"y"in t)t=gn.createSVGPoint(this.svg,t.x,t.y);else throw new Error("Given point is invalid");this.zoomAtPoint(e,t,n)};pt.prototype.getZoom=function(){return this.viewport.getZoom()};pt.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()};pt.prototype.computeFromRelativeZoom=function(e){return e*this.viewport.getOriginalState().zoom};pt.prototype.resetZoom=function(){var e=this.viewport.getOriginalState();this.zoom(e.zoom,!0)};pt.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())};pt.prototype.reset=function(){this.resetZoom(),this.resetPan()};pt.prototype.handleDblClick=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.options.controlIconsEnabled){var t=e.target.getAttribute("class")||"";if(t.indexOf("svg-pan-zoom-control")>-1)return!1}var n;e.shiftKey?n=1/((1+this.options.zoomScaleSensitivity)*2):n=(1+this.options.zoomScaleSensitivity)*2;var r=gn.getEventPoint(e,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(n,r)};pt.prototype.handleMouseDown=function(e,t){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),Pn.mouseAndTouchNormalize(e,this.svg),this.options.dblClickZoomEnabled&&Pn.isDblClick(e,t)?this.handleDblClick(e):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=gn.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()))};pt.prototype.handleMouseMove=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.state==="pan"&&this.options.panEnabled){var t=gn.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(t.x-this.stateOrigin.x,t.y-this.stateOrigin.y);this.viewport.setCTM(n)}};pt.prototype.handleMouseUp=function(e){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.state==="pan"&&(this.state="none")};pt.prototype.handleTouchStart=function(e,t){if(e.touches.length==1)this.handleMouseDown(e,t);else{this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.firstEventCTM=this.viewport.getCTM();var n=gn.getTouchPoint(e,this.svg,0),r=gn.getTouchPoint(e,this.svg,1);this.firstDistance=Pn.calculateDistance(n,r),n.x=(n.x+r.x)/2,n.y=(n.y+r.y)/2,this.stateOrigin=n.matrixTransform(this.firstEventCTM.inverse()),this.firstZoomLevel=this.getZoom()}};pt.prototype.handleTouchMove=function(e){if(e.touches.length==1)this.handleMouseMove(e);else{if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),!this.options.panEnabled&&!this.options.zoomEnabled)return;var t=gn.getTouchPoint(e,this.svg,0),n=gn.getTouchPoint(e,this.svg,1),r=this.svg.createSVGPoint();if(r.x=(t.x+n.x)/2,r.y=(t.y+n.y)/2,this.state==="pan"&&this.options.panEnabled){var o=r.matrixTransform(this.firstEventCTM.inverse()),i=this.firstEventCTM.translate(o.x-this.stateOrigin.x,o.y-this.stateOrigin.y);this.viewport.setCTM(i)}if(this.options.zoomEnabled){var a=Pn.calculateDistance(t,n),l=a/this.firstDistance,s=this.svg.getScreenCTM().inverse(),c=r.matrixTransform(s);this.zoomAtPoint(this.firstZoomLevel*l,c,!0)}}};pt.prototype.handleTouchEnd=function(e){if(e.touches.length==0)this.handleMouseUp(e);else if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.firstEventCTM=this.viewport.getCTM(),e.touches.length==1)this.stateOrigin=gn.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse());else{var t=gn.getTouchPoint(e,this.svg,0),n=gn.getTouchPoint(e,this.svg,1);this.firstDistance=Pn.calculateDistance(t,n),t.x=(t.x+n.x)/2,t.y=(t.y+n.y)/2,this.stateOrigin=t.matrixTransform(this.firstEventCTM.inverse())}};pt.prototype.fit=function(){var e=this.viewport.getViewBox(),t=Math.min(this.width/e.width,this.height/e.height);this.zoom(t,!0)};pt.prototype.contain=function(){var e=this.viewport.getViewBox(),t=Math.max(this.width/e.width,this.height/e.height);this.zoom(t,!0)};pt.prototype.center=function(){var e=this.viewport.getViewBox(),t=(this.width-(e.width+e.x*2)*this.getZoom())*.5,n=(this.height-(e.height+e.y*2)*this.getZoom())*.5;this.getPublicInstance().pan({x:t,y:n})};pt.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()};pt.prototype.pan=function(e){var t=this.viewport.getCTM();t.e=e.x,t.f=e.y,this.viewport.setCTM(t)};pt.prototype.panBy=function(e){var t=this.viewport.getCTM();t.e+=e.x,t.f+=e.y,this.viewport.setCTM(t)};pt.prototype.getPan=function(){var e=this.viewport.getState();return{x:e.x,y:e.y}};pt.prototype.resize=function(){var e=gn.getBoundingClientRectNormalized(this.svg);this.width=e.width,this.height=e.height;var t=this.viewport;t.options.width=this.width,t.options.height=this.height,t.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())};pt.prototype.destroy=function(){var e=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,this.options.customEventsHandler!=null&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var t in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],this.options.preventMouseEventsDefault?X1:Y1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),ho=ho.filter(function(n){return n.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}};pt.prototype.getPublicInstance=function(){var e=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return e.options.panEnabled=!0,e.pi},disablePan:function(){return e.options.panEnabled=!1,e.pi},isPanEnabled:function(){return!!e.options.panEnabled},pan:function(t){return e.pan(t),e.pi},panBy:function(t){return e.panBy(t),e.pi},getPan:function(){return e.getPan()},setBeforePan:function(t){return e.options.beforePan=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},setOnPan:function(t){return e.options.onPan=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},enableZoom:function(){return e.options.zoomEnabled=!0,e.pi},disableZoom:function(){return e.options.zoomEnabled=!1,e.pi},isZoomEnabled:function(){return!!e.options.zoomEnabled},enableControlIcons:function(){return e.options.controlIconsEnabled||(e.options.controlIconsEnabled=!0,$f.enable(e)),e.pi},disableControlIcons:function(){return e.options.controlIconsEnabled&&(e.options.controlIconsEnabled=!1,$f.disable(e)),e.pi},isControlIconsEnabled:function(){return!!e.options.controlIconsEnabled},enableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!0,e.pi},disableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!1,e.pi},isDblClickZoomEnabled:function(){return!!e.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return e.enableMouseWheelZoom(),e.pi},disableMouseWheelZoom:function(){return e.disableMouseWheelZoom(),e.pi},isMouseWheelZoomEnabled:function(){return!!e.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return e.options.zoomScaleSensitivity=t,e.pi},setMinZoom:function(t){return e.options.minZoom=t,e.pi},setMaxZoom:function(t){return e.options.maxZoom=t,e.pi},setBeforeZoom:function(t){return e.options.beforeZoom=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},setOnZoom:function(t){return e.options.onZoom=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},zoom:function(t){return e.publicZoom(t,!0),e.pi},zoomBy:function(t){return e.publicZoom(t,!1),e.pi},zoomAtPoint:function(t,n){return e.publicZoomAtPoint(t,n,!0),e.pi},zoomAtPointBy:function(t,n){return e.publicZoomAtPoint(t,n,!1),e.pi},zoomIn:function(){return this.zoomBy(1+e.options.zoomScaleSensitivity),e.pi},zoomOut:function(){return this.zoomBy(1/(1+e.options.zoomScaleSensitivity)),e.pi},getZoom:function(){return e.getRelativeZoom()},setOnUpdatedCTM:function(t){return e.options.onUpdatedCTM=t===null?null:Pn.proxy(t,e.publicInstance),e.pi},resetZoom:function(){return e.resetZoom(),e.pi},resetPan:function(){return e.resetPan(),e.pi},reset:function(){return e.reset(),e.pi},fit:function(){return e.fit(),e.pi},contain:function(){return e.contain(),e.pi},center:function(){return e.center(),e.pi},updateBBox:function(){return e.updateBBox(),e.pi},resize:function(){return e.resize(),e.pi},getSizes:function(){return{width:e.width,height:e.height,realZoom:e.getZoom(),viewBox:e.viewport.getViewBox()}},destroy:function(){return e.destroy(),e.pi}}),this.publicInstance};var ho=[],eR=function(e,t){var n=Pn.getSvg(e);if(n===null)return null;for(var r=ho.length-1;r>=0;r--)if(ho[r].svg===n)return ho[r].instance.getPublicInstance();return ho.push({svg:n,instance:new pt(n,t)}),ho[ho.length-1].instance.getPublicInstance()},tR=eR;const nR={fitToContents(){return this.fit().center().zoomOut().zoomOut(),this},getViewArea(){const e=this.getSizes(),t=this.getPan(),n=e.realZoom;t.x/=n,t.y/=n;const r={width:e.width/n,height:e.height/n};return{box:{top:-t.y,bottom:r.height-t.y,left:-t.x,right:r.width-t.x},center:{x:r.width/2-t.x,y:r.height/2-t.y}}},getRealZoom(){return this.getSizes().realZoom},applyAbsoluteZoomLevel(e,t,n){const r=Math.max(1e-4,t),o=Math.max(r,n),i=Math.max(Math.min(o,e),r),a=this.getRealZoom(),l=this.getZoom(),s=a/l;this.setMinZoom(r/s).setMaxZoom(o/s).zoom(i/s)},isPanEnabled(){return this._isPanEnabled},enablePan(){return this._isPanEnabled=!0,this._internalEnablePan(),this},disablePan(){return this._isPanEnabled=!1,this._internalDisablePan(),this},isZoomEnabled(){return this._isZoomEnabled},enableZoom(){return this._isZoomEnabled=!0,this._internalEnableZoom(),this},disableZoom(){return this._isZoomEnabled=!1,this._internalDisableZoom(),this},setPanEnabled(e){return e?this.enablePan():this.disablePan(),this},setZoomEnabled(e){return e?(this.enableZoom(),this.enableDblClickZoom()):(this.disableZoom(),this.disableDblClickZoom()),this}};function rR(e,t){var n,r;const o=e;return o._isPanEnabled=(n=t.panEnabled)!=null?n:!0,o._isZoomEnabled=(r=t==null?void 0:t.zoomEnabled)!=null?r:!0,o._internalIsPanEnabled=o.isPanEnabled,o._internalEnablePan=o.enablePan,o._internalDisablePan=o.disablePan,o._internalIsZoomEnabled=o.isZoomEnabled,o._internalEnableZoom=o.enableZoom,o._internalDisableZoom=o.disableZoom,Object.assign(e,nR),o}function oR(e,t){var n,r,o,i,a,l;const s=(r=(n=t.customEventsHandler)==null?void 0:n.init)!=null?r:d=>{},c=(i=(o=t.customEventsHandler)==null?void 0:o.destroy)!=null?i:d=>{},u=(l=(a=t.customEventsHandler)==null?void 0:a.haltEventListeners)!=null?l:[];return t.mouseWheelZoomEnabled===void 0&&(t.mouseWheelZoomEnabled=t.zoomEnabled),t.customEventsHandler={init:d=>{rR(d.instance,t),s(d)},destroy:d=>c(d),haltEventListeners:u},tR(e,t)}var Np;(function(e){e[e.INITIAL=0]="INITIAL",e[e.MOUNTED=1]="MOUNTED",e[e.UNMOUNTED=2]="UNMOUNTED"})(Np||(Np={}));function iR(e,t){const n=U();let r=0;const o=[],i=[],a=()=>{r=1,o.forEach(u=>u()),o.length=0},l=()=>{r=2,i.forEach(u=>u()),i.length=0};return _t(()=>{var u,d,f,h,m,_;const b=on(e.value,""),x=(d=(u=t.customEventsHandler)==null?void 0:u.init)!=null?d:w=>{},p=(h=(f=t.customEventsHandler)==null?void 0:f.destroy)!=null?h:w=>{},y=(_=(m=t.customEventsHandler)==null?void 0:m.haltEventListeners)!=null?_:[];t.customEventsHandler={init:w=>{n.value=w.instance,x(w),a()},destroy:w=>{l(),p(w)},haltEventListeners:y},oR(b,t)}),$r(()=>{var u;(u=n.value)==null||u.destroy(),n.value=void 0}),{svgPanZoom:n,onSvgPanZoomMounted:u=>{r===0?o.push(u):r===1&&u()},onSvgPanZoomUnmounted:u=>{r===0||r===1?i.push(u):u()}}}const G1=Symbol("zoomLevel");function aR(e,t){const n=g(()=>t.scalingObjects?1:1/e.value);return nn(G1,{zoomLevel:e,scale:n}),{scale:n}}function qr(){return on(gt(G1),"zoomLevel")}const lR=["paths","nodes","focusring","edges","base","grid","background","root"],sR=["cx","cy","r","fill","stroke","stroke-width","stroke-dasharray"],uR=["x","y","width","height","rx","ry","fill","stroke","stroke-width","stroke-dasharray"],fh=$t({props:{baseX:{type:Number,default:0},baseY:{type:Number,default:0},config:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=U(n.baseX),i=U(n.baseY),a=U(0),l=U("#000000"),s=U(void 0),c=U(0),u=U(0),d=U(0),f=U(0);return Zn(()=>{var h;const m=r.value;a.value=n.config.strokeWidth*m,l.value=(h=n.config.strokeColor)!=null?h:"none",s.value=kc(n.config.strokeDasharray,m),n.config.type==="circle"?(o.value=n.baseX,i.value=n.baseY,c.value=n.config.radius*m):(u.value=n.config.width*m,d.value=n.config.height*m,f.value=n.config.borderRadius*m,o.value=n.baseX-u.value/2,i.value=n.baseY-d.value/2)}),t({x:o,y:i,strokeWidth:a,strokeColor:l,strokeDasharray:s,radius:c,width:u,height:d,borderRadius:f}),(h,m)=>e.config.type==="circle"?(qe(),ze("circle",{key:0,class:"v-shape-circle",cx:o.value,cy:i.value,r:c.value,fill:e.config.color,stroke:l.value,"stroke-width":a.value,"stroke-dasharray":s.value},null,8,sR)):(qe(),ze("rect",{key:1,class:"v-shape-rect",x:o.value,y:i.value,width:u.value,height:d.value,rx:f.value,ry:f.value,fill:e.config.color,stroke:l.value,"stroke-width":a.value,"stroke-dasharray":s.value},null,8,uR))}}),cR=["rx","ry","fill","transform"],dR=["x","y","dominant-baseline","font-family","font-size","fill"],fR=["x","dy","dominant-baseline"],Pc=$t({props:{text:{type:String,required:!0},x:{type:Number,required:!0},y:{type:Number,required:!0},dominantBaseline:{type:String,required:!1,default:"central"},config:{type:Object,required:!0}},setup(e,{expose:t}){const n=e;function r(x,p,y){var w;const S=x.getBBox();p.x=S.x,p.y=S.y,p.width=S.width,p.height=S.height,y.value=(w=x.getAttribute("transform"))!=null?w:void 0}function o(x,p,y){const w=new MutationObserver(()=>{r(x,p,y)});return w.observe(x,{attributes:!0,attributeFilter:["x","y","transform","font-size"]}),r(x,p,y),w}const i=I0(),{scale:a}=qr(),l=g(()=>{var x,p;return(p=(x=n.text)==null?void 0:x.toString().split(/\r?\n/))!=null?p:""}),s=g(()=>{var x;return(x=i["font-size"])!=null?x:n.config.fontSize*a.value}),c=g(()=>s.value*n.config.lineHeight),u=g(()=>{const x=n.dominantBaseline;return x==="hanging"?0:x==="central"?-(c.value*(l.value.length-1))/2:-c.value*(l.value.length-1)}),d=U(),f=U(""),h=Kt({x:0,y:0,width:0,height:0}),m=g(()=>{var x,p;const y=n.config.background;if(!y)return h;let w,S;y.padding instanceof Object?(w=y.padding.vertical,S=y.padding.horizontal):(w=(x=y.padding)!=null?x:0,S=(p=y.padding)!=null?p:0);const C=c.value-s.value;return{x:h.x-S*a.value,y:h.y-w*a.value-C/2,width:h.width+S*2*a.value,height:h.height+w*2*a.value+C}});let _;const b=()=>{n.config.background&&n.config.background.visible?!_&&d.value&&(_=o(d.value,h,f)):(_==null||_.disconnect(),_=void 0)};return _t(()=>b()),de(()=>n.config.background&&n.config.background.visible,(x,p)=>{x!=p&&b()}),$r(()=>{_==null||_.disconnect(),_=void 0}),t({fontSize:s,element:d,transform:f,backgroundRectPos:m,scale:a}),(x,p)=>{var y,w,S,C,T,O;return qe(),ze(Xe,null,[e.config.background&&e.config.background.visible?(qe(),ze("rect",Sr({key:0,class:"v-text-background"},be(m),{rx:((w=(y=e.config.background)==null?void 0:y.borderRadius)!=null?w:0)*be(a),ry:((C=(S=e.config.background)==null?void 0:S.borderRadius)!=null?C:0)*be(a),fill:(O=(T=e.config.background)==null?void 0:T.color)!=null?O:"#ffffff",transform:f.value}),null,16,cR)):Un("",!0),wa("text",Sr({ref_key:"element",ref:d,class:"v-text"},x.$attrs,{x:e.x,y:e.y,"dominant-baseline":e.dominantBaseline,"font-family":x.$attrs["font-family"]?`${x.$attrs["font-family"]}`:e.config.fontFamily,"font-size":be(s),fill:x.$attrs.fill?`${x.$attrs.fill}`:e.config.color}),[be(l).length<=1?(qe(),ze(Xe,{key:0},[ec(Od(e.text),1)],64)):(qe(!0),ze(Xe,{key:1},Lt(be(l),(L,R)=>(qe(),ze("tspan",{key:R,x:e.x,dy:R==0?be(u):be(c),"dominant-baseline":e.dominantBaseline},Od(L),9,fR))),128))],16,dR)],64)}}});var gr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const vR=["transform"],hR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},pos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,r=g(()=>{var S;return((S=n.pos)==null?void 0:S.x)||0}),o=g(()=>{var S;return((S=n.pos)==null?void 0:S.y)||0}),i=L1(),{scale:a}=qr(),{handleNodePointerDownEvent:l,handleNodePointerOverEvent:s,handleNodePointerOutEvent:c,handleNodeContextMenu:u}=ch(),d=g(()=>{var S;return n.state.label.visible&&(S=n.state.labelText)!=null?S:!1}),f=g(()=>n.state.label.direction===ot.CENTER?0:n.state.label.margin*a.value),h=U(0),m=U(0),_=U(0),b=U(0);Zn(()=>{const S=a.value,C=n.state.shape;if(C.type=="circle"){const T=C.radius*S,O=T+f.value,L=Math.sqrt(sr(O,2)/2);h.value=T+f.value,m.value=T+f.value,_.value=L,b.value=L}else{const T=C.borderRadius*S,O=C.width*S,L=C.height*S,R=T+f.value,z=Math.sqrt(sr(R,2)/2);h.value=L/2+f.value,m.value=O/2+f.value,_.value=L/2-T+z,b.value=O/2-T+z}});const x=g(()=>{switch(n.state.label.direction){case ot.CENTER:case ot.NORTH:case ot.SOUTH:return"middle";case ot.EAST:case ot.NORTH_EAST:case ot.SOUTH_EAST:return"start";case ot.WEST:case ot.NORTH_WEST:case ot.SOUTH_WEST:default:return"end"}}),p=g(()=>{switch(n.state.label.direction){case ot.NORTH:case ot.NORTH_EAST:case ot.NORTH_WEST:return"text-top";case ot.SOUTH:case ot.SOUTH_EAST:case ot.SOUTH_WEST:return"hanging";case ot.CENTER:case ot.EAST:case ot.WEST:default:return"central"}}),y=g(()=>{switch(n.state.label.direction){case ot.CENTER:case ot.NORTH:case ot.SOUTH:return 0;case ot.EAST:return m.value;case ot.WEST:return-m.value;case ot.NORTH_EAST:case ot.SOUTH_EAST:return b.value;case ot.NORTH_WEST:case ot.SOUTH_WEST:default:return-b.value}}),w=g(()=>{switch(n.state.label.direction){case ot.NORTH:return-h.value;case ot.SOUTH:return h.value;case ot.CENTER:case ot.EAST:case ot.WEST:return 0;case ot.NORTH_EAST:case ot.NORTH_WEST:return-_.value;case ot.SOUTH_EAST:case ot.SOUTH_WEST:default:return _.value}});return t({x:r,y:o,config:i,labelVisibility:d,handleNodePointerDownEvent:l,handleNodePointerOverEvent:s,handleNodePointerOutEvent:c,handleNodeContextMenu:u,textAnchor:x,dominantBaseline:p,labelX:y,labelY:w,scale:a}),(S,C)=>(qe(),ze("g",{class:bn({"v-node":!0,hover:e.state.hovered,selected:e.state.selected}),transform:`translate(${be(r)} ${be(o)})`,onPointerdown:C[0]||(C[0]=Xl(T=>be(l)(e.id,T),["prevent","stop"])),onPointerenterPassive:C[1]||(C[1]=T=>be(s)(e.id,T)),onPointerleavePassive:C[2]||(C[2]=T=>be(c)(e.id,T)),onContextmenu:C[3]||(C[3]=T=>be(u)(e.id,T))},[fn(S.$slots,"override-node",{nodeId:e.id,scale:be(a),config:e.state.shape,class:bn({draggable:e.state.draggable,selectable:e.state.selectable})},()=>[mt(fh,{config:e.state.shape,class:bn({draggable:e.state.draggable,selectable:e.state.selectable})},null,8,["config","class"])],!0),be(d)?fn(S.$slots,"override-node-label",{key:0,nodeId:e.id,scale:be(a),text:e.state.labelText,x:be(y),y:be(w),config:e.state.label,shape:e.state.shape,textAnchor:be(x),dominantBaseline:be(p)},()=>[mt(Pc,{text:e.state.labelText,x:be(y),y:be(w),config:e.state.label,"text-anchor":be(x),"dominant-baseline":be(p)},null,8,["text","x","y","config","text-anchor","dominant-baseline"])],!0):Un("",!0)],42,vR))}});var mR=gr(hR,[["__scopeId","data-v-20ea340e"]]);const gR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},pos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,r=g(()=>{var l;return((l=n.pos)==null?void 0:l.x)||0}),o=g(()=>{var l;return((l=n.pos)==null?void 0:l.y)||0}),i=L1(),a=Kt({});return Zn(()=>{var l,s,c;const u=n.state.shape;if(u.type==="circle"){const d={type:"circle",radius:u.radius+((l=u.strokeWidth)!=null?l:0)/2+i.focusring.padding+i.focusring.width/2,color:"none",strokeWidth:i.focusring.width,strokeColor:i.focusring.color,strokeDasharray:i.focusring.dasharray};Object.assign(a,d)}else{const d={type:"rect",width:u.width+((s=u.strokeWidth)!=null?s:0)+i.focusring.padding*2+i.focusring.width,height:u.height+((c=u.strokeWidth)!=null?c:0)+i.focusring.padding*2+i.focusring.width,borderRadius:u.borderRadius>0?u.borderRadius+i.focusring.padding:0,color:"none",strokeWidth:i.focusring.width,strokeColor:i.focusring.color,strokeDasharray:i.focusring.dasharray};Object.assign(a,d)}}),t({x:r,y:o,shapeConfig:a}),(l,s)=>(qe(),Ut(fh,{class:"v-node-focus-ring","base-x":be(r),"base-y":be(o),config:be(a)},null,8,["base-x","base-y","config"]))}});var pR=gr(gR,[["__scopeId","data-v-4f2bee14"]]);const yR=["d","stroke","stroke-width","stroke-dasharray","stroke-linecap"],bR=$t({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},config:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=g(()=>n.config.width*r.value),i=g(()=>kc(n.config.dasharray,r.value)),a=g(()=>{const l=n.config.animate?oh(n.config.dasharray)*n.config.animationSpeed*r.value:!1;return l?`--animation-speed:${l}`:void 0});return t({strokeWidth:o,strokeDasharray:i,animationSpeed:a}),(l,s)=>(qe(),ze("path",{class:bn({"v-line":!0,animate:e.config.animate}),d:`M ${e.x1} ${e.y1} L ${e.x2} ${e.y2}`,stroke:e.config.color,"stroke-width":be(o),"stroke-dasharray":be(i),"stroke-linecap":e.config.linecap,style:zo(be(a))},null,14,yR))}});var J1=gr(bR,[["__scopeId","data-v-1809a5d0"]]);function wR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r{var s,c;const u=n.state.position,d=[...(c=(s=n.state.curve)==null?void 0:s.control)!=null?c:[],{x:u.x2,y:u.y2}],f=[];return f.push(`M ${u.x1} ${u.y1}`),vh(d,2).forEach(([h,m])=>f.push(`Q ${h.x} ${h.y} ${m.x} ${m.y}`)),f.join(" ")}),i=g(()=>n.config.width*r.value),a=g(()=>kc(n.config.dasharray,r.value)),l=g(()=>{const s=n.config.animate?oh(n.config.dasharray)*n.config.animationSpeed*r.value:!1;return s?`--animation-speed:${s}`:void 0});return t({strokeWidth:i,strokeDasharray:a,animationSpeed:l}),(s,c)=>(qe(),ze("path",{class:bn({"v-line":!0,animate:e.config.animate}),d:be(o),fill:"none",stroke:e.config.color,"stroke-width":be(i),"stroke-dasharray":be(a),"stroke-linecap":e.config.linecap,style:zo(be(l)),"marker-start":e.markerStart,"marker-end":e.markerEnd},null,14,SR))}});var CR=gr(kR,[["__scopeId","data-v-1fa4fd0c"]]);const TR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},sourcePos:{type:Object,required:!1,default:void 0},targetPos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=Tc();return t({config:n}),(r,o)=>be(n).type=="straight"||!e.state.curve?(qe(),Ut(J1,Sr({key:0},e.state.position,{class:{selectable:e.state.selectable,hover:e.state.hovered,selected:e.state.selected},config:e.state.line.stroke,"marker-start":e.state.sourceMarkerId?`url('#${e.state.sourceMarkerId}')`:void 0,"marker-end":e.state.targetMarkerId?`url('#${e.state.targetMarkerId}')`:void 0}),null,16,["class","config","marker-start","marker-end"])):(qe(),Ut(CR,{key:1,class:bn({selectable:e.state.selectable,hover:e.state.hovered,selected:e.state.selected}),state:e.state,config:e.state.line.stroke,"marker-start":e.state.sourceMarkerId?`url('#${e.state.sourceMarkerId}')`:void 0,"marker-end":e.state.targetMarkerId?`url('#${e.state.targetMarkerId}')`:void 0},null,8,["class","state","config","marker-start","marker-end"]))}});var ER=gr(TR,[["__scopeId","data-v-f407a16e"]]);const $R=$t({props:{edges:{type:Object,required:!0},layouts:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,r=Tc(),{handleEdgesPointerDownEvent:o,handleEdgesPointerOverEvent:i,handleEdgesPointerOutEvent:a,handleEdgesContextMenu:l}=ch(),{edgeStates:s}=ls(),c=U({x1:0,y1:0,x2:0,y2:0}),u=U({x:0,y:0});Zn(()=>{const p=Object.keys(n.edges).find(y=>y in s);p&&(c.value=s[p].position,u.value={x:(c.value.x1+c.value.x2)/2,y:(c.value.y1+c.value.y2)/2})});const d=g(()=>Object.keys(n.edges)),f=g(()=>it.values(r.summarized.label,n.edges)),h=g(()=>it.values(r.summarized.shape,n.edges)),m=g(()=>it.values(r.summarized.stroke,n.edges)),_=g(()=>d.value.some(p=>s[p].hovered)),b=g(()=>d.value.some(p=>s[p].selectable)),x=g(()=>d.value.some(p=>s[p].selected));return t({config:r,pos:c,centerPos:u,handleEdgesPointerDownEvent:o,handleEdgesPointerOverEvent:i,handleEdgesPointerOutEvent:a,handleEdgesContextMenu:l,hovered:_,selectable:b,selected:x}),(p,y)=>(qe(),ze("g",{class:bn({"v-line-summarized":!0,hovered:be(_),selectable:be(b),selected:be(x)}),onPointerdown:y[0]||(y[0]=Xl(w=>be(o)(be(d),w),["prevent","stop"])),onPointerenterPassive:y[1]||(y[1]=w=>be(i)(be(d),w)),onPointerleavePassive:y[2]||(y[2]=w=>be(a)(be(d),w)),onContextmenu:y[3]||(y[3]=w=>be(l)(be(d),w))},[mt(J1,Sr(c.value,{config:be(m)}),null,16,["config"]),mt(fh,{"base-x":u.value.x,"base-y":u.value.y,config:be(h)},null,8,["base-x","base-y","config"]),mt(Pc,{text:Object.keys(e.edges).length.toString(),x:u.value.x,y:u.value.y,config:be(f),"text-anchor":"middle","dominant-baseline":"central"},null,8,["text","x","y","config"])],34))}});var PR=gr($R,[["__scopeId","data-v-3b805f24"]]);const qR=$t({setup(e,{expose:t}){const{edgeStates:n,edgeGroupStates:r,layouts:o}=ls();return t({edgeStates:n,edgeGroupStates:r,layouts:o}),(i,a)=>(qe(!0),ze(Xe,null,Lt(be(r).edgeGroups,({summarize:l,edges:s},c)=>(qe(),ze(Xe,null,[l?(qe(),Ut(PR,{key:c,edges:s,layouts:be(o).nodes},null,8,["edges","layouts"])):(qe(!0),ze(Xe,{key:1},Lt(s,(u,d)=>(qe(),Ut(ER,{key:d,id:d,state:be(n)[d],"source-pos":be(o).nodes[u.source],"target-pos":be(o).nodes[u.target]},null,8,["id","state","source-pos","target-pos"]))),128))],64))),256))}}),MR=["d","stroke-width"],OR=$t({props:{id:{type:String,required:!0},state:{type:Object,required:!0},sourcePos:{type:Object,required:!1,default:void 0},targetPos:{type:Object,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=Tc(),{handleEdgePointerDownEvent:i,handleEdgePointerOverEvent:a,handleEdgePointerOutEvent:l,handleEdgeContextMenu:s}=ch(),c=g(()=>{const d=n.state.position;if(o.type==="straight"||!n.state.curve)return`M ${d.x1} ${d.y1} L ${d.x2} ${d.y2}`;{const f=[...n.state.curve.control,{x:d.x2,y:d.y2}],h=[];return h.push(`M ${d.x1} ${d.y1}`),vh(f,2).forEach(([m,_])=>h.push(`Q ${m.x} ${m.y} ${_.x} ${_.y}`)),h.join(" ")}}),u=g(()=>(n.state.line.stroke.width+10)*r.value);return t({config:o,handleEdgePointerDownEvent:i,handleEdgePointerOverEvent:a,handleEdgePointerOutEvent:l,handleEdgeContextMenu:s}),(d,f)=>(qe(),ze("path",{class:bn({"v-line-background":!0,selectable:e.state.selectable}),d:be(c),stroke:"transparent","stroke-width":be(u),fill:"none",onPointerdown:f[0]||(f[0]=Xl(h=>be(i)(e.id,h),["prevent","stop"])),onPointerenterPassive:f[1]||(f[1]=h=>be(a)(e.id,h)),onPointerleavePassive:f[2]||(f[2]=h=>be(l)(e.id,h)),onContextmenu:f[3]||(f[3]=h=>be(s)(e.id,h))},null,42,MR))}});var AR=gr(OR,[["__scopeId","data-v-1b4a2a82"]]);const RR=$t({setup(e,{expose:t}){const{edgeStates:n,edgeGroupStates:r,layouts:o}=ls();return t({edgeStates:n,edgeGroupStates:r,layouts:o}),(i,a)=>(qe(!0),ze(Xe,null,Lt(be(r).edgeGroups,({summarize:l,edges:s})=>(qe(),ze(Xe,null,[l?Un("",!0):(qe(!0),ze(Xe,{key:0},Lt(s,(c,u)=>(qe(),Ut(AR,{key:u,id:u,state:be(n)[u],"source-pos":be(o).nodes[c.source],"target-pos":be(o).nodes[c.target]},null,8,["id","state","source-pos","target-pos"]))),128))],64))),256))}}),IR={class:"v-edge-labels"},LR=$t({setup(e,{expose:t}){const n=Tc(),{nodeStates:r,edgeStates:o,edgeGroupStates:i,summarizedEdgeStates:a,layouts:l}=ls(),{scale:s}=qr(),c=g(()=>Object.fromEntries(Object.entries(i.edgeGroups).filter(([_,b])=>!b.summarize&&Object.keys(b.edges).length>0))),u=g(()=>{const _={},b={};return Object.entries(i.edgeGroups).forEach(([x,p])=>{Object.keys(p.edges).length>0&&(p.summarize?b[x]=p:_[x]=p)}),{indivisual:_,summarized:b}}),d=g(()=>_=>{var b;return{pos:(b=l.nodes[_])!=null?b:{x:0,y:0},shape:r[_].shape}}),f=g(()=>(_,b,x,p)=>Ap(o[_].labelPosition,p,n.label.margin,n.label.padding,s.value)),h=g(()=>(_,b)=>{var x,p;const y=Object.keys(b.edges)[0];return Ap(o[y].labelPosition,(p=(x=a[_])==null?void 0:x.stroke)!=null?p:o[y].line.stroke,n.label.margin,n.label.padding,s.value)}),m=g(()=>_=>o[Object.keys(_.edges)[0]]);return t({indivisualEdgeGroups:c,edgeGroups:u,nodeShape:d,labelAreaPosition:f,groupLabelAreaPosition:h,representativeEdgeState:m,edgeStates:o,edgeConfig:n,scale:s}),(_,b)=>(qe(),ze("g",IR,[(qe(!0),ze(Xe,null,Lt(be(u).indivisual,(x,p)=>(qe(),ze(Xe,{key:p},[(qe(!0),ze(Xe,null,Lt(x.edges,(y,w)=>fn(_.$slots,"edge-label",{key:w,edgeId:w,edge:y,config:be(n).label,area:be(f)(w,be(d)(y.source),be(d)(y.target),be(o)[w].line.stroke),hovered:be(o)[w].hovered,selected:be(o)[w].selected,scale:be(s)},void 0,!0)),128))],64))),128)),(qe(!0),ze(Xe,null,Lt(be(u).summarized,(x,p)=>fn(_.$slots,"edges-label",{key:p,edges:x.edges,config:be(n).label,area:be(h)(p,x),hovered:be(m)(x).hovered,selected:be(m)(x).selected,scale:be(s)},void 0,!0)),128))]))}});var BR=gr(LR,[["__scopeId","data-v-15f17dbf"]]);const NR=$t({setup(e,{expose:t}){const{viewport:n}=C1(),r=U(),o=(a,l,s)=>{a.forEach(c=>{var u;return l.setAttribute(c,(u=s.getAttribute(c))!=null?u:"")})},i=new MutationObserver(a=>{if(!r.value)return;const l=a.map(s=>{var c;return(c=s.attributeName)!=null?c:""}).filter(Boolean);o(l,r.value,n.value)});return _t(()=>{const a=["transform","style"];i.observe(n.value,{attributes:!0,attributeFilter:a}),r.value&&o(a,r.value,n.value)}),$r(()=>{i.disconnect()}),t({background:r}),(a,l)=>(qe(),ze("g",{ref_key:"background",ref:r,class:"v-background-viewport"},[fn(a.$slots,"default")],512))}}),FR={class:"v-background-grid","shape-rendering":"crispEdges"},zR=["d"],jR=["d"],DR=["d"],VR=["d"],HR=$t({setup(e,{expose:t}){const{emitter:n}=K1(),{container:r,svgPanZoom:o}=C1(),{zoomLevel:i}=qr(),a=WA(),l=U({x:0,y:0}),s=U({width:500,height:500});_t(()=>{var h;const m=(h=o.value)==null?void 0:h.getPan();m&&(l.value={x:-m.x,y:-m.y});const _=r.value.getBoundingClientRect();s.value={width:_.width,height:_.height}}),n.on("view:resize",h=>{s.value={width:h.width,height:h.height}}),n.on("view:pan",h=>{l.value={x:-h.x,y:-h.y}}),n.on("view:zoom",()=>{var h;const m=(h=o.value)==null?void 0:h.getPan();m&&(l.value={x:-m.x,y:-m.y})});const c=U([]),u=U([]),d=U([]),f=U([]);return Zn(()=>{const h=[],m=[],_=[],b=[],x=1/i.value,p=a.grid.interval,y=l.value.x*x,w=l.value.y*x,S=Math.floor(s.value.width/p+1)*p,C=Math.floor(s.value.height/p+1)*p,T=(l.value.x+S)*x,O=(l.value.y+C)*x,L=a.grid.thickIncrements,R=a.grid.line.dasharray,z=a.grid.thick.dasharray;let $={stroke:a.grid.thick.color,"stroke-width":a.grid.thick.width,"stroke-dasharray":z,"stroke-dashoffset":z?y/x:void 0},E={stroke:a.grid.line.color,"stroke-width":a.grid.line.width,"stroke-dasharray":R,"stroke-dashoffset":R?y/x:void 0};const F=(l.value.x+S)*x;for(let J=w;J<=O;J+=p){const I=Math.floor(J/p);L&&I%L===0?h.push([I,I*p,y,F,$]):_.push([I,I*p,y,F,E])}$=Kr({},$),$["stroke-dashoffset"]=z?w/x:void 0,E=Kr({},E),E["stroke-dashoffset"]=R?w/x:void 0;const Q=(l.value.y+C)*x;for(let J=y;J<=T;J+=p){const I=Math.floor(J/p);L&&I%L===0?m.push([I,I*p,w,Q,$]):b.push([I,I*p,w,Q,E])}u.value=h,c.value=m,f.value=_,d.value=b}),t({thickVerticals:c,thickHorizontals:u,normalVerticals:d,normalHorizontals:f}),(h,m)=>(qe(),ze("g",FR,[(qe(!0),ze(Xe,null,Lt(f.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`nv${_}`,d:`M ${x} ${b} L ${p} ${b}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,zR))),128)),(qe(!0),ze(Xe,null,Lt(d.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`nh${_}`,d:`M ${b} ${x} L ${b} ${p}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,jR))),128)),(qe(!0),ze(Xe,null,Lt(u.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`tv${_}`,d:`M ${x} ${b} L ${p} ${b}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,DR))),128)),(qe(!0),ze(Xe,null,Lt(c.value,([_,b,x,p,y])=>(qe(),ze("path",Sr({key:`th${_}`,d:`M ${b} ${x} L ${b} ${p}`},y,{style:{"vector-effect":"non-scaling-stroke"}}),null,16,VR))),128))]))}}),UR=["d","stroke","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin"],WR=$t({props:{points:{type:Array,required:!0},path:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,{scale:r}=qr(),o=B1(),i=g(()=>{let c=!0;return n.points.map(u=>{if(u===null)c=!0;else if(u instanceof Array){u=[...u];const d=[];if(u.length%2===1){const f=u[0];u=u.slice(1),d.push(`L ${f.x} ${f.y}`)}return vh(u,2).map(([f,h])=>d.push(`Q ${f.x} ${f.y} ${h.x} ${h.y}`)),d.join(" ")}else{const d=c;return c=!1,`${d?"M ":"L "}${u.x} ${u.y}`}}).join(" ")}),a=g(()=>it.values(o.path,n.path)),l=g(()=>kc(a.value.dasharray,r.value)),s=g(()=>{const c=a.value.animate?oh(a.value.dasharray)*a.value.animationSpeed*r.value:!1;return c?`--animation-speed:${c}`:void 0});return t({d:i,scale:r,config:a,strokeDasharray:l,animationSpeed:s}),(c,u)=>(qe(),ze("path",{class:bn({"v-path-line":!0,animate:be(a).animate}),d:be(i),fill:"none",stroke:be(a).color,"stroke-width":be(a).width*be(r),"stroke-dasharray":be(l),"stroke-linecap":be(a).linecap,"stroke-linejoin":be(a).linejoin,style:zo(be(s))},null,14,UR))}});var KR=gr(WR,[["__scopeId","data-v-d5817f5c"]]);const QR=$t({props:{paths:{type:Array,required:!0},edges:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,r=Number.EPSILON*100,o=B1(),{nodeStates:i,edgeStates:a,layouts:l}=ls(),{scale:s}=qr(),{emitter:c}=K1(),u=g(()=>{const C=[];for(const T of n.paths){const O=T.edges.map(L=>({edgeId:L,edge:n.edges[L]})).filter(L=>L.edge);O.length===T.edges.length&&C.push({path:T,edges:O})}return C}),d=g(()=>C=>{if(C.edges.length===0)return[];const T=it.value(o.margin,C.path)*s.value;return m(C,i,l.nodes,a,s.value,o.curveInNode,o.end,T)}),f=(C,T)=>{!o.clickable||c.emit("path:click",{path:C,event:T})},h=(C,T)=>{!o.clickable||c.emit("path:contextmenu",{path:C,event:T})};function m(C,T,O,L,R,z,$,E){var F;const Q=C.edges,J=b(Q),I=Q.map((A,G)=>w(A,J[G],L[A.edgeId])),W=[];let ae=!1,_e=!1;{const A=I[0];let G=_(T[A.source].shape)*R;const N=E+($==="edgeOfNode"?G:0),q=N<=0?A.line.source:x(A,N,O,!0);W.push(q),G=_(T[A.target].shape)*R,E>0&&ir(A.line.source,A.line.target)<=N+G&&(ae=!0)}const Y=Q.length;for(let A=1;A0&&ir(A.line.source,A.line.target)<=N+G&&(_e=!0)}return ae&&(W.shift(),W[0]instanceof Array&&W.unshift(W[0][0])),_e&&W.pop(),W}function _(C){return C.type=="circle"?C.radius:Math.min(C.width,C.height)/2}function b(C){const T=C.length;if(T<=1)return[!0];const O=[];let L=null;for(let R=0;R2){const F=[z,$].sort(),Q=[C[1].edge.source,C[1].edge.target].sort();F[0]===Q[0]&&F[1]===Q[1]?[C[2].edge.source,C[2].edge.target].includes(C[1].edge.target)?E=$===C[1].edge.source:E=$===C[1].edge.target:E=[C[1].edge.source,C[1].edge.target].includes($)}else E=[C[1].edge.source,C[1].edge.target].includes($);else E=L===z;O.push(E),L=E?$:z}return O}function x(C,T,O,L){const R=L?C.source:C.target,z=C.curve;if(z){let $=T/z.circle.radius;return z.theta>0&&($*=-1),L||($*=-1),lt.fromObject(ga(L?C.line.source:C.line.target,z.circle.center,$))}else{let $,E;L?($=C.line.target,E=C.line.source):($=C.line.source,E=C.line.target);const F=wd($,E,lt.fromObject(O[R]),T);return F===null?$:F}}function p(C,T,O){let L=null;if(C.curve)if(T.curve){if(C.line.target.isEqualTo(T.line.source))return C.line.target.clone();L=Mp(C.curve.circle.center,C.curve.circle.radius,T.curve.circle.center,T.curve.circle.radius,C.curve.center)}else L=o5(T.line.target,T.line.source,C.curve.circle.center,C.curve.circle.radius,O);else if(T.curve)L=wd(C.line.source,C.line.target,T.curve.circle.center,T.curve.circle.radius);else{const R=S(C.line),z=S(T.line);!isFinite(R)&&!isFinite(z)||Math.abs(R-z)(qe(),Ut(ic,{name:be(o).transition,css:!!be(o).transition,tag:"g",class:"v-paths"},{default:_r(()=>[(qe(!0),ze(Xe,null,Lt(be(u),(O,L)=>(qe(),Ut(KR,{key:L,points:be(d)(O),class:bn({clickable:be(o).clickable}),path:O.path,onClick:Xl(R=>f(O.path,R),["prevent","stop"]),onContextmenu:R=>h(O.path,R)},null,8,["points","class","path","onClick","onContextmenu"]))),128))]),_:1},8,["name","css"]))}});var ZR=gr(QR,[["__scopeId","data-v-7191e492"]]);const YR=["points","fill"],XR=$t({props:{width:{type:Number,required:!0},height:{type:Number,required:!0},refX:{type:Number,required:!0},color:{type:String,required:!0},isSource:{type:Boolean,required:!0},units:{type:String,required:!0}},setup(e){const t=e,n=g(()=>{const r=t.width,o=t.height;return t.isSource?`${r} ${o}, 0 ${o/2}, ${r} 0`:`0 0, ${r} ${o/2}, 0 ${o}`});return(r,o)=>(qe(),ze("polygon",{points:be(n),fill:e.color},null,8,YR))}}),GR=["points","stroke-width","stroke"],JR=$t({props:{width:{type:Number,required:!0},height:{type:Number,required:!0},refX:{type:Number,required:!0},color:{type:String,required:!0},isSource:{type:Boolean,required:!0},units:{type:String,required:!0}},setup(e){const t=e,n=g(()=>t.units==="strokeWidth"?1:Math.min(t.width,t.height)/5),r=g(()=>{const o=n.value/2,i=t.width,a=t.height;return t.isSource?`${i-o} ${a-o}, ${o} ${a/2}, ${i-o} ${o}`:`${o} ${o}, ${i-o} ${a/2}, ${o} ${a-o}`});return(o,i)=>(qe(),ze("polyline",{points:be(r),fill:"none","stroke-width":be(n),stroke:e.color,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,GR))}}),eI=["fill","cx","cy","rx","ry"],tI=$t({props:{width:{type:Number,required:!0},height:{type:Number,required:!0},refX:{type:Number,required:!0},color:{type:String,required:!0},isSource:{type:Boolean,required:!0},units:{type:String,required:!0}},setup(e){return(t,n)=>(qe(),ze("ellipse",{fill:e.color,cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2},null,8,eI))}}),nI=["id","markerWidth","markerHeight","refX","refY","markerUnits"],rI=$t({props:{id:{type:String,required:!0},marker:{type:Object,required:!0},scale:{type:Number,required:!0}},setup(e){const t=e,n={arrow:XR,angle:JR,circle:tI},r=g(()=>t.marker.width*(t.marker.units==="strokeWidth"?1:t.scale)),o=g(()=>t.marker.height*(t.marker.units==="strokeWidth"?1:t.scale)),i=g(()=>{const a=t.marker.margin*(t.marker.units==="strokeWidth"?1:t.scale);return t.marker.isSource?r.value+a:-a});return(a,l)=>e.marker.type!=="none"&&e.marker.type!=="custom"?(qe(),ze("marker",{key:0,id:e.id,markerWidth:be(r),markerHeight:be(o),refX:be(i),refY:be(o)/2,orient:"auto",markerUnits:e.marker.units,class:"v-marker"},[(qe(),Ut(x0(n[e.marker.type]),{width:be(r),height:be(o),refX:be(i),color:e.marker.color,"is-source":e.marker.isSource,units:e.marker.units},null,8,["width","height","refX","color","is-source","units"]))],8,nI)):Un("",!0)}}),oI=["override-node","override-node-label","edge-label","edges-label"];var Fp;(function(e){e[e.INITIAL=0]="INITIAL",e[e.LOADED=1]="LOADED",e[e.UNLOADED=2]="UNLOADED"})(Fp||(Fp={}));const iI=$t({components:{VNode:mR,VNodeFocusRing:pR,VEdgeGroups:qR,VEdgeBackgrounds:RR,VEdgeLabels:BR,VBackgroundViewport:NR,VBackgroundGrid:HR,VPaths:ZR,VMarkerHead:rI},props:{nodes:{type:Object,default:()=>({})},edges:{type:Object,default:()=>({})},layouts:{type:Object,default:()=>({})},zoomLevel:{type:Number,default:1},selectedNodes:{type:Array,default:()=>[]},selectedEdges:{type:Array,default:()=>[]},configs:{type:Object,default:()=>({})},paths:{type:Array,default:()=>[]},layers:{type:Object,default:()=>({})},eventHandlers:{type:Object,default:()=>({})}},emits:["update:zoomLevel","update:selectedNodes","update:selectedEdges","update:layouts"],setup(e,{emit:t,slots:n}){const r=So(e,"nodes"),o=So(e,"edges"),i=W5();Object.entries(e.eventHandlers).forEach(([M,D])=>{i.on(M,D)});const a=UA(So(e,"configs")),l=g(()=>{const M=new Set(Object.keys(n));oI.forEach(j=>M.delete(j));const D=Object.fromEntries(lR.map(j=>[j,[]]));return Object.assign(D,Object.entries(e.layers).reduce((j,[k,Z])=>(M.delete(k),Z in j?j[Z].push(k):j[Z]=[k],j),{})),D.root.push(...M),D}),s=g(()=>a.view.grid.visible),c=g(()=>{const M=l.value;return s.value||M.background.length>0||M.grid.length>0}),u=g(()=>"override-node"in n),d=g(()=>"override-node-label"in n),f=g(()=>"edge-label"in n),h=g(()=>"edges-label"in n),m=U(),_=U(),b=U(),x=U(0),p=g(()=>x.value!==0),y=PO(e,"zoomLevel",t,M=>(M=Math.max(M,a.view.minZoomLevel),M=Math.min(M,a.view.maxZoomLevel),M)),{svgPanZoom:w,onSvgPanZoomMounted:S,onSvgPanZoomUnmounted:C}=iR(_,{viewportSelector:".v-viewport",minZoom:a.view.minZoomLevel,maxZoom:a.view.maxZoomLevel,fit:!0,center:!0,zoomEnabled:a.view.zoomEnabled,onZoom:M=>{var D,j;if(x.value===2)return;const k=(j=(D=w.value)==null?void 0:D.getRealZoom())!=null?j:1;Math.abs(y.value-k)>=1e-6&&(y.value=k,i.emit("view:zoom",k))},panEnabled:a.view.panEnabled,onPan:M=>{x.value!==2&&i.emit("view:pan",M)}});qO({container:m,svg:_,viewport:b,svgPanZoom:w});const T={width:0,height:0},O=new ResizeObserver(()=>{var M,D,j;(M=w.value)==null||M.resize();const k=(D=m.value)==null?void 0:D.getBoundingClientRect();if(k){const Z=-(T.width-k.width)/2,oe=-(T.height-k.height)/2;(j=w.value)==null||j.panBy({x:Z,y:oe});const{width:ce,height:ke}=k;Object.assign(T,{width:ce,height:ke}),i.emit("view:resize",{x:k.x,y:k.y,width:ce,height:ke})}});S(()=>{var M,D;const j=on(m.value,"svg-pan-zoom container");O.observe(j),(D=(M=a.view).onSvgPanZoomInitialized)==null||D.call(M,on(w.value,"svg-pan-zoom instance"));const k=j.getBoundingClientRect(),{width:Z,height:oe}=k;Object.assign(T,{width:Z,height:oe})}),C(()=>{O.disconnect()});const L=M=>{var D;(D=w.value)==null||D.applyAbsoluteZoomLevel(M,a.view.minZoomLevel,a.view.maxZoomLevel)};de(()=>a.view.panEnabled,M=>{var D;(D=w.value)==null||D.setPanEnabled(M)}),de(()=>a.view.zoomEnabled,M=>{var D;(D=w.value)==null||D.setZoomEnabled(M)}),de(y,M=>L(M)),de(()=>[a.view.minZoomLevel,a.view.maxZoomLevel],M=>{L(y.value)});const{scale:R}=aR(y,a.view);S(()=>{const M=e.zoomLevel;L(M)});const z=M=>{var D;Object.keys(e.nodes).length>0?((D=w.value)==null||D.updateBBox(),Ge(M)):M()},$=()=>{z(()=>{w.value&&(w.value.fitToContents(),i.emit("view:fit",void 0))})},E=()=>{z(()=>{var M;(M=w.value)==null||M.center()})},F=vp(e,"selectedNodes",r,t);de(F,M=>i.emit("node:select",Array.from(M)));const Q=vp(e,"selectedEdges",o,t);de(Q,M=>i.emit("edge:select",Array.from(M)));const J=oa(new Set),I=oa(new Set),W=oa({nodes:{}});de(()=>e.layouts,()=>Object.assign(W,e.layouts),{deep:!0,immediate:!0}),de(W,()=>t("update:layouts",W),{deep:!0});const ae=g(()=>a.node.focusring.visible),_e=QA(),Y=U(!1);i.on("node:dragstart",M=>Y.value=!0),i.on("node:dragend",M=>Y.value=!1),i.on("view:mode",M=>{var D,j,k,Z;a.view.panEnabled&&(M==="default"?(D=w.value)==null||D.enablePan():(j=w.value)==null||j.disablePan()),a.view.zoomEnabled&&(M==="default"?(k=w.value)==null||k.enableZoom():(Z=w.value)==null||Z.disableZoom())});const{nodeStates:A,edgeStates:G}=F5(r,o,F,Q,J,I,yo(a),W,R);H5(_,yo(W.nodes),yo(y),A,G,F,Q,J,I,i);const N=g(()=>a.path.visible),q=()=>({layouts:oa(W.nodes),nodes:r,edges:o,configs:yo(a),scale:yo(R),emitter:i,svgPanZoom:on(w.value)});return de(()=>a.view.layoutHandler,(M,D)=>{D.deactivate(),M.activate(q())}),S(()=>{z(()=>{const M=on(w.value,"svg-pan-zoom");M.center(),a.view.layoutHandler.activate(q()),Ge(()=>{if(Object.keys(e.nodes).length>0)a.view.fit?$():E();else{const D=M.getSizes();M.pan({x:D.width/2,y:D.height/2})}i.emit("view:load"),x.value=1})})}),C(()=>{x.value=2,i.emit("view:unload"),a.view.layoutHandler.deactivate()}),{container:m,svg:_,viewport:b,show:p,svgPanZoom:w,allConfigs:a,layerDefs:l,isShowGrid:s,isShowBackgroundViewport:c,overrideNodes:u,overrideNodeLabels:d,overrideEdgeLabels:f,overrideEdgesLabels:h,scale:R,nodeStates:A,currentSelectedNodes:F,markers:_e,dragging:Y,currentLayouts:W,visibleNodeFocusRing:ae,visiblePaths:N,fitToContents:$,panToCenter:E}},methods:{zoomIn(){var e;(e=this.svgPanZoom)==null||e.zoomIn()},zoomOut(){var e;(e=this.svgPanZoom)==null||e.zoomOut()},panTo(e){var t;(t=this.svgPanZoom)==null||t.pan(e)},panBy(e){var t;(t=this.svgPanZoom)==null||t.panBy(e)},getPan(){return on(this.svgPanZoom).getPan()},getSizes(){const e=on(this.svgPanZoom).getSizes();return{width:e.width,height:e.height,viewBox:e.viewBox}},translateFromDomToSvgCoordinates(e){return AO(on(this.svg,"svg"),on(this.viewport,"viewport"),e)},translateFromSvgToDomCoordinates(e){return RO(on(this.svg,"svg"),on(this.viewport,"viewport"),e)},getAsSvg(){const e=on(this.svg,"svg"),t=on(this.viewport,"svg viewport"),n=e.cloneNode(!0),r=t.getBBox(),o=1/this.scale,i={x:Math.floor((r.x-10)*o),y:Math.floor((r.y-10)*o),width:Math.ceil((r.width+20)*o),height:Math.ceil((r.height+20)*o)};n.setAttribute("width",i.width.toString()),n.setAttribute("height",i.height.toString());const a=n.querySelector(".v-viewport");a.setAttribute("transform",`translate(${-i.x} ${-i.y}), scale(${o})`),a.removeAttribute("style"),n.setAttribute("viewBox",`0 0 ${i.width} ${i.height}`);let l=n.outerHTML;return l=l.replaceAll(/ data-v-[0-9a-z]+=""/g,""),l=l.replaceAll(//gm,""),l}}}),aI={ref:"container",class:"v-network-graph"},lI={key:0},sI={ref:"viewport",class:"v-viewport"},uI={class:"v-layer-edges"},cI={key:2,class:"v-layer-nodes-selections"};function dI(e,t,n,r,o,i){const a=rr("v-marker-head"),l=rr("v-background-grid"),s=rr("v-background-viewport"),c=rr("v-edge-backgrounds"),u=rr("v-edge-groups"),d=rr("v-edge-labels"),f=rr("v-node-focus-ring"),h=rr("v-node"),m=rr("v-paths");return qe(),ze("div",aI,[(qe(),ze("svg",{ref:"svg",class:bn(["v-canvas",{show:e.show,dragging:e.dragging}]),width:"500",height:"500",viewBox:"0 0 500 500"},[(qe(!0),ze(Xe,null,Lt(e.layerDefs.root,_=>fn(e.$slots,_,{key:_,scale:e.scale},void 0,!0)),128)),Object.keys(e.markers).length>0?(qe(),ze("defs",lI,[(qe(!0),ze(Xe,null,Lt(e.markers,(_,b)=>(qe(),Ut(a,{id:b,key:b,marker:_,scale:e.scale},null,8,["id","marker","scale"]))),128))])):Un("",!0),e.isShowBackgroundViewport?(qe(),Ut(s,{key:1},{default:_r(()=>[(qe(!0),ze(Xe,null,Lt(e.layerDefs.background,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),e.isShowGrid?(qe(),Ut(l,{key:0})):Un("",!0),(qe(!0),ze(Xe,null,Lt(e.layerDefs.grid,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128))]),_:3})):Un("",!0),wa("g",sI,[(qe(!0),ze(Xe,null,Lt(e.layerDefs.base,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),wa("g",uI,[mt(c),mt(u)]),(qe(!0),ze(Xe,null,Lt(e.layerDefs.edges,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),e.overrideEdgeLabels?(qe(),Ut(d,{key:0},{"edge-label":_r(_=>[fn(e.$slots,"edge-label",ol(na(_)),void 0,!0)]),_:3})):Un("",!0),e.overrideEdgesLabels?(qe(),Ut(d,{key:1},{"edges-label":_r(_=>[fn(e.$slots,"edges-label",ol(na(_)),void 0,!0)]),_:3})):Un("",!0),e.visibleNodeFocusRing?(qe(),ze("g",cI,[(qe(!0),ze(Xe,null,Lt(e.currentSelectedNodes,_=>(qe(),Ut(f,{id:_,key:_,state:e.nodeStates[_],pos:e.currentLayouts.nodes[_]},null,8,["id","state","pos"]))),128))])):Un("",!0),(qe(!0),ze(Xe,null,Lt(e.layerDefs.focusring,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),mt(ic,{name:e.allConfigs.node.transition,css:!!e.allConfigs.node.transition,tag:"g",class:"v-layer-nodes"},{default:_r(()=>[(qe(!0),ze(Xe,null,Lt(e.nodeStates,(_,b)=>(qe(),Ut(h,{id:b.toString(),key:b,state:_,pos:e.currentLayouts.nodes[b]},E0({_:2},[e.overrideNodes?{name:"override-node",fn:_r(x=>[fn(e.$slots,"override-node",ol(na(x)),void 0,!0)])}:void 0,e.overrideNodeLabels?{name:"override-node-label",fn:_r(x=>[fn(e.$slots,"override-node-label",ol(na(x)),void 0,!0)])}:void 0]),1032,["id","state","pos"]))),128))]),_:3},8,["name","css"]),(qe(!0),ze(Xe,null,Lt(e.layerDefs.nodes,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128)),e.visiblePaths?(qe(),Ut(m,{key:3,paths:e.paths,edges:e.edges},null,8,["paths","edges"])):Un("",!0),(qe(!0),ze(Xe,null,Lt(e.layerDefs.paths,_=>(qe(),ze("g",{key:_,class:"v-layer"},[fn(e.$slots,_,{scale:e.scale},void 0,!0)]))),128))],512)],2))],512)}var fI=gr(iI,[["render",dI],["__scopeId","data-v-03e831bc"]]);const vI=$t({props:{area:{type:Object,required:!0},config:{type:Object,required:!0},text:{type:String,required:!1,default:""},align:{type:String,required:!1,default:"center"},verticalAlign:{type:String,required:!1,default:"center"},edge:{type:Object,required:!1,default:void 0},hovered:{type:Boolean,required:!1,default:!1},selected:{type:Boolean,required:!1,default:!1},scale:{type:Number,required:!1,default:void 0}},setup(e,{expose:t}){const n=e,r=U(0),o=U(0),i=U("middle"),a=U("central"),l=U(0);Zn(()=>{const c=n.area.source,u=n.area.target;n.align==="source"?(c.above.x==u.above.x?i.value=c.above.y>u.above.y?"start":"end":i.value=c.above.xu.above.x?"start":"end",n.verticalAlign==="above"?(r.value=u.above.x,o.value=u.above.y,a.value="text-top"):n.verticalAlign==="below"?(r.value=u.below.x,o.value=u.below.y,a.value="hanging"):(r.value=(u.above.x+u.below.x)/2,o.value=(u.above.y+u.below.y)/2,a.value="central")):(i.value="middle",n.verticalAlign==="above"?(r.value=(c.above.x+u.above.x)/2,o.value=(c.above.y+u.above.y)/2,a.value="text-top"):n.verticalAlign==="below"?(r.value=(c.below.x+u.below.x)/2,o.value=(c.below.y+u.below.y)/2,a.value="hanging"):(r.value=(c.above.x+u.below.x)/2,o.value=(c.above.y+u.below.y)/2,a.value="central"));let d=Lu(c.above,u.above).v.angleDeg();(d<-90||d>=90)&&(d=d+180,d>180&&(d-=360)),l.value=d});const s=g(()=>a.value==="central"&&!n.config.background?Gv(Kr({},n.config),{background:{visible:!0,color:"#ffffff",padding:{vertical:1,horizontal:4},borderRadius:2}}):n.config);return t({x:r,y:o,textAnchor:i,dominantBaseline:a,angle:l,updatedConfig:s}),(c,u)=>(qe(),Ut(Pc,{class:"v-edge-label",text:e.text,x:r.value,y:o.value,config:be(s),"text-anchor":i.value,"dominant-baseline":a.value,transform:`rotate(${l.value} ${r.value} ${o.value})`},null,8,["text","x","y","config","text-anchor","dominant-baseline","transform"]))}});var hI=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",VNetworkGraph:fI,VEdgeLabel:vI,VLabelText:Pc});const mI=function(e){Object.entries(hI).forEach(([t,n])=>{e.component(t,n)})};var gI=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const pI={};function yI(e,t){const n=rr("router-view");return qe(),Ut(n)}var bI=gI(pI,[["render",yI],["__file","/Users/boyan/development/opensource/gopherCronFE/src/App.vue"]]),hh={exports:{}},e_=function(t,n){return function(){return t.apply(n,arguments)}},wI=e_,mh=Object.prototype.toString,gh=function(e){return function(t){var n=mh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function Vo(e){return e=e.toLowerCase(),function(n){return gh(n)===e}}function qc(e){return Array.isArray(e)}function Pf(e){return typeof e=="undefined"}function _I(e){return e!==null&&!Pf(e)&&e.constructor!==null&&!Pf(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var t_=Vo("ArrayBuffer");function xI(e){var t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&t_(e.buffer),t}function SI(e){return typeof e=="string"}function n_(e){return typeof e=="number"}function r_(e){return e!==null&&typeof e=="object"}function Ys(e){if(gh(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function kI(e){return e&&Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}var CI=Vo("Date"),TI=Vo("File"),EI=Vo("Blob"),$I=Vo("FileList");function ph(e){return mh.call(e)==="[object Function]"}function PI(e){return r_(e)&&ph(e.pipe)}function qI(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||mh.call(e)===t||ph(e.toString)&&e.toString()===t)}var MI=Vo("URLSearchParams");function OI(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function AI(){var e;return typeof navigator!="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function yh(e,t){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),qc(e))for(var n=0,r=e.length;n0;)a=o[i],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function NI(e,t,n){e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return r!==-1&&r===n}function FI(e){if(!e)return null;if(qc(e))return e;var t=e.length;if(!n_(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n}var zI=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!="undefined"&&Object.getPrototypeOf(Uint8Array));function jI(e,t){for(var n=e&&e[Symbol.iterator],r=n.call(e),o;(o=r.next())&&!o.done;){var i=o.value;t.call(e,i[0],i[1])}}function DI(e,t){for(var n,r=[];(n=e.exec(t))!==null;)r.push(n);return r}var VI=Vo("HTMLFormElement"),HI=function(t){return function(n,r){return t.call(n,r)}}(Object.prototype.hasOwnProperty),cn={isArray:qc,isArrayBuffer:t_,isBuffer:_I,isFormData:qI,isArrayBufferView:xI,isString:SI,isNumber:n_,isObject:r_,isPlainObject:Ys,isEmptyObject:kI,isUndefined:Pf,isDate:CI,isFile:TI,isBlob:EI,isFunction:ph,isStream:PI,isURLSearchParams:MI,isStandardBrowserEnv:AI,forEach:yh,merge:qf,extend:RI,trim:OI,stripBOM:II,inherits:LI,toFlatObject:BI,kindOf:gh,kindOfTest:Vo,endsWith:NI,toArray:FI,isTypedArray:zI,isFileList:$I,forEachEntry:jI,matchAll:DI,isHTMLForm:VI,hasOwnProperty:HI},o_=cn;function $a(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}o_.inherits($a,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i_=$a.prototype,a_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){a_[e]={value:e}});Object.defineProperties($a,a_);Object.defineProperty(i_,"isAxiosError",{value:!0});$a.from=function(e,t,n,r,o,i){var a=Object.create(i_);return o_.toFlatObject(e,a,function(s){return s!==Error.prototype}),$a.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Ii=$a,UI=typeof self=="object"?self.FormData:window.FormData,WI=UI,Mt=cn,KI=Ii,QI=WI;function Mf(e){return Mt.isPlainObject(e)||Mt.isArray(e)}function l_(e){return Mt.endsWith(e,"[]")?e.slice(0,-2):e}function zp(e,t,n){return e?e.concat(t).map(function(o,i){return o=l_(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ZI(e){return Mt.isArray(e)&&!e.some(Mf)}var YI=Mt.toFlatObject(Mt,{},null,function(t){return/^is[A-Z]/.test(t)});function XI(e){return e&&Mt.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function GI(e,t,n){if(!Mt.isObject(e))throw new TypeError("target must be an object");t=t||new(QI||FormData),n=Mt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,b){return!Mt.isUndefined(b[_])});var r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,s=l&&XI(t);if(!Mt.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(Mt.isDate(m))return m.toISOString();if(!s&&Mt.isBlob(m))throw new KI("Blob is not supported. Use a Buffer instead.");return Mt.isArrayBuffer(m)||Mt.isTypedArray(m)?s&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,_,b){var x=m;if(m&&!b&&typeof m=="object"){if(Mt.endsWith(_,"{}"))_=r?_:_.slice(0,-2),m=JSON.stringify(m);else if(Mt.isArray(m)&&ZI(m)||Mt.isFileList(m)||Mt.endsWith(_,"[]")&&(x=Mt.toArray(m)))return _=l_(_),x.forEach(function(y,w){!Mt.isUndefined(y)&&t.append(a===!0?zp([_],w,i):a===null?_:_+"[]",c(y))}),!1}return Mf(m)?!0:(t.append(zp(b,_,i),c(m)),!1)}var d=[],f=Object.assign(YI,{defaultVisitor:u,convertValue:c,isVisitable:Mf});function h(m,_){if(!Mt.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(m),Mt.forEach(m,function(x,p){var y=!Mt.isUndefined(x)&&o.call(t,x,Mt.isString(p)?p.trim():p,_,f);y===!0&&h(x,_?_.concat(p):[p])}),d.pop()}}if(!Mt.isObject(e))throw new TypeError("data must be an object");return h(e),t}var Mc=GI,JI=Mc;function jp(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(r){return t[r]})}function s_(e,t){this._pairs=[],e&&JI(e,this,t)}var u_=s_.prototype;u_.append=function(t,n){this._pairs.push([t,n])};u_.toString=function(t){var n=t?function(r){return t.call(this,r,jp)}:jp;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var c_=s_,eL=cn,tL=c_;function nL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var d_=function(t,n,r){if(!n)return t;var o=t.indexOf("#");o!==-1&&(t=t.slice(0,o));var i=r&&r.encode||nL,a=eL.isURLSearchParams(n)?n.toString():new tL(n,r).toString(i);return a&&(t+=(t.indexOf("?")===-1?"?":"&")+a),t},rL=cn;function ss(){this.handlers=[]}ss.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};ss.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};ss.prototype.clear=function(){this.handlers&&(this.handlers=[])};ss.prototype.forEach=function(t){rL.forEach(this.handlers,function(r){r!==null&&t(r)})};var oL=ss,iL=cn,f_=function(t,n){iL.forEach(t,function(o,i){i!==n&&i.toUpperCase()===n.toUpperCase()&&(t[n]=o,delete t[i])})},v_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},aL=c_,lL=typeof URLSearchParams!="undefined"?URLSearchParams:aL,sL=FormData,uL={isBrowser:!0,classes:{URLSearchParams:lL,FormData:sL,Blob},protocols:["http","https","file","blob","url","data"]},bh=uL,cL=cn,dL=Mc,Dp=bh,fL=function(t,n){return dL(t,new Dp.classes.URLSearchParams,Object.assign({visitor:function(r,o,i,a){return Dp.isNode&&cL.isBuffer(r)?(this.append(o,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},n))},fo=cn;function vL(e){return fo.matchAll(/\w+|\[(\w*)]/g,e).map(function(t){return t[0]==="[]"?"":t[1]||t[0]})}function hL(e){var t={},n=Object.keys(e),r,o=n.length,i;for(r=0;r=r.length;if(l=!l&&fo.isArray(i)?i.length:l,c)return fo.hasOwnProperty(i,l)?i[l]=[i[l],o]:i[l]=o,!s;(!i[l]||!fo.isObject(i[l]))&&(i[l]=[]);var u=t(r,o,i[l],a);return u&&fo.isArray(i[l])&&(i[l]=hL(i[l])),!s}if(fo.isFormData(e)&&fo.isFunction(e.entries)){var n={};return fo.forEachEntry(e,function(r,o){t(vL(r),o,n,0)}),n}return null}var h_=mL,xd=Ii,gL=function(t,n,r){var o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):n(new xd("Request failed with status code "+r.status,[xd.ERR_BAD_REQUEST,xd.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))},Fs=cn,pL=Fs.isStandardBrowserEnv()?function(){return{write:function(n,r,o,i,a,l){var s=[];s.push(n+"="+encodeURIComponent(r)),Fs.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),Fs.isString(i)&&s.push("path="+i),Fs.isString(a)&&s.push("domain="+a),l===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){var r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),yL=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},bL=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},wL=yL,_L=bL,m_=function(t,n){return t&&!wL(n)?_L(t,n):n},Sd=cn,xL=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],SL=function(t){var n={},r,o,i;return t&&Sd.forEach(t.split(` +`),function(l){if(i=l.indexOf(":"),r=Sd.trim(l.slice(0,i)).toLowerCase(),o=Sd.trim(l.slice(i+1)),r){if(n[r]&&xL.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([o]):n[r]=n[r]?n[r]+", "+o:o}}),n},Vp=cn,kL=Vp.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function o(i){var a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){var l=Vp.isString(a)?o(a):a;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}(),Of=Ii,CL=cn;function g_(e,t,n){Of.call(this,e==null?"canceled":e,Of.ERR_CANCELED,t,n),this.name="CanceledError"}CL.inherits(g_,Of,{__CANCEL__:!0});var Oc=g_,TL=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""},Qi=cn,EL=gL,$L=pL,PL=d_,qL=m_,ML=SL,OL=kL,AL=v_,Ar=Ii,RL=Oc,IL=TL,LL=bh,Hp=function(t){return new Promise(function(r,o){var i=t.data,a=t.headers,l=t.responseType,s=t.withXSRFToken,c;function u(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}Qi.isFormData(i)&&Qi.isStandardBrowserEnv()&&delete a["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var f=t.auth.username||"",h=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.Authorization="Basic "+btoa(f+":"+h)}var m=qL(t.baseURL,t.url);d.open(t.method.toUpperCase(),PL(m,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function _(){if(!!d){var p="getAllResponseHeaders"in d?ML(d.getAllResponseHeaders()):null,y=!l||l==="text"||l==="json"?d.responseText:d.response,w={data:y,status:d.status,statusText:d.statusText,headers:p,config:t,request:d};EL(function(C){r(C),u()},function(C){o(C),u()},w),d=null}}if("onloadend"in d?d.onloadend=_:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(_)},d.onabort=function(){!d||(o(new Ar("Request aborted",Ar.ECONNABORTED,t,d)),d=null)},d.onerror=function(){o(new Ar("Network Error",Ar.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){var y=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",w=t.transitional||AL;t.timeoutErrorMessage&&(y=t.timeoutErrorMessage),o(new Ar(y,w.clarifyTimeoutError?Ar.ETIMEDOUT:Ar.ECONNABORTED,t,d)),d=null},Qi.isStandardBrowserEnv()&&(s&&Qi.isFunction(s)&&(s=s(t)),s||s!==!1&&OL(m))){var b=t.xsrfHeaderName&&t.xsrfCookieName&&$L.read(t.xsrfCookieName);b&&(a[t.xsrfHeaderName]=b)}"setRequestHeader"in d&&Qi.forEach(a,function(y,w){typeof i=="undefined"&&w.toLowerCase()==="content-type"?delete a[w]:d.setRequestHeader(w,y)}),Qi.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),l&&l!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(c=function(p){!d||(o(!p||p.type?new RL(null,t,req):p),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c))),!i&&i!==!1&&i!==0&&i!==""&&(i=null);var x=IL(m);if(x&&LL.protocols.indexOf(x)===-1){o(new Ar("Unsupported protocol "+x+":",Ar.ERR_BAD_REQUEST,t));return}d.send(i)})},an=cn,Up=f_,Wp=Ii,BL=v_,NL=Mc,FL=fL,Kp=bh,zL=h_,jL={"Content-Type":"application/x-www-form-urlencoded"};function Qp(e,t){!an.isUndefined(e)&&an.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function DL(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Hp),e}function VL(e,t,n){if(an.isString(e))try{return(t||JSON.parse)(e),an.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Ac={transitional:BL,adapter:DL(),transformRequest:[function(t,n){Up(n,"Accept"),Up(n,"Content-Type");var r=n&&n["Content-Type"]||"",o=r.indexOf("application/json")>-1,i=an.isObject(t);i&&an.isHTMLForm(t)&&(t=new FormData(t));var a=an.isFormData(t);if(a)return o?JSON.stringify(zL(t)):t;if(an.isArrayBuffer(t)||an.isBuffer(t)||an.isStream(t)||an.isFile(t)||an.isBlob(t))return t;if(an.isArrayBufferView(t))return t.buffer;if(an.isURLSearchParams(t))return Qp(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var l;if(i){if(r.indexOf("application/x-www-form-urlencoded")!==-1)return FL(t,this.formSerializer).toString();if((l=an.isFileList(t))||r.indexOf("multipart/form-data")>-1){var s=this.env&&this.env.FormData;return NL(l?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(Qp(n,"application/json"),VL(t)):t}],transformResponse:[function(t){var n=this.transitional||Ac.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&an.isString(t)&&(r&&!this.responseType||o)){var i=n&&n.silentJSONParsing,a=!i&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?Wp.from(l,Wp.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kp.classes.FormData,Blob:Kp.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};an.forEach(["delete","get","head"],function(t){Ac.headers[t]={}});an.forEach(["post","put","patch"],function(t){Ac.headers[t]=an.merge(jL)});var wh=Ac,HL=cn,UL=wh,WL=function(t,n,r,o){var i=this||UL;return HL.forEach(o,function(l){t=l.call(i,t,n,r)}),t},p_=function(t){return!!(t&&t.__CANCEL__)},Zp=cn,kd=WL,KL=p_,QL=wh,ZL=Oc,Yp=f_;function Cd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ZL}var YL=function(t){Cd(t),t.headers=t.headers||{},t.data=kd.call(t,t.data,t.headers,null,t.transformRequest),Yp(t.headers,"Accept"),Yp(t.headers,"Content-Type"),t.headers=Zp.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Zp.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var n=t.adapter||QL.adapter;return n(t).then(function(o){return Cd(t),o.data=kd.call(t,o.data,o.headers,o.status,t.transformResponse),o},function(o){return KL(o)||(Cd(t),o&&o.response&&(o.response.data=kd.call(t,o.response.data,o.response.headers,o.response.status,t.transformResponse))),Promise.reject(o)})},xn=cn,y_=function(t,n){n=n||{};var r={};function o(u,d){return xn.isPlainObject(u)&&xn.isPlainObject(d)?xn.merge(u,d):xn.isEmptyObject(d)?xn.merge({},u):xn.isPlainObject(d)?xn.merge({},d):xn.isArray(d)?d.slice():d}function i(u){if(xn.isUndefined(n[u])){if(!xn.isUndefined(t[u]))return o(void 0,t[u])}else return o(t[u],n[u])}function a(u){if(!xn.isUndefined(n[u]))return o(void 0,n[u])}function l(u){if(xn.isUndefined(n[u])){if(!xn.isUndefined(t[u]))return o(void 0,t[u])}else return o(void 0,n[u])}function s(u){if(u in n)return o(t[u],n[u]);if(u in t)return o(void 0,t[u])}var c={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s};return xn.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var f=c[d]||i,h=f(d);xn.isUndefined(h)&&f!==s||(r[d]=h)}),r},b_={version:"0.28.0"},XL=b_.version,mo=Ii,_h={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){_h[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Xp={};_h.transitional=function(t,n,r){function o(i,a){return"[Axios v"+XL+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return function(i,a,l){if(t===!1)throw new mo(o(a," has been removed"+(n?" in "+n:"")),mo.ERR_DEPRECATED);return n&&!Xp[a]&&(Xp[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function GL(e,t,n){if(typeof e!="object")throw new mo("options must be an object",mo.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new mo("option "+i+" must be "+s,mo.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new mo("Unknown option "+i,mo.ERR_BAD_OPTION)}}var JL={assertOptions:GL,validators:_h},xh=cn,eB=d_,Gp=oL,Jp=YL,Rc=y_,tB=m_,w_=JL,Zi=w_.validators;function Pa(e){this.defaults=e,this.interceptors={request:new Gp,response:new Gp}}Pa.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rc(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&w_.assertOptions(r,{silentJSONParsing:Zi.transitional(Zi.boolean),forcedJSONParsing:Zi.transitional(Zi.boolean),clarifyTimeoutError:Zi.transitional(Zi.boolean)},!1);var o=n.paramsSerializer;xh.isFunction(o)&&(n.paramsSerializer={serialize:o});var i=[],a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(a=a&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});var l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});var s;if(!a){var c=[Jp,void 0];for(Array.prototype.unshift.apply(c,i),c=c.concat(l),s=Promise.resolve(n);c.length;)s=s.then(c.shift(),c.shift());return s}for(var u=n;i.length;){var d=i.shift(),f=i.shift();try{u=d(u)}catch(h){f(h);break}}try{s=Jp(u)}catch(h){return Promise.reject(h)}for(;l.length;)s=s.then(l.shift(),l.shift());return s};Pa.prototype.getUri=function(t){t=Rc(this.defaults,t);var n=tB(t.baseURL,t.url);return eB(n,t.params,t.paramsSerializer)};xh.forEach(["delete","get","head","options"],function(t){Pa.prototype[t]=function(n,r){return this.request(Rc(r||{},{method:t,url:n,data:(r||{}).data}))}});xh.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(Rc(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Pa.prototype[t]=n(),Pa.prototype[t+"Form"]=n(!0)});var nB=Pa,rB=Oc;function qa(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(o){t=o});var n=this;this.promise.then(function(r){if(!!n._listeners){for(var o=n._listeners.length;o-- >0;)n._listeners[o](r);n._listeners=null}}),this.promise.then=function(r){var o,i=new Promise(function(a){n.subscribe(a),o=a}).then(r);return i.cancel=function(){n.unsubscribe(o)},i},e(function(o,i,a){n.reason||(n.reason=new rB(o,i,a),t(n.reason))})}qa.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};qa.prototype.subscribe=function(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]};qa.prototype.unsubscribe=function(t){if(!!this._listeners){var n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}};qa.source=function(){var t,n=new qa(function(o){t=o});return{token:n,cancel:t}};var oB=qa,iB=function(t){return function(r){return t.apply(null,r)}},aB=cn,lB=function(t){return aB.isObject(t)&&t.isAxiosError===!0},Af=cn,sB=e_,Xs=nB,uB=y_,cB=wh,dB=h_;function __(e){var t=new Xs(e),n=sB(Xs.prototype.request,t);return Af.extend(n,Xs.prototype,t),Af.extend(n,t),n.create=function(o){return __(uB(e,o))},n}var Tn=__(cB);Tn.Axios=Xs;Tn.CanceledError=Oc;Tn.CancelToken=oB;Tn.isCancel=p_;Tn.VERSION=b_.version;Tn.toFormData=Mc;Tn.AxiosError=Ii;Tn.Cancel=Tn.CanceledError;Tn.all=function(t){return Promise.all(t)};Tn.spread=iB;Tn.isAxiosError=lB;Tn.formToJSON=function(e){return dB(Af.isHTMLForm(e)?new FormData(e):e)};hh.exports=Tn;hh.exports.default=Tn;var fB=hh.exports;const vB="modulepreload",ey={},hB="./",Ht=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${hB}${r}`,r in ey)return;ey[r]=!0;const o=r.endsWith(".css"),i=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${i}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":vB,o||(a.as="script",a.crossOrigin=""),a.href=r,document.head.appendChild(a),o)return new Promise((l,s)=>{a.addEventListener("load",l),a.addEventListener("error",()=>s(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function mB(){return x_().__VUE_DEVTOOLS_GLOBAL_HOOK__}function x_(){return typeof navigator!="undefined"&&typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const gB=typeof Proxy=="function",pB="devtools-plugin:setup",yB="plugin:settings:set";let Yi,Rf;function bB(){var e;return Yi!==void 0||(typeof window!="undefined"&&window.performance?(Yi=!0,Rf=window.performance):typeof global!="undefined"&&((e=global.perf_hooks)===null||e===void 0?void 0:e.performance)?(Yi=!0,Rf=global.perf_hooks.performance):Yi=!1),Yi}function wB(){return bB()?Rf.now():Date.now()}class _B{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const a in t.settings){const l=t.settings[a];r[a]=l.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let i=Object.assign({},r);try{const a=localStorage.getItem(o),l=JSON.parse(a);Object.assign(i,l)}catch{}this.fallbacks={getSettings(){return i},setSettings(a){try{localStorage.setItem(o,JSON.stringify(a))}catch{}i=a},now(){return wB()}},n&&n.on(yB,(a,l)=>{a===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(a,l)=>this.target?this.target.on[l]:(...s)=>{this.onQueue.push({method:l,args:s})}}),this.proxiedTarget=new Proxy({},{get:(a,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...s)=>(this.targetQueue.push({method:l,args:s,resolve:()=>{}}),this.fallbacks[l](...s)):(...s)=>new Promise(c=>{this.targetQueue.push({method:l,args:s,resolve:c})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function S_(e,t){const n=e,r=x_(),o=mB(),i=gB&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!i))o.emit(pB,e,t);else{const a=i?new _B(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:a}),a&&t(a.proxiedTarget)}}/*! * vue-router v4.0.14 * (c) 2022 Eduardo San Martin Morote * @license MIT - */const k1=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",ja=e=>k1?Symbol("[vue-router]: "+e):"[vue-router]: "+e,xB=ja("router view location matched"),ty=ja("router view depth"),Ic=ja("router"),Sh=ja("route location"),If=ja("router view location"),jr=typeof window!="undefined";function SB(e){return e.__esModule||k1&&e[Symbol.toStringTag]==="Module"}const Ct=Object.assign;function Td(e,t){const n={};for(const r in t){const o=t[r];n[r]=Array.isArray(o)?o.map(e):e(o)}return n}const $l=()=>{};function bt(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const kB=/\/$/,CB=e=>e.replace(kB,"");function Ed(e,t,n="/"){let r,o={},i="",a="";const l=t.indexOf("?"),s=t.indexOf("#",l>-1?l:0);return l>-1&&(r=t.slice(0,l),i=t.slice(l+1,s>-1?s:t.length),o=e(i)),s>-1&&(r=r||t.slice(0,s),a=t.slice(s,t.length)),r=$B(r!=null?r:t,n),{fullPath:r+(i&&"?")+i+a,path:r,query:o,hash:a}}function TB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ny(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ry(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&Fo(t.matched[r],n.matched[o])&&C1(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Fo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function C1(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!EB(e[n],t[n]))return!1;return!0}function EB(e,t){return Array.isArray(e)?oy(e,t):Array.isArray(t)?oy(t,e):e===t}function oy(e,t){return Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function $B(e,t){if(e.startsWith("/"))return e;if(!t.startsWith("/"))return bt(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o=n.length-1,i,a;for(i=0;i({left:window.pageXOffset,top:window.pageYOffset});function AB(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#");if(typeof e.el=="string"&&(!r||!document.getElementById(e.el.slice(1))))try{const i=document.querySelector(e.el);if(r&&i){bt(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{bt(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o){bt(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=OB(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function iy(e,t){return(history.state?history.state.position-t:-1)+e}const Lf=new Map;function RB(e,t){Lf.set(e,t)}function IB(e){const t=Lf.get(e);return Lf.delete(e),t}let LB=()=>location.protocol+"//"+location.host;function T1(e,t){const{pathname:n,search:r,hash:o}=t,i=e.indexOf("#");if(i>-1){let l=o.includes(e.slice(i))?e.slice(i).length:1,s=o.slice(l);return s[0]!=="/"&&(s="/"+s),ny(s,"")}return ny(n,e)+r+o}function BB(e,t,n,r){let o=[],i=[],a=null;const l=({state:f})=>{const h=T1(e,location),m=n.value,_=t.value;let b=0;if(f){if(n.value=h,t.value=f,a&&a===m){a=null;return}b=_?f.position-_.position:0}else r(h);o.forEach(x=>{x(n.value,m,{delta:b,type:Hl.pop,direction:b?b>0?Pl.forward:Pl.back:Pl.unknown})})};function s(){a=n.value}function c(f){o.push(f);const h=()=>{const m=o.indexOf(f);m>-1&&o.splice(m,1)};return i.push(h),h}function u(){const{history:f}=window;!f.state||f.replaceState(Ct({},f.state,{scroll:Lc()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u),{pauseListeners:s,listen:c,destroy:d}}function ay(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Lc():null}}function NB(e){const{history:t,location:n}=window,r={value:T1(e,n)},o={value:t.state};o.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:LB()+e+s;try{t[u?"replaceState":"pushState"](c,"",f),o.value=c}catch(h){bt("Error with push/replace State",h),n[u?"replace":"assign"](f)}}function a(s,c){const u=Ct({},t.state,ay(o.value.back,s,o.value.forward,!0),c,{position:o.value.position});i(s,u,!0),r.value=s}function l(s,c){const u=Ct({},o.value,t.state,{forward:s,scroll:Lc()});t.state||bt(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: + */const k_=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",ja=e=>k_?Symbol("[vue-router]: "+e):"[vue-router]: "+e,xB=ja("router view location matched"),ty=ja("router view depth"),Ic=ja("router"),Sh=ja("route location"),If=ja("router view location"),jr=typeof window!="undefined";function SB(e){return e.__esModule||k_&&e[Symbol.toStringTag]==="Module"}const Ct=Object.assign;function Td(e,t){const n={};for(const r in t){const o=t[r];n[r]=Array.isArray(o)?o.map(e):e(o)}return n}const $l=()=>{};function bt(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const kB=/\/$/,CB=e=>e.replace(kB,"");function Ed(e,t,n="/"){let r,o={},i="",a="";const l=t.indexOf("?"),s=t.indexOf("#",l>-1?l:0);return l>-1&&(r=t.slice(0,l),i=t.slice(l+1,s>-1?s:t.length),o=e(i)),s>-1&&(r=r||t.slice(0,s),a=t.slice(s,t.length)),r=$B(r!=null?r:t,n),{fullPath:r+(i&&"?")+i+a,path:r,query:o,hash:a}}function TB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ny(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ry(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&Fo(t.matched[r],n.matched[o])&&C_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Fo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function C_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!EB(e[n],t[n]))return!1;return!0}function EB(e,t){return Array.isArray(e)?oy(e,t):Array.isArray(t)?oy(t,e):e===t}function oy(e,t){return Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function $B(e,t){if(e.startsWith("/"))return e;if(!t.startsWith("/"))return bt(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o=n.length-1,i,a;for(i=0;i({left:window.pageXOffset,top:window.pageYOffset});function AB(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#");if(typeof e.el=="string"&&(!r||!document.getElementById(e.el.slice(1))))try{const i=document.querySelector(e.el);if(r&&i){bt(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{bt(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o){bt(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=OB(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function iy(e,t){return(history.state?history.state.position-t:-1)+e}const Lf=new Map;function RB(e,t){Lf.set(e,t)}function IB(e){const t=Lf.get(e);return Lf.delete(e),t}let LB=()=>location.protocol+"//"+location.host;function T_(e,t){const{pathname:n,search:r,hash:o}=t,i=e.indexOf("#");if(i>-1){let l=o.includes(e.slice(i))?e.slice(i).length:1,s=o.slice(l);return s[0]!=="/"&&(s="/"+s),ny(s,"")}return ny(n,e)+r+o}function BB(e,t,n,r){let o=[],i=[],a=null;const l=({state:f})=>{const h=T_(e,location),m=n.value,_=t.value;let b=0;if(f){if(n.value=h,t.value=f,a&&a===m){a=null;return}b=_?f.position-_.position:0}else r(h);o.forEach(x=>{x(n.value,m,{delta:b,type:Hl.pop,direction:b?b>0?Pl.forward:Pl.back:Pl.unknown})})};function s(){a=n.value}function c(f){o.push(f);const h=()=>{const m=o.indexOf(f);m>-1&&o.splice(m,1)};return i.push(h),h}function u(){const{history:f}=window;!f.state||f.replaceState(Ct({},f.state,{scroll:Lc()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u),{pauseListeners:s,listen:c,destroy:d}}function ay(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Lc():null}}function NB(e){const{history:t,location:n}=window,r={value:T_(e,n)},o={value:t.state};o.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:LB()+e+s;try{t[u?"replaceState":"pushState"](c,"",f),o.value=c}catch(h){bt("Error with push/replace State",h),n[u?"replace":"assign"](f)}}function a(s,c){const u=Ct({},t.state,ay(o.value.back,s,o.value.forward,!0),c,{position:o.value.position});i(s,u,!0),r.value=s}function l(s,c){const u=Ct({},o.value,t.state,{forward:s,scroll:Lc()});t.state||bt(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: history.replaceState(history.state, '', url) You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`),i(u.current,u,!0);const d=Ct({},ay(r.value,s,null),{position:u.position+1},c);i(s,d,!1),r.value=s}return{location:r,state:o,push:l,replace:a}}function FB(e){e=PB(e);const t=NB(e),n=BB(e,t.state,t.location,t.replace);function r(i,a=!0){a||n.pauseListeners(),history.go(i)}const o=Ct({location:"",base:e,go:r,createHref:MB.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function zB(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),!e.endsWith("#/")&&!e.endsWith("#")&&bt(`A hash base must end with a "#": -"${e}" should be "${e.replace(/#.*$/,"#")}".`),FB(e)}function jB(e){return typeof e=="string"||e&&typeof e=="object"}function E1(e){return typeof e=="string"||typeof e=="symbol"}const so={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},$1=ja("navigation failure");var ly;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ly||(ly={}));const DB={[1]({location:e,currentLocation:t}){return`No match for +"${e}" should be "${e.replace(/#.*$/,"#")}".`),FB(e)}function jB(e){return typeof e=="string"||e&&typeof e=="object"}function E_(e){return typeof e=="string"||typeof e=="symbol"}const so={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},$_=ja("navigation failure");var ly;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ly||(ly={}));const DB={[1]({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at -`+JSON.stringify(t):""}`},[2]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${HB(t)}" via a navigation guard.`},[4]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[8]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[16]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function Ma(e,t){return Ct(new Error(DB[e](t)),{type:e,[$1]:!0},t)}function uo(e,t){return e instanceof Error&&$1 in e&&(t==null||!!(e.type&t))}const VB=["params","query","hash"];function HB(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of VB)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const sy="[^/]+?",UB={sensitive:!1,strict:!1,start:!0,end:!0},WB=/[.+*?^${}()[\]/\\]/g;function KB(e,t){const n=Ct({},UB,t),r=[];let o=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(o+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function ZB(e,t){let n=0;const r=e.score,o=t.score;for(;n1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=s}for(;l{a(p)}:$l}function a(u){if(E1(u)){const d=r.get(u);d&&(r.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&r.delete(u.record.name),u.children.forEach(a),u.alias.forEach(a))}}function l(){return n}function s(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!P1(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!uy(u)&&r.set(u.record.name,u)}function c(u,d){let f,h={},m,_;if("name"in u&&u.name){if(f=r.get(u.name),!f)throw Ma(1,{location:u});_=f.record.name,h=Ct(tN(d.params,f.keys.filter(p=>!p.optional).map(p=>p.name)),u.params),m=f.stringify(h)}else if("path"in u)m=u.path,m.startsWith("/")||bt(`The Matcher cannot resolve relative paths but received "${m}". Unless you directly called \`matcher.resolve("${m}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`),f=n.find(p=>p.re.test(m)),f&&(h=f.parse(m),_=f.record.name);else{if(f=d.name?r.get(d.name):n.find(p=>p.re.test(d.path)),!f)throw Ma(1,{location:u,currentLocation:d});_=f.record.name,h=Ct({},d.params,u.params),m=f.stringify(h)}const b=[];let x=f;for(;x;)b.unshift(x.record),x=x.parent;return{name:_,path:m,params:h,matched:b,meta:oN(b)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:a,getRoutes:l,getRecordMatcher:o}}function tN(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function nN(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:rN(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function rN(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function uy(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function oN(e){return e.reduce((t,n)=>Ct(t,n.meta),{})}function cy(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Bf(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function iN(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(Bf.bind(null,n)))return bt(`Alias "${t.record.path}" and the original record: "${e.record.path}" should have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(Bf.bind(null,n)))return bt(`Alias "${t.record.path}" and the original record: "${e.record.path}" should have the exact same param named "${n.name}"`)}function aN(e,t){for(const n of t.keys)if(!e.keys.find(Bf.bind(null,n)))return bt(`Absolute path "${e.record.path}" should have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function P1(e,t){return t.children.some(n=>n===e||P1(e,n))}const q1=/#/g,lN=/&/g,sN=/\//g,uN=/=/g,cN=/\?/g,M1=/\+/g,dN=/%5B/g,fN=/%5D/g,O1=/%5E/g,vN=/%60/g,A1=/%7B/g,hN=/%7C/g,R1=/%7D/g,mN=/%20/g;function kh(e){return encodeURI(""+e).replace(hN,"|").replace(dN,"[").replace(fN,"]")}function gN(e){return kh(e).replace(A1,"{").replace(R1,"}").replace(O1,"^")}function Nf(e){return kh(e).replace(M1,"%2B").replace(mN,"+").replace(q1,"%23").replace(lN,"%26").replace(vN,"`").replace(A1,"{").replace(R1,"}").replace(O1,"^")}function pN(e){return Nf(e).replace(uN,"%3D")}function yN(e){return kh(e).replace(q1,"%23").replace(cN,"%3F")}function bN(e){return e==null?"":yN(e).replace(sN,"%2F")}function Ul(e){try{return decodeURIComponent(""+e)}catch{bt(`Error decoding "${e}". Using original value`)}return""+e}function wN(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;oi&&Nf(i)):[r&&Nf(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function _N(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Array.isArray(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}function tl(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function go(e,t,n,r,o){const i=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((a,l)=>{const s=d=>{d===!1?l(Ma(4,{from:n,to:t})):d instanceof Error?l(d):jB(d)?l(Ma(2,{from:t,to:d})):(i&&r.enterCallbacks[o]===i&&typeof d=="function"&&i.push(d),a())},c=e.call(r&&r.instances[o],t,n,xN(s,t,n));let u=Promise.resolve(c);if(e.length<3&&(u=u.then(s)),e.length>2){const d=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: +`+JSON.stringify(t):""}`},[2]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${HB(t)}" via a navigation guard.`},[4]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[8]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[16]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function Ma(e,t){return Ct(new Error(DB[e](t)),{type:e,[$_]:!0},t)}function uo(e,t){return e instanceof Error&&$_ in e&&(t==null||!!(e.type&t))}const VB=["params","query","hash"];function HB(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of VB)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const sy="[^/]+?",UB={sensitive:!1,strict:!1,start:!0,end:!0},WB=/[.+*?^${}()[\]/\\]/g;function KB(e,t){const n=Ct({},UB,t),r=[];let o=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(o+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function ZB(e,t){let n=0;const r=e.score,o=t.score;for(;n1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=s}for(;l{a(p)}:$l}function a(u){if(E_(u)){const d=r.get(u);d&&(r.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&r.delete(u.record.name),u.children.forEach(a),u.alias.forEach(a))}}function l(){return n}function s(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!P_(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!uy(u)&&r.set(u.record.name,u)}function c(u,d){let f,h={},m,_;if("name"in u&&u.name){if(f=r.get(u.name),!f)throw Ma(1,{location:u});_=f.record.name,h=Ct(tN(d.params,f.keys.filter(p=>!p.optional).map(p=>p.name)),u.params),m=f.stringify(h)}else if("path"in u)m=u.path,m.startsWith("/")||bt(`The Matcher cannot resolve relative paths but received "${m}". Unless you directly called \`matcher.resolve("${m}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`),f=n.find(p=>p.re.test(m)),f&&(h=f.parse(m),_=f.record.name);else{if(f=d.name?r.get(d.name):n.find(p=>p.re.test(d.path)),!f)throw Ma(1,{location:u,currentLocation:d});_=f.record.name,h=Ct({},d.params,u.params),m=f.stringify(h)}const b=[];let x=f;for(;x;)b.unshift(x.record),x=x.parent;return{name:_,path:m,params:h,matched:b,meta:oN(b)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:a,getRoutes:l,getRecordMatcher:o}}function tN(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function nN(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:rN(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function rN(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function uy(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function oN(e){return e.reduce((t,n)=>Ct(t,n.meta),{})}function cy(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Bf(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function iN(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(Bf.bind(null,n)))return bt(`Alias "${t.record.path}" and the original record: "${e.record.path}" should have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(Bf.bind(null,n)))return bt(`Alias "${t.record.path}" and the original record: "${e.record.path}" should have the exact same param named "${n.name}"`)}function aN(e,t){for(const n of t.keys)if(!e.keys.find(Bf.bind(null,n)))return bt(`Absolute path "${e.record.path}" should have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function P_(e,t){return t.children.some(n=>n===e||P_(e,n))}const q_=/#/g,lN=/&/g,sN=/\//g,uN=/=/g,cN=/\?/g,M_=/\+/g,dN=/%5B/g,fN=/%5D/g,O_=/%5E/g,vN=/%60/g,A_=/%7B/g,hN=/%7C/g,R_=/%7D/g,mN=/%20/g;function kh(e){return encodeURI(""+e).replace(hN,"|").replace(dN,"[").replace(fN,"]")}function gN(e){return kh(e).replace(A_,"{").replace(R_,"}").replace(O_,"^")}function Nf(e){return kh(e).replace(M_,"%2B").replace(mN,"+").replace(q_,"%23").replace(lN,"%26").replace(vN,"`").replace(A_,"{").replace(R_,"}").replace(O_,"^")}function pN(e){return Nf(e).replace(uN,"%3D")}function yN(e){return kh(e).replace(q_,"%23").replace(cN,"%3F")}function bN(e){return e==null?"":yN(e).replace(sN,"%2F")}function Ul(e){try{return decodeURIComponent(""+e)}catch{bt(`Error decoding "${e}". Using original value`)}return""+e}function wN(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;oi&&Nf(i)):[r&&Nf(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function _N(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Array.isArray(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}function tl(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function go(e,t,n,r,o){const i=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((a,l)=>{const s=d=>{d===!1?l(Ma(4,{from:n,to:t})):d instanceof Error?l(d):jB(d)?l(Ma(2,{from:t,to:d})):(i&&r.enterCallbacks[o]===i&&typeof d=="function"&&i.push(d),a())},c=e.call(r&&r.instances[o],t,n,xN(s,t,n));let u=Promise.resolve(c);if(e.length<3&&(u=u.then(s)),e.length>2){const d=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: ${e.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof c=="object"&&"then"in c)u=u.then(f=>s._called?f:(bt(d),Promise.reject(new Error("Invalid navigation guard"))));else if(c!==void 0&&!s._called){bt(d),l(new Error("Invalid navigation guard"));return}}u.catch(d=>l(d))})}function xN(e,t,n){let r=0;return function(){r++===1&&bt(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,r===1&&e.apply(null,arguments)}}function $d(e,t,n,r){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];{if(!l||typeof l!="object"&&typeof l!="function")throw bt(`Component "${a}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`),new Error("Invalid route component");if("then"in l){bt(`Component "${a}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const s=l;l=()=>s}else l.__asyncLoader&&!l.__warnedDefineAsync&&(l.__warnedDefineAsync=!0,bt(`Component "${a}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(SN(l)){const c=(l.__vccOpts||l)[t];c&&o.push(go(c,n,r,i,a))}else{let s=l();"catch"in s||(bt(`Component "${a}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),s=Promise.resolve(s)),o.push(()=>s.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const u=SB(c)?c.default:c;i.components[a]=u;const f=(u.__vccOpts||u)[t];return f&&go(f,n,r,i,a)()}))}}return o}function SN(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function fy(e){const t=gt(Ic),n=gt(Sh),r=g(()=>t.resolve(be(e.to))),o=g(()=>{const{matched:s}=r.value,{length:c}=s,u=s[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Fo.bind(null,u));if(f>-1)return f;const h=vy(s[c-2]);return c>1&&vy(u)===h&&d[d.length-1].path!==h?d.findIndex(Fo.bind(null,s[c-2])):f}),i=g(()=>o.value>-1&&EN(n.params,r.value.params)),a=g(()=>o.value>-1&&o.value===n.matched.length-1&&C1(n.params,r.value.params));function l(s={}){return TN(s)?t[be(e.replace)?"replace":"push"](be(e.to)).catch($l):Promise.resolve()}if(jr){const s=$e();if(s){const c={route:r.value,isActive:i.value,isExactActive:a.value};s.__vrl_devtools=s.__vrl_devtools||[],s.__vrl_devtools.push(c),Zn(()=>{c.route=r.value,c.isActive=i.value,c.isExactActive=a.value},{flush:"post"})}}return{route:r,href:g(()=>r.value.href),isActive:i,isExactActive:a,navigate:l}}const kN=$t({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:fy,setup(e,{slots:t}){const n=Kt(fy(e)),{options:r}=gt(Ic),o=g(()=>({[hy(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[hy(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:v("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},i)}}}),CN=kN;function TN(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function EN(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!Array.isArray(o)||o.length!==r.length||r.some((i,a)=>i!==o[a]))return!1}return!0}function vy(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const hy=(e,t,n)=>e!=null?e:t!=null?t:n,$N=$t({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){qN();const r=gt(If),o=g(()=>e.route||r.value),i=gt(ty,0),a=g(()=>o.value.matched[i]);nn(ty,i+1),nn(xB,a),nn(If,o);const l=U();return de(()=>[l.value,a.value,e.name],([s,c,u],[d,f,h])=>{c&&(c.instances[u]=s,f&&f!==c&&s&&s===d&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),s&&c&&(!f||!Fo(c,f)||!d)&&(c.enterCallbacks[u]||[]).forEach(m=>m(s))},{flush:"post"}),()=>{const s=o.value,c=a.value,u=c&&c.components[e.name],d=e.name;if(!u)return my(n.default,{Component:u,route:s});const f=c.props[e.name],h=f?f===!0?s.params:typeof f=="function"?f(s):f:null,_=v(u,Ct({},h,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(c.instances[d]=null)},ref:l}));if(jr&&_.ref){const b={depth:i,name:c.name,path:c.path,meta:c.meta};(Array.isArray(_.ref)?_.ref.map(p=>p.i):[_.ref.i]).forEach(p=>{p.__vrv_devtools=b})}return my(n.default,{Component:_,route:s})||_}}});function my(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const PN=$N;function qN(){const e=$e(),t=e.parent&&e.parent.type.name;if(t&&(t==="KeepAlive"||t.includes("Transition"))){const n=t==="KeepAlive"?"keep-alive":"transition";bt(` can no longer be used directly inside or . +. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof c=="object"&&"then"in c)u=u.then(f=>s._called?f:(bt(d),Promise.reject(new Error("Invalid navigation guard"))));else if(c!==void 0&&!s._called){bt(d),l(new Error("Invalid navigation guard"));return}}u.catch(d=>l(d))})}function xN(e,t,n){let r=0;return function(){r++===1&&bt(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,r===1&&e.apply(null,arguments)}}function $d(e,t,n,r){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];{if(!l||typeof l!="object"&&typeof l!="function")throw bt(`Component "${a}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`),new Error("Invalid route component");if("then"in l){bt(`Component "${a}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const s=l;l=()=>s}else l.__asyncLoader&&!l.__warnedDefineAsync&&(l.__warnedDefineAsync=!0,bt(`Component "${a}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(SN(l)){const c=(l.__vccOpts||l)[t];c&&o.push(go(c,n,r,i,a))}else{let s=l();"catch"in s||(bt(`Component "${a}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),s=Promise.resolve(s)),o.push(()=>s.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const u=SB(c)?c.default:c;i.components[a]=u;const f=(u.__vccOpts||u)[t];return f&&go(f,n,r,i,a)()}))}}return o}function SN(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function fy(e){const t=gt(Ic),n=gt(Sh),r=g(()=>t.resolve(be(e.to))),o=g(()=>{const{matched:s}=r.value,{length:c}=s,u=s[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Fo.bind(null,u));if(f>-1)return f;const h=vy(s[c-2]);return c>1&&vy(u)===h&&d[d.length-1].path!==h?d.findIndex(Fo.bind(null,s[c-2])):f}),i=g(()=>o.value>-1&&EN(n.params,r.value.params)),a=g(()=>o.value>-1&&o.value===n.matched.length-1&&C_(n.params,r.value.params));function l(s={}){return TN(s)?t[be(e.replace)?"replace":"push"](be(e.to)).catch($l):Promise.resolve()}if(jr){const s=$e();if(s){const c={route:r.value,isActive:i.value,isExactActive:a.value};s.__vrl_devtools=s.__vrl_devtools||[],s.__vrl_devtools.push(c),Zn(()=>{c.route=r.value,c.isActive=i.value,c.isExactActive=a.value},{flush:"post"})}}return{route:r,href:g(()=>r.value.href),isActive:i,isExactActive:a,navigate:l}}const kN=$t({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:fy,setup(e,{slots:t}){const n=Kt(fy(e)),{options:r}=gt(Ic),o=g(()=>({[hy(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[hy(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:v("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},i)}}}),CN=kN;function TN(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function EN(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!Array.isArray(o)||o.length!==r.length||r.some((i,a)=>i!==o[a]))return!1}return!0}function vy(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const hy=(e,t,n)=>e!=null?e:t!=null?t:n,$N=$t({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){qN();const r=gt(If),o=g(()=>e.route||r.value),i=gt(ty,0),a=g(()=>o.value.matched[i]);nn(ty,i+1),nn(xB,a),nn(If,o);const l=U();return de(()=>[l.value,a.value,e.name],([s,c,u],[d,f,h])=>{c&&(c.instances[u]=s,f&&f!==c&&s&&s===d&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),s&&c&&(!f||!Fo(c,f)||!d)&&(c.enterCallbacks[u]||[]).forEach(m=>m(s))},{flush:"post"}),()=>{const s=o.value,c=a.value,u=c&&c.components[e.name],d=e.name;if(!u)return my(n.default,{Component:u,route:s});const f=c.props[e.name],h=f?f===!0?s.params:typeof f=="function"?f(s):f:null,_=v(u,Ct({},h,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(c.instances[d]=null)},ref:l}));if(jr&&_.ref){const b={depth:i,name:c.name,path:c.path,meta:c.meta};(Array.isArray(_.ref)?_.ref.map(p=>p.i):[_.ref.i]).forEach(p=>{p.__vrv_devtools=b})}return my(n.default,{Component:_,route:s})||_}}});function my(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const PN=$N;function qN(){const e=$e(),t=e.parent&&e.parent.type.name;if(t&&(t==="KeepAlive"||t.includes("Transition"))){const n=t==="KeepAlive"?"keep-alive":"transition";bt(` can no longer be used directly inside or . Use slot props instead: <${n}> -`)}}function nl(e,t){const n=Ct({},e,{matched:e.matched.map(r=>FN(r,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function zs(e){return{_custom:{display:e}}}let MN=0;function ON(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const r=MN++;S1({id:"org.vuejs.router"+(r?"."+r:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},o=>{o.on.inspectComponent((u,d)=>{u.instanceData&&u.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:nl(t.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:u,componentInstance:d})=>{if(d.__vrv_devtools){const f=d.__vrv_devtools;u.tags.push({label:(f.name?`${f.name.toString()}: `:"")+f.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:I1})}Array.isArray(d.__vrl_devtools)&&(d.__devtoolsApi=o,d.__vrl_devtools.forEach(f=>{let h=N1,m="";f.isExactActive?(h=B1,m="This is exactly active"):f.isActive&&(h=L1,m="This link is active"),u.tags.push({label:f.route.path,textColor:0,tooltip:m,backgroundColor:h})}))}),de(t.currentRoute,()=>{s(),o.notifyComponentUpdate(),o.sendInspectorTree(l),o.sendInspectorState(l)});const i="router:navigations:"+r;o.addTimelineLayer({id:i,label:`Router${r?" "+r:""} Navigations`,color:4237508}),t.onError((u,d)=>{o.addTimelineEvent({layerId:i,event:{title:"Error during Navigation",subtitle:d.fullPath,logType:"error",time:o.now(),data:{error:u},groupId:d.meta.__navigationId}})});let a=0;t.beforeEach((u,d)=>{const f={guard:zs("beforeEach"),from:nl(d,"Current Location during this navigation"),to:nl(u,"Target location")};Object.defineProperty(u.meta,"__navigationId",{value:a++}),o.addTimelineEvent({layerId:i,event:{time:o.now(),title:"Start of navigation",subtitle:u.fullPath,data:f,groupId:u.meta.__navigationId}})}),t.afterEach((u,d,f)=>{const h={guard:zs("afterEach")};f?(h.failure={_custom:{type:Error,readOnly:!0,display:f?f.message:"",tooltip:"Navigation Failure",value:f}},h.status=zs("\u274C")):h.status=zs("\u2705"),h.from=nl(d,"Current Location during this navigation"),h.to=nl(u,"Target location"),o.addTimelineEvent({layerId:i,event:{title:"End of navigation",subtitle:u.fullPath,time:o.now(),data:h,logType:f?"warning":"default",groupId:u.meta.__navigationId}})});const l="router-inspector:"+r;o.addInspector({id:l,label:"Routes"+(r?" "+r:""),icon:"book",treeFilterPlaceholder:"Search routes"});function s(){if(!c)return;const u=c;let d=n.getRoutes().filter(f=>!f.parent);d.forEach(j1),u.filter&&(d=d.filter(f=>Ff(f,u.filter.toLowerCase()))),d.forEach(f=>z1(f,t.currentRoute.value)),u.rootNodes=d.map(F1)}let c;o.on.getInspectorTree(u=>{c=u,u.app===e&&u.inspectorId===l&&s()}),o.on.getInspectorState(u=>{if(u.app===e&&u.inspectorId===l){const f=n.getRoutes().find(h=>h.record.__vd_id===u.nodeId);f&&(u.state={options:RN(f)})}}),o.sendInspectorTree(l),o.sendInspectorState(l)})}function AN(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function RN(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(r=>`${r.name}${AN(r)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(r=>r.record.path)}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(r=>r.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const I1=15485081,L1=2450411,B1=8702998,IN=2282478,N1=16486972,LN=6710886;function F1(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:IN}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:N1}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:I1}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:B1}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:L1}),n.redirect&&t.push({label:"redirect: "+(typeof n.redirect=="string"?n.redirect:"Object"),textColor:16777215,backgroundColor:LN});let r=n.__vd_id;return r==null&&(r=String(BN++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(F1)}}let BN=0;const NN=/^\/(.*)\/([a-z]*)$/;function z1(e,t){const n=t.matched.length&&Fo(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(r=>Fo(r,e.record))),e.children.forEach(r=>z1(r,t))}function j1(e){e.__vd_match=!1,e.children.forEach(j1)}function Ff(e,t){const n=String(e.re).match(NN);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(a=>Ff(a,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),i=Ul(o);return!t.startsWith("/")&&(i.includes(t)||o.includes(t))||i.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(a=>Ff(a,t))}function FN(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function zN(e){const t=eN(e.routes,e),n=e.parseQuery||wN,r=e.stringifyQuery||dy,o=e.history;if(!o)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const i=tl(),a=tl(),l=tl(),s=jy(so);let c=so;jr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Td.bind(null,q=>""+q),d=Td.bind(null,bN),f=Td.bind(null,Ul);function h(q,M){let D,j;return E1(q)?(D=t.getRecordMatcher(q),j=M):j=q,t.addRoute(j,D)}function m(q){const M=t.getRecordMatcher(q);M?t.removeRoute(M):bt(`Cannot remove non-existent route "${String(q)}"`)}function _(){return t.getRoutes().map(q=>q.record)}function b(q){return!!t.getRecordMatcher(q)}function x(q,M){if(M=Ct({},M||s.value),typeof q=="string"){const ce=Ed(n,q,M.path),ke=t.resolve({path:ce.path},M),P=o.createHref(ce.fullPath);return P.startsWith("//")?bt(`Location "${q}" resolved to "${P}". A resolved location cannot start with multiple slashes.`):ke.matched.length||bt(`No match found for location with path "${q}"`),Ct(ce,ke,{params:f(ke.params),hash:Ul(ce.hash),redirectedFrom:void 0,href:P})}let D;if("path"in q)"params"in q&&!("name"in q)&&Object.keys(q.params).length&&bt(`Path "${q.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),D=Ct({},q,{path:Ed(n,q.path,M.path).path});else{const ce=Ct({},q.params);for(const ke in ce)ce[ke]==null&&delete ce[ke];D=Ct({},q,{params:d(q.params)}),M.params=d(M.params)}const j=t.resolve(D,M),k=q.hash||"";k&&!k.startsWith("#")&&bt(`A \`hash\` should always start with the character "#". Replace "${k}" with "#${k}".`),j.params=u(f(j.params));const Z=TB(r,Ct({},q,{hash:gN(k),path:j.path})),oe=o.createHref(Z);return oe.startsWith("//")?bt(`Location "${q}" resolved to "${oe}". A resolved location cannot start with multiple slashes.`):j.matched.length||bt(`No match found for location with path "${"path"in q?q.path:q}"`),Ct({fullPath:Z,hash:k,query:r===dy?_N(q.query):q.query||{}},j,{redirectedFrom:void 0,href:oe})}function p(q){return typeof q=="string"?Ed(n,q,s.value.path):Ct({},q)}function y(q,M){if(c!==q)return Ma(8,{from:M,to:q})}function w(q){return T(q)}function S(q){return w(Ct(p(q),{replace:!0}))}function C(q){const M=q.matched[q.matched.length-1];if(M&&M.redirect){const{redirect:D}=M;let j=typeof D=="function"?D(q):D;if(typeof j=="string"&&(j=j.includes("?")||j.includes("#")?j=p(j):{path:j},j.params={}),!("path"in j)&&!("name"in j))throw bt(`Invalid redirect found: +`)}}function nl(e,t){const n=Ct({},e,{matched:e.matched.map(r=>FN(r,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function zs(e){return{_custom:{display:e}}}let MN=0;function ON(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const r=MN++;S_({id:"org.vuejs.router"+(r?"."+r:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},o=>{o.on.inspectComponent((u,d)=>{u.instanceData&&u.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:nl(t.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:u,componentInstance:d})=>{if(d.__vrv_devtools){const f=d.__vrv_devtools;u.tags.push({label:(f.name?`${f.name.toString()}: `:"")+f.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:I_})}Array.isArray(d.__vrl_devtools)&&(d.__devtoolsApi=o,d.__vrl_devtools.forEach(f=>{let h=N_,m="";f.isExactActive?(h=B_,m="This is exactly active"):f.isActive&&(h=L_,m="This link is active"),u.tags.push({label:f.route.path,textColor:0,tooltip:m,backgroundColor:h})}))}),de(t.currentRoute,()=>{s(),o.notifyComponentUpdate(),o.sendInspectorTree(l),o.sendInspectorState(l)});const i="router:navigations:"+r;o.addTimelineLayer({id:i,label:`Router${r?" "+r:""} Navigations`,color:4237508}),t.onError((u,d)=>{o.addTimelineEvent({layerId:i,event:{title:"Error during Navigation",subtitle:d.fullPath,logType:"error",time:o.now(),data:{error:u},groupId:d.meta.__navigationId}})});let a=0;t.beforeEach((u,d)=>{const f={guard:zs("beforeEach"),from:nl(d,"Current Location during this navigation"),to:nl(u,"Target location")};Object.defineProperty(u.meta,"__navigationId",{value:a++}),o.addTimelineEvent({layerId:i,event:{time:o.now(),title:"Start of navigation",subtitle:u.fullPath,data:f,groupId:u.meta.__navigationId}})}),t.afterEach((u,d,f)=>{const h={guard:zs("afterEach")};f?(h.failure={_custom:{type:Error,readOnly:!0,display:f?f.message:"",tooltip:"Navigation Failure",value:f}},h.status=zs("\u274C")):h.status=zs("\u2705"),h.from=nl(d,"Current Location during this navigation"),h.to=nl(u,"Target location"),o.addTimelineEvent({layerId:i,event:{title:"End of navigation",subtitle:u.fullPath,time:o.now(),data:h,logType:f?"warning":"default",groupId:u.meta.__navigationId}})});const l="router-inspector:"+r;o.addInspector({id:l,label:"Routes"+(r?" "+r:""),icon:"book",treeFilterPlaceholder:"Search routes"});function s(){if(!c)return;const u=c;let d=n.getRoutes().filter(f=>!f.parent);d.forEach(j_),u.filter&&(d=d.filter(f=>Ff(f,u.filter.toLowerCase()))),d.forEach(f=>z_(f,t.currentRoute.value)),u.rootNodes=d.map(F_)}let c;o.on.getInspectorTree(u=>{c=u,u.app===e&&u.inspectorId===l&&s()}),o.on.getInspectorState(u=>{if(u.app===e&&u.inspectorId===l){const f=n.getRoutes().find(h=>h.record.__vd_id===u.nodeId);f&&(u.state={options:RN(f)})}}),o.sendInspectorTree(l),o.sendInspectorState(l)})}function AN(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function RN(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(r=>`${r.name}${AN(r)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(r=>r.record.path)}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(r=>r.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const I_=15485081,L_=2450411,B_=8702998,IN=2282478,N_=16486972,LN=6710886;function F_(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:IN}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:N_}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:I_}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:B_}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:L_}),n.redirect&&t.push({label:"redirect: "+(typeof n.redirect=="string"?n.redirect:"Object"),textColor:16777215,backgroundColor:LN});let r=n.__vd_id;return r==null&&(r=String(BN++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(F_)}}let BN=0;const NN=/^\/(.*)\/([a-z]*)$/;function z_(e,t){const n=t.matched.length&&Fo(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(r=>Fo(r,e.record))),e.children.forEach(r=>z_(r,t))}function j_(e){e.__vd_match=!1,e.children.forEach(j_)}function Ff(e,t){const n=String(e.re).match(NN);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(a=>Ff(a,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),i=Ul(o);return!t.startsWith("/")&&(i.includes(t)||o.includes(t))||i.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(a=>Ff(a,t))}function FN(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function zN(e){const t=eN(e.routes,e),n=e.parseQuery||wN,r=e.stringifyQuery||dy,o=e.history;if(!o)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const i=tl(),a=tl(),l=tl(),s=jy(so);let c=so;jr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Td.bind(null,q=>""+q),d=Td.bind(null,bN),f=Td.bind(null,Ul);function h(q,M){let D,j;return E_(q)?(D=t.getRecordMatcher(q),j=M):j=q,t.addRoute(j,D)}function m(q){const M=t.getRecordMatcher(q);M?t.removeRoute(M):bt(`Cannot remove non-existent route "${String(q)}"`)}function _(){return t.getRoutes().map(q=>q.record)}function b(q){return!!t.getRecordMatcher(q)}function x(q,M){if(M=Ct({},M||s.value),typeof q=="string"){const ce=Ed(n,q,M.path),ke=t.resolve({path:ce.path},M),P=o.createHref(ce.fullPath);return P.startsWith("//")?bt(`Location "${q}" resolved to "${P}". A resolved location cannot start with multiple slashes.`):ke.matched.length||bt(`No match found for location with path "${q}"`),Ct(ce,ke,{params:f(ke.params),hash:Ul(ce.hash),redirectedFrom:void 0,href:P})}let D;if("path"in q)"params"in q&&!("name"in q)&&Object.keys(q.params).length&&bt(`Path "${q.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),D=Ct({},q,{path:Ed(n,q.path,M.path).path});else{const ce=Ct({},q.params);for(const ke in ce)ce[ke]==null&&delete ce[ke];D=Ct({},q,{params:d(q.params)}),M.params=d(M.params)}const j=t.resolve(D,M),k=q.hash||"";k&&!k.startsWith("#")&&bt(`A \`hash\` should always start with the character "#". Replace "${k}" with "#${k}".`),j.params=u(f(j.params));const Z=TB(r,Ct({},q,{hash:gN(k),path:j.path})),oe=o.createHref(Z);return oe.startsWith("//")?bt(`Location "${q}" resolved to "${oe}". A resolved location cannot start with multiple slashes.`):j.matched.length||bt(`No match found for location with path "${"path"in q?q.path:q}"`),Ct({fullPath:Z,hash:k,query:r===dy?_N(q.query):q.query||{}},j,{redirectedFrom:void 0,href:oe})}function p(q){return typeof q=="string"?Ed(n,q,s.value.path):Ct({},q)}function y(q,M){if(c!==q)return Ma(8,{from:M,to:q})}function w(q){return T(q)}function S(q){return w(Ct(p(q),{replace:!0}))}function C(q){const M=q.matched[q.matched.length-1];if(M&&M.redirect){const{redirect:D}=M;let j=typeof D=="function"?D(q):D;if(typeof j=="string"&&(j=j.includes("?")||j.includes("#")?j=p(j):{path:j},j.params={}),!("path"in j)&&!("name"in j))throw bt(`Invalid redirect found: ${JSON.stringify(j,null,2)} - when navigating to "${q.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return Ct({query:q.query,hash:q.hash,params:q.params},j)}}function T(q,M){const D=c=x(q),j=s.value,k=q.state,Z=q.force,oe=q.replace===!0,ce=C(D);if(ce)return T(Ct(p(ce),{state:k,force:Z,replace:oe}),M||D);const ke=D;ke.redirectedFrom=M;let P;return!Z&&ry(r,j,D)&&(P=Ma(16,{to:ke,from:j}),_e(j,j,!0,!1)),(P?Promise.resolve(P):L(ke,j)).catch(H=>uo(H)?uo(H,2)?H:ae(H):I(H,ke,j)).then(H=>{if(H){if(uo(H,2))return ry(r,x(H.to),ke)&&M&&(M._count=M._count?M._count+1:1)>10?(bt(`Detected an infinite redirection in a navigation guard when going from "${j.fullPath}" to "${ke.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):T(Ct(p(H.to),{state:k,force:Z,replace:oe}),M||ke)}else H=z(ke,j,!0,oe,k);return R(ke,j,H),H})}function O(q,M){const D=y(q,M);return D?Promise.reject(D):Promise.resolve()}function L(q,M){let D;const[j,k,Z]=jN(q,M);D=$d(j.reverse(),"beforeRouteLeave",q,M);for(const ce of j)ce.leaveGuards.forEach(ke=>{D.push(go(ke,q,M))});const oe=O.bind(null,q,M);return D.push(oe),Xi(D).then(()=>{D=[];for(const ce of i.list())D.push(go(ce,q,M));return D.push(oe),Xi(D)}).then(()=>{D=$d(k,"beforeRouteUpdate",q,M);for(const ce of k)ce.updateGuards.forEach(ke=>{D.push(go(ke,q,M))});return D.push(oe),Xi(D)}).then(()=>{D=[];for(const ce of q.matched)if(ce.beforeEnter&&!M.matched.includes(ce))if(Array.isArray(ce.beforeEnter))for(const ke of ce.beforeEnter)D.push(go(ke,q,M));else D.push(go(ce.beforeEnter,q,M));return D.push(oe),Xi(D)}).then(()=>(q.matched.forEach(ce=>ce.enterCallbacks={}),D=$d(Z,"beforeRouteEnter",q,M),D.push(oe),Xi(D))).then(()=>{D=[];for(const ce of a.list())D.push(go(ce,q,M));return D.push(oe),Xi(D)}).catch(ce=>uo(ce,8)?ce:Promise.reject(ce))}function R(q,M,D){for(const j of l.list())j(q,M,D)}function z(q,M,D,j,k){const Z=y(q,M);if(Z)return Z;const oe=M===so,ce=jr?history.state:{};D&&(j||oe?o.replace(q.fullPath,Ct({scroll:oe&&ce&&ce.scroll},k)):o.push(q.fullPath,k)),s.value=q,_e(q,M,D,oe),ae()}let $;function E(){$=o.listen((q,M,D)=>{const j=x(q),k=C(j);if(k){T(Ct(k,{replace:!0}),j).catch($l);return}c=j;const Z=s.value;jr&&RB(iy(Z.fullPath,D.delta),Lc()),L(j,Z).catch(oe=>uo(oe,12)?oe:uo(oe,2)?(T(oe.to,j).then(ce=>{uo(ce,20)&&!D.delta&&D.type===Hl.pop&&o.go(-1,!1)}).catch($l),Promise.reject()):(D.delta&&o.go(-D.delta,!1),I(oe,j,Z))).then(oe=>{oe=oe||z(j,Z,!1),oe&&(D.delta?o.go(-D.delta,!1):D.type===Hl.pop&&uo(oe,20)&&o.go(-1,!1)),R(j,Z,oe)}).catch($l)})}let F=tl(),Q=tl(),J;function I(q,M,D){ae(q);const j=Q.list();return j.length?j.forEach(k=>k(q,M,D)):(bt("uncaught error during route navigation:"),console.error(q)),Promise.reject(q)}function W(){return J&&s.value!==so?Promise.resolve():new Promise((q,M)=>{F.add([q,M])})}function ae(q){return J||(J=!q,E(),F.list().forEach(([M,D])=>q?D(q):M()),F.reset()),q}function _e(q,M,D,j){const{scrollBehavior:k}=e;if(!jr||!k)return Promise.resolve();const Z=!D&&IB(iy(q.fullPath,0))||(j||!D)&&history.state&&history.state.scroll||null;return Ge().then(()=>k(q,M,Z)).then(oe=>oe&&AB(oe)).catch(oe=>I(oe,q,M))}const Y=q=>o.go(q);let A;const G=new Set;return{currentRoute:s,addRoute:h,removeRoute:m,hasRoute:b,getRoutes:_,resolve:x,options:e,push:w,replace:S,go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:Q.add,isReady:W,install(q){const M=this;q.component("RouterLink",CN),q.component("RouterView",PN),q.config.globalProperties.$router=M,Object.defineProperty(q.config.globalProperties,"$route",{enumerable:!0,get:()=>be(s)}),jr&&!A&&s.value===so&&(A=!0,w(o.location).catch(k=>{bt("Unexpected error when starting the router:",k)}));const D={};for(const k in so)D[k]=g(()=>s.value[k]);q.provide(Ic,M),q.provide(Sh,Kt(D)),q.provide(If,s);const j=q.unmount;G.add(q),q.unmount=function(){G.delete(q),G.size<1&&(c=so,$&&$(),s.value=so,A=!1,J=!1),j()},jr&&ON(q,M,t)}}}function Xi(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function jN(e,t){const n=[],r=[],o=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aFo(c,l))?r.push(l):n.push(l));const s=e.matched[a];s&&(t.matched.find(c=>Fo(c,s))||o.push(s))}return[n,r,o]}function R3(){return gt(Ic)}function I3(){return gt(Sh)}async function DN(e,t,n){var a;const i=(await xt.get("/workflow/list",{params:{oid:e,page:t,pagesize:n}})).data.response;return[((a=i.list)==null?void 0:a.map(l=>({id:l.id,title:l.title,remark:l.remark,status:l.status,state:l.state,createTime:l.create_time,cronExpr:l.cron})))||[],i.total]}async function D1(e){const n=(await xt.get("/workflow/detail",{params:{id:e}})).data.response;return{id:n.id,oid:n.oid,title:n.title,remark:n.remark,status:n.status,state:n.state?{status:n.state.status}:null,cronExpr:n.cron,createTime:n.create_time}}async function L3(e){const t=JSON.stringify({workflow_id:e});return await xt.post("/workflow/kill",t,{headers:{"content-type":"application/json"}})}async function VN(e){const t=JSON.stringify({id:e});return await xt.post("/workflow/delete",t,{headers:{"content-type":"application/json"}})}async function B3(e){return(await xt.get("/workflow/manage/users",{params:{workflow_id:e}})).data.response.list.map(n=>({id:n.id,name:n.name,account:n.account,permissions:n.permission.split(","),createTime:n.create_time}))}async function N3(e,t){const n=JSON.stringify({workflow_id:e,user_id:t});return await xt.post("/workflow/manage/remove_user",n,{headers:{"content-type":"application/json"}})}async function F3(e,t){const n=JSON.stringify({workflow_id:e,user_account:t});return await xt.post("/workflow/manage/add_user",n,{headers:{"content-type":"application/json"}})}/*! + when navigating to "${q.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return Ct({query:q.query,hash:q.hash,params:q.params},j)}}function T(q,M){const D=c=x(q),j=s.value,k=q.state,Z=q.force,oe=q.replace===!0,ce=C(D);if(ce)return T(Ct(p(ce),{state:k,force:Z,replace:oe}),M||D);const ke=D;ke.redirectedFrom=M;let P;return!Z&&ry(r,j,D)&&(P=Ma(16,{to:ke,from:j}),_e(j,j,!0,!1)),(P?Promise.resolve(P):L(ke,j)).catch(H=>uo(H)?uo(H,2)?H:ae(H):I(H,ke,j)).then(H=>{if(H){if(uo(H,2))return ry(r,x(H.to),ke)&&M&&(M._count=M._count?M._count+1:1)>10?(bt(`Detected an infinite redirection in a navigation guard when going from "${j.fullPath}" to "${ke.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):T(Ct(p(H.to),{state:k,force:Z,replace:oe}),M||ke)}else H=z(ke,j,!0,oe,k);return R(ke,j,H),H})}function O(q,M){const D=y(q,M);return D?Promise.reject(D):Promise.resolve()}function L(q,M){let D;const[j,k,Z]=jN(q,M);D=$d(j.reverse(),"beforeRouteLeave",q,M);for(const ce of j)ce.leaveGuards.forEach(ke=>{D.push(go(ke,q,M))});const oe=O.bind(null,q,M);return D.push(oe),Xi(D).then(()=>{D=[];for(const ce of i.list())D.push(go(ce,q,M));return D.push(oe),Xi(D)}).then(()=>{D=$d(k,"beforeRouteUpdate",q,M);for(const ce of k)ce.updateGuards.forEach(ke=>{D.push(go(ke,q,M))});return D.push(oe),Xi(D)}).then(()=>{D=[];for(const ce of q.matched)if(ce.beforeEnter&&!M.matched.includes(ce))if(Array.isArray(ce.beforeEnter))for(const ke of ce.beforeEnter)D.push(go(ke,q,M));else D.push(go(ce.beforeEnter,q,M));return D.push(oe),Xi(D)}).then(()=>(q.matched.forEach(ce=>ce.enterCallbacks={}),D=$d(Z,"beforeRouteEnter",q,M),D.push(oe),Xi(D))).then(()=>{D=[];for(const ce of a.list())D.push(go(ce,q,M));return D.push(oe),Xi(D)}).catch(ce=>uo(ce,8)?ce:Promise.reject(ce))}function R(q,M,D){for(const j of l.list())j(q,M,D)}function z(q,M,D,j,k){const Z=y(q,M);if(Z)return Z;const oe=M===so,ce=jr?history.state:{};D&&(j||oe?o.replace(q.fullPath,Ct({scroll:oe&&ce&&ce.scroll},k)):o.push(q.fullPath,k)),s.value=q,_e(q,M,D,oe),ae()}let $;function E(){$=o.listen((q,M,D)=>{const j=x(q),k=C(j);if(k){T(Ct(k,{replace:!0}),j).catch($l);return}c=j;const Z=s.value;jr&&RB(iy(Z.fullPath,D.delta),Lc()),L(j,Z).catch(oe=>uo(oe,12)?oe:uo(oe,2)?(T(oe.to,j).then(ce=>{uo(ce,20)&&!D.delta&&D.type===Hl.pop&&o.go(-1,!1)}).catch($l),Promise.reject()):(D.delta&&o.go(-D.delta,!1),I(oe,j,Z))).then(oe=>{oe=oe||z(j,Z,!1),oe&&(D.delta?o.go(-D.delta,!1):D.type===Hl.pop&&uo(oe,20)&&o.go(-1,!1)),R(j,Z,oe)}).catch($l)})}let F=tl(),Q=tl(),J;function I(q,M,D){ae(q);const j=Q.list();return j.length?j.forEach(k=>k(q,M,D)):(bt("uncaught error during route navigation:"),console.error(q)),Promise.reject(q)}function W(){return J&&s.value!==so?Promise.resolve():new Promise((q,M)=>{F.add([q,M])})}function ae(q){return J||(J=!q,E(),F.list().forEach(([M,D])=>q?D(q):M()),F.reset()),q}function _e(q,M,D,j){const{scrollBehavior:k}=e;if(!jr||!k)return Promise.resolve();const Z=!D&&IB(iy(q.fullPath,0))||(j||!D)&&history.state&&history.state.scroll||null;return Ge().then(()=>k(q,M,Z)).then(oe=>oe&&AB(oe)).catch(oe=>I(oe,q,M))}const Y=q=>o.go(q);let A;const G=new Set;return{currentRoute:s,addRoute:h,removeRoute:m,hasRoute:b,getRoutes:_,resolve:x,options:e,push:w,replace:S,go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:Q.add,isReady:W,install(q){const M=this;q.component("RouterLink",CN),q.component("RouterView",PN),q.config.globalProperties.$router=M,Object.defineProperty(q.config.globalProperties,"$route",{enumerable:!0,get:()=>be(s)}),jr&&!A&&s.value===so&&(A=!0,w(o.location).catch(k=>{bt("Unexpected error when starting the router:",k)}));const D={};for(const k in so)D[k]=g(()=>s.value[k]);q.provide(Ic,M),q.provide(Sh,Kt(D)),q.provide(If,s);const j=q.unmount;G.add(q),q.unmount=function(){G.delete(q),G.size<1&&(c=so,$&&$(),s.value=so,A=!1,J=!1),j()},jr&&ON(q,M,t)}}}function Xi(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function jN(e,t){const n=[],r=[],o=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aFo(c,l))?r.push(l):n.push(l));const s=e.matched[a];s&&(t.matched.find(c=>Fo(c,s))||o.push(s))}return[n,r,o]}function R3(){return gt(Ic)}function I3(){return gt(Sh)}async function DN(e,t,n){var a;const i=(await xt.get("/workflow/list",{params:{oid:e,page:t,pagesize:n}})).data.response;return[((a=i.list)==null?void 0:a.map(l=>({id:l.id,title:l.title,remark:l.remark,status:l.status,state:l.state,createTime:l.create_time,cronExpr:l.cron})))||[],i.total]}async function D_(e){const n=(await xt.get("/workflow/detail",{params:{id:e}})).data.response;return{id:n.id,oid:n.oid,title:n.title,remark:n.remark,status:n.status,state:n.state?{status:n.state.status}:null,cronExpr:n.cron,createTime:n.create_time}}async function L3(e){const t=JSON.stringify({workflow_id:e});return await xt.post("/workflow/kill",t,{headers:{"content-type":"application/json"}})}async function VN(e){const t=JSON.stringify({id:e});return await xt.post("/workflow/delete",t,{headers:{"content-type":"application/json"}})}async function B3(e){return(await xt.get("/workflow/manage/users",{params:{workflow_id:e}})).data.response.list.map(n=>({id:n.id,name:n.name,account:n.account,permissions:n.permission.split(","),createTime:n.create_time}))}async function N3(e,t){const n=JSON.stringify({workflow_id:e,user_id:t});return await xt.post("/workflow/manage/remove_user",n,{headers:{"content-type":"application/json"}})}async function F3(e,t){const n=JSON.stringify({workflow_id:e,user_account:t});return await xt.post("/workflow/manage/add_user",n,{headers:{"content-type":"application/json"}})}/*! * vuex v4.0.2 * (c) 2021 Evan You * @license MIT - */var V1="store";function HN(e){return e===void 0&&(e=null),gt(e!==null?e:V1)}function Li(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function UN(e){return e!==null&&typeof e=="object"}function WN(e){return e&&typeof e.then=="function"}function fr(e,t){if(!e)throw new Error("[vuex] "+t)}function KN(e,t){return function(){return e(t)}}function H1(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function U1(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Bc(e,n,[],e._modules.root,!0),Ch(e,n,t)}function Ch(e,t,n){var r=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,i={};Li(o,function(a,l){i[l]=KN(a,e),Object.defineProperty(e.getters,l,{get:function(){return i[l]()},enumerable:!0})}),e._state=Kt({data:t}),e.strict&&GN(e),r&&n&&e._withCommit(function(){r.data=null})}function Bc(e,t,n,r,o){var i=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a]&&console.error("[vuex] duplicate namespace "+a+" for the namespaced module "+n.join("/")),e._modulesNamespaceMap[a]=r),!i&&!o){var l=Th(t,n.slice(0,-1)),s=n[n.length-1];e._withCommit(function(){s in l&&console.warn('[vuex] state field "'+s+'" was overridden by a module with the same name at "'+n.join(".")+'"'),l[s]=r.state})}var c=r.context=QN(e,a,n);r.forEachMutation(function(u,d){var f=a+d;ZN(e,f,u,c)}),r.forEachAction(function(u,d){var f=u.root?d:a+d,h=u.handler||u;YN(e,f,h,c)}),r.forEachGetter(function(u,d){var f=a+d;XN(e,f,u,c)}),r.forEachChild(function(u,d){Bc(e,t,n.concat(d),u,o)})}function QN(e,t,n){var r=t==="",o={dispatch:r?e.dispatch:function(i,a,l){var s=Bu(i,a,l),c=s.payload,u=s.options,d=s.type;if((!u||!u.root)&&(d=t+d,!e._actions[d])){console.error("[vuex] unknown local action type: "+s.type+", global type: "+d);return}return e.dispatch(d,c)},commit:r?e.commit:function(i,a,l){var s=Bu(i,a,l),c=s.payload,u=s.options,d=s.type;if((!u||!u.root)&&(d=t+d,!e._mutations[d])){console.error("[vuex] unknown local mutation type: "+s.type+", global type: "+d);return}e.commit(d,c,u)}};return Object.defineProperties(o,{getters:{get:r?function(){return e.getters}:function(){return W1(e,t)}},state:{get:function(){return Th(e.state,n)}}}),o}function W1(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(o){if(o.slice(0,r)===t){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[o]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function ZN(e,t,n,r){var o=e._mutations[t]||(e._mutations[t]=[]);o.push(function(a){n.call(e,r.state,a)})}function YN(e,t,n,r){var o=e._actions[t]||(e._actions[t]=[]);o.push(function(a){var l=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},a);return WN(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(s){throw e._devtoolHook.emit("vuex:error",s),s}):l})}function XN(e,t,n,r){if(e._wrappedGetters[t]){console.error("[vuex] duplicate getter key: "+t);return}e._wrappedGetters[t]=function(i){return n(r.state,r.getters,i.state,i.getters)}}function GN(e){de(function(){return e._state.data},function(){fr(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function Th(e,t){return t.reduce(function(n,r){return n[r]},e)}function Bu(e,t,n){return UN(e)&&e.type&&(n=t,t=e,e=e.type),fr(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}var JN="vuex bindings",gy="vuex:mutations",Pd="vuex:actions",Gi="vuex",eF=0;function tF(e,t){S1({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[JN]},function(n){n.addTimelineLayer({id:gy,label:"Vuex Mutations",color:py}),n.addTimelineLayer({id:Pd,label:"Vuex Actions",color:py}),n.addInspector({id:Gi,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===Gi)if(r.filter){var o=[];Y1(o,t._modules.root,r.filter,""),r.rootNodes=o}else r.rootNodes=[Z1(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===Gi){var o=r.nodeId;W1(t,o),r.state=oF(aF(t._modules,o),o==="root"?t.getters:t._makeLocalGettersCache,o)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===Gi){var o=r.nodeId,i=r.path;o!=="root"&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit(function(){r.set(t._state.data,i,r.state.value)})}}),t.subscribe(function(r,o){var i={};r.payload&&(i.payload=r.payload),i.state=o,n.notifyComponentUpdate(),n.sendInspectorTree(Gi),n.sendInspectorState(Gi),n.addTimelineEvent({layerId:gy,event:{time:Date.now(),title:r.type,data:i}})}),t.subscribeAction({before:function(r,o){var i={};r.payload&&(i.payload=r.payload),r._id=eF++,r._time=Date.now(),i.state=o,n.addTimelineEvent({layerId:Pd,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:i}})},after:function(r,o){var i={},a=Date.now()-r._time;i.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},r.payload&&(i.payload=r.payload),i.state=o,n.addTimelineEvent({layerId:Pd,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:i}})}})})}var py=8702998,nF=6710886,rF=16777215,K1={label:"namespaced",textColor:rF,backgroundColor:nF};function Q1(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function Z1(e,t){return{id:t||"root",label:Q1(t),tags:e.namespaced?[K1]:[],children:Object.keys(e._children).map(function(n){return Z1(e._children[n],t+n+"/")})}}function Y1(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[K1]:[]}),Object.keys(t._children).forEach(function(o){Y1(e,t._children[o],n,r+o+"/")})}function oF(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),o={state:Object.keys(e.state).map(function(a){return{key:a,editable:!0,value:e.state[a]}})};if(r.length){var i=iF(t);o.getters=Object.keys(i).map(function(a){return{key:a.endsWith("/")?Q1(a):a,editable:!1,value:zf(function(){return i[a]})}})}return o}function iF(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var o=t,i=r.pop();r.forEach(function(a){o[a]||(o[a]={_custom:{value:{},display:a,tooltip:"Module",abstract:!0}}),o=o[a]._custom.value}),o[i]=zf(function(){return e[n]})}else t[n]=zf(function(){return e[n]})}),t}function aF(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,o,i){var a=r[o];if(!a)throw new Error('Missing module "'+o+'" for path "'+t+'".');return i===n.length-1?a:a._children},t==="root"?e:e.root._children)}function zf(e){try{return e()}catch(t){return t}}var pr=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},X1={namespaced:{configurable:!0}};X1.namespaced.get=function(){return!!this._rawModule.namespaced};pr.prototype.addChild=function(t,n){this._children[t]=n};pr.prototype.removeChild=function(t){delete this._children[t]};pr.prototype.getChild=function(t){return this._children[t]};pr.prototype.hasChild=function(t){return t in this._children};pr.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};pr.prototype.forEachChild=function(t){Li(this._children,t)};pr.prototype.forEachGetter=function(t){this._rawModule.getters&&Li(this._rawModule.getters,t)};pr.prototype.forEachAction=function(t){this._rawModule.actions&&Li(this._rawModule.actions,t)};pr.prototype.forEachMutation=function(t){this._rawModule.mutations&&Li(this._rawModule.mutations,t)};Object.defineProperties(pr.prototype,X1);var Bi=function(t){this.register([],t,!1)};Bi.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};Bi.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,o){return n=n.getChild(o),r+(n.namespaced?o+"/":"")},"")};Bi.prototype.update=function(t){G1([],this.root,t)};Bi.prototype.register=function(t,n,r){var o=this;r===void 0&&(r=!0),J1(t,n);var i=new pr(n,r);if(t.length===0)this.root=i;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],i)}n.modules&&Li(n.modules,function(l,s){o.register(t.concat(s),l,r)})};Bi.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],o=n.getChild(r);if(!o){console.warn("[vuex] trying to unregister module '"+r+"', which is not registered");return}!o.runtime||n.removeChild(r)};Bi.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function G1(e,t,n){if(J1(e,n),t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r)){console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, manual reload is needed");return}G1(e.concat(r),t.getChild(r),n.modules[r])}}var yy={assert:function(e){return typeof e=="function"},expected:"function"},lF={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},by={getters:yy,mutations:yy,actions:lF};function J1(e,t){Object.keys(by).forEach(function(n){if(!!t[n]){var r=by[n];Li(t[n],function(o,i){fr(r.assert(o),sF(e,n,i,o,r.expected))})}})}function sF(e,t,n,r,o){var i=t+" should be "+o+' but "'+t+"."+n+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(r)+".",i}function uF(e){return new Mn(e)}var Mn=function e(t){var n=this;t===void 0&&(t={}),fr(typeof Promise!="undefined","vuex requires a Promise polyfill in this browser."),fr(this instanceof e,"store must be called with the new operator.");var r=t.plugins;r===void 0&&(r=[]);var o=t.strict;o===void 0&&(o=!1);var i=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Bi(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var a=this,l=this,s=l.dispatch,c=l.commit;this.dispatch=function(f,h){return s.call(a,f,h)},this.commit=function(f,h,m){return c.call(a,f,h,m)},this.strict=o;var u=this._modules.root.state;Bc(this,u,[],this._modules.root),Ch(this,u),r.forEach(function(d){return d(n)})},Eh={state:{configurable:!0}};Mn.prototype.install=function(t,n){t.provide(n||V1,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!0;r&&tF(t,this)};Eh.state.get=function(){return this._state.data};Eh.state.set=function(e){fr(!1,"use store.replaceState() to explicit replace store state.")};Mn.prototype.commit=function(t,n,r){var o=this,i=Bu(t,n,r),a=i.type,l=i.payload,s=i.options,c={type:a,payload:l},u=this._mutations[a];if(!u){console.error("[vuex] unknown mutation type: "+a);return}this._withCommit(function(){u.forEach(function(f){f(l)})}),this._subscribers.slice().forEach(function(d){return d(c,o.state)}),s&&s.silent&&console.warn("[vuex] mutation type: "+a+". Silent option has been removed. Use the filter functionality in the vue-devtools")};Mn.prototype.dispatch=function(t,n){var r=this,o=Bu(t,n),i=o.type,a=o.payload,l={type:i,payload:a},s=this._actions[i];if(!s){console.error("[vuex] unknown action type: "+i);return}try{this._actionSubscribers.slice().filter(function(u){return u.before}).forEach(function(u){return u.before(l,r.state)})}catch(u){console.warn("[vuex] error in before action subscribers: "),console.error(u)}var c=s.length>1?Promise.all(s.map(function(u){return u(a)})):s[0](a);return new Promise(function(u,d){c.then(function(f){try{r._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(l,r.state)})}catch(h){console.warn("[vuex] error in after action subscribers: "),console.error(h)}u(f)},function(f){try{r._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(l,r.state,f)})}catch(h){console.warn("[vuex] error in error action subscribers: "),console.error(h)}d(f)})})};Mn.prototype.subscribe=function(t,n){return H1(t,this._subscribers,n)};Mn.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return H1(r,this._actionSubscribers,n)};Mn.prototype.watch=function(t,n,r){var o=this;return fr(typeof t=="function","store.watch only accepts a function."),de(function(){return t(o.state,o.getters)},n,Object.assign({},r))};Mn.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};Mn.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),fr(Array.isArray(t),"module path must be a string or an Array."),fr(t.length>0,"cannot register the root module by using registerModule."),this._modules.register(t,n),Bc(this,this.state,t,this._modules.get(t),r.preserveState),Ch(this,this.state)};Mn.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),fr(Array.isArray(t),"module path must be a string or an Array."),this._modules.unregister(t),this._withCommit(function(){var r=Th(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),U1(this)};Mn.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),fr(Array.isArray(t),"module path must be a string or an Array."),this._modules.isRegistered(t)};Mn.prototype.hotUpdate=function(t){this._modules.update(t),U1(this,!0)};Mn.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(Mn.prototype,Eh);async function cF(e){return(await xt.get("/project/list",{params:{oid:e}})).data.response.list.map(o=>({id:o.project_id,remark:o.remark,taskCount:o.task_count,title:o.title,uid:o.uid,role:o.role}))}async function z3(e){return(await xt.post("/project/re_gen_token",{project_id:e})).data.response}async function dF(e){const r=(await xt.get("/crontab/client/list",{params:{project_id:e}})).data.response;return r.list?r.list.map(o=>({clientIP:o.client_ip,weight:o.weight,version:o.version,region:o.region})):[]}async function j3(e){return(await xt.get("/project/token",{params:{project_id:e}})).data.response}async function D3(e,t,n){await xt.post("/client/weight",{project_id:e,client_ip:t,weight:n})}const fF={async fetchProjects({commit:e},{orgId:t}){e("loadingProjects");try{const n=await cF(t);e("setProjects",{projects:n})}catch(n){e("error",{error:n},{root:!0})}e("unloadingProjects")},async fetchProjectClients({commit:e},{projectId:t}){e("loadingProjectClients");try{const n=await dF(t);e("setProjectClients",{projectId:t,clients:n})}catch(n){e("error",{error:n},{root:!0})}e("unloadingProjectClients")}},vF={loadingProjects(e){e.loadingProjects=!0},unloadingProjects(e){e.loadingProjects=!1},setProjects(e,{projects:t}){e.projects=t},loadingProjectClients(e){e.loadingProjectClients=!0},unloadingProjectClients(e){e.loadingProjectClients=!1},setProjectClients(e,{projectId:t,clients:n}){e.projectClients.set(t,n)}},hF={namespaced:!0,state:()=>({projects:[],projectClients:new Map,loadingProjects:!1,loadingProjectClients:!1}),actions:fF,mutations:vF};/*! js-cookie v3.0.1 | MIT */function js(e){for(var t=1;t{o.push({id:i.id,name:i.name,account:i.account,permissions:i.permission.split(","),createTime:i.create_time})}),{total:n.response.total,list:o}}async function H3(e){return(await xt.post("/user/delete",{id:e.id})).data}function wF(e){return{type:"error",info:e}}function _F(e){return{type:"success",info:e}}class xF{constructor(t,n,r){no(this,"ws");no(this,"publishKey",1);no(this,"subscribeKey",2);no(this,"unSubscribeKey",3);no(this,"logging",!0);no(this,"onmessage");no(this,"onclose");this.onclose=r;try{this.ws=new WebSocket(t)}catch(o){this.onclose&&this.onclose(o);return}this.ws.onopen=n,this.ws.onmessage=o=>{this.logging&&this.logInfo("new message:"+JSON.stringify(o.data)),o.data!=="heartbeat"&&this.onmessage&&this.onmessage(o)},this.ws.onclose=o=>{this.onclose&&this.onclose(o)}}logInfo(t){console.log("[FireTower] INFO",t)}publish(t,n){var r;return t===""||n===""?wF("topic\u6216data\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A"):(this.logging&&this.logInfo('publish topic:"'+t+'", data:'+JSON.stringify(n)),(r=this.ws)==null||r.send(JSON.stringify({type:this.publishKey,topic:t,data:n})),_F("\u53D1\u9001\u6210\u529F"))}subscribe(t){var n;Array.isArray(t)||(t=[t]),this.logging&&this.logInfo('subscribe:"'+t.join(",")+'"'),(n=this.ws)==null||n.send(JSON.stringify({type:this.subscribeKey,topic:t.join(",")}))}unsubscribe(t){var n;Array.isArray(t)||(t=[t]),this.logging&&this.logInfo('unSubscribe:"'+t.join(",")+'"'),(n=this.ws)==null||n.send(JSON.stringify({type:this.unSubscribeKey,topic:t.join(",")}))}close(){var t;(t=this.ws)==null||t.close()}}function qd(e,t,n){try{const r=()=>{let o={}.VITE_API_V1_WS_URL;if(!o){let a="ws://";window.location.protocol==="https:"&&(a="wss://"),o=a+window.location.host+"/api/v1/connect"}o.indexOf("?")!==-1?o+="&user="+e.id+"&token="+n:o+="?user="+e.id+"&token="+n;const i=new xF(o,()=>{t.commit("setTower",i),console.log("firetower connected"),i.onmessage=a=>{let l=JSON.parse(a.data),s=l.data;l.topic&&(l=l.data,s=s.data),l.type==="publish"&&(l.subject.startsWith("/task/status")?t.commit("emitEventTask",{event:{status:s.status,taskId:s.task_id,tmpId:s.tmp_id,projectId:s.project_id}}):l.subject.startsWith("/workflow/status")?t.commit("emitEventWorkFlow",{event:{status:s.status,workFlowId:s.workflow_id}}):l.subject.startsWith("/workflow/task/status")?t.commit("emitEventWorkFlowTask",{event:{status:s.status,taskId:s.task_id,projectId:s.project_id,workFlowId:s.workflow_id}}):console.log("unknown event",a))}},()=>{setTimeout(()=>{t.getters.currentUser&&r()},1e3)})};r()}catch(r){console.error(r)}}function U3(e){return e===""?"EM":e.length>3?e.substring(e.length-2).toUpperCase():e.length<3?e.substring(0,1).toUpperCase():e.substring(1,3).toUpperCase()}function W3(e){const n=window.location.search.substring(1).split("&");for(let r=0;rn===t[r])}const Vf=new Error("Handled"),ia="access-token",kF={setApi(e,{apiv1:t}){e.apiv1=t},setQuasar(e,{$q:t}){e.$q=t},setTower(e,t){e.firetower=t},subscribedTopic(e,t){e.subscribedTopic=t},setNotificationSwitch(e,{status:t}){e.notificationSwitch=t},authed(e,{user:t,token:n}){e.user=t,e.token=n,e.logined=!0,Df.set(ia,n,{expires:7});const r=e.apiv1;r&&(r.defaults.headers.common[ia]=n)},unauthed(e){e.user=void 0,e.token=void 0,e.logined=!1,Df.remove(ia);const t=e.apiv1;t&&delete t.defaults.headers.common[ia]},userOrgs(e,t){if(t&&t.length>0){const n=localStorage.getItem("gc_choosed_org");let r=!1;t.forEach((o,i,a)=>{o.id===n&&(r=!0)}),r||localStorage.removeItem("gc_choosed_org")}e.userOrgs=t},error(e,{error:t}){if(t===Vf)return;e.currentError=t;const n=e.$q;if(n){let r=t.message;r||(r=t),n.notify({html:!0,message:r,color:"red",icon:"announcement",position:"top-right",classes:"first:tw-mt-14"})}else throw t},success(e,{message:t,type:n=""}){t&&e.$q&&e.$q.notify({html:!0,message:t,type:n||"info",position:"top-right",classes:"first:tw-mt-14"})},notifySuccess(e,{message:t,type:n=""}){!e.notificationSwitch||t&&e.$q&&e.$q.notify({html:!0,message:t,type:n||"info",position:"bottom-right"})},cleanError(e){e.currentError=void 0},setUsers(e,{list:t,total:n}){e.users=t,e.userTotal=n},setRecentLogCount(e,{records:t}){e.recentLogCountRecords=t},loadingLogs(e){e.loadingTaskLogs=!0},unloadingLogs(e){e.loadingTaskLogs=!1},setLogs(e,{logs:t,total:n}){e.taskLogs=t,e.taskLogsTotal=n},setWorkflows(e,{workflows:t,total:n}){e.workflows=t,e.workflowsTotal=n},loadingWorkflowEdges(e){e.loadingWorkflowEdges=!0},unloadingWorkflowEdges(e){e.loadingWorkflowEdges=!1},setWorkflowEdges(e,{edges:t,states:n,tasks:r}){e.workflowEdges=t,e.workflowTaskStates=n,e.workflowTasks=r},loadingWorkflowLogs(e){e.loadingWorkflowLogs=!0},unloadingWorkflowLogs(e){e.loadingWorkflowLogs=!1},setWorkflowLogs(e,{logs:t,total:n}){e.workflowLogs=t,e.workflowLogsTotal=n},setCurrentOrg(e,t){e.currentOrg=t},emitEventTask(e,{event:t}){e.eventTask=t},emitEventWorkFlow(e,{event:t}){e.eventWorkFlow=t},emitEventWorkFlowTask(e,{event:t}){e.eventWorkFlowTask=t}},CF={changeNotificationStatus({commit:e,state:t}){e("setNotificationSwitch",{status:!t.notificationSwitch}),localStorage.setItem("gc_notification_setting",JSON.stringify({status:t.notificationSwitch}))},async refreshUserOrgs({commit:e,state:t}){},async logout({commit:e,state:t}){e("unauthed"),this.getters.firetower&&this.getters.firetower.close()},switchOrg({commit:e},t){e("setCurrentOrg",t),us.push({name:"summary",params:{orgId:t}})},async checkLogin({dispatch:e,commit:t,state:n}){if(n.logined)return;const r=Df.get(ia);if(r===void 0){await e("logout");return}try{const o=this.getters.apiv1;o.defaults.headers.common[ia]=r;const i=await WF(o);t("authed",{user:i,token:r}),qd(i,this,r);const a=await rl();t("userOrgs",a)}catch(o){await e("logout"),t("error",{error:o})}},async login({commit:e},{username:t,password:n}){const r=this.getters.apiv1;try{const[o,i]=await HF(r,t,n);e("authed",{user:o,token:i}),qd(o,this,i);const a=await rl();e("userOrgs",a)}catch(o){e("error",{error:o})}},async loginWithOIDC({commit:e},{code:t,state:n}){const r=this.getters.apiv1;try{const[o,i]=await UF(r,t,n);e("authed",{user:o,token:i}),qd(o,this,i);const a=await rl();e("userOrgs",a)}catch(o){e("error",{error:o})}},async saveTask({commit:e},{task:t}){const n=this.getters.apiv1;try{const r=await KF(n,t);return r&&(t.isRunning=r.isRunning),e("Task/updateTask",{task:t}),e("success",{message:"\u66F4\u65B0\u6210\u529F"}),r}catch(r){e("error",{error:r})}},subscribeTopic({commit:e},t){try{const n=this.getters.subscribedTopic;if(n&&n.length>0){if(SF(n,t))return;this.getters.firetower.unsubscribe(n)}this.getters.firetower.subscribe(t),e("subscribedTopic",t)}catch{}},async saveWorkFlowTask({commit:e},{task:t}){const n=this.getters.apiv1;try{t.id!==""?await s3(n,t):await a3(n,t.projectId,t.name,t.command,t.remark,t.timeout),e("WorkFlowTask/updateTask",{task:t})}catch(r){e("error",{error:r})}},async deleteTask({commit:e},{projectId:t,taskId:n}){const r=this.getters.apiv1;try{await QF(r,t,n)}catch(o){e("error",{error:o})}},async deleteWorkFlowTask({commit:e},{projectId:t,taskId:n}){const r=this.getters.apiv1;try{await l3(r,t,n)}catch(o){e("error",{error:o})}},async recentLog({commit:e},t){const n=this.getters.apiv1;try{const r=await ZF(n,t);e("setRecentLogCount",{records:r})}catch(r){e("error",{error:r})}},async createOrg({commit:e},t){try{await gF(t);const n=await rl();e("userOrgs",n)}catch(n){e("error",{error:n})}},async updateOrg({commit:e},t){try{await pF(t);const n=await rl();e("userOrgs",n)}catch(n){e("error",{error:n})}},async createProject({dispatch:e,commit:t},{title:n,remark:r,orgId:o}){const i=this.getters.apiv1;try{await YF(i,n,r,o),await e("Project/fetchProjects",{orgId:o})}catch(a){t("error",{error:a})}},async updateProject({dispatch:e,commit:t},{projectId:n,title:r,remark:o,orgId:i}){const a=this.getters.apiv1;try{await XF(a,n,r,o),await e("Project/fetchProjects",{orgId:i})}catch(l){t("error",{error:l})}},async deleteProject({dispatch:e,commit:t},{projectId:n,orgId:r}){const o=this.getters.apiv1;try{await GF(o,n),await e("Project/fetchProjects",{orgId:r})}catch(i){t("error",{error:i})}},async fetchUsers({dispatch:e,commit:t},n){try{const r=await bF(n);t("setUsers",{list:r.list,total:r.total})}catch(r){t("error",{error:r})}},async createUser({dispatch:e,commit:t},n){try{await yF(n),await e("fetchUsers")}catch(r){t("error",{error:r})}},async fetchTaskLogs({commit:e},{projectId:t,taskId:n,page:r,pageSize:o}){e("loadingLogs");const i=this.getters.apiv1;try{const[a,l]=await JF(i,t,n,r,o);e("setLogs",{logs:a,total:l})}catch(a){e("error",{error:a})}e("unloadingLogs")},async fetchWorkflowEdges({commit:e},{workflowId:t}){e("loadingWorkflowEdges");const n=this.getters.apiv1;try{const[r,o,i]=await n3(n,t);e("setWorkflowEdges",{edges:r,states:o,tasks:i})}catch(r){e("error",{error:r})}e("unloadingWorkflowEdges")},async deleteWorkflow({commit:e},{workflowId:t}){const n=this.getters.apiv1;try{await o3(n,t)}catch(r){e("error",{error:r})}},async updateWorkflow({commit:e},{workflow:t}){const n=this.getters.apiv1;try{await t3(n,t)}catch(r){e("error",{error:r})}},async updateWorkFlowEdges({dispatch:e,commit:t},{workflowId:n,edges:r}){const o=this.getters.apiv1;try{await r3(o,n,r),await e("fetchWorkflowEdges",{workflowId:n})}catch(i){t("error",{error:i})}},async fetchWorkFlowLogs({commit:e},{workflowId:t,page:n,pageSize:r}){e("loadingWorkflowLogs");const o=this.getters.apiv1;try{const[i,a]=await i3(o,t,n,r);e("setWorkflowLogs",{logs:i,total:a})}catch(i){e("error",{error:i})}e("unloadingWorkflowLogs")}},TF={firetower(e){return e.firetower},subscribedTopic(e){return e.subscribedTopic},notificationSetting(e){return{status:e.notificationSwitch}},apiv1(e){const t=e.apiv1;if(t===void 0)throw new Error("Api V1 instance not found");return t},$q(e){const t=e.$q;if(t===void 0)throw new Error("Quasar api instance not found");return t},isAdmin(e){return e.user!==void 0&&e.user.permissions.includes("admin")},currentUser(e){if(e.user===void 0)throw new Error("User is not login");return e.user},currentOrg(e){return e.currentOrg||""}},EF={notificationSwitch:(()=>{const e=localStorage.getItem("gc_notification_setting");if(e)try{const t=JSON.parse(e);if(t.status!==void 0)return t.status}catch(t){console.error(t)}return!0})(),currentOrg:"",logined:!1,FireTower:void 0,subscribedTopic:[],workFlowTasks:[],loadingWorkFlowTasks:!1,fetchWorkFlowTasksCache:new Map,recentLogCountRecords:[],taskLogs:[],taskLogsTotal:0,loadingTaskLogs:!1,workflows:[],workflowsTotal:0,loadingWorkflows:!1,workflowEdges:[],workflowTaskStates:[],workflowTasks:[],loadingWorkflowEdges:!1,workflowLogs:[],workflowLogsTotal:0,loadingWorkflowLogs:!1},$F={state:()=>EF,actions:CF,mutations:kF,getters:TF};async function PF(e){return(await xt.get("/crontab/list",{params:{project_id:e}})).data.response.list.map(o=>({id:o.task_id,name:o.name,projectId:o.project_id,command:o.command,cronExpr:o.cron,remark:o.remark,timeout:o.timeout,createTime:o.create_time,status:o.status,isRunning:o.is_running,noseize:o.noseize,exclusion:o.exclusion,clientIp:o.client_ip,tmpId:o.tmp_id}))}async function qF(e){const r=(await xt.get("/temporary_task/list",{params:{project_id:e}})).data.response;return r?r.map(o=>({command:o.command,createTime:o.create_time,id:o.id,projectId:o.project_id,scheduleStatus:o.schedule_status,scheduleTime:o.schedule_time,taskId:o.task_id,userId:o.user_id,userName:o.user_name,tmpId:o.tmp_id,isRunning:o.is_running,host:o.host,timeout:o.timeout,remark:o.remark})):[]}async function K3(e){return(await xt.post("/crontab/kill",{project_id:e.projectId,task_id:e.taskId})).data}async function Q3(e){return(await xt.post("/temporary_task/delete",{id:e})).data}async function Z3(e){return(await xt.post("/temporary_task/create",{project_id:e.projectId,task_id:e.taskId,command:e.command,noseize:e.noseize,remark:e.remark,schedule_time:e.scheduleTime,timeout:e.timeout,host:e.host})).data.meta}const MF={async fetchTasks({commit:e,state:t},{projectId:n,cached:r=!1}){e("loadingTasks");try{if(!r||!t.tasks.has(n)){const o=await PF(n);e("setTasks",{tasks:o,projectId:n})}}catch(o){e("error",{error:o},{root:!0})}e("unloadingTasks")},async fetchTemporaryTasks({commit:e,state:t},{projectId:n,cached:r=!1}){e("loadingTemporaryTasks");try{if(!r||!t.temporaryTasks.has(n)){const o=await qF(n);e("setTemporaryTasks",{tasks:o,projectId:n})}}catch(o){e("error",{error:o},{root:!0})}e("unloadingTemporaryTasks")}},OF={loadingTasks(e){e.loadingTasks=!0},unloadingTasks(e){e.loadingTasks=!1},setTasks(e,{projectId:t,tasks:n}){e.tasks.set(t,n)},loadingTemporaryTasks(e){e.loadingTemporaryTasks=!0},unloadingTemporaryTasks(e){e.loadingTemporaryTasks=!1},setTemporaryTasks(e,{projectId:t,tasks:n}){e.temporaryTasks.set(t,n)},clearTasks(e,{projectId:t}){t!==void 0?e.tasks.delete(t):e.tasks.clear()},updateTemporaryTaskStatus(e,t){const n=e.temporaryTasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.tmpId===t.tmpId);r!==-1&&(n[r].scheduleStatus=t.finished?0:1,n[r].isRunning=t.isRunning?1:0)},updateTaskStatus(e,t){const n=e.tasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.id===t.taskId);r!==-1&&(n[r].isRunning=t.isRunning===!0?1:0)},updateTask(e,{task:t}){const n=e.tasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.id===t.id);r!==-1&&(n[r]=t)}},AF={namespaced:!0,state:()=>({tasks:new Map,loadingTasks:!1,temporaryTasks:new Map,loadingTemporaryTasks:!1}),actions:MF,mutations:OF},RF={async fetchWorkFlows({commit:e},{orgId:t,page:n,pageSize:r}){let o,i;try{e("loadingWorkflows"),[o,i]=await DN(t,n,r),e("appendWorkFlows",{workflows:o,total:i})}catch(a){console.error(a)}return e("unloadingWorkflows"),[o,i]},async fetchWorkFlow({commit:e},{id:t}){const n=await D1(t);e("updateWorkFlow",{workflow:n})},async deleteWorkFlow({commit:e},{id:t}){try{await VN(t),e("deleteWorkFlow",{id:t})}catch(n){e("error",{error:n},{root:!0})}}},IF={loadingWorkflows(e){e.loadingWorkflows=!0},unloadingWorkflows(e){e.loadingWorkflows=!1},updateWorkFlow(e,{workflow:t}){e.workflows.set(t.id,t)},appendWorkFlows(e,{workflows:t,total:n}){if(t)for(const r of t)e.workflows.set(r.id,r);e.totalCount=n},clearWorkFlows(e){e.workflows.clear(),e.totalCount=0},deleteWorkFlow(e,{id:t}){e.workflows.delete(t)}},LF={namespaced:!0,state:()=>({workflows:new Map,totalCount:0,loadingWorkflows:!1}),actions:RF,mutations:IF};async function BF(e){return(await xt.get("/project/workflow/task/list",{params:{project_id:e}})).data.response.map(o=>({id:o.task_id,name:o.task_name,projectId:o.project_id,workflowId:o.workflow_id,command:o.command,remark:o.remark,timeout:o.timeout,createTime:o.create_time,noseize:o.noseize}))}const NF={async fetchTasks({commit:e,state:t},{projectId:n,cached:r=!1}){e("loadingTasks");try{if(!r||!t.tasks.has(n)){const o=await BF(n);e("setTasks",{projectId:n,tasks:o})}}catch(o){e("error",{error:o},{root:!0})}e("unloadingTasks")}},FF={loadingTasks(e){e.loadingTasks=!0},unloadingTasks(e){e.loadingTasks=!1},setTasks(e,{projectId:t,tasks:n}){e.tasks.set(t,n)},clearTasks(e,{projectId:t}){t!==void 0?e.tasks.delete(t):e.tasks.clear()},updateTask(e,{task:t}){const n=e.tasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.id===t.id);r!==-1&&(n[r]=t)}},zF={namespaced:!0,state:()=>({tasks:new Map,loadingTasks:!1}),actions:NF,mutations:FF},Jt=uF({modules:{Root:$F,WorkFlow:LF,Project:hF,Task:AF,WorkFlowTask:zF},devtools:!0,strict:!0,state:{}}),ex=Symbol("Vuex Store");function Y3(){return HN(ex)}function wy(e){return async t=>{var n,r,o;if(e==="crontab"){const i=Number(t.params.projectId),a=Jt.state.Task.tasks.get(i);if((!a||a.length===0)&&await Jt.dispatch("Task/fetchTasks",{projectId:i}),((n=Jt.state.Task.tasks.get(i))==null?void 0:n.find(s=>s.id===t.params.taskId))===void 0)return{name:"notfound"}}else if(e==="workflow"){const i=Number(t.params.projectId),a=Jt.state.WorkFlowTask.tasks.get(i);if((!a||a.length===0)&&await Jt.dispatch("WorkFlowTask/fetchTasks",{projectId:Number(t.params.projectId)}),((r=Jt.state.WorkFlowTask.tasks.get(i))==null?void 0:r.find(s=>s.id===t.params.taskId))===void 0)return{name:"notfound"}}else if(e==="temporary"){const i=Number(t.params.projectId),a=Jt.state.Task.temporaryTasks.get(i);if((!a||a.length===0)&&await Jt.dispatch("Task/fetchTemporaryTasks",{projectId:i}),((o=Jt.state.Task.temporaryTasks.get(i))==null?void 0:o.find(s=>s.id===Number(t.params.taskId)))===void 0)return{name:"notfound"}}}}const Md=e=>[{name:`${e}_task`,path:"task/:taskId",component:()=>Ht(()=>import("./TaskDetail.78b1d32f.js"),["assets/TaskDetail.78b1d32f.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/task.f3ffd066.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css","assets/log.a88c5349.js","assets/thumbStyle.856de4cb.js"]),props:t=>({id:t.params.taskId,projectId:Number(t.params.projectId),type:e}),beforeEnter:wy(e)},{name:`${e}_task_logs`,path:"task/:taskId/logs",component:()=>Ht(()=>import("./TaskDetail.78b1d32f.js"),["assets/TaskDetail.78b1d32f.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/task.f3ffd066.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css","assets/log.a88c5349.js","assets/thumbStyle.856de4cb.js"]),props:t=>({id:t.params.taskId,projectId:Number(t.params.projectId),type:e}),beforeEnter:wy(e)},{name:`create_${e}_task`,path:"task/create",component:()=>Ht(()=>import("./TaskDetail.78b1d32f.js"),["assets/TaskDetail.78b1d32f.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/task.f3ffd066.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css","assets/log.a88c5349.js","assets/thumbStyle.856de4cb.js"]),props:t=>({projectId:Number(t.params.projectId),type:e})}],jF=[{path:"/",redirect:{name:"summary",params:{orgId:"baseorg"}},component:()=>Ht(()=>import("./LandingLayout.f500530e.js"),[]),meta:{requiresAuth:!0},children:[{name:"summary",path:":orgId/summary",props:e=>({orgId:e.params.orgId}),component:()=>Ht(()=>import("./SummaryPage.9cc28269.js"),["assets/SummaryPage.9cc28269.js","assets/log.a88c5349.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css","assets/datetime.561112b0.js"])},{name:"projects",path:":orgId/project",props:e=>({orgId:e.params.orgId}),component:()=>Ht(()=>import("./ProjectList.cb9d1f1f.js"),["assets/ProjectList.cb9d1f1f.js","assets/Confirm.47315734.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),children:[{name:"project",path:":projectId(\\d+)",component:()=>Ht(()=>import("./DummyContainer.53b75c50.js"),[]),async beforeEnter(e){if(Jt.state.Project.projects.length===0&&await Jt.dispatch("Project/fetchProjects",{orgId:e.params.orgId}),Jt.state.Project.projects.find(n=>n.id===Number(e.params.projectId))===void 0)return{name:"notfound"}},redirect:e=>({name:"crontab_tasks",params:B({},e.params)}),children:[{name:"crontab_tasks",path:"crontab_tasks",component:()=>Ht(()=>import("./TaskList.7fccd2e3.js"),["assets/TaskList.7fccd2e3.js","assets/TaskList.19182fd1.css","assets/Confirm.47315734.js","assets/task.f3ffd066.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),props:e=>({projectId:Number(e.params.projectId)}),children:Md("crontab")},{name:"temporary_tasks",path:"temporary_tasks",component:()=>Ht(()=>import("./TaskList.7fccd2e3.js"),["assets/TaskList.7fccd2e3.js","assets/TaskList.19182fd1.css","assets/Confirm.47315734.js","assets/task.f3ffd066.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),props:e=>({projectId:Number(e.params.projectId)}),children:Md("temporary")},{name:"workflow_tasks",path:"workflow_tasks",component:()=>Ht(()=>import("./TaskList.7fccd2e3.js"),["assets/TaskList.7fccd2e3.js","assets/TaskList.19182fd1.css","assets/Confirm.47315734.js","assets/task.f3ffd066.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),props:e=>({projectId:Number(e.params.projectId)}),children:Md("workflow")}]}]},{name:"workflows",path:":orgId/workflows",props:e=>({orgId:e.params.orgId}),component:()=>Ht(()=>import("./WorkflowList.bd34351b.js"),["assets/WorkflowList.bd34351b.js","assets/WorkflowList.65afaacb.css","assets/Confirm.47315734.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),children:[{name:"workflow",path:":workflowId(\\d+)",component:()=>Ht(()=>import("./WorkflowTabs.36c12950.js"),["assets/WorkflowTabs.36c12950.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId}),async beforeEnter(e){try{await D1(Number(e.params.workflowId))}catch{return{name:"notfound"}}},redirect:e=>({name:"workflow_graph",params:B({},e.params)}),children:[{name:"workflow_graph",path:"graph",component:()=>Ht(()=>import("./WorkflowTabs.36c12950.js"),["assets/WorkflowTabs.36c12950.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId})},{name:"workflow_logs",path:"logs",component:()=>Ht(()=>import("./WorkflowTabs.36c12950.js"),["assets/WorkflowTabs.36c12950.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId})},{name:"workflow_detail",path:"detail",component:()=>Ht(()=>import("./WorkflowTabs.36c12950.js"),["assets/WorkflowTabs.36c12950.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId})}]},{name:"create_workflow",path:"create",component:()=>Ht(()=>import("./WorkflowTabs.36c12950.js"),["assets/WorkflowTabs.36c12950.js","assets/index.650f2770.js","assets/datetime.561112b0.js","assets/Confirm.47315734.js","assets/JSONViewer.6dded83c.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({orgId:e.params.orgId})}]},{name:"user-admin",path:":orgId/admin/user",component:()=>Ht(()=>import("./UserListAdmin.74b6349a.js"),["assets/UserListAdmin.74b6349a.js","assets/ModifyBox.88f33ebb.js","assets/datetime.561112b0.js"]),props:e=>({orgId:e.params.orgId}),meta:{requiresAdmin:!0}},{name:"node-admin",path:":orgId/admin/node",component:()=>Ht(()=>import("./NodeListAdmin.5e0c8013.js"),[]),props:e=>({orgId:e.params.orgId}),meta:{requiresAdmin:!0}},{name:"user-profile",path:"user/profile",component:()=>Ht(()=>import("./UserProfile.ab80fd42.js"),["assets/UserProfile.ab80fd42.js","assets/ModifyBox.88f33ebb.js"])}]},{name:"login",path:"/login",component:()=>Ht(()=>import("./LoginPage.d43407c2.js"),[])},{name:"logout",path:"/logout",redirect:{name:"login"}},{name:"forbidden",path:"/error/forbidden",component:()=>Ht(()=>import("./HTTPStatus.a6c1441d.js"),[]),props:{code:403}},{name:"notfound",path:"/error/notfound",component:()=>Ht(()=>import("./HTTPStatus.a6c1441d.js"),[]),props:{code:404}},{path:"/:pathMatch(.*)*",redirect:{name:"notfound"}}],us=zN({history:zB(),routes:jF});us.onError((e,t,n)=>{console.error("router error",e)});us.beforeEach(async(e,t)=>{if(await Jt.dispatch("checkLogin"),e.params.orgId!==t.params.orgId&&e.params.orgId&&Jt.commit("setCurrentOrg",e.params.orgId),e.meta.requiresAuth&&!Jt.state.Root.logined)return{name:"login",query:{redirect:e.fullPath}};if(e.meta.requiresAdmin&&!Jt.getters.isAdmin)return{name:"forbidden"}});const xt=fB.create({baseURL:"/api/v1"}),DF=Symbol("ApiV1 Axio Instance");function VF(e,{store:t}){e.provide(DF,xt),e.config.globalProperties.$apiv1=xt,xt.interceptors.response.use(function(n){const r=n.data;if(r.meta.code!==0){const o=new Error(r.meta.log||r.meta.msg);throw t.commit("error",{error:o}),Vf}return n},function(n){var o,i,a,l,s,c,u;let r=new Error(n.message);if(!n.response)r=new Error("\u7F51\u7EDC\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");else{switch(n.response.status){case 401:t.commit("unauthed"),us.push({name:"login"});break}try{let d=(i=(o=n.response)==null?void 0:o.data.meta)==null?void 0:i.msg;((l=(a=n.response)==null?void 0:a.data.meta)==null?void 0:l.log)&&((c=(s=n.response)==null?void 0:s.data.meta)==null?void 0:c.log)!==d&&(d+="
"+((u=n.response.data.meta)==null?void 0:u.log)),r=new Error(d||"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")}catch{r=new Error(n.message)}}throw t.commit("error",{error:r}),Vf})}async function X3(){return(await xt.get("/login_methods")).data.response}async function HF(e,t,n){const i=(await e.post("/user/login",{account:t,password:n})).data.response;return[{id:i.id,name:i.name,account:i.account,permissions:i.permission.split(","),createTime:i.create_time},i.token]}async function G3(){return(await xt.get("/oidc/auth_url")).data.response}async function UF(e,t,n){const i=(await e.post("/oidc/login",{code:t,state:n})).data.response;return[{id:i.id,name:i.name,account:i.account,permissions:i.permission.split(","),createTime:i.create_time},i.token]}async function WF(e){const r=(await e.get("/user/info")).data.response;return{id:r.id,name:r.name,account:r.account,permissions:r.permission.split(","),createTime:r.createTime}}async function KF(e,t){const n=JSON.stringify({project_id:t.projectId,task_id:t.id,name:t.name,command:t.command,cron:t.cronExpr,remark:t.remark,timeout:t.timeout,status:t.status,noseize:t.noseize,exclusion:t.exclusion}),i=(await e.post("/crontab/save",n,{headers:{"content-type":"application/json"}})).data.response;return{id:i.task_id,name:i.name,projectId:i.project_id,command:i.command,cronExpr:i.cron,remark:i.remark,timout:i.timout,createTime:i.create_time,status:i.status,isRunning:i.is_running,noseize:i.noseize,exclusion:i.exclusion,clientIp:i.client_ip,tmpId:i.tmp_id}}async function J3(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/crontab/execute",r,{headers:{"content-type":"application/json"}})}async function ez(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/crontab/flow_task/execute",r,{headers:{"content-type":"application/json"}})}async function QF(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/crontab/delete",r,{headers:{"content-type":"application/json"}})}async function ZF(e,t){return(await e.get("/log/recent",{params:{oid:t}})).data.response.map(i=>({success:i.success_count,error:i.error_count,date:i.date}))}async function YF(e,t,n,r){const o=JSON.stringify({oid:r,title:t,remark:n});return await e.post("/project/create",o,{headers:{"content-type":"application/json"}})}async function XF(e,t,n,r){const o=JSON.stringify({project_id:t,title:n,remark:r});return await e.post("/project/update",o,{headers:{"content-type":"application/json"}})}async function GF(e,t){const n=JSON.stringify({project_id:t});return await e.post("/project/delete",n,{headers:{"content-type":"application/json"}})}async function tz(e,t){return(await e.get("/project/users",{params:{project_id:t}})).data.response.list.map(r=>({id:r.id,name:r.name,account:r.account,permissions:r.permission.split(","),createTime:r.create_time}))}async function nz(e,t,n){const r=JSON.stringify({project_id:t,user_id:n});return await e.post("/project/remove_user",r,{headers:{"content-type":"application/json"}})}async function rz(e,t,n,r){const o=JSON.stringify({project_id:t,user_account:n,user_role:r});return await e.post("/project/add_user",o,{headers:{"content-type":"application/json"}})}async function JF(e,t,n,r,o){const l=(await e.get("/log/list",{params:{project_id:t,task_id:n,page:r,pagesize:o}})).data.response;return[l.list.map(s=>({id:s.id,taskId:s.task_id,projectId:s.project_id,project:s.project,name:s.name,result:s.result,startTime:s.start_time,endTime:s.end_time,command:s.command,withError:s.with_error,clientIp:s.client_ip,tmpId:s.tmp_id})),l.total]}const e3=2;async function oz(e,t,n,r,o,i=e3){const a=JSON.stringify({oid:t,title:n,remark:r,cron:o,status:i});return await e.post("/workflow/create",a,{headers:{"content-type":"application/json"}})}async function t3(e,t){const n=JSON.stringify({id:t.id,title:t.title,remark:t.remark,cron:t.cronExpr,status:t.status});return await e.post("/workflow/update",n,{headers:{"content-type":"application/json"}})}async function n3(e,t){const r=(await e.get("/workflow/task/list",{params:{workflow_id:t}})).data;if(!r.response)return[[],[],[]];const o=[],i=new Map,a=new Map;for(const{task:l,state:s,task_detail:c}of r.response){o.push({id:l.id,projectId:l.project_id,taskId:l.task_id,workflowId:l.workflowId,createTime:l.create_time,dependencyProjectId:l.dependency_project_id,dependencyTaskId:l.dependency_task_id});{const d=`${c.project_id}_${c.task_id}`;if(a.has(d))continue;a.set(d,{id:c.task_id,name:c.task_name,projectId:c.project_id,workflowId:c.workflow_id,command:c.command,remark:c.remark,timeout:c.timeout,createTime:c.create_time,noseize:c.noseize})}if(!s)continue;const u=`${s.project_id}_${s.task_id}`;i.has(u)||i.set(u,{workflowId:s.workflow_id,projectId:s.project_id,taskId:s.task_id,currentStatus:s.current_status,scheduleCount:s.schedule_count,scheduleRecords:s.schedule_records.map(d=>({tmpId:d.tmp_id,status:d.status,result:d.result,eventTime:d.event_time})),startTime:s.start_time})}return[o,Array.from(i.values()),Array.from(a.values())]}async function r3(e,t,n){const r=new Map,o=new Map;for(const a of n){const l=`${a.projectId}_${a.taskId}`;if(r.has(l)||r.set(l,{task_id:a.taskId,project_id:a.projectId}),a.dependencyProjectId===0||a.dependencyTaskId==="")continue;const s=o.get(l),c={task_id:a.dependencyTaskId,project_id:a.dependencyProjectId};s===void 0?o.set(l,[c]):o.set(l,[...s,c])}const i=JSON.stringify({workflow_id:t,tasks:Array.from(r.keys()).map(a=>({task:r.get(a),dependencies:o.get(a)||[]}))});return await e.post("/workflow/task/schedule/create",i,{headers:{"content-type":"application/json"}})}async function iz(e,t){const n=JSON.stringify({workflow_id:t});return await e.post("/workflow/start",n,{headers:{"content-type":"application/json"}})}async function o3(e,t){const n=JSON.stringify({id:t});return await e.post("/workflow/delete",n,{headers:{"content-type":"application/json"}})}async function i3(e,t,n,r){const a=(await e.get("/workflow/log/list",{params:{workflow_id:t,page:n,pagesize:r}})).data.response;return[a.list.map(l=>({id:l.id,workflowId:l.workflow_id,createTime:l.create_time,startTime:l.start_time,endTime:l.end_time,result:l.result})),a.total]}async function a3(e,t,n,r,o,i){const a=JSON.stringify({project_id:t,task_name:n,command:r,remark:o,timeout:i});return await e.post("/project/workflow/task/create",a,{headers:{"content-type":"application/json"}})}async function l3(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/project/workflow/task/delete",r,{headers:{"content-type":"application/json"}})}async function s3(e,t){const n=JSON.stringify({project_id:t.projectId,task_id:t.id,task_name:t.name,command:t.command,remark:t.remark,timeout:t.timeout});return await e.post("/project/workflow/task/update",n,{headers:{"content-type":"application/json"}})}const Ni=wv(bI);Ni.use(kq,{plugins:{Notify:pq,Dialog:cq},config:{dark:!0,notify:{}},lang:Cq});Ni.use(mI);Ni.use(VF,{store:Jt});Ni.use(Jt,ex);Jt.commit("setQuasar",{$q:Ni.config.globalProperties.$q});Jt.commit("setApi",{apiv1:xt});Ni.use(us);Ni.mount("#app");export{xT as $,be as A,p$ as B,M3 as C,JT as D,Qt as E,mc as F,Z3 as G,I3 as H,de as I,R3 as J,ze as K,BE as L,m3 as M,J3 as N,K3 as O,Ge as P,ii as Q,y3 as R,gc as S,$o as T,gf as U,E3 as V,ac as W,k3 as X,Xe as Y,Q3 as Z,gI as _,mt as a,ez as a0,$r as a1,bn as a2,Vm as a3,S3 as a4,$3 as a5,gE as a6,td as a7,Lt as a8,c3 as a9,B3 as aA,F3 as aB,N3 as aC,Kt as aD,So as aE,ot as aF,hc as aG,iz as aH,L3 as aI,D1 as aJ,e3 as aK,oz as aL,t3 as aM,H3 as aN,_3 as aO,Jt as aP,V3 as aQ,yF as aR,W3 as aS,Zl as aT,X3 as aU,G3 as aV,xt as aa,T3 as ab,Xl as ac,Sr as ad,U3 as ae,O3 as af,rr as ag,b3 as ah,q3 as ai,C3 as aj,g3 as ak,c$ as al,h3 as am,v3 as an,w3 as ao,We as ap,p3 as aq,tz as ar,rz as as,nz as at,GT as au,j3 as av,A3 as aw,z3 as ax,d3 as ay,Hb as az,wa as b,Ut as c,ec as d,xi as e,Ow as f,LC as g,vt as h,Nb as i,D3 as j,$t as k,g as l,_t as m,Zn as n,qe as o,Un as p,st as q,U as r,x3 as s,Od as t,Y3 as u,f3 as v,_r as w,Yn as x,P3 as y,T$ as z}; + */var V_="store";function HN(e){return e===void 0&&(e=null),gt(e!==null?e:V_)}function Li(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function UN(e){return e!==null&&typeof e=="object"}function WN(e){return e&&typeof e.then=="function"}function fr(e,t){if(!e)throw new Error("[vuex] "+t)}function KN(e,t){return function(){return e(t)}}function H_(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function U_(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Bc(e,n,[],e._modules.root,!0),Ch(e,n,t)}function Ch(e,t,n){var r=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,i={};Li(o,function(a,l){i[l]=KN(a,e),Object.defineProperty(e.getters,l,{get:function(){return i[l]()},enumerable:!0})}),e._state=Kt({data:t}),e.strict&&GN(e),r&&n&&e._withCommit(function(){r.data=null})}function Bc(e,t,n,r,o){var i=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a]&&console.error("[vuex] duplicate namespace "+a+" for the namespaced module "+n.join("/")),e._modulesNamespaceMap[a]=r),!i&&!o){var l=Th(t,n.slice(0,-1)),s=n[n.length-1];e._withCommit(function(){s in l&&console.warn('[vuex] state field "'+s+'" was overridden by a module with the same name at "'+n.join(".")+'"'),l[s]=r.state})}var c=r.context=QN(e,a,n);r.forEachMutation(function(u,d){var f=a+d;ZN(e,f,u,c)}),r.forEachAction(function(u,d){var f=u.root?d:a+d,h=u.handler||u;YN(e,f,h,c)}),r.forEachGetter(function(u,d){var f=a+d;XN(e,f,u,c)}),r.forEachChild(function(u,d){Bc(e,t,n.concat(d),u,o)})}function QN(e,t,n){var r=t==="",o={dispatch:r?e.dispatch:function(i,a,l){var s=Bu(i,a,l),c=s.payload,u=s.options,d=s.type;if((!u||!u.root)&&(d=t+d,!e._actions[d])){console.error("[vuex] unknown local action type: "+s.type+", global type: "+d);return}return e.dispatch(d,c)},commit:r?e.commit:function(i,a,l){var s=Bu(i,a,l),c=s.payload,u=s.options,d=s.type;if((!u||!u.root)&&(d=t+d,!e._mutations[d])){console.error("[vuex] unknown local mutation type: "+s.type+", global type: "+d);return}e.commit(d,c,u)}};return Object.defineProperties(o,{getters:{get:r?function(){return e.getters}:function(){return W_(e,t)}},state:{get:function(){return Th(e.state,n)}}}),o}function W_(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(o){if(o.slice(0,r)===t){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[o]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function ZN(e,t,n,r){var o=e._mutations[t]||(e._mutations[t]=[]);o.push(function(a){n.call(e,r.state,a)})}function YN(e,t,n,r){var o=e._actions[t]||(e._actions[t]=[]);o.push(function(a){var l=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},a);return WN(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(s){throw e._devtoolHook.emit("vuex:error",s),s}):l})}function XN(e,t,n,r){if(e._wrappedGetters[t]){console.error("[vuex] duplicate getter key: "+t);return}e._wrappedGetters[t]=function(i){return n(r.state,r.getters,i.state,i.getters)}}function GN(e){de(function(){return e._state.data},function(){fr(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function Th(e,t){return t.reduce(function(n,r){return n[r]},e)}function Bu(e,t,n){return UN(e)&&e.type&&(n=t,t=e,e=e.type),fr(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}var JN="vuex bindings",gy="vuex:mutations",Pd="vuex:actions",Gi="vuex",eF=0;function tF(e,t){S_({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[JN]},function(n){n.addTimelineLayer({id:gy,label:"Vuex Mutations",color:py}),n.addTimelineLayer({id:Pd,label:"Vuex Actions",color:py}),n.addInspector({id:Gi,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===Gi)if(r.filter){var o=[];Y_(o,t._modules.root,r.filter,""),r.rootNodes=o}else r.rootNodes=[Z_(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===Gi){var o=r.nodeId;W_(t,o),r.state=oF(aF(t._modules,o),o==="root"?t.getters:t._makeLocalGettersCache,o)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===Gi){var o=r.nodeId,i=r.path;o!=="root"&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit(function(){r.set(t._state.data,i,r.state.value)})}}),t.subscribe(function(r,o){var i={};r.payload&&(i.payload=r.payload),i.state=o,n.notifyComponentUpdate(),n.sendInspectorTree(Gi),n.sendInspectorState(Gi),n.addTimelineEvent({layerId:gy,event:{time:Date.now(),title:r.type,data:i}})}),t.subscribeAction({before:function(r,o){var i={};r.payload&&(i.payload=r.payload),r._id=eF++,r._time=Date.now(),i.state=o,n.addTimelineEvent({layerId:Pd,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:i}})},after:function(r,o){var i={},a=Date.now()-r._time;i.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},r.payload&&(i.payload=r.payload),i.state=o,n.addTimelineEvent({layerId:Pd,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:i}})}})})}var py=8702998,nF=6710886,rF=16777215,K_={label:"namespaced",textColor:rF,backgroundColor:nF};function Q_(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function Z_(e,t){return{id:t||"root",label:Q_(t),tags:e.namespaced?[K_]:[],children:Object.keys(e._children).map(function(n){return Z_(e._children[n],t+n+"/")})}}function Y_(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[K_]:[]}),Object.keys(t._children).forEach(function(o){Y_(e,t._children[o],n,r+o+"/")})}function oF(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),o={state:Object.keys(e.state).map(function(a){return{key:a,editable:!0,value:e.state[a]}})};if(r.length){var i=iF(t);o.getters=Object.keys(i).map(function(a){return{key:a.endsWith("/")?Q_(a):a,editable:!1,value:zf(function(){return i[a]})}})}return o}function iF(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var o=t,i=r.pop();r.forEach(function(a){o[a]||(o[a]={_custom:{value:{},display:a,tooltip:"Module",abstract:!0}}),o=o[a]._custom.value}),o[i]=zf(function(){return e[n]})}else t[n]=zf(function(){return e[n]})}),t}function aF(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,o,i){var a=r[o];if(!a)throw new Error('Missing module "'+o+'" for path "'+t+'".');return i===n.length-1?a:a._children},t==="root"?e:e.root._children)}function zf(e){try{return e()}catch(t){return t}}var pr=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},X_={namespaced:{configurable:!0}};X_.namespaced.get=function(){return!!this._rawModule.namespaced};pr.prototype.addChild=function(t,n){this._children[t]=n};pr.prototype.removeChild=function(t){delete this._children[t]};pr.prototype.getChild=function(t){return this._children[t]};pr.prototype.hasChild=function(t){return t in this._children};pr.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};pr.prototype.forEachChild=function(t){Li(this._children,t)};pr.prototype.forEachGetter=function(t){this._rawModule.getters&&Li(this._rawModule.getters,t)};pr.prototype.forEachAction=function(t){this._rawModule.actions&&Li(this._rawModule.actions,t)};pr.prototype.forEachMutation=function(t){this._rawModule.mutations&&Li(this._rawModule.mutations,t)};Object.defineProperties(pr.prototype,X_);var Bi=function(t){this.register([],t,!1)};Bi.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};Bi.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,o){return n=n.getChild(o),r+(n.namespaced?o+"/":"")},"")};Bi.prototype.update=function(t){G_([],this.root,t)};Bi.prototype.register=function(t,n,r){var o=this;r===void 0&&(r=!0),J_(t,n);var i=new pr(n,r);if(t.length===0)this.root=i;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],i)}n.modules&&Li(n.modules,function(l,s){o.register(t.concat(s),l,r)})};Bi.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],o=n.getChild(r);if(!o){console.warn("[vuex] trying to unregister module '"+r+"', which is not registered");return}!o.runtime||n.removeChild(r)};Bi.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function G_(e,t,n){if(J_(e,n),t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r)){console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, manual reload is needed");return}G_(e.concat(r),t.getChild(r),n.modules[r])}}var yy={assert:function(e){return typeof e=="function"},expected:"function"},lF={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},by={getters:yy,mutations:yy,actions:lF};function J_(e,t){Object.keys(by).forEach(function(n){if(!!t[n]){var r=by[n];Li(t[n],function(o,i){fr(r.assert(o),sF(e,n,i,o,r.expected))})}})}function sF(e,t,n,r,o){var i=t+" should be "+o+' but "'+t+"."+n+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(r)+".",i}function uF(e){return new Mn(e)}var Mn=function e(t){var n=this;t===void 0&&(t={}),fr(typeof Promise!="undefined","vuex requires a Promise polyfill in this browser."),fr(this instanceof e,"store must be called with the new operator.");var r=t.plugins;r===void 0&&(r=[]);var o=t.strict;o===void 0&&(o=!1);var i=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Bi(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var a=this,l=this,s=l.dispatch,c=l.commit;this.dispatch=function(f,h){return s.call(a,f,h)},this.commit=function(f,h,m){return c.call(a,f,h,m)},this.strict=o;var u=this._modules.root.state;Bc(this,u,[],this._modules.root),Ch(this,u),r.forEach(function(d){return d(n)})},Eh={state:{configurable:!0}};Mn.prototype.install=function(t,n){t.provide(n||V_,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!0;r&&tF(t,this)};Eh.state.get=function(){return this._state.data};Eh.state.set=function(e){fr(!1,"use store.replaceState() to explicit replace store state.")};Mn.prototype.commit=function(t,n,r){var o=this,i=Bu(t,n,r),a=i.type,l=i.payload,s=i.options,c={type:a,payload:l},u=this._mutations[a];if(!u){console.error("[vuex] unknown mutation type: "+a);return}this._withCommit(function(){u.forEach(function(f){f(l)})}),this._subscribers.slice().forEach(function(d){return d(c,o.state)}),s&&s.silent&&console.warn("[vuex] mutation type: "+a+". Silent option has been removed. Use the filter functionality in the vue-devtools")};Mn.prototype.dispatch=function(t,n){var r=this,o=Bu(t,n),i=o.type,a=o.payload,l={type:i,payload:a},s=this._actions[i];if(!s){console.error("[vuex] unknown action type: "+i);return}try{this._actionSubscribers.slice().filter(function(u){return u.before}).forEach(function(u){return u.before(l,r.state)})}catch(u){console.warn("[vuex] error in before action subscribers: "),console.error(u)}var c=s.length>1?Promise.all(s.map(function(u){return u(a)})):s[0](a);return new Promise(function(u,d){c.then(function(f){try{r._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(l,r.state)})}catch(h){console.warn("[vuex] error in after action subscribers: "),console.error(h)}u(f)},function(f){try{r._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(l,r.state,f)})}catch(h){console.warn("[vuex] error in error action subscribers: "),console.error(h)}d(f)})})};Mn.prototype.subscribe=function(t,n){return H_(t,this._subscribers,n)};Mn.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return H_(r,this._actionSubscribers,n)};Mn.prototype.watch=function(t,n,r){var o=this;return fr(typeof t=="function","store.watch only accepts a function."),de(function(){return t(o.state,o.getters)},n,Object.assign({},r))};Mn.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};Mn.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),fr(Array.isArray(t),"module path must be a string or an Array."),fr(t.length>0,"cannot register the root module by using registerModule."),this._modules.register(t,n),Bc(this,this.state,t,this._modules.get(t),r.preserveState),Ch(this,this.state)};Mn.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),fr(Array.isArray(t),"module path must be a string or an Array."),this._modules.unregister(t),this._withCommit(function(){var r=Th(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),U_(this)};Mn.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),fr(Array.isArray(t),"module path must be a string or an Array."),this._modules.isRegistered(t)};Mn.prototype.hotUpdate=function(t){this._modules.update(t),U_(this,!0)};Mn.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(Mn.prototype,Eh);async function cF(e){return(await xt.get("/project/list",{params:{oid:e}})).data.response.list.map(o=>({id:o.project_id,remark:o.remark,taskCount:o.task_count,title:o.title,uid:o.uid,role:o.role}))}async function z3(e){return(await xt.post("/project/re_gen_token",{project_id:e})).data.response}async function dF(e){const r=(await xt.get("/crontab/client/list",{params:{project_id:e}})).data.response;return r.list?r.list.map(o=>({clientIP:o.client_ip,weight:o.weight,version:o.version,region:o.region})):[]}async function j3(e){return(await xt.get("/project/token",{params:{project_id:e}})).data.response}async function D3(e,t,n){await xt.post("/client/weight",{project_id:e,client_ip:t,weight:n})}const fF={async fetchProjects({commit:e},{orgId:t}){e("loadingProjects");try{const n=await cF(t);e("setProjects",{projects:n})}catch(n){e("error",{error:n},{root:!0})}e("unloadingProjects")},async fetchProjectClients({commit:e},{projectId:t}){e("loadingProjectClients");try{const n=await dF(t);e("setProjectClients",{projectId:t,clients:n})}catch(n){e("error",{error:n},{root:!0})}e("unloadingProjectClients")}},vF={loadingProjects(e){e.loadingProjects=!0},unloadingProjects(e){e.loadingProjects=!1},setProjects(e,{projects:t}){e.projects=t},loadingProjectClients(e){e.loadingProjectClients=!0},unloadingProjectClients(e){e.loadingProjectClients=!1},setProjectClients(e,{projectId:t,clients:n}){e.projectClients.set(t,n)}},hF={namespaced:!0,state:()=>({projects:[],projectClients:new Map,loadingProjects:!1,loadingProjectClients:!1}),actions:fF,mutations:vF};/*! js-cookie v3.0.1 | MIT */function js(e){for(var t=1;t{o.push({id:i.id,name:i.name,account:i.account,permissions:i.permission.split(","),createTime:i.create_time})}),{total:n.response.total,list:o}}async function H3(e){return(await xt.post("/user/delete",{id:e.id})).data}function wF(e){return{type:"error",info:e}}function _F(e){return{type:"success",info:e}}class xF{constructor(t,n,r){no(this,"ws");no(this,"publishKey",1);no(this,"subscribeKey",2);no(this,"unSubscribeKey",3);no(this,"logging",!0);no(this,"onmessage");no(this,"onclose");this.onclose=r;try{this.ws=new WebSocket(t)}catch(o){this.onclose&&this.onclose(o);return}this.ws.onopen=n,this.ws.onmessage=o=>{this.logging&&this.logInfo("new message:"+JSON.stringify(o.data)),o.data!=="heartbeat"&&this.onmessage&&this.onmessage(o)},this.ws.onclose=o=>{this.onclose&&this.onclose(o)}}logInfo(t){console.log("[FireTower] INFO",t)}publish(t,n){var r;return t===""||n===""?wF("topic\u6216data\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A"):(this.logging&&this.logInfo('publish topic:"'+t+'", data:'+JSON.stringify(n)),(r=this.ws)==null||r.send(JSON.stringify({type:this.publishKey,topic:t,data:n})),_F("\u53D1\u9001\u6210\u529F"))}subscribe(t){var n;Array.isArray(t)||(t=[t]),this.logging&&this.logInfo('subscribe:"'+t.join(",")+'"'),(n=this.ws)==null||n.send(JSON.stringify({type:this.subscribeKey,topic:t.join(",")}))}unsubscribe(t){var n;Array.isArray(t)||(t=[t]),this.logging&&this.logInfo('unSubscribe:"'+t.join(",")+'"'),(n=this.ws)==null||n.send(JSON.stringify({type:this.unSubscribeKey,topic:t.join(",")}))}close(){var t;(t=this.ws)==null||t.close()}}function qd(e,t,n){try{const r=()=>{let o={}.VITE_API_V1_WS_URL;if(!o){let a="ws://";window.location.protocol==="https:"&&(a="wss://"),o=a+window.location.host+"/api/v1/connect"}o.indexOf("?")!==-1?o+="&user="+e.id+"&token="+n:o+="?user="+e.id+"&token="+n;const i=new xF(o,()=>{t.commit("setTower",i),console.log("firetower connected"),i.onmessage=a=>{let l=JSON.parse(a.data),s=l.data;l.topic&&(l=l.data,s=s.data),l.type==="publish"&&(l.subject.startsWith("/task/status")?t.commit("emitEventTask",{event:{status:s.status,taskId:s.task_id,tmpId:s.tmp_id,projectId:s.project_id}}):l.subject.startsWith("/workflow/status")?t.commit("emitEventWorkFlow",{event:{status:s.status,workFlowId:s.workflow_id}}):l.subject.startsWith("/workflow/task/status")?t.commit("emitEventWorkFlowTask",{event:{status:s.status,taskId:s.task_id,projectId:s.project_id,workFlowId:s.workflow_id}}):console.log("unknown event",a))}},()=>{setTimeout(()=>{t.getters.currentUser&&r()},1e3)})};r()}catch(r){console.error(r)}}function U3(e){return e===""?"EM":e.length>3?e.substring(e.length-2).toUpperCase():e.length<3?e.substring(0,1).toUpperCase():e.substring(1,3).toUpperCase()}function W3(e){const n=window.location.search.substring(1).split("&");for(let r=0;rn===t[r])}const Vf=new Error("Handled"),ia="access-token",kF={setApi(e,{apiv1:t}){e.apiv1=t},setQuasar(e,{$q:t}){e.$q=t},setTower(e,t){e.firetower=t},subscribedTopic(e,t){e.subscribedTopic=t},setNotificationSwitch(e,{status:t}){e.notificationSwitch=t},authed(e,{user:t,token:n}){e.user=t,e.token=n,e.logined=!0,Df.set(ia,n,{expires:7});const r=e.apiv1;r&&(r.defaults.headers.common[ia]=n)},unauthed(e){e.user=void 0,e.token=void 0,e.logined=!1,Df.remove(ia);const t=e.apiv1;t&&delete t.defaults.headers.common[ia]},userOrgs(e,t){if(t&&t.length>0){const n=localStorage.getItem("gc_choosed_org");let r=!1;t.forEach((o,i,a)=>{o.id===n&&(r=!0)}),r||localStorage.removeItem("gc_choosed_org")}e.userOrgs=t},error(e,{error:t}){if(t===Vf)return;e.currentError=t;const n=e.$q;if(n){let r=t.message;r||(r=t),n.notify({html:!0,message:r,color:"red",icon:"announcement",position:"top-right",classes:"first:tw-mt-14"})}else throw t},success(e,{message:t,type:n=""}){t&&e.$q&&e.$q.notify({html:!0,message:t,type:n||"info",position:"top-right",classes:"first:tw-mt-14"})},notifySuccess(e,{message:t,type:n=""}){!e.notificationSwitch||t&&e.$q&&e.$q.notify({html:!0,message:t,type:n||"info",position:"bottom-right"})},cleanError(e){e.currentError=void 0},setUsers(e,{list:t,total:n}){e.users=t,e.userTotal=n},setRecentLogCount(e,{records:t}){e.recentLogCountRecords=t},loadingLogs(e){e.loadingTaskLogs=!0},unloadingLogs(e){e.loadingTaskLogs=!1},setLogs(e,{logs:t,total:n}){e.taskLogs=t,e.taskLogsTotal=n},setWorkflows(e,{workflows:t,total:n}){e.workflows=t,e.workflowsTotal=n},loadingWorkflowEdges(e){e.loadingWorkflowEdges=!0},unloadingWorkflowEdges(e){e.loadingWorkflowEdges=!1},setWorkflowEdges(e,{edges:t,states:n,tasks:r}){e.workflowEdges=t,e.workflowTaskStates=n,e.workflowTasks=r},loadingWorkflowLogs(e){e.loadingWorkflowLogs=!0},unloadingWorkflowLogs(e){e.loadingWorkflowLogs=!1},setWorkflowLogs(e,{logs:t,total:n}){e.workflowLogs=t,e.workflowLogsTotal=n},setCurrentOrg(e,t){e.currentOrg=t},emitEventTask(e,{event:t}){e.eventTask=t},emitEventWorkFlow(e,{event:t}){e.eventWorkFlow=t},emitEventWorkFlowTask(e,{event:t}){e.eventWorkFlowTask=t}},CF={changeNotificationStatus({commit:e,state:t}){e("setNotificationSwitch",{status:!t.notificationSwitch}),localStorage.setItem("gc_notification_setting",JSON.stringify({status:t.notificationSwitch}))},async refreshUserOrgs({commit:e,state:t}){},async logout({commit:e,state:t}){e("unauthed"),this.getters.firetower&&this.getters.firetower.close()},switchOrg({commit:e},t){e("setCurrentOrg",t),us.push({name:"summary",params:{orgId:t}})},async checkLogin({dispatch:e,commit:t,state:n}){if(n.logined)return;const r=Df.get(ia);if(r===void 0){await e("logout");return}try{const o=this.getters.apiv1;o.defaults.headers.common[ia]=r;const i=await WF(o);t("authed",{user:i,token:r}),qd(i,this,r);const a=await rl();t("userOrgs",a)}catch(o){await e("logout"),t("error",{error:o})}},async login({commit:e},{username:t,password:n}){const r=this.getters.apiv1;try{const[o,i]=await HF(r,t,n);e("authed",{user:o,token:i}),qd(o,this,i);const a=await rl();e("userOrgs",a)}catch(o){e("error",{error:o})}},async loginWithOIDC({commit:e},{code:t,state:n}){const r=this.getters.apiv1;try{const[o,i]=await UF(r,t,n);e("authed",{user:o,token:i}),qd(o,this,i);const a=await rl();e("userOrgs",a)}catch(o){e("error",{error:o})}},async saveTask({commit:e},{task:t}){const n=this.getters.apiv1;try{const r=await KF(n,t);return r&&(t.isRunning=r.isRunning),e("Task/updateTask",{task:t}),e("success",{message:"\u66F4\u65B0\u6210\u529F"}),r}catch(r){e("error",{error:r})}},subscribeTopic({commit:e},t){try{const n=this.getters.subscribedTopic;if(n&&n.length>0){if(SF(n,t))return;this.getters.firetower.unsubscribe(n)}this.getters.firetower.subscribe(t),e("subscribedTopic",t)}catch{}},async saveWorkFlowTask({commit:e},{task:t}){const n=this.getters.apiv1;try{t.id!==""?await s3(n,t):await a3(n,t.projectId,t.name,t.command,t.remark,t.timeout),e("WorkFlowTask/updateTask",{task:t})}catch(r){e("error",{error:r})}},async deleteTask({commit:e},{projectId:t,taskId:n}){const r=this.getters.apiv1;try{await QF(r,t,n)}catch(o){e("error",{error:o})}},async deleteWorkFlowTask({commit:e},{projectId:t,taskId:n}){const r=this.getters.apiv1;try{await l3(r,t,n)}catch(o){e("error",{error:o})}},async recentLog({commit:e},t){const n=this.getters.apiv1;try{const r=await ZF(n,t);e("setRecentLogCount",{records:r})}catch(r){e("error",{error:r})}},async createOrg({commit:e},t){try{await gF(t);const n=await rl();e("userOrgs",n)}catch(n){e("error",{error:n})}},async updateOrg({commit:e},t){try{await pF(t);const n=await rl();e("userOrgs",n)}catch(n){e("error",{error:n})}},async createProject({dispatch:e,commit:t},{title:n,remark:r,orgId:o}){const i=this.getters.apiv1;try{await YF(i,n,r,o),await e("Project/fetchProjects",{orgId:o})}catch(a){t("error",{error:a})}},async updateProject({dispatch:e,commit:t},{projectId:n,title:r,remark:o,orgId:i}){const a=this.getters.apiv1;try{await XF(a,n,r,o),await e("Project/fetchProjects",{orgId:i})}catch(l){t("error",{error:l})}},async deleteProject({dispatch:e,commit:t},{projectId:n,orgId:r}){const o=this.getters.apiv1;try{await GF(o,n),await e("Project/fetchProjects",{orgId:r})}catch(i){t("error",{error:i})}},async fetchUsers({dispatch:e,commit:t},n){try{const r=await bF(n);t("setUsers",{list:r.list,total:r.total})}catch(r){t("error",{error:r})}},async createUser({dispatch:e,commit:t},n){try{await yF(n),await e("fetchUsers")}catch(r){t("error",{error:r})}},async fetchTaskLogs({commit:e},{projectId:t,taskId:n,page:r,pageSize:o}){e("loadingLogs");const i=this.getters.apiv1;try{const[a,l]=await JF(i,t,n,r,o);e("setLogs",{logs:a,total:l})}catch(a){e("error",{error:a})}e("unloadingLogs")},async fetchWorkflowEdges({commit:e},{workflowId:t}){e("loadingWorkflowEdges");const n=this.getters.apiv1;try{const[r,o,i]=await n3(n,t);e("setWorkflowEdges",{edges:r,states:o,tasks:i})}catch(r){e("error",{error:r})}e("unloadingWorkflowEdges")},async deleteWorkflow({commit:e},{workflowId:t}){const n=this.getters.apiv1;try{await o3(n,t)}catch(r){e("error",{error:r})}},async updateWorkflow({commit:e},{workflow:t}){const n=this.getters.apiv1;try{await t3(n,t)}catch(r){e("error",{error:r})}},async updateWorkFlowEdges({dispatch:e,commit:t},{workflowId:n,edges:r}){const o=this.getters.apiv1;try{await r3(o,n,r),await e("fetchWorkflowEdges",{workflowId:n})}catch(i){t("error",{error:i})}},async fetchWorkFlowLogs({commit:e},{workflowId:t,page:n,pageSize:r}){e("loadingWorkflowLogs");const o=this.getters.apiv1;try{const[i,a]=await i3(o,t,n,r);e("setWorkflowLogs",{logs:i,total:a})}catch(i){e("error",{error:i})}e("unloadingWorkflowLogs")}},TF={firetower(e){return e.firetower},subscribedTopic(e){return e.subscribedTopic},notificationSetting(e){return{status:e.notificationSwitch}},apiv1(e){const t=e.apiv1;if(t===void 0)throw new Error("Api V1 instance not found");return t},$q(e){const t=e.$q;if(t===void 0)throw new Error("Quasar api instance not found");return t},isAdmin(e){return e.user!==void 0&&e.user.permissions.includes("admin")},currentUser(e){if(e.user===void 0)throw new Error("User is not login");return e.user},currentOrg(e){return e.currentOrg||""}},EF={notificationSwitch:(()=>{const e=localStorage.getItem("gc_notification_setting");if(e)try{const t=JSON.parse(e);if(t.status!==void 0)return t.status}catch(t){console.error(t)}return!0})(),currentOrg:"",logined:!1,FireTower:void 0,subscribedTopic:[],workFlowTasks:[],loadingWorkFlowTasks:!1,fetchWorkFlowTasksCache:new Map,recentLogCountRecords:[],taskLogs:[],taskLogsTotal:0,loadingTaskLogs:!1,workflows:[],workflowsTotal:0,loadingWorkflows:!1,workflowEdges:[],workflowTaskStates:[],workflowTasks:[],loadingWorkflowEdges:!1,workflowLogs:[],workflowLogsTotal:0,loadingWorkflowLogs:!1},$F={state:()=>EF,actions:CF,mutations:kF,getters:TF};async function PF(e){return(await xt.get("/crontab/list",{params:{project_id:e}})).data.response.list.map(o=>({id:o.task_id,name:o.name,projectId:o.project_id,command:o.command,cronExpr:o.cron,remark:o.remark,timeout:o.timeout,createTime:o.create_time,status:o.status,isRunning:o.is_running,noseize:o.noseize,exclusion:o.exclusion,clientIp:o.client_ip,tmpId:o.tmp_id}))}async function qF(e){const r=(await xt.get("/temporary_task/list",{params:{project_id:e}})).data.response;return r?r.map(o=>({command:o.command,createTime:o.create_time,id:o.id,projectId:o.project_id,scheduleStatus:o.schedule_status,scheduleTime:o.schedule_time,taskId:o.task_id,userId:o.user_id,userName:o.user_name,tmpId:o.tmp_id,isRunning:o.is_running,host:o.host,timeout:o.timeout,remark:o.remark})):[]}async function K3(e){return(await xt.post("/crontab/kill",{project_id:e.projectId,task_id:e.taskId})).data}async function Q3(e){return(await xt.post("/temporary_task/delete",{id:e})).data}async function Z3(e){return(await xt.post("/temporary_task/create",{project_id:e.projectId,task_id:e.taskId,command:e.command,noseize:e.noseize,remark:e.remark,schedule_time:e.scheduleTime,timeout:e.timeout,host:e.host})).data.meta}const MF={async fetchTasks({commit:e,state:t},{projectId:n,cached:r=!1}){e("loadingTasks");try{if(!r||!t.tasks.has(n)){const o=await PF(n);e("setTasks",{tasks:o,projectId:n})}}catch(o){e("error",{error:o},{root:!0})}e("unloadingTasks")},async fetchTemporaryTasks({commit:e,state:t},{projectId:n,cached:r=!1}){e("loadingTemporaryTasks");try{if(!r||!t.temporaryTasks.has(n)){const o=await qF(n);e("setTemporaryTasks",{tasks:o,projectId:n})}}catch(o){e("error",{error:o},{root:!0})}e("unloadingTemporaryTasks")}},OF={loadingTasks(e){e.loadingTasks=!0},unloadingTasks(e){e.loadingTasks=!1},setTasks(e,{projectId:t,tasks:n}){e.tasks.set(t,n)},loadingTemporaryTasks(e){e.loadingTemporaryTasks=!0},unloadingTemporaryTasks(e){e.loadingTemporaryTasks=!1},setTemporaryTasks(e,{projectId:t,tasks:n}){e.temporaryTasks.set(t,n)},clearTasks(e,{projectId:t}){t!==void 0?e.tasks.delete(t):e.tasks.clear()},updateTemporaryTaskStatus(e,t){const n=e.temporaryTasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.tmpId===t.tmpId);r!==-1&&(n[r].scheduleStatus=t.finished?0:1,n[r].isRunning=t.isRunning?1:0)},updateTaskStatus(e,t){const n=e.tasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.id===t.taskId);r!==-1&&(n[r].isRunning=t.isRunning===!0?1:0)},updateTask(e,{task:t}){const n=e.tasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.id===t.id);r!==-1&&(n[r]=t)}},AF={namespaced:!0,state:()=>({tasks:new Map,loadingTasks:!1,temporaryTasks:new Map,loadingTemporaryTasks:!1}),actions:MF,mutations:OF},RF={async fetchWorkFlows({commit:e},{orgId:t,page:n,pageSize:r}){let o,i;try{e("loadingWorkflows"),[o,i]=await DN(t,n,r),e("appendWorkFlows",{workflows:o,total:i})}catch(a){console.error(a)}return e("unloadingWorkflows"),[o,i]},async fetchWorkFlow({commit:e},{id:t}){const n=await D_(t);e("updateWorkFlow",{workflow:n})},async deleteWorkFlow({commit:e},{id:t}){try{await VN(t),e("deleteWorkFlow",{id:t})}catch(n){e("error",{error:n},{root:!0})}}},IF={loadingWorkflows(e){e.loadingWorkflows=!0},unloadingWorkflows(e){e.loadingWorkflows=!1},updateWorkFlow(e,{workflow:t}){e.workflows.set(t.id,t)},appendWorkFlows(e,{workflows:t,total:n}){if(t)for(const r of t)e.workflows.set(r.id,r);e.totalCount=n},clearWorkFlows(e){e.workflows.clear(),e.totalCount=0},deleteWorkFlow(e,{id:t}){e.workflows.delete(t)}},LF={namespaced:!0,state:()=>({workflows:new Map,totalCount:0,loadingWorkflows:!1}),actions:RF,mutations:IF};async function BF(e){return(await xt.get("/project/workflow/task/list",{params:{project_id:e}})).data.response.map(o=>({id:o.task_id,name:o.task_name,projectId:o.project_id,workflowId:o.workflow_id,command:o.command,remark:o.remark,timeout:o.timeout,createTime:o.create_time,noseize:o.noseize}))}const NF={async fetchTasks({commit:e,state:t},{projectId:n,cached:r=!1}){e("loadingTasks");try{if(!r||!t.tasks.has(n)){const o=await BF(n);e("setTasks",{projectId:n,tasks:o})}}catch(o){e("error",{error:o},{root:!0})}e("unloadingTasks")}},FF={loadingTasks(e){e.loadingTasks=!0},unloadingTasks(e){e.loadingTasks=!1},setTasks(e,{projectId:t,tasks:n}){e.tasks.set(t,n)},clearTasks(e,{projectId:t}){t!==void 0?e.tasks.delete(t):e.tasks.clear()},updateTask(e,{task:t}){const n=e.tasks.get(t.projectId);if(n===void 0)return;const r=n.findIndex(o=>o.id===t.id);r!==-1&&(n[r]=t)}},zF={namespaced:!0,state:()=>({tasks:new Map,loadingTasks:!1}),actions:NF,mutations:FF},Jt=uF({modules:{Root:$F,WorkFlow:LF,Project:hF,Task:AF,WorkFlowTask:zF},devtools:!0,strict:!0,state:{}}),ex=Symbol("Vuex Store");function Y3(){return HN(ex)}function wy(e){return async t=>{var n,r,o;if(e==="crontab"){const i=Number(t.params.projectId),a=Jt.state.Task.tasks.get(i);if((!a||a.length===0)&&await Jt.dispatch("Task/fetchTasks",{projectId:i}),((n=Jt.state.Task.tasks.get(i))==null?void 0:n.find(s=>s.id===t.params.taskId))===void 0)return{name:"notfound"}}else if(e==="workflow"){const i=Number(t.params.projectId),a=Jt.state.WorkFlowTask.tasks.get(i);if((!a||a.length===0)&&await Jt.dispatch("WorkFlowTask/fetchTasks",{projectId:Number(t.params.projectId)}),((r=Jt.state.WorkFlowTask.tasks.get(i))==null?void 0:r.find(s=>s.id===t.params.taskId))===void 0)return{name:"notfound"}}else if(e==="temporary"){const i=Number(t.params.projectId),a=Jt.state.Task.temporaryTasks.get(i);if((!a||a.length===0)&&await Jt.dispatch("Task/fetchTemporaryTasks",{projectId:i}),((o=Jt.state.Task.temporaryTasks.get(i))==null?void 0:o.find(s=>s.id===Number(t.params.taskId)))===void 0)return{name:"notfound"}}}}const Md=e=>[{name:`${e}_task`,path:"task/:taskId",component:()=>Ht(()=>import("./TaskDetail.ce4b2fe5.js"),["assets/TaskDetail.ce4b2fe5.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/task.f3ffd066.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css","assets/log.a17ac264.js","assets/thumbStyle.856de4cb.js"]),props:t=>({id:t.params.taskId,projectId:Number(t.params.projectId),type:e}),beforeEnter:wy(e)},{name:`${e}_task_logs`,path:"task/:taskId/logs",component:()=>Ht(()=>import("./TaskDetail.ce4b2fe5.js"),["assets/TaskDetail.ce4b2fe5.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/task.f3ffd066.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css","assets/log.a17ac264.js","assets/thumbStyle.856de4cb.js"]),props:t=>({id:t.params.taskId,projectId:Number(t.params.projectId),type:e}),beforeEnter:wy(e)},{name:`create_${e}_task`,path:"task/create",component:()=>Ht(()=>import("./TaskDetail.ce4b2fe5.js"),["assets/TaskDetail.ce4b2fe5.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/task.f3ffd066.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css","assets/log.a17ac264.js","assets/thumbStyle.856de4cb.js"]),props:t=>({projectId:Number(t.params.projectId),type:e})}],jF=[{path:"/",redirect:{name:"summary",params:{orgId:"baseorg"}},component:()=>Ht(()=>import("./LandingLayout.0344366d.js"),[]),meta:{requiresAuth:!0},children:[{name:"summary",path:":orgId/summary",props:e=>({orgId:e.params.orgId}),component:()=>Ht(()=>import("./SummaryPage.08383290.js"),["assets/SummaryPage.08383290.js","assets/log.a17ac264.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css","assets/datetime.561112b0.js"])},{name:"projects",path:":orgId/project",props:e=>({orgId:e.params.orgId}),component:()=>Ht(()=>import("./ProjectList.81bcf7ef.js"),["assets/ProjectList.81bcf7ef.js","assets/Confirm.4116c3bd.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),children:[{name:"project",path:":projectId(\\d+)",component:()=>Ht(()=>import("./DummyContainer.2932fa1c.js"),[]),async beforeEnter(e){if(Jt.state.Project.projects.length===0&&await Jt.dispatch("Project/fetchProjects",{orgId:e.params.orgId}),Jt.state.Project.projects.find(n=>n.id===Number(e.params.projectId))===void 0)return{name:"notfound"}},redirect:e=>({name:"crontab_tasks",params:B({},e.params)}),children:[{name:"crontab_tasks",path:"crontab_tasks",component:()=>Ht(()=>import("./TaskList.51a57257.js"),["assets/TaskList.51a57257.js","assets/TaskList.19182fd1.css","assets/Confirm.4116c3bd.js","assets/task.f3ffd066.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),props:e=>({projectId:Number(e.params.projectId)}),children:Md("crontab")},{name:"temporary_tasks",path:"temporary_tasks",component:()=>Ht(()=>import("./TaskList.51a57257.js"),["assets/TaskList.51a57257.js","assets/TaskList.19182fd1.css","assets/Confirm.4116c3bd.js","assets/task.f3ffd066.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),props:e=>({projectId:Number(e.params.projectId)}),children:Md("temporary")},{name:"workflow_tasks",path:"workflow_tasks",component:()=>Ht(()=>import("./TaskList.51a57257.js"),["assets/TaskList.51a57257.js","assets/TaskList.19182fd1.css","assets/Confirm.4116c3bd.js","assets/task.f3ffd066.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),props:e=>({projectId:Number(e.params.projectId)}),children:Md("workflow")}]}]},{name:"workflows",path:":orgId/workflows",props:e=>({orgId:e.params.orgId}),component:()=>Ht(()=>import("./WorkflowList.56e40ec4.js"),["assets/WorkflowList.56e40ec4.js","assets/WorkflowList.65afaacb.css","assets/Confirm.4116c3bd.js","assets/datetime.561112b0.js","assets/thumbStyle.856de4cb.js"]),children:[{name:"workflow",path:":workflowId(\\d+)",component:()=>Ht(()=>import("./WorkflowTabs.9cd7e98f.js"),["assets/WorkflowTabs.9cd7e98f.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId}),async beforeEnter(e){try{await D_(Number(e.params.workflowId))}catch{return{name:"notfound"}}},redirect:e=>({name:"workflow_graph",params:B({},e.params)}),children:[{name:"workflow_graph",path:"graph",component:()=>Ht(()=>import("./WorkflowTabs.9cd7e98f.js"),["assets/WorkflowTabs.9cd7e98f.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId})},{name:"workflow_logs",path:"logs",component:()=>Ht(()=>import("./WorkflowTabs.9cd7e98f.js"),["assets/WorkflowTabs.9cd7e98f.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId})},{name:"workflow_detail",path:"detail",component:()=>Ht(()=>import("./WorkflowTabs.9cd7e98f.js"),["assets/WorkflowTabs.9cd7e98f.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({id:Number(e.params.workflowId),orgId:e.params.orgId})}]},{name:"create_workflow",path:"create",component:()=>Ht(()=>import("./WorkflowTabs.9cd7e98f.js"),["assets/WorkflowTabs.9cd7e98f.js","assets/index.c4564906.js","assets/datetime.561112b0.js","assets/Confirm.4116c3bd.js","assets/JSONViewer.177a839e.js","assets/JSONViewer.b63b1d91.css"]),props:e=>({orgId:e.params.orgId})}]},{name:"user-admin",path:":orgId/admin/user",component:()=>Ht(()=>import("./UserListAdmin.54159650.js"),["assets/UserListAdmin.54159650.js","assets/ModifyBox.25d0a805.js","assets/datetime.561112b0.js"]),props:e=>({orgId:e.params.orgId}),meta:{requiresAdmin:!0}},{name:"node-admin",path:":orgId/admin/node",component:()=>Ht(()=>import("./NodeListAdmin.4379dd19.js"),[]),props:e=>({orgId:e.params.orgId}),meta:{requiresAdmin:!0}},{name:"user-profile",path:"user/profile",component:()=>Ht(()=>import("./UserProfile.3ae9d6ce.js"),["assets/UserProfile.3ae9d6ce.js","assets/ModifyBox.25d0a805.js"])}]},{name:"login",path:"/login",component:()=>Ht(()=>import("./LoginPage.945f899b.js"),[])},{name:"logout",path:"/logout",redirect:{name:"login"}},{name:"forbidden",path:"/error/forbidden",component:()=>Ht(()=>import("./HTTPStatus.da72d188.js"),[]),props:{code:403}},{name:"notfound",path:"/error/notfound",component:()=>Ht(()=>import("./HTTPStatus.da72d188.js"),[]),props:{code:404}},{path:"/:pathMatch(.*)*",redirect:{name:"notfound"}}],us=zN({history:zB(),routes:jF});us.onError((e,t,n)=>{console.error("router error",e)});us.beforeEach(async(e,t)=>{if(await Jt.dispatch("checkLogin"),e.params.orgId!==t.params.orgId&&e.params.orgId&&Jt.commit("setCurrentOrg",e.params.orgId),e.meta.requiresAuth&&!Jt.state.Root.logined)return{name:"login",query:{redirect:e.fullPath}};if(e.meta.requiresAdmin&&!Jt.getters.isAdmin)return{name:"forbidden"}});const xt=fB.create({baseURL:"http://localhost:6306/api/v1"});console.log("http://localhost:6306/api/v1");const DF=Symbol("ApiV1 Axio Instance");function VF(e,{store:t}){e.provide(DF,xt),e.config.globalProperties.$apiv1=xt,xt.interceptors.response.use(function(n){const r=n.data;if(r.meta.code!==0){const o=new Error(r.meta.log||r.meta.msg);throw t.commit("error",{error:o}),Vf}return n},function(n){var o,i,a,l,s,c,u;let r=new Error(n.message);if(!n.response)r=new Error("\u7F51\u7EDC\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");else{switch(n.response.status){case 401:t.commit("unauthed"),us.push({name:"login"});break}try{let d=(i=(o=n.response)==null?void 0:o.data.meta)==null?void 0:i.msg;((l=(a=n.response)==null?void 0:a.data.meta)==null?void 0:l.log)&&((c=(s=n.response)==null?void 0:s.data.meta)==null?void 0:c.log)!==d&&(d+="
"+((u=n.response.data.meta)==null?void 0:u.log)),r=new Error(d||"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")}catch{r=new Error(n.message)}}throw t.commit("error",{error:r}),Vf})}async function X3(){return(await xt.get("/login_methods")).data.response}async function HF(e,t,n){const i=(await e.post("/user/login",{account:t,password:n})).data.response;return[{id:i.id,name:i.name,account:i.account,permissions:i.permission.split(","),createTime:i.create_time},i.token]}async function G3(){return(await xt.get("/oidc/auth_url")).data.response}async function UF(e,t,n){const i=(await e.post("/oidc/login",{code:t,state:n})).data.response;return[{id:i.id,name:i.name,account:i.account,permissions:i.permission.split(","),createTime:i.create_time},i.token]}async function WF(e){const r=(await e.get("/user/info")).data.response;return{id:r.id,name:r.name,account:r.account,permissions:r.permission.split(","),createTime:r.createTime}}async function KF(e,t){const n=JSON.stringify({project_id:t.projectId,task_id:t.id,name:t.name,command:t.command,cron:t.cronExpr,remark:t.remark,timeout:t.timeout,status:t.status,noseize:t.noseize,exclusion:t.exclusion}),i=(await e.post("/crontab/save",n,{headers:{"content-type":"application/json"}})).data.response;return{id:i.task_id,name:i.name,projectId:i.project_id,command:i.command,cronExpr:i.cron,remark:i.remark,timout:i.timout,createTime:i.create_time,status:i.status,isRunning:i.is_running,noseize:i.noseize,exclusion:i.exclusion,clientIp:i.client_ip,tmpId:i.tmp_id}}async function J3(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/crontab/execute",r,{headers:{"content-type":"application/json"}})}async function ez(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/crontab/flow_task/execute",r,{headers:{"content-type":"application/json"}})}async function QF(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/crontab/delete",r,{headers:{"content-type":"application/json"}})}async function ZF(e,t){return(await e.get("/log/recent",{params:{oid:t}})).data.response.map(i=>({success:i.success_count,error:i.error_count,date:i.date}))}async function YF(e,t,n,r){const o=JSON.stringify({oid:r,title:t,remark:n});return await e.post("/project/create",o,{headers:{"content-type":"application/json"}})}async function XF(e,t,n,r){const o=JSON.stringify({project_id:t,title:n,remark:r});return await e.post("/project/update",o,{headers:{"content-type":"application/json"}})}async function GF(e,t){const n=JSON.stringify({project_id:t});return await e.post("/project/delete",n,{headers:{"content-type":"application/json"}})}async function tz(e,t){return(await e.get("/project/users",{params:{project_id:t}})).data.response.list.map(r=>({id:r.id,name:r.name,account:r.account,permissions:r.permission.split(","),createTime:r.create_time}))}async function nz(e,t,n){const r=JSON.stringify({project_id:t,user_id:n});return await e.post("/project/remove_user",r,{headers:{"content-type":"application/json"}})}async function rz(e,t,n,r){const o=JSON.stringify({project_id:t,user_account:n,user_role:r});return await e.post("/project/add_user",o,{headers:{"content-type":"application/json"}})}async function JF(e,t,n,r,o){const l=(await e.get("/log/list",{params:{project_id:t,task_id:n,page:r,pagesize:o}})).data.response;return[l.list.map(s=>({id:s.id,taskId:s.task_id,projectId:s.project_id,project:s.project,name:s.name,result:s.result,startTime:s.start_time,endTime:s.end_time,command:s.command,withError:s.with_error,clientIp:s.client_ip,tmpId:s.tmp_id})),l.total]}const e3=2;async function oz(e,t,n,r,o,i=e3){const a=JSON.stringify({oid:t,title:n,remark:r,cron:o,status:i});return await e.post("/workflow/create",a,{headers:{"content-type":"application/json"}})}async function t3(e,t){const n=JSON.stringify({id:t.id,title:t.title,remark:t.remark,cron:t.cronExpr,status:t.status});return await e.post("/workflow/update",n,{headers:{"content-type":"application/json"}})}async function n3(e,t){const r=(await e.get("/workflow/task/list",{params:{workflow_id:t}})).data;if(!r.response)return[[],[],[]];const o=[],i=new Map,a=new Map;for(const{task:l,state:s,task_detail:c}of r.response){o.push({id:l.id,projectId:l.project_id,taskId:l.task_id,workflowId:l.workflowId,createTime:l.create_time,dependencyProjectId:l.dependency_project_id,dependencyTaskId:l.dependency_task_id});{const d=`${c.project_id}_${c.task_id}`;if(a.has(d))continue;a.set(d,{id:c.task_id,name:c.task_name,projectId:c.project_id,workflowId:c.workflow_id,command:c.command,remark:c.remark,timeout:c.timeout,createTime:c.create_time,noseize:c.noseize})}if(!s)continue;const u=`${s.project_id}_${s.task_id}`;i.has(u)||i.set(u,{workflowId:s.workflow_id,projectId:s.project_id,taskId:s.task_id,currentStatus:s.current_status,scheduleCount:s.schedule_count,scheduleRecords:s.schedule_records.map(d=>({tmpId:d.tmp_id,status:d.status,result:d.result,eventTime:d.event_time})),startTime:s.start_time})}return[o,Array.from(i.values()),Array.from(a.values())]}async function r3(e,t,n){const r=new Map,o=new Map;for(const a of n){const l=`${a.projectId}_${a.taskId}`;if(r.has(l)||r.set(l,{task_id:a.taskId,project_id:a.projectId}),a.dependencyProjectId===0||a.dependencyTaskId==="")continue;const s=o.get(l),c={task_id:a.dependencyTaskId,project_id:a.dependencyProjectId};s===void 0?o.set(l,[c]):o.set(l,[...s,c])}const i=JSON.stringify({workflow_id:t,tasks:Array.from(r.keys()).map(a=>({task:r.get(a),dependencies:o.get(a)||[]}))});return await e.post("/workflow/task/schedule/create",i,{headers:{"content-type":"application/json"}})}async function iz(e,t){const n=JSON.stringify({workflow_id:t});return await e.post("/workflow/start",n,{headers:{"content-type":"application/json"}})}async function o3(e,t){const n=JSON.stringify({id:t});return await e.post("/workflow/delete",n,{headers:{"content-type":"application/json"}})}async function i3(e,t,n,r){const a=(await e.get("/workflow/log/list",{params:{workflow_id:t,page:n,pagesize:r}})).data.response;return[a.list.map(l=>({id:l.id,workflowId:l.workflow_id,createTime:l.create_time,startTime:l.start_time,endTime:l.end_time,result:l.result})),a.total]}async function a3(e,t,n,r,o,i){const a=JSON.stringify({project_id:t,task_name:n,command:r,remark:o,timeout:i});return await e.post("/project/workflow/task/create",a,{headers:{"content-type":"application/json"}})}async function l3(e,t,n){const r=JSON.stringify({project_id:t,task_id:n});return await e.post("/project/workflow/task/delete",r,{headers:{"content-type":"application/json"}})}async function s3(e,t){const n=JSON.stringify({project_id:t.projectId,task_id:t.id,task_name:t.name,command:t.command,remark:t.remark,timeout:t.timeout});return await e.post("/project/workflow/task/update",n,{headers:{"content-type":"application/json"}})}const Ni=wv(bI);Ni.use(kq,{plugins:{Notify:pq,Dialog:cq},config:{dark:!0,notify:{}},lang:Cq});Ni.use(mI);Ni.use(VF,{store:Jt});Ni.use(Jt,ex);Jt.commit("setQuasar",{$q:Ni.config.globalProperties.$q});Jt.commit("setApi",{apiv1:xt});Ni.use(us);Ni.mount("#app");export{xT as $,be as A,p$ as B,M3 as C,JT as D,Qt as E,mc as F,Z3 as G,I3 as H,de as I,R3 as J,ze as K,BE as L,m3 as M,J3 as N,K3 as O,Ge as P,ii as Q,y3 as R,gc as S,$o as T,gf as U,E3 as V,ac as W,k3 as X,Xe as Y,Q3 as Z,gI as _,mt as a,ez as a0,$r as a1,bn as a2,Vm as a3,S3 as a4,$3 as a5,gE as a6,td as a7,Lt as a8,c3 as a9,B3 as aA,F3 as aB,N3 as aC,Kt as aD,So as aE,ot as aF,hc as aG,iz as aH,L3 as aI,D_ as aJ,e3 as aK,oz as aL,t3 as aM,H3 as aN,_3 as aO,Jt as aP,V3 as aQ,yF as aR,W3 as aS,Zl as aT,X3 as aU,G3 as aV,xt as aa,T3 as ab,Xl as ac,Sr as ad,U3 as ae,O3 as af,rr as ag,b3 as ah,q3 as ai,C3 as aj,g3 as ak,c$ as al,h3 as am,v3 as an,w3 as ao,We as ap,p3 as aq,tz as ar,rz as as,nz as at,GT as au,j3 as av,A3 as aw,z3 as ax,d3 as ay,Hb as az,wa as b,Ut as c,ec as d,xi as e,Ow as f,LC as g,vt as h,Nb as i,D3 as j,$t as k,g as l,_t as m,Zn as n,qe as o,Un as p,st as q,U as r,x3 as s,Od as t,Y3 as u,f3 as v,_r as w,Yn as x,P3 as y,T$ as z}; diff --git a/dist/assets/log.a88c5349.js b/dist/assets/log.a17ac264.js similarity index 92% rename from dist/assets/log.a88c5349.js rename to dist/assets/log.a17ac264.js index 00afd1b..8b89b93 100644 --- a/dist/assets/log.a88c5349.js +++ b/dist/assets/log.a17ac264.js @@ -1 +1 @@ -import{aa as s}from"./index.d76e71bf.js";async function d(a){const t=(await s.get("/log/detail",{params:{project_id:a.projectId,task_id:a.taskId,tmp_id:a.tmpId}})).data.response;return t?{id:t.id,taskId:t.task_id,projectId:t.project_id,projectName:t.project,taskName:t.name,result:t.result,startTime:t.start_time,endTime:t.end_time,command:t.command,clientIp:t.client_ip,tmpId:t.tmp_id}:null}async function p(a){const i=await s.get("/log/errors",{params:{oid:a.oid,page:a.page,pagesize:a.pagesize}}),t=[];return i.data.meta.code===0&&i.data.response.list&&i.data.response.list.forEach((e,r)=>{t.push({id:e.id,clientIp:e.client_ip,command:e.command,endTime:e.end_time,taskName:e.name,projectName:e.project,projectId:e.project_id,result:e.result,startTime:e.start_time,taskId:e.task_id,tmpId:e.tmp_id})}),{list:t,total:i.data.response.total}}export{d as G,p as g}; +import{aa as s}from"./index.f89dd3dd.js";async function d(a){const t=(await s.get("/log/detail",{params:{project_id:a.projectId,task_id:a.taskId,tmp_id:a.tmpId}})).data.response;return t?{id:t.id,taskId:t.task_id,projectId:t.project_id,projectName:t.project,taskName:t.name,result:t.result,startTime:t.start_time,endTime:t.end_time,command:t.command,clientIp:t.client_ip,tmpId:t.tmp_id}:null}async function p(a){const i=await s.get("/log/errors",{params:{oid:a.oid,page:a.page,pagesize:a.pagesize}}),t=[];return i.data.meta.code===0&&i.data.response.list&&i.data.response.list.forEach((e,r)=>{t.push({id:e.id,clientIp:e.client_ip,command:e.command,endTime:e.end_time,taskName:e.name,projectName:e.project,projectId:e.project_id,result:e.result,startTime:e.start_time,taskId:e.task_id,tmpId:e.tmp_id})}),{list:t,total:i.data.response.total}}export{d as G,p as g}; diff --git a/dist/index.html b/dist/index.html index ce80871..0bf121a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -26,7 +26,7 @@ }, false); } - + diff --git a/pkg/infra/register/registerv2.go b/pkg/infra/register/registerv2.go index be9bb61..66cdb8b 100644 --- a/pkg/infra/register/registerv2.go +++ b/pkg/infra/register/registerv2.go @@ -33,11 +33,43 @@ type remoteRegistryV2 struct { locker *sync.Mutex receivingLocker *sync.Mutex - eventHandler func(context.Context, *cronpb.ServiceEvent) (*cronpb.ClientEvent, error) + eventHandler func(context.Context, *cronpb.ServiceEvent) (*cronpb.ClientEvent, error) + registerNotify *registerNotify str string } +type registerNotify struct { + locker *sync.Mutex + registeredNotify map[string]chan struct{} +} + +func (s *registerNotify) notify(reqID string) { + s.locker.Lock() + if c, exist := s.registeredNotify[reqID]; exist { + close(c) + delete(s.registeredNotify, reqID) + } else { + // 兼容旧版本 + for key, v := range s.registeredNotify { + close(v) + delete(s.registeredNotify, key) + } + } + s.locker.Unlock() +} + +func (s *registerNotify) registerNotify(reqID string) func() { + s.locker.Lock() + c := make(chan struct{}) + s.registeredNotify[reqID] = c + s.locker.Unlock() + + return func() { + <-c + } +} + func NewRemoteRegisterV2(localIP string, connect func() (*CenterClient, error), eventHandler func(context.Context, *cronpb.ServiceEvent) (*cronpb.ClientEvent, error)) (register.ServiceRegister[infra.NodeMetaRemote], error) { ctx, cancel := context.WithCancel(context.Background()) @@ -50,6 +82,10 @@ func NewRemoteRegisterV2(localIP string, connect func() (*CenterClient, error), str: u.RandomStr(32), locker: &sync.Mutex{}, receivingLocker: &sync.Mutex{}, + registerNotify: ®isterNotify{ + locker: &sync.Mutex{}, + registeredNotify: make(map[string]chan struct{}), + }, } rr.reConnect = func() (err error) { @@ -129,6 +165,13 @@ func (s *remoteRegistryV2) getConnect(ctx context.Context) (cronpb.Center_Regist return s.currentStream, err } +type RegisterType int + +const ( + FirstRegister RegisterType = iota + SecondRegister +) + func (s *remoteRegistryV2) register() error { var ( receive func() (*cronpb.ServiceEvent, error) @@ -139,104 +182,124 @@ func (s *remoteRegistryV2) register() error { if len(services) == 0 { return errors.New("empty service") - } else { - stream, err := s.getConnect(s.ctx) - if err != nil { - return err - } + } + + stream, err := s.getConnect(s.ctx) + if err != nil { + return err + } - if err = stream.Send(&cronpb.ClientEvent{ - Id: u.GetStrID(), - Type: cronpb.EventType_EVENT_REGISTER_REQUEST, - EventTime: time.Now().Unix(), - Event: &cronpb.ClientEvent_RegisterInfo{ - RegisterInfo: &cronpb.RegisterInfo{ - Agents: services, - }, + // 加入 hang 实现“同步模式”的重新注册 + hang := make(chan struct{}, 1) + reqID := u.GetStrID() + go safe.Run(func() { + defer close(hang) + wait := s.registerNotify.registerNotify(reqID) + hang <- struct{}{} + wait() + }) + + <-hang + + // 无论是第几次注册,都需要发送注册信息 + if err = stream.Send(&cronpb.ClientEvent{ + Id: reqID, + Type: cronpb.EventType_EVENT_REGISTER_REQUEST, + EventTime: time.Now().Unix(), + Event: &cronpb.ClientEvent_RegisterInfo{ + RegisterInfo: &cronpb.RegisterInfo{ + Agents: services, }, - }); err != nil { - return err - } + }, + }); err != nil { + return err + } + if s.receivingLocker.TryLock() { + // 首次注册需要开启事件监听 receive = stream.Recv send = stream.Send closeStream = stream.CloseSend - } + kill := make(chan struct{}) - errHandler := func(err error) { - if closeStream != nil { - closeStream() - s.currentStream = nil - } - s.log.Error("agent handle event with error", zap.Error(err)) - time.Sleep(time.Second) - if gerr, ok := status.FromError(err); ok && gerr.Code() == codes.Canceled { - s.log.Warn("retry to reconnect", zap.String("status", gerr.Code().String())) - if err = s.reConnect(); err != nil { - s.log.Error("failed to reconnect registry", zap.Error(err)) + errHandler := func(err error) { + if err == nil { + return + } + close(kill) + + if closeStream != nil { + closeStream() + s.currentStream = nil + } + s.log.Error("agent handle event with error", zap.Error(err)) + time.Sleep(time.Second) + if gerr, ok := status.FromError(err); ok && gerr.Code() == codes.Canceled { + s.log.Warn("retry to reconnect", zap.String("status", gerr.Code().String())) + if err = s.reConnect(); err != nil { + s.log.Error("failed to reconnect registry", zap.Error(err)) + } } + + s.reRegister() } - s.reRegister() - } - if s.receivingLocker.TryLock() { - waitingFirstReceive := make(chan struct{}) go safe.Run(func() { var ( - err error - resp *cronpb.ServiceEvent - reply *cronpb.ClientEvent - once = &sync.Once{} + err error + resp *cronpb.ServiceEvent + reply *cronpb.ClientEvent + eventHandleLocker = &sync.Mutex{} ) defer func() { - close(waitingFirstReceive) s.receivingLocker.Unlock() - if err != nil { - errHandler(err) - } }() for { select { + case <-kill: + s.log.Warn("register killed by self") + return case <-s.ctx.Done(): s.log.Warn("register receiver is down, context done") return default: resp, err = receive() if err != nil { + errHandler(err) return } - if resp.Type == cronpb.EventType_EVENT_REGISTER_REPLY { - once.Do(func() { - waitingFirstReceive <- struct{}{} - }) + // 重新注册的过程中修改任务信息,同样会下发 EventType_EVENT_REGISTER_REPLY 事件,可能导致 notify 不准确 + s.registerNotify.notify(resp.Id) } s.log.Debug("receive event", zap.String("event", resp.Type.String()), zap.Any("value", resp.GetEvent())) - func() { + go safe.Run(func() { + eventHandleLocker.Lock() + defer eventHandleLocker.Unlock() ctx, cancel := context.WithTimeout(s.ctx, time.Minute) defer cancel() reply, err = s.eventHandler(ctx, resp) - }() - if err != nil { - return - } - - if reply != nil { - if err = send(reply); err != nil { - s.log.Error("failed reply center request", zap.Error(err), zap.String("event", resp.Type.String()), - zap.String("value", resp.String())) + if err != nil { + errHandler(err) return } - } + if reply != nil { + if err = send(reply); err != nil { + s.log.Error("failed reply center request", zap.Error(err), zap.String("event", resp.Type.String()), + zap.String("value", resp.String())) + errHandler(err) + return + } + } + }) } } }) - - <-waitingFirstReceive } + <-hang return nil } diff --git a/pkg/infra/register/registerv2_test.go b/pkg/infra/register/registerv2_test.go new file mode 100644 index 0000000..41cecfd --- /dev/null +++ b/pkg/infra/register/registerv2_test.go @@ -0,0 +1,18 @@ +package register + +import "testing" + +func TestMapRangeAndDelete(t *testing.T) { + a := make(map[string]string) + a["a"] = "a" + a["b"] = "b" + a["c"] = "c" + a["d"] = "d" + a["e"] = "e" + for k, v := range a { + t.Log(k, v) + delete(a, k) + } + + t.Log(a) +} diff --git a/protocol/interface.go b/protocol/interface.go index 83f889f..b6055a1 100644 --- a/protocol/interface.go +++ b/protocol/interface.go @@ -75,7 +75,7 @@ func (a *comm) GetTask(projectID int64, taskID string) (*common.TaskInfo, error) } const ( - version = "v2.4.7" + version = "v2.4.7-1" GrpcBufferSize = 1024 * 4 )