diff --git a/README.md b/README.md index d8d0f5e..d4a5670 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ K8s defaults are separate from VM defaults. An empty image ID (`""`) for Azure, | K8s Spec | `alibaba+ap-northeast-2+ecs.c9i.xlarge` / `ecs.c9i.xlarge` | `aws+ap-northeast-2+c8i.xlarge` / `c8i.xlarge` | `azure+koreacentral+Standard_D4ls_v6` / `Standard_D4ls_v6` | `gcp+asia-northeast3+c3-highcpu-4` / `c3-highcpu-4` | `ibm+jp-tok+cx2-4x8` / `cx2-4x8` | Not yet | `ncp+kr+c4-g3` / `c4-g3` | `nhn+kr1+m2.c4m8` / `m2.c4m8` | Not Support | `tencent+ap-seoul+S5.LARGE8` / `S5.LARGE8` | | K8s Image | `Ubuntu` | `AL2023_x86_64_STANDARD` | `""` (provider-managed) | `UBUNTU_CONTAINERD` | `""` (provider-managed) | Not yet | `""` (provider-managed) | `107cc02d-02d8-44fd-84d6-6c316045b817` | Not Support | `ubuntu22.04x86_64` | | K8s Zone | `ap-northeast-2a` | `ap-northeast-2a` | `1` | `asia-northeast3-a` | `jp-tok-1` | Not yet | `KR-1` | `kr-pub-a` | Not Support | `ap-seoul-1` | -| K8s Version | `1.35.7-aliyun.1` | `1.35` | `1.35.7` | `1.35.6-gke.1250000` | `1.35.7` | Not yet | `1.35.3-nks.2` | `v1.35.5` | Not Support | `1.34.1` | +| K8s Version | `1.35.7-aliyun.1` | `1.35` | `1.35.8` | `1.35.6-gke.1250001` | `1.35.9` | Not yet | `1.35.3-nks.2` | `v1.35.5` | Not Support | `1.34.1` | ## Requirements diff --git a/src/main/java/kr/co/mcmp/workflowStage/dto/WorkflowStageDto.java b/src/main/java/kr/co/mcmp/workflowStage/dto/WorkflowStageDto.java index 8244c04..be6da1a 100644 --- a/src/main/java/kr/co/mcmp/workflowStage/dto/WorkflowStageDto.java +++ b/src/main/java/kr/co/mcmp/workflowStage/dto/WorkflowStageDto.java @@ -439,11 +439,11 @@ private static List multiCspK8sParams() { addCspK8sParams(result, "AWS", "ap-northeast-2", "aws-ap-northeast-2", "ap-northeast-2a", "aws+ap-northeast-2+c8i.xlarge", "AL2023_x86_64_STANDARD", "1.35"); addCspK8sParams(result, "AZURE", "koreacentral", "azure-koreacentral", "1", - "azure+koreacentral+Standard_D4ls_v6", "", "1.35.7"); + "azure+koreacentral+Standard_D4ls_v6", "", "1.35.8"); addCspK8sParams(result, "GCP", "asia-northeast3", "gcp-asia-northeast3", "asia-northeast3-a", - "gcp+asia-northeast3+c3-highcpu-4", "UBUNTU_CONTAINERD", "1.35.6-gke.1250000"); + "gcp+asia-northeast3+c3-highcpu-4", "UBUNTU_CONTAINERD", "1.35.6-gke.1250001"); addCspK8sParams(result, "IBM", "jp-tok", "ibm-jp-tok", "jp-tok-1", - "ibm+jp-tok+cx2-4x8", "", "1.35.7"); + "ibm+jp-tok+cx2-4x8", "", "1.35.9"); addCspK8sParams(result, "NCP", "kr", "ncp-kr", "KR-1", "ncp+kr+c4-g3", "", "1.35.3-nks.2"); addCspK8sParams(result, "NHN", "kr1", "nhn-kr1", "kr-pub-a", diff --git a/src/main/resources/import.sql b/src/main/resources/import.sql index 9bc0494..ad3d199 100644 --- a/src/main/resources/import.sql +++ b/src/main/resources/import.sql @@ -279,7 +279,7 @@ INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflo "connectionName": "gcp-asia-northeast3", \ "name": "${CLUSTER}", \ "nodeGroupName": "k8sng03", \ - "version": "1.35.6-gke.1250000" \ + "version": "1.35.6-gke.1250001" \ }""" } else if (CPS == "aws") { call_tumblebug_create_cluster_payload = """{ \ @@ -5097,19 +5097,19 @@ INSERT INTO workflow_param (workflow_idx, param_key, param_value, event_listener (104, 'AZURE_ZONE', '1', 'N'), (104, 'AZURE_SPEC_ID', 'azure+koreacentral+Standard_D4ls_v6', 'N'), (104, 'AZURE_IMAGE_ID', '', 'N'), -(104, 'AZURE_K8S_VERSION', '1.35.7', 'N'), +(104, 'AZURE_K8S_VERSION', '1.35.8', 'N'), (104, 'GCP_REGION', 'asia-northeast3', 'N'), (104, 'GCP_CONNECTION_NAME', 'gcp-asia-northeast3', 'N'), (104, 'GCP_ZONE', 'asia-northeast3-a', 'N'), (104, 'GCP_SPEC_ID', 'gcp+asia-northeast3+c3-highcpu-4', 'N'), (104, 'GCP_IMAGE_ID', 'UBUNTU_CONTAINERD', 'N'), -(104, 'GCP_K8S_VERSION', '1.35.6-gke.1250000', 'N'), +(104, 'GCP_K8S_VERSION', '1.35.6-gke.1250001', 'N'), (104, 'IBM_REGION', 'jp-tok', 'N'), (104, 'IBM_CONNECTION_NAME', 'ibm-jp-tok', 'N'), (104, 'IBM_ZONE', 'jp-tok-1', 'N'), (104, 'IBM_SPEC_ID', 'ibm+jp-tok+cx2-4x8', 'N'), (104, 'IBM_IMAGE_ID', '', 'N'), -(104, 'IBM_K8S_VERSION', '1.35.7', 'N'), +(104, 'IBM_K8S_VERSION', '1.35.9', 'N'), (104, 'NCP_REGION', 'kr', 'N'), (104, 'NCP_CONNECTION_NAME', 'ncp-kr', 'N'), (104, 'NCP_ZONE', 'KR-1', 'N'), diff --git a/src/main/resources/static/assets/EventListenerList-CoL40D58.js b/src/main/resources/static/assets/EventListenerList-CuKG9W52.js similarity index 97% rename from src/main/resources/static/assets/EventListenerList-CoL40D58.js rename to src/main/resources/static/assets/EventListenerList-CuKG9W52.js index 2e0bda0..90fa340 100644 --- a/src/main/resources/static/assets/EventListenerList-CoL40D58.js +++ b/src/main/resources/static/assets/EventListenerList-CuKG9W52.js @@ -1,4 +1,4 @@ -import{_ as Z}from"./TableHeader.vue_vue_type_script_setup_true_lang-l3eqvMpD.js";import{s as N,_ as ee}from"./request-1ziJwdRS.js";import{d as M,u as B,l as te,r as d,c as W,w as ne,o as T,M as Y,m as ae,a as y,b as n,t as $,p as A,j as G,e as S,g as O,v as se,F as le,f as oe,h as w,s as re,i as D}from"./index-DhGk3pPk.js";import{f as ie,P as de}from"./SearchableSelect-uzEoHd_d.js";import{T as ue}from"./TumblebugParamSelector-CLgObYff.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const ce=()=>N.get("/eventlistener/list");function ve(r){return N.get("/eventlistener/"+r)}function me(r){return N.get(`/eventlistener/duplicate?eventlistenerName=${encodeURIComponent(r)}`)}function we(r){return N.post("/eventlistener",r)}function fe(r){return N.patch(`/eventlistener/${r.eventListenerIdx}`,r)}function pe(r){return N.delete(`/eventlistener/${r}`)}const be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document",style:{"max-width":"900px"}},Le={class:"modal-content"},ke={class:"modal-header"},ge={class:"modal-title"},ye={class:"modal-body py-4"},Ee={class:"row mb-3"},he={class:"grid gap-0 column-gap-3"},xe={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},Ne={class:"mb-3"},_e={class:"mb-3"},Ie=["value"],Ce={class:"modal-footer"},De=M({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(r,{emit:_}){const s=B(),f=te(),v=d(),k=d(),i=r,c=_,C=W(()=>i.eventListenerIdx);ne(C,async()=>{await l(),await P()}),T(async()=>{v.value&&(k.value=new Y(v.value),v.value.addEventListener("show.bs.modal",E)),await l(),await P()}),ae(()=>{var e;(e=v.value)==null||e.removeEventListener("show.bs.modal",E)});const E=async()=>{await l(),await P()},a=d({}),p=d(!1),g=d(!1),u=d(0),l=async()=>{if(g.value=!1,i.mode==="new")a.value={eventListenerIdx:0,eventListenerName:"",eventListenerDesc:"",eventListenerUrl:"",eventListenerCallUrl:"",workflowIdx:0,workflowParams:[]},L.value=!1,x.value="",F.value="",p.value=!0;else{const{data:e}=await ve(i.eventListenerIdx);a.value=e,L.value=!0,x.value=I(e.eventListenerName),F.value=I(e.eventListenerName),p.value=!0,g.value=!!a.value.workflowIdx}u.value+=1},b=d([]),h=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],R=new Map(h.map((e,t)=>[e,t])),P=async()=>{const{data:e}=await ie("N");b.value=[...e].sort((t,m)=>{const o=R.get(t.workflowInfo.workflowName)??h.length,U=R.get(m.workflowInfo.workflowName)??h.length;return o-U})},V=W(()=>b.value.find(e=>Number(e.workflowInfo.workflowIdx)===Number(a.value.workflowIdx))),j=W(()=>{var e;return((e=V.value)==null?void 0:e.workflowInfo.workflowName)||a.value.workflowName||""}),L=d(!1),x=d(""),F=d(""),I=e=>(e||"").trim(),H=()=>{const e=I(a.value.eventListenerName);L.value=!!(e&&e===x.value)},q=async()=>{const e=I(a.value.eventListenerName);if(!e){s.error("Please enter Event Listener name.");return}if(i.mode!=="new"&&e===F.value){s.success("Name is available."),L.value=!0,x.value=e;return}const{data:t}=await me(e);t?(s.error("Name is already in use."),L.value=!1):(s.success("Name is available."),L.value=!0,x.value=e)},K=async()=>{if(!a.value.eventListenerName){s.error("Please enter Event Listener name.");return}if(!L.value||x.value!==I(a.value.eventListenerName)){s.error("Please perform duplicate check for the name.");return}if(!a.value.eventListenerDesc){s.error("Please enter Event Listener description.");return}if(!a.value.workflowIdx||a.value.workflowIdx===0){s.error("Please select a Workflow.");return}let e=!1;i.mode==="new"?(a.value.workflowParams.forEach(t=>{t.paramIdx=0,t.eventListenerYn="Y"}),e=await z()):e=await J(),e&&(c("get-event-listener-list"),l(),k.value&&(k.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const t=document.querySelector(".modal-backdrop");t==null||t.remove()},150)))},z=async()=>{try{const{data:e}=await we(a.value);return e?(s.success("Registered successfully."),!0):(s.error("Failed to register."),!1)}catch{return s.error("Failed to register."),!1}},J=async()=>{try{const{data:e}=await fe(a.value);return e?(s.success("Updated successfully."),!0):(s.error("Failed to update."),!1)}catch{return s.error("Failed to update."),!1}},Q=e=>{g.value=!1;const t=b.value.find(m=>Number(m.workflowInfo.workflowIdx)===Number(e));if(!t){a.value.workflowParams=[];return}a.value.workflowParams=X(t.workflowParams),u.value+=1,g.value=!0},X=(e=[])=>{const t=(f.projectInfo.ns_id||f.projectInfo.name||"").trim();return e.map(m=>{var o;return{...m,paramIdx:0,paramValue:t&&((o=m.paramKey)==null?void 0:o.trim().toUpperCase())==="NAMESPACE"?t:m.paramValue,eventListenerYn:"Y"}})};return(e,t)=>{var m;return w(),y("div",{class:"modal modal-blur fade",id:"eventListenerForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:v},[n("div",be,[n("div",Le,[n("div",ke,[n("h3",ge,"Event Listener "+$(i.mode==="new"?"New":"Edit"),1),t[6]||(t[6]=n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),n("div",ye,[n("div",null,[n("div",Ee,[t[7]||(t[7]=n("label",{class:"form-label required"},"Event Listener Name",-1)),n("div",he,[S(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Name","onUpdate:modelValue":t[0]||(t[0]=o=>a.value.eventListenerName=o),onInput:H},null,544),[[O,a.value.eventListenerName]]),L.value?(w(),y("button",xe,"Duplicate Check")):(w(),y("button",{key:0,class:"btn btn-primary chk",onClick:q,style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),n("div",Ne,[t[8]||(t[8]=n("label",{class:"form-label required"},"Event Listener Description",-1)),S(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Description","onUpdate:modelValue":t[1]||(t[1]=o=>a.value.eventListenerDesc=o)},null,512),[[O,a.value.eventListenerDesc]])]),n("div",_e,[t[10]||(t[10]=n("label",{class:"form-label required"},"Workflow",-1)),S(n("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":t[2]||(t[2]=o=>a.value.workflowIdx=o),onChange:t[3]||(t[3]=o=>Q(a.value.workflowIdx))},[t[9]||(t[9]=n("option",{value:0},"Select Workflow",-1)),(w(!0),y(le,null,oe(b.value,(o,U)=>(w(),y("option",{value:o.workflowInfo.workflowIdx,key:U},$(o.workflowInfo.workflowName),9,Ie))),128))],544),[[se,a.value.workflowIdx]])]),p.value&&g.value&&a.value.workflowIdx&&a.value.workflowParams?(w(),A(ue,{key:`${a.value.workflowIdx}-${u.value}`,"workflow-name":j.value,"workflow-param-data":a.value.workflowParams,"workflow-stage-mappings":((m=V.value)==null?void 0:m.workflowStageMappings)||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):G("",!0),p.value?(w(),A(de,{key:1,popup:!1,"workflow-param-data":a.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):G("",!0)])]),n("div",Ce,[n("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:t[4]||(t[4]=o=>l())}," Cancel "),n("button",{type:"button",class:"btn btn-primary ms-auto",onClick:t[5]||(t[5]=o=>K())},$(i.mode==="new"?"Create":"Edit"),1)])])])],512)}}}),$e={class:"modal modal-blur fade",id:"deleteEventListener",tabindex:"-1","aria-hidden":"true"},Pe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Fe={class:"modal-content"},Ue={class:"modal-body py-4"},We={class:"modal-footer"},Se=M({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(r,{emit:_}){const s=B(),f=r,v=_,k=async()=>{const{data:i}=await pe(f.eventListenerIdx);i?s.success("Deleted successfully."):s.error("Failed to delete."),v("get-event-listener-list")};return(i,c)=>(w(),y("div",$e,[n("div",Pe,[n("div",Fe,[c[2]||(c[2]=n("div",{class:"modal-status bg-danger"},null,-1)),c[3]||(c[3]=n("div",{class:"modal-header"},[n("h3",{class:"modal-title"},"Delete Event Listener"),n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),n("div",Ue,[n("h4",null,"Are you sure you want to delete "+$(f.eventListenerName)+"?",1)]),n("div",We,[c[1]||(c[1]=n("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),n("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:c[0]||(c[0]=C=>k())},"Delete")])])])]))}}),Me={class:"card card-flush w-100"},Be={class:"card-body"},Re={class:"event-listener-table"},je=M({__name:"EventListenerList",setup(r){const _=B(),s=d([]),f=d([]);T(async()=>{C(),await v()});const v=async()=>{try{const{data:u}=await ce();s.value=u,s.value.forEach(l=>{l.eventListenerUrl=k(l.eventListenerCallUrl)})}catch(u){console.log(u),_.error("Failed to load data.")}},k=u=>window.location.origin+u,i=d(0),c=d(""),C=()=>{f.value=[{title:"Event Listener Name",field:"eventListenerName",minWidth:190,widthGrow:1.4,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Connect Workflow Name",field:"workflowName",minWidth:220,widthGrow:1.6,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Event Listener Desc",field:"eventListenerDesc",minWidth:220,widthGrow:1.8,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Action URL",field:"eventListenerUrl",minWidth:260,widthGrow:2.2,cssClass:"event-listener-url-cell",variableHeight:!0},{title:"Action",minWidth:180,widthGrow:1,formatter:a,cssClass:"event-listener-action-cell",headerSort:!1,variableHeight:!0,cellClick:async function(u,l){const b=u.target,h=b==null?void 0:b.getAttribute("id");i.value=l.getRow().getData().eventListenerIdx,h==="edit-btn"?(p.value="edit",await E("eventListenerForm")):h==="delete-btn"&&(c.value=l.getRow().getData().eventListenerName,await E("deleteEventListener"))}}]},E=async u=>{await re();const l=document.getElementById(u);l&&Y.getOrCreateInstance(l).show()},a=()=>` +import{_ as Z}from"./TableHeader.vue_vue_type_script_setup_true_lang-CH8iOgmf.js";import{s as N,_ as ee}from"./request-Bkt8aQiS.js";import{d as M,u as B,l as te,r as d,c as W,w as ne,o as T,M as Y,m as ae,a as y,b as n,t as $,p as A,j as G,e as S,g as O,v as se,F as le,f as oe,h as w,s as re,i as D}from"./index-B3pAGCoW.js";import{f as ie,P as de}from"./SearchableSelect-B-_1YT6N.js";import{T as ue}from"./TumblebugParamSelector-DzZGpJmW.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const ce=()=>N.get("/eventlistener/list");function ve(r){return N.get("/eventlistener/"+r)}function me(r){return N.get(`/eventlistener/duplicate?eventlistenerName=${encodeURIComponent(r)}`)}function we(r){return N.post("/eventlistener",r)}function fe(r){return N.patch(`/eventlistener/${r.eventListenerIdx}`,r)}function pe(r){return N.delete(`/eventlistener/${r}`)}const be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document",style:{"max-width":"900px"}},Le={class:"modal-content"},ke={class:"modal-header"},ge={class:"modal-title"},ye={class:"modal-body py-4"},Ee={class:"row mb-3"},he={class:"grid gap-0 column-gap-3"},xe={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},Ne={class:"mb-3"},_e={class:"mb-3"},Ie=["value"],Ce={class:"modal-footer"},De=M({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(r,{emit:_}){const s=B(),f=te(),v=d(),k=d(),i=r,c=_,C=W(()=>i.eventListenerIdx);ne(C,async()=>{await l(),await P()}),T(async()=>{v.value&&(k.value=new Y(v.value),v.value.addEventListener("show.bs.modal",E)),await l(),await P()}),ae(()=>{var e;(e=v.value)==null||e.removeEventListener("show.bs.modal",E)});const E=async()=>{await l(),await P()},a=d({}),p=d(!1),g=d(!1),u=d(0),l=async()=>{if(g.value=!1,i.mode==="new")a.value={eventListenerIdx:0,eventListenerName:"",eventListenerDesc:"",eventListenerUrl:"",eventListenerCallUrl:"",workflowIdx:0,workflowParams:[]},L.value=!1,x.value="",F.value="",p.value=!0;else{const{data:e}=await ve(i.eventListenerIdx);a.value=e,L.value=!0,x.value=I(e.eventListenerName),F.value=I(e.eventListenerName),p.value=!0,g.value=!!a.value.workflowIdx}u.value+=1},b=d([]),h=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],R=new Map(h.map((e,t)=>[e,t])),P=async()=>{const{data:e}=await ie("N");b.value=[...e].sort((t,m)=>{const o=R.get(t.workflowInfo.workflowName)??h.length,U=R.get(m.workflowInfo.workflowName)??h.length;return o-U})},V=W(()=>b.value.find(e=>Number(e.workflowInfo.workflowIdx)===Number(a.value.workflowIdx))),j=W(()=>{var e;return((e=V.value)==null?void 0:e.workflowInfo.workflowName)||a.value.workflowName||""}),L=d(!1),x=d(""),F=d(""),I=e=>(e||"").trim(),H=()=>{const e=I(a.value.eventListenerName);L.value=!!(e&&e===x.value)},q=async()=>{const e=I(a.value.eventListenerName);if(!e){s.error("Please enter Event Listener name.");return}if(i.mode!=="new"&&e===F.value){s.success("Name is available."),L.value=!0,x.value=e;return}const{data:t}=await me(e);t?(s.error("Name is already in use."),L.value=!1):(s.success("Name is available."),L.value=!0,x.value=e)},K=async()=>{if(!a.value.eventListenerName){s.error("Please enter Event Listener name.");return}if(!L.value||x.value!==I(a.value.eventListenerName)){s.error("Please perform duplicate check for the name.");return}if(!a.value.eventListenerDesc){s.error("Please enter Event Listener description.");return}if(!a.value.workflowIdx||a.value.workflowIdx===0){s.error("Please select a Workflow.");return}let e=!1;i.mode==="new"?(a.value.workflowParams.forEach(t=>{t.paramIdx=0,t.eventListenerYn="Y"}),e=await z()):e=await J(),e&&(c("get-event-listener-list"),l(),k.value&&(k.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const t=document.querySelector(".modal-backdrop");t==null||t.remove()},150)))},z=async()=>{try{const{data:e}=await we(a.value);return e?(s.success("Registered successfully."),!0):(s.error("Failed to register."),!1)}catch{return s.error("Failed to register."),!1}},J=async()=>{try{const{data:e}=await fe(a.value);return e?(s.success("Updated successfully."),!0):(s.error("Failed to update."),!1)}catch{return s.error("Failed to update."),!1}},Q=e=>{g.value=!1;const t=b.value.find(m=>Number(m.workflowInfo.workflowIdx)===Number(e));if(!t){a.value.workflowParams=[];return}a.value.workflowParams=X(t.workflowParams),u.value+=1,g.value=!0},X=(e=[])=>{const t=(f.projectInfo.ns_id||f.projectInfo.name||"").trim();return e.map(m=>{var o;return{...m,paramIdx:0,paramValue:t&&((o=m.paramKey)==null?void 0:o.trim().toUpperCase())==="NAMESPACE"?t:m.paramValue,eventListenerYn:"Y"}})};return(e,t)=>{var m;return w(),y("div",{class:"modal modal-blur fade",id:"eventListenerForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:v},[n("div",be,[n("div",Le,[n("div",ke,[n("h3",ge,"Event Listener "+$(i.mode==="new"?"New":"Edit"),1),t[6]||(t[6]=n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),n("div",ye,[n("div",null,[n("div",Ee,[t[7]||(t[7]=n("label",{class:"form-label required"},"Event Listener Name",-1)),n("div",he,[S(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Name","onUpdate:modelValue":t[0]||(t[0]=o=>a.value.eventListenerName=o),onInput:H},null,544),[[O,a.value.eventListenerName]]),L.value?(w(),y("button",xe,"Duplicate Check")):(w(),y("button",{key:0,class:"btn btn-primary chk",onClick:q,style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),n("div",Ne,[t[8]||(t[8]=n("label",{class:"form-label required"},"Event Listener Description",-1)),S(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Description","onUpdate:modelValue":t[1]||(t[1]=o=>a.value.eventListenerDesc=o)},null,512),[[O,a.value.eventListenerDesc]])]),n("div",_e,[t[10]||(t[10]=n("label",{class:"form-label required"},"Workflow",-1)),S(n("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":t[2]||(t[2]=o=>a.value.workflowIdx=o),onChange:t[3]||(t[3]=o=>Q(a.value.workflowIdx))},[t[9]||(t[9]=n("option",{value:0},"Select Workflow",-1)),(w(!0),y(le,null,oe(b.value,(o,U)=>(w(),y("option",{value:o.workflowInfo.workflowIdx,key:U},$(o.workflowInfo.workflowName),9,Ie))),128))],544),[[se,a.value.workflowIdx]])]),p.value&&g.value&&a.value.workflowIdx&&a.value.workflowParams?(w(),A(ue,{key:`${a.value.workflowIdx}-${u.value}`,"workflow-name":j.value,"workflow-param-data":a.value.workflowParams,"workflow-stage-mappings":((m=V.value)==null?void 0:m.workflowStageMappings)||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):G("",!0),p.value?(w(),A(de,{key:1,popup:!1,"workflow-param-data":a.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):G("",!0)])]),n("div",Ce,[n("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:t[4]||(t[4]=o=>l())}," Cancel "),n("button",{type:"button",class:"btn btn-primary ms-auto",onClick:t[5]||(t[5]=o=>K())},$(i.mode==="new"?"Create":"Edit"),1)])])])],512)}}}),$e={class:"modal modal-blur fade",id:"deleteEventListener",tabindex:"-1","aria-hidden":"true"},Pe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Fe={class:"modal-content"},Ue={class:"modal-body py-4"},We={class:"modal-footer"},Se=M({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(r,{emit:_}){const s=B(),f=r,v=_,k=async()=>{const{data:i}=await pe(f.eventListenerIdx);i?s.success("Deleted successfully."):s.error("Failed to delete."),v("get-event-listener-list")};return(i,c)=>(w(),y("div",$e,[n("div",Pe,[n("div",Fe,[c[2]||(c[2]=n("div",{class:"modal-status bg-danger"},null,-1)),c[3]||(c[3]=n("div",{class:"modal-header"},[n("h3",{class:"modal-title"},"Delete Event Listener"),n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),n("div",Ue,[n("h4",null,"Are you sure you want to delete "+$(f.eventListenerName)+"?",1)]),n("div",We,[c[1]||(c[1]=n("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),n("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:c[0]||(c[0]=C=>k())},"Delete")])])])]))}}),Me={class:"card card-flush w-100"},Be={class:"card-body"},Re={class:"event-listener-table"},je=M({__name:"EventListenerList",setup(r){const _=B(),s=d([]),f=d([]);T(async()=>{C(),await v()});const v=async()=>{try{const{data:u}=await ce();s.value=u,s.value.forEach(l=>{l.eventListenerUrl=k(l.eventListenerCallUrl)})}catch(u){console.log(u),_.error("Failed to load data.")}},k=u=>window.location.origin+u,i=d(0),c=d(""),C=()=>{f.value=[{title:"Event Listener Name",field:"eventListenerName",minWidth:190,widthGrow:1.4,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Connect Workflow Name",field:"workflowName",minWidth:220,widthGrow:1.6,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Event Listener Desc",field:"eventListenerDesc",minWidth:220,widthGrow:1.8,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Action URL",field:"eventListenerUrl",minWidth:260,widthGrow:2.2,cssClass:"event-listener-url-cell",variableHeight:!0},{title:"Action",minWidth:180,widthGrow:1,formatter:a,cssClass:"event-listener-action-cell",headerSort:!1,variableHeight:!0,cellClick:async function(u,l){const b=u.target,h=b==null?void 0:b.getAttribute("id");i.value=l.getRow().getData().eventListenerIdx,h==="edit-btn"?(p.value="edit",await E("eventListenerForm")):h==="delete-btn"&&(c.value=l.getRow().getData().eventListenerName,await E("deleteEventListener"))}}]},E=async u=>{await re();const l=document.getElementById(u);l&&Y.getOrCreateInstance(l).show()},a=()=>`
- -
`,p=d("new"),g=async()=>{i.value=0,p.value="new",await E("eventListenerForm")};return(u,l)=>(w(),y("div",null,[D(Z,{"header-title":"Event Listener","new-btn-title":"New Event Listener","popup-flag":!1,"popup-target":"",class:"mb-3",onClickNewBtn:g}),n("div",Me,[n("div",Be,[n("div",Re,[D(ee,{columns:f.value,"table-data":s.value},null,8,["columns","table-data"])])])]),D(De,{style:{width:"100%"},mode:p.value,"event-listener-idx":i.value,onGetEventListenerList:v},null,8,["mode","event-listener-idx"]),D(Se,{"event-listener-name":c.value,"event-listener-idx":i.value,onGetEventListenerList:v},null,8,["event-listener-name","event-listener-idx"])]))}});export{je as default}; diff --git a/src/main/resources/static/assets/OssList-B61Yq9pp.js b/src/main/resources/static/assets/OssList-B61Yq9pp.js deleted file mode 100644 index 8d6e3d1..0000000 --- a/src/main/resources/static/assets/OssList-B61Yq9pp.js +++ /dev/null @@ -1,17 +0,0 @@ -import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-DI9Uu4Cl.js";import{_ as q}from"./request-B_1A5BoF.js";import{g as M,a as G,b as z,d as W,o as j,r as H,u as J,c as K,e as Q}from"./oss-BzajjW9d.js";import{d as D,u as I,w as T,o as N,M as X,r as i,c as v,a as e,t as C,b as g,v as Y,F as Z,e as ss,f as h,g as p,h as es,i as k}from"./index-DRhuj6I4.js";const ts={class:"modal-dialog modal-xl modal-dialog-centered",role:"document"},os={class:"modal-content"},as={class:"modal-header"},ls={class:"modal-title"},ns={class:"modal-body py-4"},rs={class:"mb-3"},is={class:"grid gap-0 column-gap-3"},ds=["value"],cs={class:"row mb-3"},us={class:"mb-3"},ms={class:"mb-3"},vs={class:"row"},ps={class:"col"},bs={class:"col"},fs={class:"col mt-4 row"},ys={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},gs={key:3,class:"btn btn-success col"},ws={class:"modal-footer"},Ss=D({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=i(),u=i(),n=_,f=w,r=es(()=>n.ossIdx);T(r,async()=>{await b()}),T(()=>n.mode,async()=>{await m(n.mode)}),N(async()=>{c.value&&(u.value=new X(c.value)),await m("init"),await b()});const t=i({}),b=async()=>{if(n.mode==="new")t.value.ossTypeIdx=0,t.value.ossName="",t.value.ossDesc="",t.value.ossUrl="",t.value.ossUsername="",t.value.ossPassword="",d.value=!1,y.value=!1;else{const{data:a}=await M(n.ossIdx);t.value=a,t.value.ossPassword=A(t.value.ossPassword),d.value=!0,y.value=!0}},S=i([]),m=async a=>{try{if(a==="new"||a==="init"){const{data:s}=await G();S.value=s}else{const{data:s}=await z();S.value=s}}catch(s){console.log(s)}},O=()=>{t.value.ossPassword="",y.value=!1},d=i(!1),x=async()=>{const a={ossName:t.value.ossName,ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername},{data:s}=await W(a);s?o.error("This name is already in use."):(o.success("This name is available."),d.value=!0)},y=i(!1),L=async()=>{const a={ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername,ossPassword:P(t.value.ossPassword),ossTypeIdx:t.value.ossTypeIdx},{data:s}=await j(a);s?(o.success("This OSS connection is available."),y.value=!0):o.error("This OSS connection is not available.")},F=()=>{d.value=!1},U=()=>{y.value=!1},E=async()=>{if(!t.value.ossTypeIdx||t.value.ossTypeIdx===0){o.error("Please select OSS Type.");return}if(!t.value.ossName){o.error("Please enter OSS Name.");return}if(!t.value.ossDesc){o.error("Please enter OSS Description.");return}if(!t.value.ossUrl){o.error("Please enter URL.");return}if(!t.value.ossUsername){o.error("Please enter OSS ID.");return}if(!t.value.ossPassword){o.error("Please enter OSS Password.");return}if(!d.value){o.error("Please perform duplicate check.");return}if(!y.value){o.error("Please perform connection check.");return}t.value.ossPassword=P(t.value.ossPassword);let a=!1;n.mode==="new"?a=await $():a=await R(),a&&(f("get-oss-list"),b(),u.value&&(u.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const s=document.querySelector(".modal-backdrop");s==null||s.remove()},150)))},$=async()=>{try{const{data:a}=await H(t.value);return a?(o.success("Regist SUCCESS."),!0):(o.error("Regist FAIL."),!1)}catch{return o.error("Regist FAIL."),!1}},R=async()=>{try{const{data:a}=await J(t.value);return a?(o.success("Update SUCCESS."),!0):(o.error("Update FAIL."),!1)}catch{return o.error("Update FAIL."),!1}},P=a=>btoa(a),A=a=>atob(a);return(a,s)=>(p(),v("div",{class:"modal modal-blur fade",id:"ossForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",ts,[e("div",os,[e("div",as,[e("h3",ls,C(n.mode==="new"?"New":"Edit")+" OSS",1),s[8]||(s[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",ns,[e("div",null,[e("div",rs,[s[10]||(s[10]=e("label",{class:"form-label required"},"OSS Type",-1)),e("div",is,[g(e("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value.ossTypeIdx=l),class:"form-select p-2 g-col-12"},[s[9]||(s[9]=e("option",{value:0},"Select OSS Type",-1)),(p(!0),v(Z,null,ss(S.value,(l,B)=>(p(),v("option",{value:l.ossTypeIdx,key:B},C(l.ossTypeName),9,ds))),128))],512),[[Y,t.value.ossTypeIdx]])])]),e("div",cs,[s[11]||(s[11]=e("label",{class:"form-label required"},"OSS Name",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":s[1]||(s[1]=l=>t.value.ossName=l),onChange:F},null,544),[[h,t.value.ossName]])]),e("div",us,[s[12]||(s[12]=e("label",{class:"form-label"},"OSS Description",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":s[2]||(s[2]=l=>t.value.ossDesc=l)},null,512),[[h,t.value.ossDesc]])]),e("div",ms,[s[13]||(s[13]=e("label",{class:"form-label required"},"URL",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":s[3]||(s[3]=l=>t.value.ossUrl=l),onFocus:U},null,544),[[h,t.value.ossUrl]])]),e("div",vs,[e("div",ps,[s[14]||(s[14]=e("label",{class:"form-label required"},"OSS ID",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":s[4]||(s[4]=l=>t.value.ossUsername=l),onFocus:U},null,544),[[h,t.value.ossUsername]])]),e("div",bs,[s[15]||(s[15]=e("label",{class:"form-label required"},"OSS PW",-1)),g(e("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":s[5]||(s[5]=l=>t.value.ossPassword=l),onClick:O,onFocus:U},null,544),[[h,t.value.ossPassword]])]),e("div",fs,[d.value?(p(),v("button",ys,"Duplicate Check")):(p(),v("button",{key:0,class:"btn btn-primary col",onClick:x,style:{"margin-right":"3px"}},"Duplicate Check")),y.value?(p(),v("button",gs,"Connection Check")):(p(),v("button",{key:2,class:"btn btn-primary col",onClick:L},"Connection Check"))])])])]),e("div",ws,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[6]||(s[6]=l=>b())}," Cancel "),e("button",{type:"button",ref:"submitBtn",class:"btn btn-primary ms-auto",onClick:s[7]||(s[7]=l=>E())},C(n.mode==="new"?"Regist":"Edit"),513)])])])],512))}}),Os={class:"modal modal-blur fade",id:"deleteOss",tabindex:"-1","aria-hidden":"true"},hs={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},_s={class:"modal-content"},ks={class:"modal-body py-4"},Cs={class:"modal-footer"},xs=D({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=_,u=w,n=async()=>{const{data:f}=await K(c.ossIdx);f?o.success("Deleted successfully."):o.error("Failed to delete."),u("get-oss-list")};return(f,r)=>(p(),v("div",Os,[e("div",hs,[e("div",_s,[r[2]||(r[2]=e("div",{class:"modal-status bg-danger"},null,-1)),r[3]||(r[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete OSS"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",ks,[e("h4",null,"Are you sure you want to delete "+C(c.ossName)+"?",1)]),e("div",Cs,[r[1]||(r[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:r[0]||(r[0]=t=>n())}," Delete ")])])])]))}}),Us={class:"card card-flush w-100"},Ds={class:"card-body table-responsive"},Ls=D({__name:"OssList",setup(_){const w=I(),o=i([]),c=i([]);N(async()=>{r(),await u()});const u=async()=>{try{const{data:m}=await Q();o.value=m}catch(m){console.log(m),w.error("Failed to load data.")}},n=i(0),f=i(""),r=()=>{c.value=[{title:"OSS Name",field:"ossName",width:"25%"},{title:"OSS Desc",field:"ossDesc",width:"25%"},{title:"URL",field:"ossUrl",width:"25%"},{title:"Action",hozAlign:"center",width:"25%",formatter:t,cellClick:function(m,O){const d=m.target,x=d==null?void 0:d.getAttribute("id");n.value=O.getRow().getData().ossIdx,x==="edit-btn"?b.value="edit":f.value=O.getRow().getData().ossName}}]},t=()=>` -
- - -
`,b=i("new"),S=()=>{n.value=0,b.value="new"};return(m,O)=>(p(),v("div",null,[k(V,{"header-title":"OSS","new-btn-title":"New OSS","popup-flag":!0,"popup-target":"#ossForm",class:"mb-3",onClickNewBtn:S}),e("div",Us,[e("div",Ds,[k(q,{columns:c.value,"table-data":o.value},null,8,["columns","table-data"])])]),k(Ss,{mode:b.value,"oss-idx":n.value,onGetOssList:u},null,8,["mode","oss-idx"]),k(xs,{"oss-name":f.value,"oss-idx":n.value,onGetOssList:u},null,8,["oss-name","oss-idx"])]))}});export{Ls as default}; diff --git a/src/main/resources/static/assets/OssList-DdY_lQmR.js b/src/main/resources/static/assets/OssList-D5ZKN3MU.js similarity index 97% rename from src/main/resources/static/assets/OssList-DdY_lQmR.js rename to src/main/resources/static/assets/OssList-D5ZKN3MU.js index 2d7b5c1..3546ec3 100644 --- a/src/main/resources/static/assets/OssList-DdY_lQmR.js +++ b/src/main/resources/static/assets/OssList-D5ZKN3MU.js @@ -1,4 +1,4 @@ -import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-l3eqvMpD.js";import{_ as q}from"./request-1ziJwdRS.js";import{g as M,a as G,b as z,d as W,o as j,r as H,u as J,c as K,e as Q}from"./oss-BVTcEIfx.js";import{d as D,u as I,r as i,c as X,w as T,o as N,M as Y,a as v,b as e,t as C,e as g,v as Z,F as ss,f as es,g as h,h as p,i as k}from"./index-DhGk3pPk.js";const ts={class:"modal-dialog modal-xl modal-dialog-centered",role:"document"},os={class:"modal-content"},as={class:"modal-header"},ls={class:"modal-title"},ns={class:"modal-body py-4"},rs={class:"mb-3"},is={class:"grid gap-0 column-gap-3"},ds=["value"],cs={class:"row mb-3"},us={class:"mb-3"},ms={class:"mb-3"},vs={class:"row"},ps={class:"col"},bs={class:"col"},fs={class:"col mt-4 row"},ys={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},gs={key:3,class:"btn btn-success col"},ws={class:"modal-footer"},Ss=D({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=i(),u=i(),n=_,f=w,r=X(()=>n.ossIdx);T(r,async()=>{await b()}),T(()=>n.mode,async()=>{await m(n.mode)}),N(async()=>{c.value&&(u.value=new Y(c.value)),await m("init"),await b()});const t=i({}),b=async()=>{if(n.mode==="new")t.value.ossTypeIdx=0,t.value.ossName="",t.value.ossDesc="",t.value.ossUrl="",t.value.ossUsername="",t.value.ossPassword="",d.value=!1,y.value=!1;else{const{data:a}=await M(n.ossIdx);t.value=a,t.value.ossPassword=A(t.value.ossPassword),d.value=!0,y.value=!0}},S=i([]),m=async a=>{try{if(a==="new"||a==="init"){const{data:s}=await G();S.value=s}else{const{data:s}=await z();S.value=s}}catch(s){console.log(s)}},O=()=>{t.value.ossPassword="",y.value=!1},d=i(!1),x=async()=>{const a={ossName:t.value.ossName,ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername},{data:s}=await W(a);s?o.error("This name is already in use."):(o.success("This name is available."),d.value=!0)},y=i(!1),L=async()=>{const a={ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername,ossPassword:P(t.value.ossPassword),ossTypeIdx:t.value.ossTypeIdx},{data:s}=await j(a);s?(o.success("This OSS connection is available."),y.value=!0):o.error("This OSS connection is not available.")},F=()=>{d.value=!1},U=()=>{y.value=!1},E=async()=>{if(!t.value.ossTypeIdx||t.value.ossTypeIdx===0){o.error("Please select OSS Type.");return}if(!t.value.ossName){o.error("Please enter OSS Name.");return}if(!t.value.ossDesc){o.error("Please enter OSS Description.");return}if(!t.value.ossUrl){o.error("Please enter URL.");return}if(!t.value.ossUsername){o.error("Please enter OSS ID.");return}if(!t.value.ossPassword){o.error("Please enter OSS Password.");return}if(!d.value){o.error("Please perform duplicate check.");return}if(!y.value){o.error("Please perform connection check.");return}t.value.ossPassword=P(t.value.ossPassword);let a=!1;n.mode==="new"?a=await $():a=await R(),a&&(f("get-oss-list"),b(),u.value&&(u.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const s=document.querySelector(".modal-backdrop");s==null||s.remove()},150)))},$=async()=>{try{const{data:a}=await H(t.value);return a?(o.success("Regist SUCCESS."),!0):(o.error("Regist FAIL."),!1)}catch{return o.error("Regist FAIL."),!1}},R=async()=>{try{const{data:a}=await J(t.value);return a?(o.success("Update SUCCESS."),!0):(o.error("Update FAIL."),!1)}catch{return o.error("Update FAIL."),!1}},P=a=>btoa(a),A=a=>atob(a);return(a,s)=>(p(),v("div",{class:"modal modal-blur fade",id:"ossForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",ts,[e("div",os,[e("div",as,[e("h3",ls,C(n.mode==="new"?"New":"Edit")+" OSS",1),s[8]||(s[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",ns,[e("div",null,[e("div",rs,[s[10]||(s[10]=e("label",{class:"form-label required"},"OSS Type",-1)),e("div",is,[g(e("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value.ossTypeIdx=l),class:"form-select p-2 g-col-12"},[s[9]||(s[9]=e("option",{value:0},"Select OSS Type",-1)),(p(!0),v(ss,null,es(S.value,(l,B)=>(p(),v("option",{value:l.ossTypeIdx,key:B},C(l.ossTypeName),9,ds))),128))],512),[[Z,t.value.ossTypeIdx]])])]),e("div",cs,[s[11]||(s[11]=e("label",{class:"form-label required"},"OSS Name",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":s[1]||(s[1]=l=>t.value.ossName=l),onChange:F},null,544),[[h,t.value.ossName]])]),e("div",us,[s[12]||(s[12]=e("label",{class:"form-label"},"OSS Description",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":s[2]||(s[2]=l=>t.value.ossDesc=l)},null,512),[[h,t.value.ossDesc]])]),e("div",ms,[s[13]||(s[13]=e("label",{class:"form-label required"},"URL",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":s[3]||(s[3]=l=>t.value.ossUrl=l),onFocus:U},null,544),[[h,t.value.ossUrl]])]),e("div",vs,[e("div",ps,[s[14]||(s[14]=e("label",{class:"form-label required"},"OSS ID",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":s[4]||(s[4]=l=>t.value.ossUsername=l),onFocus:U},null,544),[[h,t.value.ossUsername]])]),e("div",bs,[s[15]||(s[15]=e("label",{class:"form-label required"},"OSS PW",-1)),g(e("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":s[5]||(s[5]=l=>t.value.ossPassword=l),onClick:O,onFocus:U},null,544),[[h,t.value.ossPassword]])]),e("div",fs,[d.value?(p(),v("button",ys,"Duplicate Check")):(p(),v("button",{key:0,class:"btn btn-primary col",onClick:x,style:{"margin-right":"3px"}},"Duplicate Check")),y.value?(p(),v("button",gs,"Connection Check")):(p(),v("button",{key:2,class:"btn btn-primary col",onClick:L},"Connection Check"))])])])]),e("div",ws,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[6]||(s[6]=l=>b())}," Cancel "),e("button",{type:"button",ref:"submitBtn",class:"btn btn-primary ms-auto",onClick:s[7]||(s[7]=l=>E())},C(n.mode==="new"?"Regist":"Edit"),513)])])])],512))}}),Os={class:"modal modal-blur fade",id:"deleteOss",tabindex:"-1","aria-hidden":"true"},hs={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},_s={class:"modal-content"},ks={class:"modal-body py-4"},Cs={class:"modal-footer"},xs=D({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=_,u=w,n=async()=>{const{data:f}=await K(c.ossIdx);f?o.success("Deleted successfully."):o.error("Failed to delete."),u("get-oss-list")};return(f,r)=>(p(),v("div",Os,[e("div",hs,[e("div",_s,[r[2]||(r[2]=e("div",{class:"modal-status bg-danger"},null,-1)),r[3]||(r[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete OSS"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",ks,[e("h4",null,"Are you sure you want to delete "+C(c.ossName)+"?",1)]),e("div",Cs,[r[1]||(r[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:r[0]||(r[0]=t=>n())}," Delete ")])])])]))}}),Us={class:"card card-flush w-100"},Ds={class:"card-body table-responsive"},Ls=D({__name:"OssList",setup(_){const w=I(),o=i([]),c=i([]);N(async()=>{r(),await u()});const u=async()=>{try{const{data:m}=await Q();o.value=m}catch(m){console.log(m),w.error("Failed to load data.")}},n=i(0),f=i(""),r=()=>{c.value=[{title:"OSS Name",field:"ossName",width:"25%"},{title:"OSS Desc",field:"ossDesc",width:"25%"},{title:"URL",field:"ossUrl",width:"25%"},{title:"Action",hozAlign:"center",width:"25%",formatter:t,cellClick:function(m,O){const d=m.target,x=d==null?void 0:d.getAttribute("id");n.value=O.getRow().getData().ossIdx,x==="edit-btn"?b.value="edit":f.value=O.getRow().getData().ossName}}]},t=()=>` +import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-CH8iOgmf.js";import{_ as q}from"./request-Bkt8aQiS.js";import{g as M,a as G,b as z,d as W,o as j,r as H,u as J,c as K,e as Q}from"./oss-AyXjpQRA.js";import{d as D,u as I,r as i,c as X,w as T,o as N,M as Y,a as v,b as e,t as C,e as g,v as Z,F as ss,f as es,g as h,h as p,i as k}from"./index-B3pAGCoW.js";const ts={class:"modal-dialog modal-xl modal-dialog-centered",role:"document"},os={class:"modal-content"},as={class:"modal-header"},ls={class:"modal-title"},ns={class:"modal-body py-4"},rs={class:"mb-3"},is={class:"grid gap-0 column-gap-3"},ds=["value"],cs={class:"row mb-3"},us={class:"mb-3"},ms={class:"mb-3"},vs={class:"row"},ps={class:"col"},bs={class:"col"},fs={class:"col mt-4 row"},ys={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},gs={key:3,class:"btn btn-success col"},ws={class:"modal-footer"},Ss=D({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=i(),u=i(),n=_,f=w,r=X(()=>n.ossIdx);T(r,async()=>{await b()}),T(()=>n.mode,async()=>{await m(n.mode)}),N(async()=>{c.value&&(u.value=new Y(c.value)),await m("init"),await b()});const t=i({}),b=async()=>{if(n.mode==="new")t.value.ossTypeIdx=0,t.value.ossName="",t.value.ossDesc="",t.value.ossUrl="",t.value.ossUsername="",t.value.ossPassword="",d.value=!1,y.value=!1;else{const{data:a}=await M(n.ossIdx);t.value=a,t.value.ossPassword=A(t.value.ossPassword),d.value=!0,y.value=!0}},S=i([]),m=async a=>{try{if(a==="new"||a==="init"){const{data:s}=await G();S.value=s}else{const{data:s}=await z();S.value=s}}catch(s){console.log(s)}},O=()=>{t.value.ossPassword="",y.value=!1},d=i(!1),x=async()=>{const a={ossName:t.value.ossName,ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername},{data:s}=await W(a);s?o.error("This name is already in use."):(o.success("This name is available."),d.value=!0)},y=i(!1),L=async()=>{const a={ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername,ossPassword:P(t.value.ossPassword),ossTypeIdx:t.value.ossTypeIdx},{data:s}=await j(a);s?(o.success("This OSS connection is available."),y.value=!0):o.error("This OSS connection is not available.")},F=()=>{d.value=!1},U=()=>{y.value=!1},E=async()=>{if(!t.value.ossTypeIdx||t.value.ossTypeIdx===0){o.error("Please select OSS Type.");return}if(!t.value.ossName){o.error("Please enter OSS Name.");return}if(!t.value.ossDesc){o.error("Please enter OSS Description.");return}if(!t.value.ossUrl){o.error("Please enter URL.");return}if(!t.value.ossUsername){o.error("Please enter OSS ID.");return}if(!t.value.ossPassword){o.error("Please enter OSS Password.");return}if(!d.value){o.error("Please perform duplicate check.");return}if(!y.value){o.error("Please perform connection check.");return}t.value.ossPassword=P(t.value.ossPassword);let a=!1;n.mode==="new"?a=await $():a=await R(),a&&(f("get-oss-list"),b(),u.value&&(u.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const s=document.querySelector(".modal-backdrop");s==null||s.remove()},150)))},$=async()=>{try{const{data:a}=await H(t.value);return a?(o.success("Regist SUCCESS."),!0):(o.error("Regist FAIL."),!1)}catch{return o.error("Regist FAIL."),!1}},R=async()=>{try{const{data:a}=await J(t.value);return a?(o.success("Update SUCCESS."),!0):(o.error("Update FAIL."),!1)}catch{return o.error("Update FAIL."),!1}},P=a=>btoa(a),A=a=>atob(a);return(a,s)=>(p(),v("div",{class:"modal modal-blur fade",id:"ossForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",ts,[e("div",os,[e("div",as,[e("h3",ls,C(n.mode==="new"?"New":"Edit")+" OSS",1),s[8]||(s[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",ns,[e("div",null,[e("div",rs,[s[10]||(s[10]=e("label",{class:"form-label required"},"OSS Type",-1)),e("div",is,[g(e("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value.ossTypeIdx=l),class:"form-select p-2 g-col-12"},[s[9]||(s[9]=e("option",{value:0},"Select OSS Type",-1)),(p(!0),v(ss,null,es(S.value,(l,B)=>(p(),v("option",{value:l.ossTypeIdx,key:B},C(l.ossTypeName),9,ds))),128))],512),[[Z,t.value.ossTypeIdx]])])]),e("div",cs,[s[11]||(s[11]=e("label",{class:"form-label required"},"OSS Name",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":s[1]||(s[1]=l=>t.value.ossName=l),onChange:F},null,544),[[h,t.value.ossName]])]),e("div",us,[s[12]||(s[12]=e("label",{class:"form-label"},"OSS Description",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":s[2]||(s[2]=l=>t.value.ossDesc=l)},null,512),[[h,t.value.ossDesc]])]),e("div",ms,[s[13]||(s[13]=e("label",{class:"form-label required"},"URL",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":s[3]||(s[3]=l=>t.value.ossUrl=l),onFocus:U},null,544),[[h,t.value.ossUrl]])]),e("div",vs,[e("div",ps,[s[14]||(s[14]=e("label",{class:"form-label required"},"OSS ID",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":s[4]||(s[4]=l=>t.value.ossUsername=l),onFocus:U},null,544),[[h,t.value.ossUsername]])]),e("div",bs,[s[15]||(s[15]=e("label",{class:"form-label required"},"OSS PW",-1)),g(e("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":s[5]||(s[5]=l=>t.value.ossPassword=l),onClick:O,onFocus:U},null,544),[[h,t.value.ossPassword]])]),e("div",fs,[d.value?(p(),v("button",ys,"Duplicate Check")):(p(),v("button",{key:0,class:"btn btn-primary col",onClick:x,style:{"margin-right":"3px"}},"Duplicate Check")),y.value?(p(),v("button",gs,"Connection Check")):(p(),v("button",{key:2,class:"btn btn-primary col",onClick:L},"Connection Check"))])])])]),e("div",ws,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[6]||(s[6]=l=>b())}," Cancel "),e("button",{type:"button",ref:"submitBtn",class:"btn btn-primary ms-auto",onClick:s[7]||(s[7]=l=>E())},C(n.mode==="new"?"Regist":"Edit"),513)])])])],512))}}),Os={class:"modal modal-blur fade",id:"deleteOss",tabindex:"-1","aria-hidden":"true"},hs={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},_s={class:"modal-content"},ks={class:"modal-body py-4"},Cs={class:"modal-footer"},xs=D({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=_,u=w,n=async()=>{const{data:f}=await K(c.ossIdx);f?o.success("Deleted successfully."):o.error("Failed to delete."),u("get-oss-list")};return(f,r)=>(p(),v("div",Os,[e("div",hs,[e("div",_s,[r[2]||(r[2]=e("div",{class:"modal-status bg-danger"},null,-1)),r[3]||(r[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete OSS"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",ks,[e("h4",null,"Are you sure you want to delete "+C(c.ossName)+"?",1)]),e("div",Cs,[r[1]||(r[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:r[0]||(r[0]=t=>n())}," Delete ")])])])]))}}),Us={class:"card card-flush w-100"},Ds={class:"card-body table-responsive"},Ls=D({__name:"OssList",setup(_){const w=I(),o=i([]),c=i([]);N(async()=>{r(),await u()});const u=async()=>{try{const{data:m}=await Q();o.value=m}catch(m){console.log(m),w.error("Failed to load data.")}},n=i(0),f=i(""),r=()=>{c.value=[{title:"OSS Name",field:"ossName",width:"25%"},{title:"OSS Desc",field:"ossDesc",width:"25%"},{title:"URL",field:"ossUrl",width:"25%"},{title:"Action",hozAlign:"center",width:"25%",formatter:t,cellClick:function(m,O){const d=m.target,x=d==null?void 0:d.getAttribute("id");n.value=O.getRow().getData().ossIdx,x==="edit-btn"?b.value="edit":f.value=O.getRow().getData().ossName}}]},t=()=>`
-
`};return(S,y)=>{const m=kl("b-overlay");return ke(),Re(Sn,null,[W.value?(ke(),Re("div",Sb,[y[0]||(y[0]=se("h3",{class:"card-title mb-3"},"History",-1)),ct(m,{show:M.value,id:"overlay-background",variant:"transparent",opacity:"1",blur:"1rem",rounded:"lg",style:{"z-index":"1000"}},null,8,["show"]),se("div",null,[ct(by,{columns:s.value,"table-data":g.value},null,8,["columns","table-data"])])])):fn("",!0),W.value?(ke(),Zm(bb,{key:1,"workflow-idx":c.workflowIdx,"build-name":r.value,"workflow-name":c.workflowName,"workflow-stages":n.value},null,8,["workflow-idx","build-name","workflow-name","workflow-stages"])):fn("",!0)],64)}}}),_b={class:"page-header"},Ab={class:"row align-items-center"},$b={class:"col"},Eb={class:"page-title"},Lb={class:"card card-flush w-100",ref:"workflowForm"},Mb={key:0,class:"card-body"},xb={class:"card-title"},Tb={class:"mb-3"},kb={class:"grid gap-0 column-gap-3"},Ib={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},Rb={class:"mb-3"},Nb={class:"grid gap-0 column-gap-3"},Ob=["value"],Db={key:0,class:"mb-3"},Fb={class:"d-flex align-items-center justify-content-between mb-2"},Pb={class:"form-check form-switch mb-0"},Wb={class:"form-check-label"},Bb={key:1,class:"mb-3"},Hb={class:"grid gap-0 column-gap-3 mb-2"},zb={class:"tumblebug-param-field g-col-4"},Vb={class:"tumblebug-param-label"},Ub={class:"tumblebug-param-field g-col-4"},Kb={class:"tumblebug-param-label"},Gb={class:"tumblebug-param-field g-col-4"},Yb={class:"tumblebug-param-label"},jb={class:"grid gap-0 column-gap-3 mb-2"},Zb={class:"tumblebug-param-field g-col-6"},Qb={class:"tumblebug-param-label"},Xb={class:"tumblebug-param-field g-col-6"},Jb={class:"tumblebug-param-label"},qb={class:"tumblebug-param-label-actions"},e0={class:"form-check form-switch tumblebug-k8s-toggle",title:"Load Kubernetes node images"},t0={class:"grid gap-0 column-gap-3 mb-2"},n0={class:"tumblebug-param-field g-col-5"},i0={class:"tumblebug-param-label"},r0={class:"tumblebug-param-field g-col-5"},o0={class:"tumblebug-param-label"},s0={class:"grid gap-0 column-gap-3 mb-2"},a0={class:"tumblebug-param-label"},l0={class:"tumblebug-param-label"},u0={key:0,class:"tumblebug-param-field g-col-4"},c0={class:"tumblebug-param-label"},h0={key:0,class:"grid gap-0 column-gap-3 mt-2"},f0={class:"tumblebug-param-field g-col-12"},d0={class:"tumblebug-param-label"},p0={key:0,class:"text-secondary"},g0={class:"row align-items-center"},v0={class:"col-auto ms-auto"},m0={class:"btn-list"},Xc="CREATE TABLE IF NOT EXISTS sample_data (id INT PRIMARY KEY, name VARCHAR(100));",y0="INSERT INTO sample_data (id, name) VALUES (1, 'sample row');",w0=ci({__name:"WorkflowForm",setup(N){const M=Il(),c=Xm(),g=ty(),W=Qm(),k=Le(!1);let E=!1;ks(async()=>{u(),await l(),await Ir(),la(),await lo(),Xn(),await yr(),Xn(),k.value=!0,E&&(E=!1,await vr())});const $=Le("new"),u=()=>{$.value=c.params.workflowIdx===void 0?"new":"detail"};let h=Jm({});const i=Le([]),a=Le([]),s={workflowIdx:0,workflowName:"",workflowPurpose:"",ossIdx:0,script:""},r=[{paramKey:"",paramValue:"",eventListenerYn:"N"}],n=()=>(W.projectInfo.ns_id||W.projectInfo.name||"").trim(),o=b=>{var fe,Ee;const K=n(),ne=((Ee=(fe=b.find(Xe=>{var et;return((et=Xe.paramKey)==null?void 0:et.trim().toUpperCase())==="NAMESPACE"}))==null?void 0:fe.paramValue)==null?void 0:Ee.trim())||"",oe=K||ne;return oe?b.map(Xe=>{var Pt;const et=(Pt=Xe.paramKey)==null?void 0:Pt.trim().toUpperCase();return{...Xe,paramValue:et==="NAMESPACE"||et==="OBJECT_STORAGE_NAMESPACE"?oe:Xe.paramValue}}):[...b]},l=async()=>{if($.value==="new")h={...s},i.value=[...r],a.value=[],Be.value=!1,mi.value="";else{const{data:b}=await sy(c.params.workflowIdx,"N");h={...b.workflowInfo,workflowPurpose:kr(b.workflowInfo.workflowPurpose)},i.value=o(b.workflowParams),a.value=[...b.workflowStageMappings],h={...h,workflowIdx:c.params.workflowIdx},Be.value=!0,mi.value=h.workflowName}},d=["alibaba","aws","azure","gcp","ibm","kt","ncp","nhn","tencent"],p=Le(Cr(d.map(b=>({label:b,value:b})))),C=Le("aws"),S=Le(""),y=Le(""),m=Le(""),T=Le(""),O=Le(""),I=Le(""),R=Le(""),B=Le(""),L=Le(""),A=Le(""),w=Le(!1),v=Le([]),_=Le([]),D=Le([]),P=Le([]),H=Le([]),U=Le([]),G=Le([]),te=Le([]),j=Le(!1),Q=Le([]),X=Le([]),ee=Le({}),ae=Le({});let ce=0,pe=0,de=0,be=0,De=0,Ze=0,ze=0,Ve=0,wt=0,_t=0,dn=0;const Ns=["infra-create","k8s-cluster-create","k8s-kubeconfig-get","mariadb-install","infra-ssh-connect-check","ssh-command-exec"],hi=["TUMBLEBUG_SELECTOR_YN","NAMESPACE","PROVIDER","CSP","REGION","IMAGE","IMAGE_ID","SPEC","SPEC_ID","K8S_VERSION","INFRA_ID","SSH_HOST","DB_HOST","K8S_CLUSTER_ID","CONNECTION_NAME","ZONE"],Nt=["PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID","K8S_VERSION"],jn=["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"],Ti=[...jn,...Ns],Os=["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"],fi=["object-storage-ensure","object-storage-delete","jupyter-object-storage-analysis-install","jupyter-object-storage-analysis-remove"],pn=Le(!1),kn=Le(!1),In={label:"No zone required",value:"",searchText:"no zone optional blank"},or={alibaba:{region:"ap-northeast-2",connectionName:"alibaba-ap-northeast-2",zone:"ap-northeast-2a",specId:"alibaba+ap-northeast-2+ecs.g9i.large",imageId:"ubuntu_24_04_x64_20G_alibase_20260810.vhd"},aws:{region:"ap-northeast-2",connectionName:"aws-ap-northeast-2",zone:"ap-northeast-2a",specId:"aws+ap-northeast-2+m8i.large",imageId:"ami-01ed18897a4aadead"},azure:{region:"koreacentral",connectionName:"azure-koreacentral",zone:"1",specId:"azure+koreacentral+Standard_D2s_v6",imageId:"Canonical:ubuntu-24_04-lts:minimal:24.04.202608100"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+n2-standard-2",imageId:"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2404-noble-amd64-v20260817"},ibm:{region:"jp-tok",connectionName:"ibm-jp-tok",zone:"jp-tok-1",specId:"ibm+jp-tok+bx2-2x8",imageId:"r022-9130f04e-631a-4e91-ae4c-b85d54621c24"},kt:{region:"kr1",connectionName:"kt-kr1",zone:"DX-M1",specId:"kt+kr1+2x8.itl",imageId:"e55c5985-b420-4a19-8c92-aa3461cda86e"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+s2-g3",imageId:"104630229"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+r2.c2m8",imageId:"5c38715f-0375-4167-af4e-56f75ba8b252"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM8",imageId:"img-mmytdhbn"}},ki={alibaba:{region:"ap-northeast-2",connectionName:"alibaba-ap-northeast-2",zone:"ap-northeast-2a",specId:"alibaba+ap-northeast-2+ecs.c9i.xlarge",imageId:"Ubuntu",k8sVersion:"1.35.7-aliyun.1"},aws:{region:"ap-northeast-2",connectionName:"aws-ap-northeast-2",zone:"ap-northeast-2a",specId:"aws+ap-northeast-2+c8i.xlarge",imageId:"AL2023_x86_64_STANDARD",k8sVersion:"1.35"},azure:{region:"koreacentral",connectionName:"azure-koreacentral",zone:"1",specId:"azure+koreacentral+Standard_D4ls_v6",imageId:"",k8sVersion:"1.35.7"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+c3-highcpu-4",imageId:"UBUNTU_CONTAINERD",k8sVersion:"1.35.6-gke.1250000"},ibm:{region:"jp-tok",connectionName:"ibm-jp-tok",zone:"jp-tok-1",specId:"ibm+jp-tok+cx2-4x8",imageId:"",k8sVersion:"1.35.7"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c4-g3",imageId:"",k8sVersion:"1.35.3-nks.2"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c4m8",imageId:"107cc02d-02d8-44fd-84d6-6c316045b817",k8sVersion:"v1.35.5"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.LARGE8",imageId:"ubuntu22.04x86_64",k8sVersion:"1.34.1"}},sr=cn(()=>$.value==="new"||a.value.some(b=>Ti.includes(b.workflowStageName||""))||i.value.some(b=>{var K;return hi.includes(((K=b.paramKey)==null?void 0:K.trim().toUpperCase())||"")})),ar=cn(()=>a.value.some(b=>jn.includes(b.workflowStageName||""))),bt=cn(()=>a.value.some(b=>Os.includes((b.workflowStageName||"").toLowerCase()))),Rn=cn(()=>a.value.some(b=>fi.includes((b.workflowStageName||"").toLowerCase()))),lr=cn(()=>C.value.toLowerCase()==="azure"),di=cn(()=>te.value.length>0?te.value:!j.value&&lr.value&&m.value&&S.value&&(R.value||Ut())?[In]:[]),ur=cn(()=>di.value.length===1&&di.value[0].value===""?In.label:"Zone"),pi=cn({get:()=>{const b=je("TUMBLEBUG_SELECTOR_YN").trim().toUpperCase();return["Y","YES","TRUE","1"].includes(b)?!0:["N","NO","FALSE","0"].includes(b)?!1:ar.value},set:b=>{we("TUMBLEBUG_SELECTOR_YN",b?"Y":"N"),b?at():ia()}}),ao=cn(()=>sr.value),Ds=cn(()=>ao.value&&pi.value);Un(S,async(b,K)=>{w.value||(Fs(b,K),await wr(),await br(),await gi(),await _n(),await Ni(),await vi(),at())}),Un(m,async(b,K)=>{w.value||(b!==K&&(y.value=""),await _n(),await Ni(),at())}),Un(bt,async b=>{kn.value||pn.value===b||(pn.value=b,w.value||(y.value="",gr(),await br(),await _n(),at()))});const lo=async()=>{w.value=!0;try{const b=cr(je("SPEC_ID")||je("IMAGE_ID"));b.provider&&(C.value=b.provider),T.value=ht(),O.value=je("INFRA_ID")||je("K8S_CLUSTER_ID"),I.value=je("SSH_HOST")||je("DB_HOST"),S.value=je("REGION")||b.region,y.value=je("IMAGE_ID")||je("IMAGE"),m.value=je("SPEC_ID")||je("SPEC"),L.value=je("K8S_VERSION"),A.value=je("OBJECT_STORAGE_BUCKET"),R.value=je("CONNECTION_NAME"),B.value=je("ZONE"),uo(),kn.value||(pn.value=bt.value)}finally{await Rc(),w.value=!1}},cr=b=>{const K=(b||"").split("+");return K.length<3?{provider:"",region:""}:{provider:K[0],region:K[1]}},hr=b=>(b||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),Ut=()=>C.value&&S.value?`${C.value}-${S.value}`:"",Fs=(b,K)=>{const ne=C.value&&K?`${C.value}-${K}`:"";(!b||R.value===ne||R.value&&!R.value.includes(b))&&(R.value=""),Lr(),B.value="",L.value=""},Ps=()=>je("CSP_LIST").split(",").map(b=>b.trim()).filter(Boolean),Cn=()=>Ps().length>0,Ws=b=>{const K=b.trim().toUpperCase(),ne=["REGION","CONNECTION_NAME","ZONE","IMAGE_ID","SPEC_ID","K8S_VERSION"];if(Cn()&&ne.includes(K)){const oe=hr(C.value);return oe?`${oe}_${K}`:K}return K},xt=b=>(Array.isArray(b)?b:[b]).map(ne=>Ws(ne)).join(" / "),Bs=()=>Cn()?xt("IMAGE_ID"):xt(["IMAGE","IMAGE_ID"]),fr=()=>Cn()?xt("SPEC_ID"):xt(["SPEC","SPEC_ID"]),tn=b=>{const K=hr(C.value);return K?je(`${K}_${b}`):""},dr=()=>{if(!(pn.value||bt.value))return or[C.value.toLowerCase()]},pr=()=>pn.value||bt.value?ki[C.value.toLowerCase()]:dr(),gr=()=>{const b=pr();b&&(S.value=S.value||b.region,R.value=R.value||b.connectionName,B.value=B.value||b.zone,m.value=m.value||b.specId,y.value=y.value||b.imageId,L.value=L.value||b.k8sVersion||"")},uo=()=>{if(!Cn())return;const b=pr(),K=cr(tn("SPEC_ID")||tn("IMAGE_ID"));S.value=tn("REGION")||K.region||(b==null?void 0:b.region)||"",y.value=tn("IMAGE_ID")||(b==null?void 0:b.imageId)||"",m.value=tn("SPEC_ID")||(b==null?void 0:b.specId)||"",L.value=tn("K8S_VERSION")||(b==null?void 0:b.k8sVersion)||"",R.value=tn("CONNECTION_NAME")||(b==null?void 0:b.connectionName)||"",B.value=tn("ZONE")||(b==null?void 0:b.zone)||""},vr=async()=>{we("NAMESPACE",T.value),Xn(),I.value="",U.value=[],await Promise.all([gi(),Sr()]),await _n(),await vi(),O.value&&await Oi()};Un(()=>[W.projectInfo.ns_id,W.projectInfo.name],async()=>{if($.value!=="detail"||i.value.length===0)return;const b=n();if(i.value=o(i.value),!b||T.value===b)return;const K=T.value;if(T.value=b,!k.value){E=!!K;return}await vr()});const Hs=async()=>{S.value="",y.value="",m.value="",R.value="",B.value="",L.value="",uo(),gr(),Xn(),await yr(),at()},mr=()=>{at()},zs=async()=>{na(),I.value="",U.value=[],O.value&&await Oi()},Vs=()=>{var K;const b=U.value.find(ne=>ne.value===I.value);b&&(we("SSH_HOST",b.value),we("DB_HOST",b.value),(K=b.meta)!=null&&K.sshUser&&we("SSH_USER",b.meta.sshUser))},co=async()=>{Lr(),L.value="",await gi(),await _n(),await Ni(),await vi(),at()},Us=()=>{at()},Ks=()=>{at()},Gs=()=>{A.value=(A.value||"").trim(),at()},Ys=async()=>{kn.value=!0,y.value="",D.value=[],await _n(),at()},js=async()=>{await yr()},yr=async()=>{const b=w.value;w.value=!0;try{await Ii(),await Zs(),gr(),await Ri(),Qs(),await wr(),await br(),await Promise.all([gi(),Sr()]),await _n(),await Ni(),await vi(),O.value&&await Oi()}finally{await Rc(),w.value=b,at()}},Ii=async()=>{var K;const b=++ce;p.value=[];try{const{data:ne}=await ay();if(b!==ce)return;const oe=Kt(ne);p.value=oe.length>0?oe:d.map(fe=>({label:fe,value:fe}))}catch{if(b!==ce)return;p.value=d.map(oe=>({label:oe,value:oe}))}b===ce&&(p.value.some(ne=>ne.value===C.value)||(C.value=((K=p.value[0])==null?void 0:K.value)||""))},Zs=async()=>{const b=++pe;v.value=[];try{const{data:K}=await ly();if(b!==pe)return;v.value=Kt(K),T.value||(T.value=ht())}catch{if(b!==pe)return;v.value=[]}},Ri=async()=>{const b=++de;_.value=[];try{const{data:K}=await uy(C.value);if(b!==de)return;_.value=Kt(K)}catch{if(b!==de)return;_.value=[]}},Qs=()=>{var K;if(_.value.length===0||S.value&&An(S.value,_.value))return;const b=tn("REGION");if(b&&An(b,_.value)){S.value=b;return}S.value=((K=_.value[0])==null?void 0:K.value)||S.value},Xs=(b=!1)=>{if(G.value.length===0){R.value="";return}if(!b&&R.value&&An(R.value,G.value))return;const K=Ut(),ne=G.value.find(Ee=>Ee.value===K);if(b&&!ne){R.value=K;return}const oe=ne||G.value[0];R.value=(oe==null?void 0:oe.value)||"";const fe=Js(R.value);!S.value&&fe&&(S.value=fe)},Js=b=>{const K=`${C.value}-`;return b!=null&&b.startsWith(K)?b.slice(K.length):""},_n=async()=>{const b=++be;if(D.value=[],!m.value){y.value="";return}try{const K={providerName:C.value,regionName:S.value,connectionName:R.value||Ut(),matchedSpecId:m.value,isKubernetesImage:pn.value?"true":void 0},{data:ne}=await hl(mo(),"image",K);if(b!==be)return;D.value=Kt(ne,"image"),ea()}catch{if(b!==be)return;D.value=[]}},gi=async()=>{const b=++De;P.value=[];try{const K={providerName:C.value,regionName:S.value,connectionName:R.value||Ut()},{data:ne}=await hl(mo(),"spec",K);if(b!==De)return;P.value=Kt(ne,"spec"),Er()}catch{if(b!==De)return;P.value=[],Er()}},wr=async()=>{const b=++Ze;G.value=[];try{const K={providerName:C.value,regionName:S.value,filterVerified:"true"},{data:ne}=await Dc(K);if(b!==Ze)return;let oe=Kt(ne),fe=!1;if(oe.length===0&&S.value){const Ee=await Dc({providerName:C.value,filterVerified:"true"});if(b!==Ze)return;oe=Kt(Ee.data),fe=!0}G.value=oe,Xs(fe)}catch{if(b!==Ze)return;G.value=[]}},br=async()=>{const b=++Ve;if(Q.value=[],!(!bt.value||!C.value||!S.value))try{const{data:K}=await cy({providerName:C.value,regionName:S.value});if(b!==Ve)return;Q.value=Kt(K,"k8sVersion"),qs()}catch{if(b!==Ve)return;Q.value=[]}},qs=()=>{var ne,oe;if(!bt.value||Q.value.length===0||L.value&&An(L.value,Q.value))return;const b=Cn()?tn("K8S_VERSION"):je("K8S_VERSION");if(b&&An(b,Q.value)){L.value=b,at();return}const K=(ne=pr())==null?void 0:ne.k8sVersion;if(K&&An(K,Q.value)){L.value=K,at();return}L.value=((oe=Q.value[0])==null?void 0:oe.value)||L.value,at()},Ni=async()=>{const b=++ze;if(te.value=[],!m.value){j.value=!1;return}j.value=!0;try{const{data:K}=await hy({specId:m.value,providerName:C.value,regionName:S.value,connectionName:R.value||Ut()});if(b!==ze)return;te.value=Kt(K),B.value&&!te.value.some(ne=>ne.value===B.value)&&(B.value=""),j.value=!1}catch{if(b!==ze)return;te.value=[],j.value=!1}},vi=async()=>{const b=++wt;if(X.value=[],ee.value={},ae.value={},!Rn.value)return;const K=je("OBJECT_STORAGE_NAMESPACE")||T.value||ht(),ne=C.value;if(!(!K||!ne))try{const{data:oe}=await hl(K,"objectStorage",{providerName:ne});if(b!==wt)return;const fe=(oe==null?void 0:oe.data)??oe,Ee=Array.isArray(fe)?fe:[],Xe={},et={};X.value=Ee.map(tt=>{const Pt=String((tt==null?void 0:tt.id)||(tt==null?void 0:tt.name)||"").trim();if(!Pt)return null;Xe[Pt]=String((tt==null?void 0:tt.cspResourceName)||"").trim();const nn=String((tt==null?void 0:tt.region)||"").trim();return et[Pt]=nn,{label:Pt,value:Pt}}).filter(tt=>tt!==null),ee.value=Xe,ae.value=et}catch{if(b!==wt)return;X.value=[],ee.value={},ae.value={}}},Sr=async()=>{const b=++_t;if(H.value=[],!!T.value)try{const{data:K}=await fy(T.value,{option:"simple"});if(b!==_t)return;H.value=Kt(K)}catch{if(b!==_t)return;H.value=[]}},Oi=async()=>{const b=++dn;if(U.value=[],!(!T.value||!O.value))try{const{data:K}=await dy(T.value,O.value,{option:"accessinfo",accessInfoOption:"showSshKey"});if(b!==dn)return;U.value=ta(K)}catch{if(b!==dn)return;U.value=[]}},Kt=(b,K="default")=>{const ne=(b==null?void 0:b.data)??b,oe=Mr(ne),fe=new Set;return oe.map(Ee=>{const Xe=ho(Ee,K),et=Di(Ee,Xe,K),tt=fo(Ee,Xe,et,K);return{label:et,value:Xe,searchText:tt}}).filter(Ee=>!Ee.value||fe.has(Ee.value)?!1:(fe.add(Ee.value),!0)).sort(_r)};function Cr(b){return[...b].sort(_r)}function _r(b,K){const ne=(b.label||b.value||"").trim(),oe=(K.label||K.value||"").trim(),fe=ne.localeCompare(oe,void 0,{numeric:!0,sensitivity:"base"});return fe!==0?fe:(b.value||"").localeCompare(K.value||"",void 0,{numeric:!0,sensitivity:"base"})}const ho=(b,K)=>{if(K==="k8sVersion")return String(Gt([b==null?void 0:b.id,b==null?void 0:b.version,b==null?void 0:b.value,b==null?void 0:b.name,b]));if(K==="spec"){const ne=Gt([b==null?void 0:b.specId,b==null?void 0:b.id,b==null?void 0:b.cspSpecId,b==null?void 0:b.cspSpecName,b==null?void 0:b.CspSpecName,b==null?void 0:b.specName,b==null?void 0:b.Name,b==null?void 0:b.VMSpecName,b==null?void 0:b.name]);return String($r(b,ne))}return String(Gt(K==="image"?[b==null?void 0:b.imageId,b==null?void 0:b.id,b==null?void 0:b.cspImageId,b==null?void 0:b.name]:[],[b==null?void 0:b.id,b==null?void 0:b.specId,b==null?void 0:b.imageId,b==null?void 0:b.configName,b==null?void 0:b.connectionName,b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,b==null?void 0:b.nsId,b==null?void 0:b.name,b==null?void 0:b.infraId,b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,b==null?void 0:b.zoneId,b==null?void 0:b.zoneName,b==null?void 0:b.zone,b==null?void 0:b.assignedZone,b]))},Di=(b,K,ne)=>{if(ne==="k8sVersion")return Pi(K,Fi(K,[b==null?void 0:b.name,b==null?void 0:b.displayName,b==null?void 0:b.version,b==null?void 0:b.value]));if(ne==="image")return Pi(K,Fi(K,[b==null?void 0:b.displayName,b==null?void 0:b.imageName,b==null?void 0:b.cspImageName,b==null?void 0:b.guestOS,b==null?void 0:b.GuestOS,b==null?void 0:b.guestOs,b==null?void 0:b.osDistribution,b==null?void 0:b.OSDistribution,b==null?void 0:b.osPlatform,b==null?void 0:b.OSPlatform,b==null?void 0:b.description,b==null?void 0:b.Description,b==null?void 0:b.name]));if(ne==="spec"){const fe=Fi(K,[b==null?void 0:b.displayName,b==null?void 0:b.specName,b==null?void 0:b.cspSpecName,b==null?void 0:b.CspSpecName,b==null?void 0:b.Name,b==null?void 0:b.VMSpecName,b==null?void 0:b.description,b==null?void 0:b.Description,b==null?void 0:b.name])||Wi(b);return Pi(K,fe)}const oe=Gt([b==null?void 0:b.name,b==null?void 0:b.id,b==null?void 0:b.configName,b==null?void 0:b.connectionName,b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,b==null?void 0:b.nsId,b==null?void 0:b.infraId,b==null?void 0:b.specName,b==null?void 0:b.imageName,b==null?void 0:b.specId,b==null?void 0:b.imageId,b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,b==null?void 0:b.zoneId,b==null?void 0:b.zoneName,b==null?void 0:b.zone,b==null?void 0:b.assignedZone,K]);return String(oe)},fo=(b,K,ne,oe)=>{const fe=Gt([b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,C.value]),Ee=Gt([b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,S.value]),Xe=oe==="image"?[b==null?void 0:b.displayName,b==null?void 0:b.imageName,b==null?void 0:b.cspImageName,b==null?void 0:b.guestOS,b==null?void 0:b.GuestOS,b==null?void 0:b.guestOs,b==null?void 0:b.osDistribution,b==null?void 0:b.OSDistribution,b==null?void 0:b.osPlatform,b==null?void 0:b.OSPlatform,b==null?void 0:b.description,b==null?void 0:b.Description]:[],et=oe==="spec"?[b==null?void 0:b.displayName,b==null?void 0:b.specName,b==null?void 0:b.cspSpecName,b==null?void 0:b.CspSpecName,b==null?void 0:b.Name,b==null?void 0:b.VMSpecName,b==null?void 0:b.description,b==null?void 0:b.Description,Wi(b)]:[],tt=oe==="k8sVersion"?[b==null?void 0:b.name,b==null?void 0:b.displayName,b==null?void 0:b.version,b==null?void 0:b.value]:[],Pt=po([K,ne,b==null?void 0:b.id,b==null?void 0:b.name,b==null?void 0:b.imageId,b==null?void 0:b.specId,b==null?void 0:b.cspImageId,b==null?void 0:b.cspSpecId,b==null?void 0:b.configName,b==null?void 0:b.connectionName,b==null?void 0:b.infraId,b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,...Xe,...et,...tt]),nn=po(Pt.flatMap(Je=>[fe&&Ee?`${fe}+${Ee}+${Je}`:"",fe&&Ee?`${fe}-${Ee}-${Je}`:"",fe&&Ee?`${fe} ${Ee} ${Je}`:""]));return[...Pt,...nn].join(` + `};return(S,y)=>{const m=kl("b-overlay");return ke(),Re(Sn,null,[W.value?(ke(),Re("div",Sb,[y[0]||(y[0]=se("h3",{class:"card-title mb-3"},"History",-1)),ct(m,{show:M.value,id:"overlay-background",variant:"transparent",opacity:"1",blur:"1rem",rounded:"lg",style:{"z-index":"1000"}},null,8,["show"]),se("div",null,[ct(by,{columns:s.value,"table-data":g.value},null,8,["columns","table-data"])])])):fn("",!0),W.value?(ke(),Zm(bb,{key:1,"workflow-idx":c.workflowIdx,"build-name":r.value,"workflow-name":c.workflowName,"workflow-stages":n.value},null,8,["workflow-idx","build-name","workflow-name","workflow-stages"])):fn("",!0)],64)}}}),_b={class:"page-header"},Ab={class:"row align-items-center"},$b={class:"col"},Eb={class:"page-title"},Lb={class:"card card-flush w-100",ref:"workflowForm"},Mb={key:0,class:"card-body"},xb={class:"card-title"},Tb={class:"mb-3"},kb={class:"grid gap-0 column-gap-3"},Ib={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},Rb={class:"mb-3"},Nb={class:"grid gap-0 column-gap-3"},Ob=["value"],Db={key:0,class:"mb-3"},Fb={class:"d-flex align-items-center justify-content-between mb-2"},Pb={class:"form-check form-switch mb-0"},Wb={class:"form-check-label"},Bb={key:1,class:"mb-3"},Hb={class:"grid gap-0 column-gap-3 mb-2"},zb={class:"tumblebug-param-field g-col-4"},Vb={class:"tumblebug-param-label"},Ub={class:"tumblebug-param-field g-col-4"},Kb={class:"tumblebug-param-label"},Gb={class:"tumblebug-param-field g-col-4"},Yb={class:"tumblebug-param-label"},jb={class:"grid gap-0 column-gap-3 mb-2"},Zb={class:"tumblebug-param-field g-col-6"},Qb={class:"tumblebug-param-label"},Xb={class:"tumblebug-param-field g-col-6"},Jb={class:"tumblebug-param-label"},qb={class:"tumblebug-param-label-actions"},e0={class:"form-check form-switch tumblebug-k8s-toggle",title:"Load Kubernetes node images"},t0={class:"grid gap-0 column-gap-3 mb-2"},n0={class:"tumblebug-param-field g-col-5"},i0={class:"tumblebug-param-label"},r0={class:"tumblebug-param-field g-col-5"},o0={class:"tumblebug-param-label"},s0={class:"grid gap-0 column-gap-3 mb-2"},a0={class:"tumblebug-param-label"},l0={class:"tumblebug-param-label"},u0={key:0,class:"tumblebug-param-field g-col-4"},c0={class:"tumblebug-param-label"},h0={key:0,class:"grid gap-0 column-gap-3 mt-2"},f0={class:"tumblebug-param-field g-col-12"},d0={class:"tumblebug-param-label"},p0={key:0,class:"text-secondary"},g0={class:"row align-items-center"},v0={class:"col-auto ms-auto"},m0={class:"btn-list"},Xc="CREATE TABLE IF NOT EXISTS sample_data (id INT PRIMARY KEY, name VARCHAR(100));",y0="INSERT INTO sample_data (id, name) VALUES (1, 'sample row');",w0=ci({__name:"WorkflowForm",setup(N){const M=Il(),c=Xm(),g=ty(),W=Qm(),k=Le(!1);let E=!1;ks(async()=>{u(),await l(),await Ir(),la(),await lo(),Xn(),await yr(),Xn(),k.value=!0,E&&(E=!1,await vr())});const $=Le("new"),u=()=>{$.value=c.params.workflowIdx===void 0?"new":"detail"};let h=Jm({});const i=Le([]),a=Le([]),s={workflowIdx:0,workflowName:"",workflowPurpose:"",ossIdx:0,script:""},r=[{paramKey:"",paramValue:"",eventListenerYn:"N"}],n=()=>(W.projectInfo.ns_id||W.projectInfo.name||"").trim(),o=b=>{var fe,Ee;const K=n(),ne=((Ee=(fe=b.find(Xe=>{var et;return((et=Xe.paramKey)==null?void 0:et.trim().toUpperCase())==="NAMESPACE"}))==null?void 0:fe.paramValue)==null?void 0:Ee.trim())||"",oe=K||ne;return oe?b.map(Xe=>{var Pt;const et=(Pt=Xe.paramKey)==null?void 0:Pt.trim().toUpperCase();return{...Xe,paramValue:et==="NAMESPACE"||et==="OBJECT_STORAGE_NAMESPACE"?oe:Xe.paramValue}}):[...b]},l=async()=>{if($.value==="new")h={...s},i.value=[...r],a.value=[],Be.value=!1,mi.value="";else{const{data:b}=await sy(c.params.workflowIdx,"N");h={...b.workflowInfo,workflowPurpose:kr(b.workflowInfo.workflowPurpose)},i.value=o(b.workflowParams),a.value=[...b.workflowStageMappings],h={...h,workflowIdx:c.params.workflowIdx},Be.value=!0,mi.value=h.workflowName}},d=["alibaba","aws","azure","gcp","ibm","kt","ncp","nhn","tencent"],p=Le(Cr(d.map(b=>({label:b,value:b})))),C=Le("aws"),S=Le(""),y=Le(""),m=Le(""),T=Le(""),O=Le(""),I=Le(""),R=Le(""),B=Le(""),L=Le(""),A=Le(""),w=Le(!1),v=Le([]),_=Le([]),D=Le([]),P=Le([]),H=Le([]),U=Le([]),G=Le([]),te=Le([]),j=Le(!1),Q=Le([]),X=Le([]),ee=Le({}),ae=Le({});let ce=0,pe=0,de=0,be=0,De=0,Ze=0,ze=0,Ve=0,wt=0,_t=0,dn=0;const Ns=["infra-create","k8s-cluster-create","k8s-kubeconfig-get","mariadb-install","infra-ssh-connect-check","ssh-command-exec"],hi=["TUMBLEBUG_SELECTOR_YN","NAMESPACE","PROVIDER","CSP","REGION","IMAGE","IMAGE_ID","SPEC","SPEC_ID","K8S_VERSION","INFRA_ID","SSH_HOST","DB_HOST","K8S_CLUSTER_ID","CONNECTION_NAME","ZONE"],Nt=["PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID","K8S_VERSION"],jn=["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"],Ti=[...jn,...Ns],Os=["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"],fi=["object-storage-ensure","object-storage-delete","jupyter-object-storage-analysis-install","jupyter-object-storage-analysis-remove"],pn=Le(!1),kn=Le(!1),In={label:"No zone required",value:"",searchText:"no zone optional blank"},or={alibaba:{region:"ap-northeast-2",connectionName:"alibaba-ap-northeast-2",zone:"ap-northeast-2a",specId:"alibaba+ap-northeast-2+ecs.g9i.large",imageId:"ubuntu_24_04_x64_20G_alibase_20260810.vhd"},aws:{region:"ap-northeast-2",connectionName:"aws-ap-northeast-2",zone:"ap-northeast-2a",specId:"aws+ap-northeast-2+m8i.large",imageId:"ami-01ed18897a4aadead"},azure:{region:"koreacentral",connectionName:"azure-koreacentral",zone:"1",specId:"azure+koreacentral+Standard_D2s_v6",imageId:"Canonical:ubuntu-24_04-lts:minimal:24.04.202608100"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+n2-standard-2",imageId:"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2404-noble-amd64-v20260817"},ibm:{region:"jp-tok",connectionName:"ibm-jp-tok",zone:"jp-tok-1",specId:"ibm+jp-tok+bx2-2x8",imageId:"r022-9130f04e-631a-4e91-ae4c-b85d54621c24"},kt:{region:"kr1",connectionName:"kt-kr1",zone:"DX-M1",specId:"kt+kr1+2x8.itl",imageId:"e55c5985-b420-4a19-8c92-aa3461cda86e"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+s2-g3",imageId:"104630229"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+r2.c2m8",imageId:"5c38715f-0375-4167-af4e-56f75ba8b252"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM8",imageId:"img-mmytdhbn"}},ki={alibaba:{region:"ap-northeast-2",connectionName:"alibaba-ap-northeast-2",zone:"ap-northeast-2a",specId:"alibaba+ap-northeast-2+ecs.c9i.xlarge",imageId:"Ubuntu",k8sVersion:"1.35.7-aliyun.1"},aws:{region:"ap-northeast-2",connectionName:"aws-ap-northeast-2",zone:"ap-northeast-2a",specId:"aws+ap-northeast-2+c8i.xlarge",imageId:"AL2023_x86_64_STANDARD",k8sVersion:"1.35"},azure:{region:"koreacentral",connectionName:"azure-koreacentral",zone:"1",specId:"azure+koreacentral+Standard_D4ls_v6",imageId:"",k8sVersion:"1.35.8"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+c3-highcpu-4",imageId:"UBUNTU_CONTAINERD",k8sVersion:"1.35.6-gke.1250001"},ibm:{region:"jp-tok",connectionName:"ibm-jp-tok",zone:"jp-tok-1",specId:"ibm+jp-tok+cx2-4x8",imageId:"",k8sVersion:"1.35.9"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c4-g3",imageId:"",k8sVersion:"1.35.3-nks.2"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c4m8",imageId:"107cc02d-02d8-44fd-84d6-6c316045b817",k8sVersion:"v1.35.5"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.LARGE8",imageId:"ubuntu22.04x86_64",k8sVersion:"1.34.1"}},sr=cn(()=>$.value==="new"||a.value.some(b=>Ti.includes(b.workflowStageName||""))||i.value.some(b=>{var K;return hi.includes(((K=b.paramKey)==null?void 0:K.trim().toUpperCase())||"")})),ar=cn(()=>a.value.some(b=>jn.includes(b.workflowStageName||""))),bt=cn(()=>a.value.some(b=>Os.includes((b.workflowStageName||"").toLowerCase()))),Rn=cn(()=>a.value.some(b=>fi.includes((b.workflowStageName||"").toLowerCase()))),lr=cn(()=>C.value.toLowerCase()==="azure"),di=cn(()=>te.value.length>0?te.value:!j.value&&lr.value&&m.value&&S.value&&(R.value||Ut())?[In]:[]),ur=cn(()=>di.value.length===1&&di.value[0].value===""?In.label:"Zone"),pi=cn({get:()=>{const b=je("TUMBLEBUG_SELECTOR_YN").trim().toUpperCase();return["Y","YES","TRUE","1"].includes(b)?!0:["N","NO","FALSE","0"].includes(b)?!1:ar.value},set:b=>{we("TUMBLEBUG_SELECTOR_YN",b?"Y":"N"),b?at():ia()}}),ao=cn(()=>sr.value),Ds=cn(()=>ao.value&&pi.value);Un(S,async(b,K)=>{w.value||(Fs(b,K),await wr(),await br(),await gi(),await _n(),await Ni(),await vi(),at())}),Un(m,async(b,K)=>{w.value||(b!==K&&(y.value=""),await _n(),await Ni(),at())}),Un(bt,async b=>{kn.value||pn.value===b||(pn.value=b,w.value||(y.value="",gr(),await br(),await _n(),at()))});const lo=async()=>{w.value=!0;try{const b=cr(je("SPEC_ID")||je("IMAGE_ID"));b.provider&&(C.value=b.provider),T.value=ht(),O.value=je("INFRA_ID")||je("K8S_CLUSTER_ID"),I.value=je("SSH_HOST")||je("DB_HOST"),S.value=je("REGION")||b.region,y.value=je("IMAGE_ID")||je("IMAGE"),m.value=je("SPEC_ID")||je("SPEC"),L.value=je("K8S_VERSION"),A.value=je("OBJECT_STORAGE_BUCKET"),R.value=je("CONNECTION_NAME"),B.value=je("ZONE"),uo(),kn.value||(pn.value=bt.value)}finally{await Rc(),w.value=!1}},cr=b=>{const K=(b||"").split("+");return K.length<3?{provider:"",region:""}:{provider:K[0],region:K[1]}},hr=b=>(b||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),Ut=()=>C.value&&S.value?`${C.value}-${S.value}`:"",Fs=(b,K)=>{const ne=C.value&&K?`${C.value}-${K}`:"";(!b||R.value===ne||R.value&&!R.value.includes(b))&&(R.value=""),Lr(),B.value="",L.value=""},Ps=()=>je("CSP_LIST").split(",").map(b=>b.trim()).filter(Boolean),Cn=()=>Ps().length>0,Ws=b=>{const K=b.trim().toUpperCase(),ne=["REGION","CONNECTION_NAME","ZONE","IMAGE_ID","SPEC_ID","K8S_VERSION"];if(Cn()&&ne.includes(K)){const oe=hr(C.value);return oe?`${oe}_${K}`:K}return K},xt=b=>(Array.isArray(b)?b:[b]).map(ne=>Ws(ne)).join(" / "),Bs=()=>Cn()?xt("IMAGE_ID"):xt(["IMAGE","IMAGE_ID"]),fr=()=>Cn()?xt("SPEC_ID"):xt(["SPEC","SPEC_ID"]),tn=b=>{const K=hr(C.value);return K?je(`${K}_${b}`):""},dr=()=>{if(!(pn.value||bt.value))return or[C.value.toLowerCase()]},pr=()=>pn.value||bt.value?ki[C.value.toLowerCase()]:dr(),gr=()=>{const b=pr();b&&(S.value=S.value||b.region,R.value=R.value||b.connectionName,B.value=B.value||b.zone,m.value=m.value||b.specId,y.value=y.value||b.imageId,L.value=L.value||b.k8sVersion||"")},uo=()=>{if(!Cn())return;const b=pr(),K=cr(tn("SPEC_ID")||tn("IMAGE_ID"));S.value=tn("REGION")||K.region||(b==null?void 0:b.region)||"",y.value=tn("IMAGE_ID")||(b==null?void 0:b.imageId)||"",m.value=tn("SPEC_ID")||(b==null?void 0:b.specId)||"",L.value=tn("K8S_VERSION")||(b==null?void 0:b.k8sVersion)||"",R.value=tn("CONNECTION_NAME")||(b==null?void 0:b.connectionName)||"",B.value=tn("ZONE")||(b==null?void 0:b.zone)||""},vr=async()=>{we("NAMESPACE",T.value),Xn(),I.value="",U.value=[],await Promise.all([gi(),Sr()]),await _n(),await vi(),O.value&&await Oi()};Un(()=>[W.projectInfo.ns_id,W.projectInfo.name],async()=>{if($.value!=="detail"||i.value.length===0)return;const b=n();if(i.value=o(i.value),!b||T.value===b)return;const K=T.value;if(T.value=b,!k.value){E=!!K;return}await vr()});const Hs=async()=>{S.value="",y.value="",m.value="",R.value="",B.value="",L.value="",uo(),gr(),Xn(),await yr(),at()},mr=()=>{at()},zs=async()=>{na(),I.value="",U.value=[],O.value&&await Oi()},Vs=()=>{var K;const b=U.value.find(ne=>ne.value===I.value);b&&(we("SSH_HOST",b.value),we("DB_HOST",b.value),(K=b.meta)!=null&&K.sshUser&&we("SSH_USER",b.meta.sshUser))},co=async()=>{Lr(),L.value="",await gi(),await _n(),await Ni(),await vi(),at()},Us=()=>{at()},Ks=()=>{at()},Gs=()=>{A.value=(A.value||"").trim(),at()},Ys=async()=>{kn.value=!0,y.value="",D.value=[],await _n(),at()},js=async()=>{await yr()},yr=async()=>{const b=w.value;w.value=!0;try{await Ii(),await Zs(),gr(),await Ri(),Qs(),await wr(),await br(),await Promise.all([gi(),Sr()]),await _n(),await Ni(),await vi(),O.value&&await Oi()}finally{await Rc(),w.value=b,at()}},Ii=async()=>{var K;const b=++ce;p.value=[];try{const{data:ne}=await ay();if(b!==ce)return;const oe=Kt(ne);p.value=oe.length>0?oe:d.map(fe=>({label:fe,value:fe}))}catch{if(b!==ce)return;p.value=d.map(oe=>({label:oe,value:oe}))}b===ce&&(p.value.some(ne=>ne.value===C.value)||(C.value=((K=p.value[0])==null?void 0:K.value)||""))},Zs=async()=>{const b=++pe;v.value=[];try{const{data:K}=await ly();if(b!==pe)return;v.value=Kt(K),T.value||(T.value=ht())}catch{if(b!==pe)return;v.value=[]}},Ri=async()=>{const b=++de;_.value=[];try{const{data:K}=await uy(C.value);if(b!==de)return;_.value=Kt(K)}catch{if(b!==de)return;_.value=[]}},Qs=()=>{var K;if(_.value.length===0||S.value&&An(S.value,_.value))return;const b=tn("REGION");if(b&&An(b,_.value)){S.value=b;return}S.value=((K=_.value[0])==null?void 0:K.value)||S.value},Xs=(b=!1)=>{if(G.value.length===0){R.value="";return}if(!b&&R.value&&An(R.value,G.value))return;const K=Ut(),ne=G.value.find(Ee=>Ee.value===K);if(b&&!ne){R.value=K;return}const oe=ne||G.value[0];R.value=(oe==null?void 0:oe.value)||"";const fe=Js(R.value);!S.value&&fe&&(S.value=fe)},Js=b=>{const K=`${C.value}-`;return b!=null&&b.startsWith(K)?b.slice(K.length):""},_n=async()=>{const b=++be;if(D.value=[],!m.value){y.value="";return}try{const K={providerName:C.value,regionName:S.value,connectionName:R.value||Ut(),matchedSpecId:m.value,isKubernetesImage:pn.value?"true":void 0},{data:ne}=await hl(mo(),"image",K);if(b!==be)return;D.value=Kt(ne,"image"),ea()}catch{if(b!==be)return;D.value=[]}},gi=async()=>{const b=++De;P.value=[];try{const K={providerName:C.value,regionName:S.value,connectionName:R.value||Ut()},{data:ne}=await hl(mo(),"spec",K);if(b!==De)return;P.value=Kt(ne,"spec"),Er()}catch{if(b!==De)return;P.value=[],Er()}},wr=async()=>{const b=++Ze;G.value=[];try{const K={providerName:C.value,regionName:S.value,filterVerified:"true"},{data:ne}=await Dc(K);if(b!==Ze)return;let oe=Kt(ne),fe=!1;if(oe.length===0&&S.value){const Ee=await Dc({providerName:C.value,filterVerified:"true"});if(b!==Ze)return;oe=Kt(Ee.data),fe=!0}G.value=oe,Xs(fe)}catch{if(b!==Ze)return;G.value=[]}},br=async()=>{const b=++Ve;if(Q.value=[],!(!bt.value||!C.value||!S.value))try{const{data:K}=await cy({providerName:C.value,regionName:S.value});if(b!==Ve)return;Q.value=Kt(K,"k8sVersion"),qs()}catch{if(b!==Ve)return;Q.value=[]}},qs=()=>{var ne,oe;if(!bt.value||Q.value.length===0||L.value&&An(L.value,Q.value))return;const b=Cn()?tn("K8S_VERSION"):je("K8S_VERSION");if(b&&An(b,Q.value)){L.value=b,at();return}const K=(ne=pr())==null?void 0:ne.k8sVersion;if(K&&An(K,Q.value)){L.value=K,at();return}L.value=((oe=Q.value[0])==null?void 0:oe.value)||L.value,at()},Ni=async()=>{const b=++ze;if(te.value=[],!m.value){j.value=!1;return}j.value=!0;try{const{data:K}=await hy({specId:m.value,providerName:C.value,regionName:S.value,connectionName:R.value||Ut()});if(b!==ze)return;te.value=Kt(K),B.value&&!te.value.some(ne=>ne.value===B.value)&&(B.value=""),j.value=!1}catch{if(b!==ze)return;te.value=[],j.value=!1}},vi=async()=>{const b=++wt;if(X.value=[],ee.value={},ae.value={},!Rn.value)return;const K=je("OBJECT_STORAGE_NAMESPACE")||T.value||ht(),ne=C.value;if(!(!K||!ne))try{const{data:oe}=await hl(K,"objectStorage",{providerName:ne});if(b!==wt)return;const fe=(oe==null?void 0:oe.data)??oe,Ee=Array.isArray(fe)?fe:[],Xe={},et={};X.value=Ee.map(tt=>{const Pt=String((tt==null?void 0:tt.id)||(tt==null?void 0:tt.name)||"").trim();if(!Pt)return null;Xe[Pt]=String((tt==null?void 0:tt.cspResourceName)||"").trim();const nn=String((tt==null?void 0:tt.region)||"").trim();return et[Pt]=nn,{label:Pt,value:Pt}}).filter(tt=>tt!==null),ee.value=Xe,ae.value=et}catch{if(b!==wt)return;X.value=[],ee.value={},ae.value={}}},Sr=async()=>{const b=++_t;if(H.value=[],!!T.value)try{const{data:K}=await fy(T.value,{option:"simple"});if(b!==_t)return;H.value=Kt(K)}catch{if(b!==_t)return;H.value=[]}},Oi=async()=>{const b=++dn;if(U.value=[],!(!T.value||!O.value))try{const{data:K}=await dy(T.value,O.value,{option:"accessinfo",accessInfoOption:"showSshKey"});if(b!==dn)return;U.value=ta(K)}catch{if(b!==dn)return;U.value=[]}},Kt=(b,K="default")=>{const ne=(b==null?void 0:b.data)??b,oe=Mr(ne),fe=new Set;return oe.map(Ee=>{const Xe=ho(Ee,K),et=Di(Ee,Xe,K),tt=fo(Ee,Xe,et,K);return{label:et,value:Xe,searchText:tt}}).filter(Ee=>!Ee.value||fe.has(Ee.value)?!1:(fe.add(Ee.value),!0)).sort(_r)};function Cr(b){return[...b].sort(_r)}function _r(b,K){const ne=(b.label||b.value||"").trim(),oe=(K.label||K.value||"").trim(),fe=ne.localeCompare(oe,void 0,{numeric:!0,sensitivity:"base"});return fe!==0?fe:(b.value||"").localeCompare(K.value||"",void 0,{numeric:!0,sensitivity:"base"})}const ho=(b,K)=>{if(K==="k8sVersion")return String(Gt([b==null?void 0:b.id,b==null?void 0:b.version,b==null?void 0:b.value,b==null?void 0:b.name,b]));if(K==="spec"){const ne=Gt([b==null?void 0:b.specId,b==null?void 0:b.id,b==null?void 0:b.cspSpecId,b==null?void 0:b.cspSpecName,b==null?void 0:b.CspSpecName,b==null?void 0:b.specName,b==null?void 0:b.Name,b==null?void 0:b.VMSpecName,b==null?void 0:b.name]);return String($r(b,ne))}return String(Gt(K==="image"?[b==null?void 0:b.imageId,b==null?void 0:b.id,b==null?void 0:b.cspImageId,b==null?void 0:b.name]:[],[b==null?void 0:b.id,b==null?void 0:b.specId,b==null?void 0:b.imageId,b==null?void 0:b.configName,b==null?void 0:b.connectionName,b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,b==null?void 0:b.nsId,b==null?void 0:b.name,b==null?void 0:b.infraId,b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,b==null?void 0:b.zoneId,b==null?void 0:b.zoneName,b==null?void 0:b.zone,b==null?void 0:b.assignedZone,b]))},Di=(b,K,ne)=>{if(ne==="k8sVersion")return Pi(K,Fi(K,[b==null?void 0:b.name,b==null?void 0:b.displayName,b==null?void 0:b.version,b==null?void 0:b.value]));if(ne==="image")return Pi(K,Fi(K,[b==null?void 0:b.displayName,b==null?void 0:b.imageName,b==null?void 0:b.cspImageName,b==null?void 0:b.guestOS,b==null?void 0:b.GuestOS,b==null?void 0:b.guestOs,b==null?void 0:b.osDistribution,b==null?void 0:b.OSDistribution,b==null?void 0:b.osPlatform,b==null?void 0:b.OSPlatform,b==null?void 0:b.description,b==null?void 0:b.Description,b==null?void 0:b.name]));if(ne==="spec"){const fe=Fi(K,[b==null?void 0:b.displayName,b==null?void 0:b.specName,b==null?void 0:b.cspSpecName,b==null?void 0:b.CspSpecName,b==null?void 0:b.Name,b==null?void 0:b.VMSpecName,b==null?void 0:b.description,b==null?void 0:b.Description,b==null?void 0:b.name])||Wi(b);return Pi(K,fe)}const oe=Gt([b==null?void 0:b.name,b==null?void 0:b.id,b==null?void 0:b.configName,b==null?void 0:b.connectionName,b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,b==null?void 0:b.nsId,b==null?void 0:b.infraId,b==null?void 0:b.specName,b==null?void 0:b.imageName,b==null?void 0:b.specId,b==null?void 0:b.imageId,b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,b==null?void 0:b.zoneId,b==null?void 0:b.zoneName,b==null?void 0:b.zone,b==null?void 0:b.assignedZone,K]);return String(oe)},fo=(b,K,ne,oe)=>{const fe=Gt([b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,C.value]),Ee=Gt([b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,S.value]),Xe=oe==="image"?[b==null?void 0:b.displayName,b==null?void 0:b.imageName,b==null?void 0:b.cspImageName,b==null?void 0:b.guestOS,b==null?void 0:b.GuestOS,b==null?void 0:b.guestOs,b==null?void 0:b.osDistribution,b==null?void 0:b.OSDistribution,b==null?void 0:b.osPlatform,b==null?void 0:b.OSPlatform,b==null?void 0:b.description,b==null?void 0:b.Description]:[],et=oe==="spec"?[b==null?void 0:b.displayName,b==null?void 0:b.specName,b==null?void 0:b.cspSpecName,b==null?void 0:b.CspSpecName,b==null?void 0:b.Name,b==null?void 0:b.VMSpecName,b==null?void 0:b.description,b==null?void 0:b.Description,Wi(b)]:[],tt=oe==="k8sVersion"?[b==null?void 0:b.name,b==null?void 0:b.displayName,b==null?void 0:b.version,b==null?void 0:b.value]:[],Pt=po([K,ne,b==null?void 0:b.id,b==null?void 0:b.name,b==null?void 0:b.imageId,b==null?void 0:b.specId,b==null?void 0:b.cspImageId,b==null?void 0:b.cspSpecId,b==null?void 0:b.configName,b==null?void 0:b.connectionName,b==null?void 0:b.infraId,b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.assignedRegion,...Xe,...et,...tt]),nn=po(Pt.flatMap(Je=>[fe&&Ee?`${fe}+${Ee}+${Je}`:"",fe&&Ee?`${fe}-${Ee}-${Je}`:"",fe&&Ee?`${fe} ${Ee} ${Je}`:""]));return[...Pt,...nn].join(` `)},po=b=>{const K=new Set;return b.map(ne=>ne==null?"":String(ne).trim()).filter(ne=>!ne||K.has(ne)?!1:(K.add(ne),!0))},Gt=(...b)=>{for(const K of b)for(const ne of K){const oe=ne==null?"":String(ne).trim();if(oe)return oe}return""},Fi=(b,K)=>{const ne=Ot(b);for(const oe of K){const fe=Ar(oe==null?"":String(oe).trim(),b);if(fe&&Ot(fe)!==ne)return fe}return""},Ar=(b,K)=>!b||!K?b:b.replace(new RegExp(`\\s*\\(${go(K)}\\)\\s*$`),"").replace(new RegExp(`^${go(K)}\\s*/\\s*`),"").trim(),go=b=>b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Pi=(b,K)=>K?`${b} / ${K}`:b,Wi=b=>{var fe;const K=Gt([b==null?void 0:b.vCpu,(fe=b==null?void 0:b.VCpu)==null?void 0:fe.Count,b==null?void 0:b.VCpu,b==null?void 0:b.num_vCPU]),ne=Gt([b==null?void 0:b.memoryGiB,b==null?void 0:b.mem_GiB,Zn(b==null?void 0:b.MemSizeMib)]),oe=[];return K&&oe.push(`${K} vCPU`),ne&&oe.push(`${ne} GiB`),oe.join(" / ")},$r=(b,K)=>{if(!K)return"";if(K.includes("+"))return K;const ne=Gt([b==null?void 0:b.providerName,b==null?void 0:b.provider,b==null?void 0:b.csp,b==null?void 0:b.cspName,C.value]),oe=Gt([b==null?void 0:b.regionName,b==null?void 0:b.RegionName,b==null?void 0:b.region,b==null?void 0:b.Region,b==null?void 0:b.assignedRegion,S.value]);return ne&&oe?`${ne}+${oe}+${K}`:K},Zn=b=>{const K=b==null?"":String(b).trim();if(!K)return"";const ne=Number(K);if(Number.isNaN(ne))return"";const oe=ne/1024;return Number.isInteger(oe)?String(oe):oe.toFixed(2)},Er=()=>{!m.value||!vo(m.value)||(m.value="",at())},Lr=()=>{y.value="",m.value=""},ea=()=>{!y.value||D.value.length===0||An(y.value,D.value)||(y.value="",at())},An=(b,K)=>{const ne=Ot(b);return K.some(oe=>Ot(oe.value)===ne||Ot(oe.label)===ne||Ot(oe.searchText).split(` `).some(fe=>fe.trim()===ne))},vo=b=>{const K=Ot(b);if(!K)return!1;const ne=Ot(Ut()),oe=Ot(R.value),fe=Ot(S.value),Ee=Ot(C.value);return K===ne||K===oe||K===fe||K===Ee},Ot=b=>(b||"").trim().toLowerCase(),Mr=b=>{if(Array.isArray(b))return b;if(!b||typeof b!="object")return[];const K=["ns","namespace","namespaces","namespaceList","provider","providers","providerList","connectionconfig","connConfig","connConfigs","connectionConfig","connectionConfigs","infra","infras","infraList","regions","region","regionList","availableZones","allVerifiedZones","zones","zoneList","availableK8sVersion","availableK8sVersions","k8sVersion","k8sVersions","versions","versionList","images","image","imageList","specs","spec","specList","idList","output","resources","resource","resourceList","items","list","result"];for(const ne of K)if(Array.isArray(b[ne]))return b[ne];for(const ne of Object.values(b)){const oe=Mr(ne);if(oe.length>0)return oe}return[]},ta=b=>{const K=(b==null?void 0:b.data)??b,ne=[];xr(K,ne);const oe=new Set;return ne.map(fe=>{const Ee=String((fe==null?void 0:fe.publicIP)??(fe==null?void 0:fe.publicIp)??(fe==null?void 0:fe.privateIP)??(fe==null?void 0:fe.privateIp)??(fe==null?void 0:fe.host)??""),Xe=String((fe==null?void 0:fe.nodeId)??(fe==null?void 0:fe.id)??(fe==null?void 0:fe.name)??""),et=String((fe==null?void 0:fe.nodeUserName)??(fe==null?void 0:fe.userName)??(fe==null?void 0:fe.sshUser)??"");return{label:`${Xe?`${Xe} / `:""}${Ee}`,value:Ee,meta:{sshUser:et,nodeId:Xe}}}).filter(fe=>!fe.value||oe.has(fe.value)?!1:(oe.add(fe.value),!0)).sort(_r)},xr=(b,K)=>{if(Array.isArray(b)){b.forEach(oe=>xr(oe,K));return}if(!b||typeof b!="object")return;(b.publicIP||b.publicIp||b.privateIP||b.privateIp||b.host)&&K.push(b),Object.values(b).forEach(oe=>xr(oe,K))},je=b=>{var K;return((K=i.value.find(ne=>{var oe;return((oe=ne.paramKey)==null?void 0:oe.toUpperCase())===b.toUpperCase()}))==null?void 0:K.paramValue)||""},Qn=b=>i.value.some(K=>{var ne;return((ne=K.paramKey)==null?void 0:ne.trim().toUpperCase())===b.toUpperCase()}),na=()=>{we("INFRA_ID",O.value),(bt.value||Qn("K8S_CLUSTER_ID"))&&we("K8S_CLUSTER_ID",O.value)},ht=()=>T.value||je("NAMESPACE")||W.projectInfo.ns_id||"",mo=()=>T.value||ht()||"system",Xn=()=>{const b=T.value||ht();if(b&&Qn("OBJECT_STORAGE_NAMESPACE")&&we("OBJECT_STORAGE_NAMESPACE",b),!Rn.value)return;C.value&&Qn("OBJECT_STORAGE_PROVIDER")&&we("OBJECT_STORAGE_PROVIDER",C.value);const K=ae.value[A.value]||S.value;K&&Qn("OBJECT_STORAGE_REGION")&&we("OBJECT_STORAGE_REGION",K)},at=()=>{if(!pi.value)return;if(bt.value){const K=Cn()?"":C.value,ne=je("CSP")||je("PROVIDER");we("ROOT_DISK_SIZE",py(K,je("ROOT_DISK_SIZE"),!!K&&ne.trim().toLowerCase()!==K.trim().toLowerCase()))}const b=T.value||ht();if(b&&we("NAMESPACE",b),we("PROVIDER",C.value),we("CSP",C.value),Cn()){const K=hr(C.value);K&&(we(`${K}_REGION`,S.value),we(`${K}_CONNECTION_NAME`,R.value||Ut()),we(`${K}_ZONE`,B.value),we(`${K}_IMAGE_ID`,y.value),we(`${K}_SPEC_ID`,m.value),bt.value&&we(`${K}_K8S_VERSION`,L.value));return}we("REGION",S.value),we("CONNECTION_NAME",R.value||Ut()),we("ZONE",B.value),we("IMAGE",y.value),we("IMAGE_ID",y.value),we("SPEC",m.value),we("SPEC_ID",m.value),bt.value&&we("K8S_VERSION",L.value),Xn(),Rn.value&&A.value&&Qn("OBJECT_STORAGE_BUCKET")&&we("OBJECT_STORAGE_BUCKET",A.value)},ia=()=>{i.value=i.value.filter(b=>{var ne;const K=((ne=b.paramKey)==null?void 0:ne.trim().toUpperCase())||"";return Nt.includes(K)?!1:!Nt.some(oe=>K.endsWith(`_${oe}`))}),y.value="",m.value="",S.value="",R.value="",B.value="",L.value=""},Jn=(b,K)=>{var ne;return K?((ne=b.find(oe=>oe.value===K))==null?void 0:ne.label)||K:""},yo=()=>{var b;return((b=C.value)==null?void 0:b.trim().toLowerCase())==="alibaba"?"cloud_essd":"default"},ra=()=>{var b,K;return((K=ki[(b=C.value)==null?void 0:b.trim().toLowerCase()])==null?void 0:K.k8sVersion)||"1.33"},wo=b=>{const K=typeof b=="string"?b:b==null?void 0:b.workflowStageName;if(!K)return;const ne=h.workflowName||"workflow",oe=`${ne}-infra`,fe=`${ne}-cluster`,Ee=`${ne}-bucket`,Xe=typeof b=="string"?[]:(b==null?void 0:b.defaultParams)||[],et={"infra-create":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:oe,eventListenerYn:"N"},{paramKey:"REGION",paramValue:S.value,eventListenerYn:"N"},{paramKey:"CONNECTION_NAME",paramValue:Ut(),eventListenerYn:"N"},{paramKey:"ZONE",paramValue:"",eventListenerYn:"N"},{paramKey:"IMAGE",paramValue:y.value,eventListenerYn:"N"},{paramKey:"IMAGE_ID",paramValue:y.value,eventListenerYn:"N"},{paramKey:"SPEC",paramValue:m.value,eventListenerYn:"N"},{paramKey:"SPEC_ID",paramValue:m.value,eventListenerYn:"N"},{paramKey:"SSH_USER",paramValue:"cb-user",eventListenerYn:"N"},{paramKey:"INFRA_ACCESS_INFO_MAX_ATTEMPTS",paramValue:"30",eventListenerYn:"N"},{paramKey:"INFRA_ACCESS_INFO_INTERVAL_SECONDS",paramValue:"10",eventListenerYn:"N"}],"multi-csp-vm-delete":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:"multi-csp-vm",eventListenerYn:"N"},{paramKey:"INFRA_PREFIX",paramValue:"multi-csp-vm",eventListenerYn:"N"},{paramKey:"INFRA_ID_LIST",paramValue:"",eventListenerYn:"N"},{paramKey:"INFRA_DELETE_OPTION",paramValue:"terminate",eventListenerYn:"N"}],"k8s-cluster-create":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"PROVIDER",paramValue:C.value,eventListenerYn:"N"},{paramKey:"CSP",paramValue:C.value,eventListenerYn:"N"},{paramKey:"REGION",paramValue:S.value,eventListenerYn:"N"},{paramKey:"CONNECTION_NAME",paramValue:Ut(),eventListenerYn:"N"},{paramKey:"K8S_CLUSTER_ID",paramValue:fe,eventListenerYn:"N"},{paramKey:"K8S_NODEGROUP_NAME",paramValue:"ng1",eventListenerYn:"N"},{paramKey:"IMAGE",paramValue:y.value,eventListenerYn:"N"},{paramKey:"IMAGE_ID",paramValue:y.value,eventListenerYn:"N"},{paramKey:"SPEC",paramValue:m.value,eventListenerYn:"N"},{paramKey:"SPEC_ID",paramValue:m.value,eventListenerYn:"N"},{paramKey:"K8S_VERSION",paramValue:L.value||ra(),eventListenerYn:"N"},{paramKey:"K8S_DESIRED_NODE_SIZE",paramValue:"1",eventListenerYn:"N"},{paramKey:"K8S_MIN_NODE_SIZE",paramValue:"1",eventListenerYn:"N"},{paramKey:"K8S_MAX_NODE_SIZE",paramValue:"3",eventListenerYn:"N"},{paramKey:"ROOT_DISK_TYPE",paramValue:yo(),eventListenerYn:"N"},{paramKey:"ROOT_DISK_SIZE",paramValue:Fc(C.value),eventListenerYn:"N"},{paramKey:"K8S_NODEGROUP_CREATE_IF_MISSING",paramValue:"true",eventListenerYn:"N"},{paramKey:"K8S_STATUS_MAX_ATTEMPTS",paramValue:"60",eventListenerYn:"N"},{paramKey:"K8S_STATUS_INTERVAL_SECONDS",paramValue:"60",eventListenerYn:"N"},{paramKey:"K8S_READY_STATUS",paramValue:"Active,Running",eventListenerYn:"N"}],"k8s-kubeconfig-get":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"K8S_CLUSTER_ID",paramValue:je("K8S_CLUSTER_ID")||fe,eventListenerYn:"N"},{paramKey:"K8S_KUBECONFIG_MAX_ATTEMPTS",paramValue:"30",eventListenerYn:"N"},{paramKey:"K8S_KUBECONFIG_INTERVAL_SECONDS",paramValue:"10",eventListenerYn:"N"},{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"}],"app-deploy-helm":[{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"HELM_REPO_NAME",paramValue:"groundhog2k",eventListenerYn:"N"},{paramKey:"HELM_REPO_URL",paramValue:"https://groundhog2k.github.io/helm-charts",eventListenerYn:"N"},{paramKey:"HELM_CHART",paramValue:"groundhog2k/mariadb",eventListenerYn:"N"},{paramKey:"HELM_CHART_VERSION",paramValue:"4.5.0",eventListenerYn:"N"},{paramKey:"HELM_RECREATE_ON_IMMUTABLE_ERROR",paramValue:"true",eventListenerYn:"N"},{paramKey:"K8S_API_READY_MAX_ATTEMPTS",paramValue:"360",eventListenerYn:"N"},{paramKey:"K8S_API_READY_INTERVAL_SECONDS",paramValue:"10",eventListenerYn:"N"},{paramKey:"K8S_NODE_READY_MIN_COUNT",paramValue:"1",eventListenerYn:"N"},{paramKey:"HELM_VALUES_ARGS",paramValue:"--set settings.rootPassword.value=mariadb_pass --set userDatabase.name.value=testdb --set userDatabase.user.value=mariadb_user --set userDatabase.password.value=mariadb_pass --wait --timeout 10m",eventListenerYn:"N"},{paramKey:"DB_EXEC_MODE",paramValue:"k8s",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"app-deploy-manifest":[{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"K8S_MANIFEST",paramValue:"",eventListenerYn:"N"}],"app-deploy-status-check":[{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"DEPLOYMENT_NAME",paramValue:"",eventListenerYn:"N"},{paramKey:"ROLLOUT_TIMEOUT",paramValue:"300s",eventListenerYn:"N"}],"mariadb-install":[{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:oe,eventListenerYn:"N"},{paramKey:"DB_EXEC_MODE",paramValue:"ssh",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"SSH_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"SSH_USER",paramValue:"cb-user",eventListenerYn:"N"},{paramKey:"SSH_KEY_FILE",paramValue:"",eventListenerYn:"N"}],"db-backup-import":[{paramKey:"DB_EXEC_MODE",paramValue:"auto",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"DB_BACKUP_FILE",paramValue:"schema.sql",eventListenerYn:"N"},{paramKey:"SCHEMA_SQL_CONTENT",paramValue:Xc,eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"db-schema-import":[{paramKey:"DB_EXEC_MODE",paramValue:"auto",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"SCHEMA_SQL_FILE",paramValue:"schema.sql",eventListenerYn:"N"},{paramKey:"SCHEMA_SQL_CONTENT",paramValue:Xc,eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"db-data-insert":[{paramKey:"DB_EXEC_MODE",paramValue:"auto",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"INSERT_SQL",paramValue:y0,eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"object-storage-ensure":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_BUCKET",paramValue:Ee,eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_PROVIDER",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_REGION",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_READY_MAX_ATTEMPTS",paramValue:"30",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_READY_INTERVAL_SECONDS",paramValue:"5",eventListenerYn:"N"}],"object-storage-delete":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_DELETE_ENABLED",paramValue:"true",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_BUCKET",paramValue:Ee,eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_PROVIDER",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_REGION",paramValue:"",eventListenerYn:"N"}],"jupyter-inbound-rule-add":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:oe,eventListenerYn:"N"},{paramKey:"JUPYTER_BIND_HOST",paramValue:"0.0.0.0",eventListenerYn:"N"},{paramKey:"JUPYTER_PORT",paramValue:"8888",eventListenerYn:"N"},{paramKey:"JUPYTER_ALLOWED_CIDR",paramValue:"0.0.0.0/0",eventListenerYn:"N"}],"jupyter-inbound-rule-remove":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:oe,eventListenerYn:"N"},{paramKey:"JUPYTER_PORT",paramValue:"8888",eventListenerYn:"N"},{paramKey:"JUPYTER_ALLOWED_CIDR",paramValue:"0.0.0.0/0",eventListenerYn:"N"}],"jupyter-object-storage-analysis-remove":[{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:oe,eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"}],"jupyter-object-storage-analysis-install":[{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ht(),eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_PROVIDER",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_BUCKET",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_REGION",paramValue:"",eventListenerYn:"N"},{paramKey:"PRESIGNED_URL_EXPIRES",paramValue:"600",eventListenerYn:"N"},{paramKey:"SSH_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"SSH_USER",paramValue:"cb-user",eventListenerYn:"N"},{paramKey:"SSH_KEY_FILE",paramValue:"",eventListenerYn:"N"},{paramKey:"DATA_PREFIX",paramValue:"",eventListenerYn:"N"},{paramKey:"RESULT_PREFIX",paramValue:"results",eventListenerYn:"N"},{paramKey:"WRITE_RESULT_ENABLED",paramValue:"true",eventListenerYn:"N"},{paramKey:"JUPYTER_IMAGE",paramValue:"quay.io/jupyter/scipy-notebook:2025-03-14",eventListenerYn:"N"},{paramKey:"DUCKDB_VERSION",paramValue:"1.3.2",eventListenerYn:"N"},{paramKey:"JUPYTER_BIND_HOST",paramValue:"0.0.0.0",eventListenerYn:"N"},{paramKey:"JUPYTER_PORT",paramValue:"8888",eventListenerYn:"N"}]},tt=(nn,Je)=>{const $t=je(nn);switch(nn.trim().toUpperCase()){case"NAMESPACE":return ht()||Je;case"PROVIDER":case"CSP":return C.value||Je;case"REGION":return S.value||Je;case"CONNECTION_NAME":return $t||R.value||Ut()||Je;case"ZONE":return B.value||$t||Je;case"IMAGE":case"IMAGE_ID":return y.value||Je;case"SPEC":case"SPEC_ID":return m.value||Je;case"K8S_VERSION":return L.value||$t||Je;case"ROOT_DISK_TYPE":return(K||"").trim().toLowerCase()==="k8s-cluster-create"?yo():$t||Je;case"ROOT_DISK_SIZE":return(K||"").trim().toLowerCase()==="k8s-cluster-create"?Fc(C.value):$t||Je;case"INFRA_ID":return $t||Je||oe;case"K8S_CLUSTER_ID":return $t||Je||fe;case"SSH_HOST":case"DB_HOST":return I.value||$t||Je;default:return Je}};(Xe.length>0?Xe:et[K]||[]).forEach(nn=>{var $t;const Je=($t=nn.paramKey)==null?void 0:$t.trim().toUpperCase();Je&&we(Je,tt(Je,nn.paramValue||""),nn.eventListenerYn,!1)})};Un(()=>a.value.map(b=>b.workflowStageName).filter(Boolean).join("|"),()=>{a.value.filter(b=>!!b.workflowStageName).forEach(b=>wo(b))}),Un(Rn,async b=>{b&&(Xn(),await vi())});const we=(b,K,ne="N",oe=!0)=>{if(!b)return;const fe=b.trim().toUpperCase(),Ee=i.value.find(Xe=>{var et;return((et=Xe.paramKey)==null?void 0:et.trim().toUpperCase())===fe});if(Ee){(oe||!Ee.paramValue)&&(Ee.paramValue=K),Ee.eventListenerYn=Ee.eventListenerYn||ne;return}i.value.push({paramIdx:0,paramKey:fe,paramValue:K,eventListenerYn:ne})},Be=Le(!1),mi=Le(""),Tr=b=>(b||"").trim(),oa=()=>{const b=Tr(h.workflowName);Be.value=!!(b&&b===mi.value)},sa=async b=>{const K=Tr(b);if(!K){M.error("Please enter Workflow Name.");return}const{data:ne}=await vy(K);ne?(M.error("Name is already in use."),Be.value=!1):(M.success("Name is available."),Be.value=!0,mi.value=K)},bo=Le([]),aa={deploy:"For Deployment",run:"For Execution",test:"For Testing",webhook:"For Webhook",clean:"For Cleanup"},kr=b=>aa[b||""]||b||"",la=()=>{bo.value=[{name:"For Deployment",value:"For Deployment"},{name:"For Execution",value:"For Execution"},{name:"For Testing",value:"For Testing"},{name:"For Webhook",value:"For Webhook"},{name:"For Cleanup",value:"For Cleanup"}]},ft=Le(""),Ir=async()=>{try{const{data:b}=await ny("JENKINS");b&&h&&($.value==="new"?(h.ossIdx=b?b[0].ossIdx:"No OSS information",ft.value=b?b[0].ossUrl:"NULL"):b.forEach(K=>{K.ossIdx===h.ossIdx&&(ft.value=K.ossUrl)}))}catch(b){console.log(b)}},Nn=async()=>{if(!h.workflowName){M.error("Please enter Workflow Name.");return}if(!Be.value||mi.value!==Tr(h.workflowName)){M.error("Please perform duplicate check for the name.");return}if(!h.workflowPurpose){M.error("Please select Purpose.");return}if(!a.value||a.value.length===0){M.error("Please create Pipeline script.");return}Dt()&&($.value==="new"?await So():await Rr())},So=async()=>{const b={workflowInfo:{...h},workflowParams:[...i.value],workflowStageMappings:[...a.value]},{data:K}=await my(b);K?(M.success("Registered successfully."),g.push("/web/workflows/workflow/list")):M.error("Failed to register.")},Rr=async()=>{const b={workflowInfo:{...h},workflowParams:[...i.value],workflowStageMappings:[...a.value]},{data:K}=await yy(b);K?(M.success("Updated successfully."),g.push("/web/workflows/workflow/list")):M.error("Failed to update.")},Dt=()=>(Co(),$o()?(Ao(),$.value=="new"&&_o(),!0):!1),Co=()=>{let b="";a.value.forEach(K=>{b+=K.stageContent,K.isDefaultScript||(b+=` -`)}),h={...h,workflowPurpose:kr(h.workflowPurpose),script:b}},_o=()=>{delete h.workflowIdx},Ao=()=>{i.value.forEach(b=>{delete b.paramIdx})},$o=()=>{var ne;const b=new Set,K=[];for(const oe of i.value){const fe=(ne=oe.paramKey)==null?void 0:ne.trim();if(!fe)continue;const Ee=fe.toUpperCase();if(b.has(Ee))return M.error(`Duplicate parameter key: ${Ee}`),!1;b.add(Ee),K.push({...oe,paramKey:Ee,paramValue:oe.paramValue??"",eventListenerYn:oe.eventListenerYn||"N"})}return i.value=K,!0},Eo=()=>{g.push("/web/workflows/workflow/list")},Lo=()=>{g.push("/web/workflows/workflow/list")},At=()=>{a.value=[]},ua=async()=>{if(h.workflowName===""){M.error("Please enter workflow name.");return}else if(!h.workflowPurpose){M.error("Please select purpose.");return}await ca(h.workflowName)},Ft=["DEFAULT_START","DEFAULT_END"],ca=async b=>{try{At();const{data:K}=await wy(b),ne=K||[];ne.forEach((oe,fe)=>{oe.isDefaultScript=!0,oe.defaultScriptTag=Ft[fe]}),a.value=[...ne]}catch(K){a.value=[],M.error(String(K))}},Mo=b=>{a.value.splice(a.value.length-1,0,b),wo(b)};return(b,K)=>(ke(),Re("div",null,[se("div",_b,[se("div",Ab,[se("div",$b,[se("h2",Eb,qe($.value==="new"?"New":"Detail")+" Workflow",1)])])]),se("div",Lb,[pt(h)&&i.value&&a.value?(ke(),Re("div",Mb,[se("div",xb,[se("div",Tb,[K[16]||(K[16]=se("label",{class:"form-label required"}," Workflow Name ",-1)),se("div",kb,[fs(se("input",{type:"text",ref:"workflowName",class:"form-control p-2 g-col-11",placeholder:"Enter the workflow name","onUpdate:modelValue":K[0]||(K[0]=ne=>pt(h).workflowName=ne),onInput:oa},null,544),[[qm,pt(h).workflowName]]),Be.value?(ke(),Re("button",Ib,"Duplicate Check")):(ke(),Re("button",{key:0,class:"btn btn-primary chk",onClick:K[1]||(K[1]=ne=>sa(pt(h).workflowName)),style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),se("div",Rb,[K[18]||(K[18]=se("label",{class:"form-label required"},"Purpose",-1)),se("div",Nb,[fs(se("select",{ref:"workflowPurpose","onUpdate:modelValue":K[2]||(K[2]=ne=>pt(h).workflowPurpose=ne),class:"form-select p-2 g-col-12"},[K[17]||(K[17]=se("option",{value:""},"Select Workflow Purpose.",-1)),(ke(!0),Re(Sn,null,ui(bo.value,(ne,oe)=>(ke(),Re("option",{value:ne.value,key:oe},qe(ne.name),9,Ob))),128))],512),[[ey,pt(h).workflowPurpose]])])]),ao.value?(ke(),Re("div",Db,[se("div",Fb,[K[19]||(K[19]=se("label",{class:"form-label mb-0"},"Tumblebug Parameter Selection",-1)),se("label",Pb,[fs(se("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":K[3]||(K[3]=ne=>pi.value=ne)},null,512),[[Nc,pi.value]]),se("span",Wb,qe(pi.value?"Enabled":"Disabled"),1)])])])):fn("",!0),Ds.value?(ke(),Re("div",Bb,[se("div",Hb,[se("div",zb,[se("label",Vb,[se("code",null,qe(xt("NAMESPACE")),1),K[20]||(K[20]=se("span",null,"Namespace",-1))]),ct(wn,{modelValue:T.value,"onUpdate:modelValue":K[4]||(K[4]=ne=>T.value=ne),options:v.value,placeholder:"Namespace",title:Jn(v.value,T.value),"allow-custom":"",onChange:vr},null,8,["modelValue","options","title"])]),se("div",Ub,[se("label",Kb,[se("code",null,qe(xt(["PROVIDER","CSP"])),1),K[21]||(K[21]=se("span",null,"CSP",-1))]),ct(wn,{modelValue:C.value,"onUpdate:modelValue":K[5]||(K[5]=ne=>C.value=ne),options:p.value,placeholder:"CSP",onChange:Hs},null,8,["modelValue","options"])]),se("div",Gb,[se("label",Yb,[se("code",null,qe(xt("REGION")),1),K[22]||(K[22]=se("span",null,"Region",-1))]),ct(wn,{modelValue:S.value,"onUpdate:modelValue":K[6]||(K[6]=ne=>S.value=ne),options:_.value,placeholder:"Region",onChange:mr},null,8,["modelValue","options"])])]),se("div",jb,[se("div",Zb,[se("label",Qb,[se("code",null,qe(fr()),1),K[23]||(K[23]=se("span",null,"VM/K8s Spec",-1))]),ct(wn,{modelValue:m.value,"onUpdate:modelValue":K[7]||(K[7]=ne=>m.value=ne),options:P.value,placeholder:"VM/K8s Spec",title:Jn(P.value,m.value),onChange:mr},null,8,["modelValue","options","title"])]),se("div",Xb,[se("label",Jb,[se("code",null,qe(Bs()),1),se("span",qb,[K[25]||(K[25]=se("span",null,"Image",-1)),se("span",e0,[fs(se("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":K[8]||(K[8]=ne=>pn.value=ne),onChange:Ys},null,544),[[Nc,pn.value]]),K[24]||(K[24]=se("span",{class:"form-check-label"},"K8s",-1))])])]),ct(wn,{modelValue:y.value,"onUpdate:modelValue":K[9]||(K[9]=ne=>y.value=ne),options:D.value,placeholder:m.value?pn.value?"K8s Image":"Image":"Select Spec first",title:Jn(D.value,y.value),onChange:mr},null,8,["modelValue","options","placeholder","title"])])]),se("div",t0,[se("div",n0,[se("label",i0,[se("code",null,qe(xt("INFRA_ID")),1),K[26]||(K[26]=se("span",null,"Existing Infra",-1))]),ct(wn,{modelValue:O.value,"onUpdate:modelValue":K[10]||(K[10]=ne=>O.value=ne),options:H.value,placeholder:"Infra ID",title:Jn(H.value,O.value),"allow-custom":"",onChange:zs},null,8,["modelValue","options","title"])]),se("div",r0,[se("label",o0,[se("code",null,qe(xt(["SSH_HOST","DB_HOST"])),1),K[27]||(K[27]=se("span",null,"SSH/DB Host",-1))]),ct(wn,{modelValue:I.value,"onUpdate:modelValue":K[11]||(K[11]=ne=>I.value=ne),options:U.value,placeholder:"SSH/DB Host",onChange:Vs},null,8,["modelValue","options"])]),se("div",{class:"tumblebug-param-field g-col-2"},[K[28]||(K[28]=se("label",{class:"tumblebug-param-label tumblebug-param-action-label"},[se("span",null,"Reload")],-1)),se("button",{class:"btn btn-outline-primary w-100",onClick:js}," Refresh ")])]),se("div",s0,[se("div",{class:Cs(["tumblebug-param-field",bt.value?"g-col-4":"g-col-6"])},[se("label",a0,[se("code",null,qe(xt("CONNECTION_NAME")),1),K[29]||(K[29]=se("span",null,"Connection Config",-1))]),ct(wn,{modelValue:R.value,"onUpdate:modelValue":K[12]||(K[12]=ne=>R.value=ne),options:G.value,placeholder:"Connection Config",onChange:co},null,8,["modelValue","options"])],2),se("div",{class:Cs(["tumblebug-param-field",bt.value?"g-col-4":"g-col-6"])},[se("label",l0,[se("code",null,qe(xt("ZONE")),1),K[30]||(K[30]=se("span",null,"Zone",-1))]),ct(wn,{modelValue:B.value,"onUpdate:modelValue":K[13]||(K[13]=ne=>B.value=ne),options:di.value,placeholder:ur.value,onChange:Us},null,8,["modelValue","options","placeholder"])],2),bt.value?(ke(),Re("div",u0,[se("label",c0,[se("code",null,qe(xt("K8S_VERSION")),1),K[31]||(K[31]=se("span",null,"K8s Version",-1))]),ct(wn,{modelValue:L.value,"onUpdate:modelValue":K[14]||(K[14]=ne=>L.value=ne),options:Q.value,placeholder:"K8s Version",title:Jn(Q.value,L.value),onChange:Ks},null,8,["modelValue","options","title"])])):fn("",!0)]),Rn.value?(ke(),Re("div",h0,[se("div",f0,[se("label",d0,[se("code",null,qe(xt("OBJECT_STORAGE_BUCKET")),1),K[32]||(K[32]=se("span",null,"Bucket Name",-1))]),ct(wn,{modelValue:A.value,"onUpdate:modelValue":K[15]||(K[15]=ne=>A.value=ne),options:X.value,placeholder:"Bucket Name",title:Jn(X.value,A.value),"allow-custom":"",onChange:Gs},null,8,["modelValue","options","title"]),A.value?(ke(),Re("small",p0,[ee.value[A.value]?(ke(),Re(Sn,{key:0},[Oc(" CSP bucket: "+qe(ee.value[A.value]),1)],64)):(ke(),Re(Sn,{key:1},[Oc(" Not registered yet. The run creates it and resolves the CSP bucket name. ")],64))])):fn("",!0)])])):fn("",!0)])):fn("",!0),ct(qw,{mode:$.value,"workflow-stage-mappings-form-data":a.value,onInitWorkflowStageMappings:At,onOnClickCreateScript:ua,onSpliceWorkflowStageMappingsFormData:Mo},null,8,["mode","workflow-stage-mappings-form-data"]),ct(gy,{popup:!1,"workflow-param-data":i.value,"event-listener-yn":"N"},null,8,["workflow-param-data"]),ct(Cb,{"workflow-idx":pt(h).workflowIdx,"workflow-name":pt(h).workflowName},null,8,["workflow-idx","workflow-name"]),se("div",g0,[K[33]||(K[33]=se("div",{id:"gap",class:"col"},null,-1)),se("div",v0,[se("div",m0,[se("button",{class:"btn btn-primary",onClick:Nn},qe($.value==="new"?"Regist":"Edit"),1),se("button",{class:"btn btn-secondary",onClick:Lo}," Go Back "),se("button",{class:"btn btn-right border",onClick:Eo}," To List ")])])])])])):fn("",!0)],512)]))}}),$0=ro(w0,[["__scopeId","data-v-c8d2967d"]]);export{$0 as default}; +`)}),h={...h,workflowPurpose:kr(h.workflowPurpose),script:b}},_o=()=>{delete h.workflowIdx},Ao=()=>{i.value.forEach(b=>{delete b.paramIdx})},$o=()=>{var ne;const b=new Set,K=[];for(const oe of i.value){const fe=(ne=oe.paramKey)==null?void 0:ne.trim();if(!fe)continue;const Ee=fe.toUpperCase();if(b.has(Ee))return M.error(`Duplicate parameter key: ${Ee}`),!1;b.add(Ee),K.push({...oe,paramKey:Ee,paramValue:oe.paramValue??"",eventListenerYn:oe.eventListenerYn||"N"})}return i.value=K,!0},Eo=()=>{g.push("/web/workflows/workflow/list")},Lo=()=>{g.push("/web/workflows/workflow/list")},At=()=>{a.value=[]},ua=async()=>{if(h.workflowName===""){M.error("Please enter workflow name.");return}else if(!h.workflowPurpose){M.error("Please select purpose.");return}await ca(h.workflowName)},Ft=["DEFAULT_START","DEFAULT_END"],ca=async b=>{try{At();const{data:K}=await wy(b),ne=K||[];ne.forEach((oe,fe)=>{oe.isDefaultScript=!0,oe.defaultScriptTag=Ft[fe]}),a.value=[...ne]}catch(K){a.value=[],M.error(String(K))}},Mo=b=>{a.value.splice(a.value.length-1,0,b),wo(b)};return(b,K)=>(ke(),Re("div",null,[se("div",_b,[se("div",Ab,[se("div",$b,[se("h2",Eb,qe($.value==="new"?"New":"Detail")+" Workflow",1)])])]),se("div",Lb,[pt(h)&&i.value&&a.value?(ke(),Re("div",Mb,[se("div",xb,[se("div",Tb,[K[16]||(K[16]=se("label",{class:"form-label required"}," Workflow Name ",-1)),se("div",kb,[fs(se("input",{type:"text",ref:"workflowName",class:"form-control p-2 g-col-11",placeholder:"Enter the workflow name","onUpdate:modelValue":K[0]||(K[0]=ne=>pt(h).workflowName=ne),onInput:oa},null,544),[[qm,pt(h).workflowName]]),Be.value?(ke(),Re("button",Ib,"Duplicate Check")):(ke(),Re("button",{key:0,class:"btn btn-primary chk",onClick:K[1]||(K[1]=ne=>sa(pt(h).workflowName)),style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),se("div",Rb,[K[18]||(K[18]=se("label",{class:"form-label required"},"Purpose",-1)),se("div",Nb,[fs(se("select",{ref:"workflowPurpose","onUpdate:modelValue":K[2]||(K[2]=ne=>pt(h).workflowPurpose=ne),class:"form-select p-2 g-col-12"},[K[17]||(K[17]=se("option",{value:""},"Select Workflow Purpose.",-1)),(ke(!0),Re(Sn,null,ui(bo.value,(ne,oe)=>(ke(),Re("option",{value:ne.value,key:oe},qe(ne.name),9,Ob))),128))],512),[[ey,pt(h).workflowPurpose]])])]),ao.value?(ke(),Re("div",Db,[se("div",Fb,[K[19]||(K[19]=se("label",{class:"form-label mb-0"},"Tumblebug Parameter Selection",-1)),se("label",Pb,[fs(se("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":K[3]||(K[3]=ne=>pi.value=ne)},null,512),[[Nc,pi.value]]),se("span",Wb,qe(pi.value?"Enabled":"Disabled"),1)])])])):fn("",!0),Ds.value?(ke(),Re("div",Bb,[se("div",Hb,[se("div",zb,[se("label",Vb,[se("code",null,qe(xt("NAMESPACE")),1),K[20]||(K[20]=se("span",null,"Namespace",-1))]),ct(wn,{modelValue:T.value,"onUpdate:modelValue":K[4]||(K[4]=ne=>T.value=ne),options:v.value,placeholder:"Namespace",title:Jn(v.value,T.value),"allow-custom":"",onChange:vr},null,8,["modelValue","options","title"])]),se("div",Ub,[se("label",Kb,[se("code",null,qe(xt(["PROVIDER","CSP"])),1),K[21]||(K[21]=se("span",null,"CSP",-1))]),ct(wn,{modelValue:C.value,"onUpdate:modelValue":K[5]||(K[5]=ne=>C.value=ne),options:p.value,placeholder:"CSP",onChange:Hs},null,8,["modelValue","options"])]),se("div",Gb,[se("label",Yb,[se("code",null,qe(xt("REGION")),1),K[22]||(K[22]=se("span",null,"Region",-1))]),ct(wn,{modelValue:S.value,"onUpdate:modelValue":K[6]||(K[6]=ne=>S.value=ne),options:_.value,placeholder:"Region",onChange:mr},null,8,["modelValue","options"])])]),se("div",jb,[se("div",Zb,[se("label",Qb,[se("code",null,qe(fr()),1),K[23]||(K[23]=se("span",null,"VM/K8s Spec",-1))]),ct(wn,{modelValue:m.value,"onUpdate:modelValue":K[7]||(K[7]=ne=>m.value=ne),options:P.value,placeholder:"VM/K8s Spec",title:Jn(P.value,m.value),onChange:mr},null,8,["modelValue","options","title"])]),se("div",Xb,[se("label",Jb,[se("code",null,qe(Bs()),1),se("span",qb,[K[25]||(K[25]=se("span",null,"Image",-1)),se("span",e0,[fs(se("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":K[8]||(K[8]=ne=>pn.value=ne),onChange:Ys},null,544),[[Nc,pn.value]]),K[24]||(K[24]=se("span",{class:"form-check-label"},"K8s",-1))])])]),ct(wn,{modelValue:y.value,"onUpdate:modelValue":K[9]||(K[9]=ne=>y.value=ne),options:D.value,placeholder:m.value?pn.value?"K8s Image":"Image":"Select Spec first",title:Jn(D.value,y.value),onChange:mr},null,8,["modelValue","options","placeholder","title"])])]),se("div",t0,[se("div",n0,[se("label",i0,[se("code",null,qe(xt("INFRA_ID")),1),K[26]||(K[26]=se("span",null,"Existing Infra",-1))]),ct(wn,{modelValue:O.value,"onUpdate:modelValue":K[10]||(K[10]=ne=>O.value=ne),options:H.value,placeholder:"Infra ID",title:Jn(H.value,O.value),"allow-custom":"",onChange:zs},null,8,["modelValue","options","title"])]),se("div",r0,[se("label",o0,[se("code",null,qe(xt(["SSH_HOST","DB_HOST"])),1),K[27]||(K[27]=se("span",null,"SSH/DB Host",-1))]),ct(wn,{modelValue:I.value,"onUpdate:modelValue":K[11]||(K[11]=ne=>I.value=ne),options:U.value,placeholder:"SSH/DB Host",onChange:Vs},null,8,["modelValue","options"])]),se("div",{class:"tumblebug-param-field g-col-2"},[K[28]||(K[28]=se("label",{class:"tumblebug-param-label tumblebug-param-action-label"},[se("span",null,"Reload")],-1)),se("button",{class:"btn btn-outline-primary w-100",onClick:js}," Refresh ")])]),se("div",s0,[se("div",{class:Cs(["tumblebug-param-field",bt.value?"g-col-4":"g-col-6"])},[se("label",a0,[se("code",null,qe(xt("CONNECTION_NAME")),1),K[29]||(K[29]=se("span",null,"Connection Config",-1))]),ct(wn,{modelValue:R.value,"onUpdate:modelValue":K[12]||(K[12]=ne=>R.value=ne),options:G.value,placeholder:"Connection Config",onChange:co},null,8,["modelValue","options"])],2),se("div",{class:Cs(["tumblebug-param-field",bt.value?"g-col-4":"g-col-6"])},[se("label",l0,[se("code",null,qe(xt("ZONE")),1),K[30]||(K[30]=se("span",null,"Zone",-1))]),ct(wn,{modelValue:B.value,"onUpdate:modelValue":K[13]||(K[13]=ne=>B.value=ne),options:di.value,placeholder:ur.value,onChange:Us},null,8,["modelValue","options","placeholder"])],2),bt.value?(ke(),Re("div",u0,[se("label",c0,[se("code",null,qe(xt("K8S_VERSION")),1),K[31]||(K[31]=se("span",null,"K8s Version",-1))]),ct(wn,{modelValue:L.value,"onUpdate:modelValue":K[14]||(K[14]=ne=>L.value=ne),options:Q.value,placeholder:"K8s Version",title:Jn(Q.value,L.value),onChange:Ks},null,8,["modelValue","options","title"])])):fn("",!0)]),Rn.value?(ke(),Re("div",h0,[se("div",f0,[se("label",d0,[se("code",null,qe(xt("OBJECT_STORAGE_BUCKET")),1),K[32]||(K[32]=se("span",null,"Bucket Name",-1))]),ct(wn,{modelValue:A.value,"onUpdate:modelValue":K[15]||(K[15]=ne=>A.value=ne),options:X.value,placeholder:"Bucket Name",title:Jn(X.value,A.value),"allow-custom":"",onChange:Gs},null,8,["modelValue","options","title"]),A.value?(ke(),Re("small",p0,[ee.value[A.value]?(ke(),Re(Sn,{key:0},[Oc(" CSP bucket: "+qe(ee.value[A.value]),1)],64)):(ke(),Re(Sn,{key:1},[Oc(" Not registered yet. The run creates it and resolves the CSP bucket name. ")],64))])):fn("",!0)])])):fn("",!0)])):fn("",!0),ct(qw,{mode:$.value,"workflow-stage-mappings-form-data":a.value,onInitWorkflowStageMappings:At,onOnClickCreateScript:ua,onSpliceWorkflowStageMappingsFormData:Mo},null,8,["mode","workflow-stage-mappings-form-data"]),ct(gy,{popup:!1,"workflow-param-data":i.value,"event-listener-yn":"N"},null,8,["workflow-param-data"]),ct(Cb,{"workflow-idx":pt(h).workflowIdx,"workflow-name":pt(h).workflowName},null,8,["workflow-idx","workflow-name"]),se("div",g0,[K[33]||(K[33]=se("div",{id:"gap",class:"col"},null,-1)),se("div",v0,[se("div",m0,[se("button",{class:"btn btn-primary",onClick:Nn},qe($.value==="new"?"Regist":"Edit"),1),se("button",{class:"btn btn-secondary",onClick:Lo}," Go Back "),se("button",{class:"btn btn-right border",onClick:Eo}," To List ")])])])])])):fn("",!0)],512)]))}}),$0=ro(w0,[["__scopeId","data-v-a8385bbe"]]);export{$0 as default}; diff --git a/src/main/resources/static/assets/WorkflowForm-CEjWZa25.css b/src/main/resources/static/assets/WorkflowForm-CEjWZa25.css deleted file mode 100644 index d07ccd2..0000000 --- a/src/main/resources/static/assets/WorkflowForm-CEjWZa25.css +++ /dev/null @@ -1 +0,0 @@ -.hr[data-v-3dfd077a]{border-bottom:2px solid #ccc}.space-between[data-v-3dfd077a]{display:flex!important;justify-content:space-between!important}.palette[data-v-3dfd077a]{background-color:#ff0}.paletteItem[data-v-3dfd077a]{font-size:15px;cursor:pointer}.pipelineContour[data-v-3dfd077a]{border-top:2px dashed black}.paletteTitle[data-v-3dfd077a]{font-size:15px;font-weight:700}.w-90[data-v-3dfd077a]{width:95%}.btn-align[data-v-3dfd077a]{display:flex;align-items:flex-end}.hr[data-v-9bafe92a]{border-bottom:2px solid #ccc}.space-between[data-v-9bafe92a]{display:flex!important;justify-content:space-between!important}.palette[data-v-9bafe92a]{background-color:#ff0}.card[data-v-9bafe92a]{border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 1px 3px #0000001a}.accordion-item[data-v-9bafe92a]{border:none;border-bottom:1px solid #e5e7eb}.accordion-item[data-v-9bafe92a]:last-child{border-bottom:none}.accordion-button[data-v-9bafe92a]{background-color:#f8fafc;border:none;color:#374151;font-weight:600;padding:1rem 1.25rem;transition:all .3s ease}.accordion-button[data-v-9bafe92a]:not(.collapsed){background-color:#3b82f6;color:#fff;box-shadow:none}.accordion-button[data-v-9bafe92a]:hover{background-color:#e5e7eb}.accordion-button[data-v-9bafe92a]:not(.collapsed):hover{background-color:#2563eb}.accordion-button[data-v-9bafe92a]:focus{box-shadow:0 0 0 3px #3b82f61a;border-color:transparent}.accordion-button[data-v-9bafe92a]:after{transition:transform .3s ease}.accordion-body[data-v-9bafe92a]{background-color:#fff;max-height:300px;overflow-y:auto}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar{width:6px}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-track{background:#f1f5f9}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-thumb:hover{background:#94a3b8}.paletteItem[data-v-9bafe92a]{font-size:14px;cursor:grab;padding:.75rem 1rem;margin:0;border:none;border-bottom:1px solid #f1f5f9;background-color:#fff;color:#374151;transition:all .2s ease;position:relative}.paletteItem[data-v-9bafe92a]:last-child{border-bottom:none}.paletteItem[data-v-9bafe92a]:hover{background-color:#f8fafc;color:#1f2937;transform:translate(4px);border-left:3px solid #3b82f6}.paletteItem[data-v-9bafe92a]:active{cursor:grabbing;background-color:#e0e7ff;transform:scale(.98)}.paletteItem.sortable-ghost[data-v-9bafe92a]{opacity:.5;background-color:#dbeafe;border:2px dashed #3b82f6}.paletteItem.sortable-chosen[data-v-9bafe92a]{background-color:#eff6ff;box-shadow:0 4px 6px -1px #0000001a}.paletteItem.sortable-drag[data-v-9bafe92a]{opacity:.8;transform:rotate(5deg);background-color:#fff;box-shadow:0 10px 15px -3px #0000001a}.paletteItem[data-v-9bafe92a]:has-text("No registered stages."){color:#9ca3af;font-style:italic;text-align:center;cursor:default;background-color:#f9fafb}.pipelineContour[data-v-9bafe92a]{border-top:2px dashed black}.paletteTitle[data-v-9bafe92a]{font-size:15px;font-weight:700}.w-90[data-v-9bafe92a]{width:95%}.btn-align[data-v-9bafe92a]{display:flex;align-items:flex-end}@keyframes slideDown-9bafe92a{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.accordion-collapse.collapsing[data-v-9bafe92a],.accordion-collapse.show[data-v-9bafe92a]{animation:slideDown-9bafe92a .3s ease-out}.paletteItem[data-v-9bafe92a]:focus{outline:2px solid #3b82f6;outline-offset:-2px;background-color:#eff6ff}@media (max-width: 768px){.accordion-button[data-v-9bafe92a]{padding:.75rem 1rem;font-size:14px}.paletteItem[data-v-9bafe92a]{padding:.5rem .75rem;font-size:13px}}.hr[data-v-35dbfdb3]{border-bottom:2px solid #ccc}.space-between[data-v-35dbfdb3]{display:flex!important;justify-content:space-between!important}.palette[data-v-35dbfdb3]{background-color:#ff0}.paletteItem[data-v-35dbfdb3]{font-size:15px;cursor:pointer}.pipelineContour[data-v-35dbfdb3]{border-top:2px dashed black}.paletteTitle[data-v-35dbfdb3]{font-size:15px;font-weight:700}.w-90[data-v-35dbfdb3]{width:95%}.btn-align[data-v-35dbfdb3]{display:flex;align-items:flex-end}.stage-title[data-v-c559e65d]{font-weight:700;font-size:large}.tumblebug-param-field[data-v-414f7597]{min-width:0}.tumblebug-param-label[data-v-414f7597]{align-items:center;display:flex;gap:.5rem;justify-content:space-between;margin-bottom:.35rem;min-height:1.45rem}.tumblebug-param-label code[data-v-414f7597]{background:#eef4ff;border-radius:4px;color:#206bc4;font-size:.72rem;line-height:1.2;min-width:0;overflow-wrap:anywhere;padding:.14rem .38rem}.tumblebug-param-label span[data-v-414f7597]{color:#667085;flex:0 0 auto;font-size:.75rem;font-weight:500}.tumblebug-param-label-actions[data-v-414f7597]{align-items:center;display:flex;gap:.5rem}.tumblebug-k8s-toggle[data-v-414f7597]{align-items:center;display:flex;gap:.25rem;margin:0;min-height:0}.tumblebug-k8s-toggle .form-check-input[data-v-414f7597]{cursor:pointer;margin-top:0}.tumblebug-k8s-toggle .form-check-label[data-v-414f7597]{color:#475467;cursor:pointer;font-size:.72rem;font-weight:600}.tumblebug-param-action-label[data-v-414f7597]{justify-content:flex-end} diff --git a/src/main/resources/static/assets/WorkflowForm-C5EVeA2P.css b/src/main/resources/static/assets/WorkflowForm-Cr3G00xB.css similarity index 88% rename from src/main/resources/static/assets/WorkflowForm-C5EVeA2P.css rename to src/main/resources/static/assets/WorkflowForm-Cr3G00xB.css index 0e37b7a..bf25377 100644 --- a/src/main/resources/static/assets/WorkflowForm-C5EVeA2P.css +++ b/src/main/resources/static/assets/WorkflowForm-Cr3G00xB.css @@ -1 +1 @@ -.hr[data-v-3dfd077a]{border-bottom:2px solid #ccc}.space-between[data-v-3dfd077a]{display:flex!important;justify-content:space-between!important}.palette[data-v-3dfd077a]{background-color:#ff0}.paletteItem[data-v-3dfd077a]{font-size:15px;cursor:pointer}.pipelineContour[data-v-3dfd077a]{border-top:2px dashed black}.paletteTitle[data-v-3dfd077a]{font-size:15px;font-weight:700}.w-90[data-v-3dfd077a]{width:95%}.btn-align[data-v-3dfd077a]{display:flex;align-items:flex-end}.hr[data-v-9bafe92a]{border-bottom:2px solid #ccc}.space-between[data-v-9bafe92a]{display:flex!important;justify-content:space-between!important}.palette[data-v-9bafe92a]{background-color:#ff0}.card[data-v-9bafe92a]{border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 1px 3px #0000001a}.accordion-item[data-v-9bafe92a]{border:none;border-bottom:1px solid #e5e7eb}.accordion-item[data-v-9bafe92a]:last-child{border-bottom:none}.accordion-button[data-v-9bafe92a]{background-color:#f8fafc;border:none;color:#374151;font-weight:600;padding:1rem 1.25rem;transition:all .3s ease}.accordion-button[data-v-9bafe92a]:not(.collapsed){background-color:#3b82f6;color:#fff;box-shadow:none}.accordion-button[data-v-9bafe92a]:hover{background-color:#e5e7eb}.accordion-button[data-v-9bafe92a]:not(.collapsed):hover{background-color:#2563eb}.accordion-button[data-v-9bafe92a]:focus{box-shadow:0 0 0 3px #3b82f61a;border-color:transparent}.accordion-button[data-v-9bafe92a]:after{transition:transform .3s ease}.accordion-body[data-v-9bafe92a]{background-color:#fff;max-height:300px;overflow-y:auto}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar{width:6px}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-track{background:#f1f5f9}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-thumb:hover{background:#94a3b8}.paletteItem[data-v-9bafe92a]{font-size:14px;cursor:grab;padding:.75rem 1rem;margin:0;border:none;border-bottom:1px solid #f1f5f9;background-color:#fff;color:#374151;transition:all .2s ease;position:relative}.paletteItem[data-v-9bafe92a]:last-child{border-bottom:none}.paletteItem[data-v-9bafe92a]:hover{background-color:#f8fafc;color:#1f2937;transform:translate(4px);border-left:3px solid #3b82f6}.paletteItem[data-v-9bafe92a]:active{cursor:grabbing;background-color:#e0e7ff;transform:scale(.98)}.paletteItem.sortable-ghost[data-v-9bafe92a]{opacity:.5;background-color:#dbeafe;border:2px dashed #3b82f6}.paletteItem.sortable-chosen[data-v-9bafe92a]{background-color:#eff6ff;box-shadow:0 4px 6px -1px #0000001a}.paletteItem.sortable-drag[data-v-9bafe92a]{opacity:.8;transform:rotate(5deg);background-color:#fff;box-shadow:0 10px 15px -3px #0000001a}.paletteItem[data-v-9bafe92a]:has-text("No registered stages."){color:#9ca3af;font-style:italic;text-align:center;cursor:default;background-color:#f9fafb}.pipelineContour[data-v-9bafe92a]{border-top:2px dashed black}.paletteTitle[data-v-9bafe92a]{font-size:15px;font-weight:700}.w-90[data-v-9bafe92a]{width:95%}.btn-align[data-v-9bafe92a]{display:flex;align-items:flex-end}@keyframes slideDown-9bafe92a{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.accordion-collapse.collapsing[data-v-9bafe92a],.accordion-collapse.show[data-v-9bafe92a]{animation:slideDown-9bafe92a .3s ease-out}.paletteItem[data-v-9bafe92a]:focus{outline:2px solid #3b82f6;outline-offset:-2px;background-color:#eff6ff}@media (max-width: 768px){.accordion-button[data-v-9bafe92a]{padding:.75rem 1rem;font-size:14px}.paletteItem[data-v-9bafe92a]{padding:.5rem .75rem;font-size:13px}}.hr[data-v-35dbfdb3]{border-bottom:2px solid #ccc}.space-between[data-v-35dbfdb3]{display:flex!important;justify-content:space-between!important}.palette[data-v-35dbfdb3]{background-color:#ff0}.paletteItem[data-v-35dbfdb3]{font-size:15px;cursor:pointer}.pipelineContour[data-v-35dbfdb3]{border-top:2px dashed black}.paletteTitle[data-v-35dbfdb3]{font-size:15px;font-weight:700}.w-90[data-v-35dbfdb3]{width:95%}.btn-align[data-v-35dbfdb3]{display:flex;align-items:flex-end}.stage-title[data-v-c559e65d]{font-weight:700;font-size:large}.tumblebug-param-field[data-v-c8d2967d]{min-width:0}.tumblebug-param-label[data-v-c8d2967d]{align-items:center;display:flex;gap:.5rem;justify-content:space-between;margin-bottom:.35rem;min-height:1.45rem}.tumblebug-param-label code[data-v-c8d2967d]{background:#eef4ff;border-radius:4px;color:#206bc4;font-size:.72rem;line-height:1.2;min-width:0;overflow-wrap:anywhere;padding:.14rem .38rem}.tumblebug-param-label span[data-v-c8d2967d]{color:#667085;flex:0 0 auto;font-size:.75rem;font-weight:500}.tumblebug-param-label-actions[data-v-c8d2967d]{align-items:center;display:flex;gap:.5rem}.tumblebug-k8s-toggle[data-v-c8d2967d]{align-items:center;display:flex;gap:.25rem;margin:0;min-height:0}.tumblebug-k8s-toggle .form-check-input[data-v-c8d2967d]{cursor:pointer;margin-top:0}.tumblebug-k8s-toggle .form-check-label[data-v-c8d2967d]{color:#475467;cursor:pointer;font-size:.72rem;font-weight:600}.tumblebug-param-action-label[data-v-c8d2967d]{justify-content:flex-end} +.hr[data-v-3dfd077a]{border-bottom:2px solid #ccc}.space-between[data-v-3dfd077a]{display:flex!important;justify-content:space-between!important}.palette[data-v-3dfd077a]{background-color:#ff0}.paletteItem[data-v-3dfd077a]{font-size:15px;cursor:pointer}.pipelineContour[data-v-3dfd077a]{border-top:2px dashed black}.paletteTitle[data-v-3dfd077a]{font-size:15px;font-weight:700}.w-90[data-v-3dfd077a]{width:95%}.btn-align[data-v-3dfd077a]{display:flex;align-items:flex-end}.hr[data-v-9bafe92a]{border-bottom:2px solid #ccc}.space-between[data-v-9bafe92a]{display:flex!important;justify-content:space-between!important}.palette[data-v-9bafe92a]{background-color:#ff0}.card[data-v-9bafe92a]{border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 1px 3px #0000001a}.accordion-item[data-v-9bafe92a]{border:none;border-bottom:1px solid #e5e7eb}.accordion-item[data-v-9bafe92a]:last-child{border-bottom:none}.accordion-button[data-v-9bafe92a]{background-color:#f8fafc;border:none;color:#374151;font-weight:600;padding:1rem 1.25rem;transition:all .3s ease}.accordion-button[data-v-9bafe92a]:not(.collapsed){background-color:#3b82f6;color:#fff;box-shadow:none}.accordion-button[data-v-9bafe92a]:hover{background-color:#e5e7eb}.accordion-button[data-v-9bafe92a]:not(.collapsed):hover{background-color:#2563eb}.accordion-button[data-v-9bafe92a]:focus{box-shadow:0 0 0 3px #3b82f61a;border-color:transparent}.accordion-button[data-v-9bafe92a]:after{transition:transform .3s ease}.accordion-body[data-v-9bafe92a]{background-color:#fff;max-height:300px;overflow-y:auto}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar{width:6px}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-track{background:#f1f5f9}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.accordion-body[data-v-9bafe92a]::-webkit-scrollbar-thumb:hover{background:#94a3b8}.paletteItem[data-v-9bafe92a]{font-size:14px;cursor:grab;padding:.75rem 1rem;margin:0;border:none;border-bottom:1px solid #f1f5f9;background-color:#fff;color:#374151;transition:all .2s ease;position:relative}.paletteItem[data-v-9bafe92a]:last-child{border-bottom:none}.paletteItem[data-v-9bafe92a]:hover{background-color:#f8fafc;color:#1f2937;transform:translate(4px);border-left:3px solid #3b82f6}.paletteItem[data-v-9bafe92a]:active{cursor:grabbing;background-color:#e0e7ff;transform:scale(.98)}.paletteItem.sortable-ghost[data-v-9bafe92a]{opacity:.5;background-color:#dbeafe;border:2px dashed #3b82f6}.paletteItem.sortable-chosen[data-v-9bafe92a]{background-color:#eff6ff;box-shadow:0 4px 6px -1px #0000001a}.paletteItem.sortable-drag[data-v-9bafe92a]{opacity:.8;transform:rotate(5deg);background-color:#fff;box-shadow:0 10px 15px -3px #0000001a}.paletteItem[data-v-9bafe92a]:has-text("No registered stages."){color:#9ca3af;font-style:italic;text-align:center;cursor:default;background-color:#f9fafb}.pipelineContour[data-v-9bafe92a]{border-top:2px dashed black}.paletteTitle[data-v-9bafe92a]{font-size:15px;font-weight:700}.w-90[data-v-9bafe92a]{width:95%}.btn-align[data-v-9bafe92a]{display:flex;align-items:flex-end}@keyframes slideDown-9bafe92a{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.accordion-collapse.collapsing[data-v-9bafe92a],.accordion-collapse.show[data-v-9bafe92a]{animation:slideDown-9bafe92a .3s ease-out}.paletteItem[data-v-9bafe92a]:focus{outline:2px solid #3b82f6;outline-offset:-2px;background-color:#eff6ff}@media (max-width: 768px){.accordion-button[data-v-9bafe92a]{padding:.75rem 1rem;font-size:14px}.paletteItem[data-v-9bafe92a]{padding:.5rem .75rem;font-size:13px}}.hr[data-v-35dbfdb3]{border-bottom:2px solid #ccc}.space-between[data-v-35dbfdb3]{display:flex!important;justify-content:space-between!important}.palette[data-v-35dbfdb3]{background-color:#ff0}.paletteItem[data-v-35dbfdb3]{font-size:15px;cursor:pointer}.pipelineContour[data-v-35dbfdb3]{border-top:2px dashed black}.paletteTitle[data-v-35dbfdb3]{font-size:15px;font-weight:700}.w-90[data-v-35dbfdb3]{width:95%}.btn-align[data-v-35dbfdb3]{display:flex;align-items:flex-end}.stage-title[data-v-c559e65d]{font-weight:700;font-size:large}.tumblebug-param-field[data-v-a8385bbe]{min-width:0}.tumblebug-param-label[data-v-a8385bbe]{align-items:center;display:flex;gap:.5rem;justify-content:space-between;margin-bottom:.35rem;min-height:1.45rem}.tumblebug-param-label code[data-v-a8385bbe]{background:#eef4ff;border-radius:4px;color:#206bc4;font-size:.72rem;line-height:1.2;min-width:0;overflow-wrap:anywhere;padding:.14rem .38rem}.tumblebug-param-label span[data-v-a8385bbe]{color:#667085;flex:0 0 auto;font-size:.75rem;font-weight:500}.tumblebug-param-label-actions[data-v-a8385bbe]{align-items:center;display:flex;gap:.5rem}.tumblebug-k8s-toggle[data-v-a8385bbe]{align-items:center;display:flex;gap:.25rem;margin:0;min-height:0}.tumblebug-k8s-toggle .form-check-input[data-v-a8385bbe]{cursor:pointer;margin-top:0}.tumblebug-k8s-toggle .form-check-label[data-v-a8385bbe]{color:#475467;cursor:pointer;font-size:.72rem;font-weight:600}.tumblebug-param-action-label[data-v-a8385bbe]{justify-content:flex-end} diff --git a/src/main/resources/static/assets/WorkflowForm-DEaDufU5.js b/src/main/resources/static/assets/WorkflowForm-DEaDufU5.js deleted file mode 100644 index f35d560..0000000 --- a/src/main/resources/static/assets/WorkflowForm-DEaDufU5.js +++ /dev/null @@ -1,1200 +0,0 @@ -import{d as hi,A as Cs,o as io,r as we,h as nn,z as Rl,s as Qr,B as Ym,C as eh,D as jm,E as Xm,G as th,w as Vn,g as Te,c as Ie,q as Ms,k as pt,a as se,F as Cn,e as ci,t as qe,j as pn,i as ht,H as Yr,I as nh,u as Nl,m as ih,p as Zm,l as Qm,b as ms,f as Jm,v as qm,J as Oc,x as Fc,K as ey,L as ty,N as ny}from"./index-DRhuj6I4.js";import{f as iy}from"./oss-BzajjW9d.js";import{h as ry,i as oy,j as sy,g as ay,k as ly,l as uy,m as cy,b as pl,n as Pc,o as hy,p as fy,q as dy,s as py,S as bn,P as gy,t as vy,u as my,v as yy,w as wy}from"./SearchableSelect-H2GnBWT7.js";import{_ as ro}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as by}from"./request-B_1A5BoF.js";/*! - * vue-draggable-next v2.3.0 - * (c) 2025 Anish George - * @license MIT - */function Sy(){return typeof window<"u"?window.console:global.console}const Cy=Sy();function _y(N){const I=Object.create(null);return function(v){return I[v]||(I[v]=N(v))}}const $y=/-(\w)/g,Wc=_y(N=>N.replace($y,(I,h)=>h?h.toUpperCase():""));function gl(N){N.parentElement!==null&&N.parentElement.removeChild(N)}function Bc(N,I,h){const v=h===0?N.children[0]:N.children[h-1].nextSibling;N.insertBefore(I,v)}/**! - * Sortable 1.14.0 - * @author RubaXa - * @author owenm - * @license MIT - */function Hc(N,I){var h=Object.keys(N);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(N);I&&(v=v.filter(function(W){return Object.getOwnPropertyDescriptor(N,W).enumerable})),h.push.apply(h,v)}return h}function Mn(N){for(var I=1;I=0)&&(h[W]=N[W]);return h}function Ly(N,I){if(N==null)return{};var h=Ey(N,I),v,W;if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(N);for(W=0;W=0)&&Object.prototype.propertyIsEnumerable.call(N,v)&&(h[v]=N[v])}return h}var My="1.14.0";function Un(N){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(N)}var Gn=Un(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),oo=Un(/Edge/i),zc=Un(/firefox/i),Jr=Un(/safari/i)&&!Un(/chrome/i)&&!Un(/android/i),rh=Un(/iP(ad|od|hone)/i),xy=Un(/chrome/i)&&Un(/android/i),oh={capture:!1,passive:!1};function Ke(N,I,h){N.addEventListener(I,h,!Gn&&oh)}function He(N,I,h){N.removeEventListener(I,h,!Gn&&oh)}function xs(N,I){if(I){if(I[0]===">"&&(I=I.substring(1)),N)try{if(N.matches)return N.matches(I);if(N.msMatchesSelector)return N.msMatchesSelector(I);if(N.webkitMatchesSelector)return N.webkitMatchesSelector(I)}catch{return!1}return!1}}function Ty(N){return N.host&&N!==document&&N.host.nodeType?N.host:N.parentNode}function En(N,I,h,v){if(N){h=h||document;do{if(I!=null&&(I[0]===">"?N.parentNode===h&&xs(N,I):xs(N,I))||v&&N===h)return N;if(N===h)break}while(N=Ty(N))}return null}var Vc=/\s+/g;function en(N,I,h){if(N&&I)if(N.classList)N.classList[h?"add":"remove"](I);else{var v=(" "+N.className+" ").replace(Vc," ").replace(" "+I+" "," ");N.className=(v+(h?" "+I:"")).replace(Vc," ")}}function Ae(N,I,h){var v=N&&N.style;if(v){if(h===void 0)return document.defaultView&&document.defaultView.getComputedStyle?h=document.defaultView.getComputedStyle(N,""):N.currentStyle&&(h=N.currentStyle),I===void 0?h:h[I];!(I in v)&&I.indexOf("webkit")===-1&&(I="-webkit-"+I),v[I]=h+(typeof h=="string"?"":"px")}}function rr(N,I){var h="";if(typeof N=="string")h=N;else do{var v=Ae(N,"transform");v&&v!=="none"&&(h=v+" "+h)}while(!I&&(N=N.parentNode));var W=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return W&&new W(h)}function sh(N,I,h){if(N){var v=N.getElementsByTagName(I),W=0,T=v.length;if(h)for(;W=T,!E)return v;if(v===Ln())break;v=ui(v,!1)}return!1}function or(N,I,h,v){for(var W=0,T=0,E=N.children;T2&&arguments[2]!==void 0?arguments[2]:{},W=v.evt,T=Ly(v,Py);so.pluginEvent.bind(Ee)(I,h,Mn({dragEl:ge,parentEl:st,ghostEl:xe,rootEl:et,nextEl:xi,lastDownEl:$s,cloneEl:at,cloneHidden:li,dragStarted:jr,putSortable:_t,activeSortable:Ee.active,originalEvent:W,oldIndex:ir,oldDraggableIndex:eo,newIndex:tn,newDraggableIndex:ai,hideGhostForTarget:dh,unhideGhostForTarget:ph,cloneNowHidden:function(){li=!0},cloneNowShown:function(){li=!1},dispatchSortableEvent:function($){Dt({sortable:h,name:$,originalEvent:W})}},T))};function Dt(N){Fy(Mn({putSortable:_t,cloneEl:at,targetEl:ge,rootEl:et,oldIndex:ir,oldDraggableIndex:eo,newIndex:tn,newDraggableIndex:ai},N))}var ge,st,xe,et,xi,$s,at,li,ir,tn,eo,ai,ys,_t,nr=!1,Ts=!1,ks=[],Li,Sn,yl,wl,Gc,Yc,jr,tr,to,no=!1,ws=!1,As,Lt,bl=[],El=!1,Is=[],Fs=typeof document<"u",bs=rh,jc=oo||Gn?"cssFloat":"float",Wy=Fs&&!xy&&!rh&&"draggable"in document.createElement("div"),ch=function(){if(Fs){if(Gn)return!1;var N=document.createElement("x");return N.style.cssText="pointer-events:auto",N.style.pointerEvents==="auto"}}(),hh=function(I,h){var v=Ae(I),W=parseInt(v.width)-parseInt(v.paddingLeft)-parseInt(v.paddingRight)-parseInt(v.borderLeftWidth)-parseInt(v.borderRightWidth),T=or(I,0,h),E=or(I,1,h),$=T&&Ae(T),u=E&&Ae(E),c=$&&parseInt($.marginLeft)+parseInt($.marginRight)+wt(T).width,s=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+wt(E).width;if(v.display==="flex")return v.flexDirection==="column"||v.flexDirection==="column-reverse"?"vertical":"horizontal";if(v.display==="grid")return v.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(T&&$.float&&$.float!=="none"){var a=$.float==="left"?"left":"right";return E&&(u.clear==="both"||u.clear===a)?"vertical":"horizontal"}return T&&($.display==="block"||$.display==="flex"||$.display==="table"||$.display==="grid"||c>=W&&v[jc]==="none"||E&&v[jc]==="none"&&c+s>W)?"vertical":"horizontal"},By=function(I,h,v){var W=v?I.left:I.top,T=v?I.right:I.bottom,E=v?I.width:I.height,$=v?h.left:h.top,u=v?h.right:h.bottom,c=v?h.width:h.height;return W===$||T===u||W+E/2===$+c/2},Hy=function(I,h){var v;return ks.some(function(W){var T=W[rn].options.emptyInsertThreshold;if(!(!T||Dl(W))){var E=wt(W),$=I>=E.left-T&&I<=E.right+T,u=h>=E.top-T&&h<=E.bottom+T;if($&&u)return v=W}}),v},fh=function(I){function h(T,E){return function($,u,c,s){var a=$.options.group.name&&u.options.group.name&&$.options.group.name===u.options.group.name;if(T==null&&(E||a))return!0;if(T==null||T===!1)return!1;if(E&&T==="clone")return T;if(typeof T=="function")return h(T($,u,c,s),E)($,u,c,s);var o=(E?$:u).options.group.name;return T===!0||typeof T=="string"&&T===o||T.join&&T.indexOf(o)>-1}}var v={},W=I.group;(!W||_s(W)!="object")&&(W={name:W}),v.name=W.name,v.checkPull=h(W.pull,!0),v.checkPut=h(W.put),v.revertClone=W.revertClone,I.group=v},dh=function(){!ch&&xe&&Ae(xe,"display","none")},ph=function(){!ch&&xe&&Ae(xe,"display","")};Fs&&document.addEventListener("click",function(N){if(Ts)return N.preventDefault(),N.stopPropagation&&N.stopPropagation(),N.stopImmediatePropagation&&N.stopImmediatePropagation(),Ts=!1,!1},!0);var Mi=function(I){if(ge){I=I.touches?I.touches[0]:I;var h=Hy(I.clientX,I.clientY);if(h){var v={};for(var W in I)I.hasOwnProperty(W)&&(v[W]=I[W]);v.target=v.rootEl=h,v.preventDefault=void 0,v.stopPropagation=void 0,h[rn]._onDragOver(v)}}},zy=function(I){ge&&ge.parentNode[rn]._isOutsideThisEl(I.target)};function Ee(N,I){if(!(N&&N.nodeType&&N.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(N));this.el=N,this.options=I=Kn({},I),N[rn]=this;var h={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(N.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return hh(N,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(E,$){E.setData("Text",$.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ee.supportPointer!==!1&&"PointerEvent"in window&&!Jr,emptyInsertThreshold:5};so.initializePlugins(this,N,h);for(var v in h)!(v in I)&&(I[v]=h[v]);fh(I);for(var W in this)W.charAt(0)==="_"&&typeof this[W]=="function"&&(this[W]=this[W].bind(this));this.nativeDraggable=I.forceFallback?!1:Wy,this.nativeDraggable&&(this.options.touchStartThreshold=1),I.supportPointer?Ke(N,"pointerdown",this._onTapStart):(Ke(N,"mousedown",this._onTapStart),Ke(N,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ke(N,"dragover",this),Ke(N,"dragenter",this)),ks.push(this.el),I.store&&I.store.get&&this.sort(I.store.get(this)||[]),Kn(this,Ny())}Ee.prototype={constructor:Ee,_isOutsideThisEl:function(I){!this.el.contains(I)&&I!==this.el&&(tr=null)},_getDirection:function(I,h){return typeof this.options.direction=="function"?this.options.direction.call(this,I,h,ge):this.options.direction},_onTapStart:function(I){if(I.cancelable){var h=this,v=this.el,W=this.options,T=W.preventOnFilter,E=I.type,$=I.touches&&I.touches[0]||I.pointerType&&I.pointerType==="touch"&&I,u=($||I).target,c=I.target.shadowRoot&&(I.path&&I.path[0]||I.composedPath&&I.composedPath()[0])||u,s=W.filter;if(Zy(v),!ge&&!(/mousedown|pointerdown/.test(E)&&I.button!==0||W.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Jr&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=En(u,W.draggable,v,!1),!(u&&u.animated)&&$s!==u)){if(ir=dn(u),eo=dn(u,W.draggable),typeof s=="function"){if(s.call(this,I,u,this)){Dt({sortable:h,rootEl:c,name:"filter",targetEl:u,toEl:v,fromEl:v}),Kt("filter",h,{evt:I}),T&&I.cancelable&&I.preventDefault();return}}else if(s&&(s=s.split(",").some(function(a){if(a=En(c,a.trim(),v,!1),a)return Dt({sortable:h,rootEl:a,name:"filter",targetEl:u,fromEl:v,toEl:v}),Kt("filter",h,{evt:I}),!0}),s)){T&&I.cancelable&&I.preventDefault();return}W.handle&&!En(c,W.handle,v,!1)||this._prepareDragStart(I,$,u)}}},_prepareDragStart:function(I,h,v){var W=this,T=W.el,E=W.options,$=T.ownerDocument,u;if(v&&!ge&&v.parentNode===T){var c=wt(v);if(et=T,ge=v,st=ge.parentNode,xi=ge.nextSibling,$s=v,ys=E.group,Ee.dragged=ge,Li={target:ge,clientX:(h||I).clientX,clientY:(h||I).clientY},Gc=Li.clientX-c.left,Yc=Li.clientY-c.top,this._lastX=(h||I).clientX,this._lastY=(h||I).clientY,ge.style["will-change"]="all",u=function(){if(Kt("delayEnded",W,{evt:I}),Ee.eventCanceled){W._onDrop();return}W._disableDelayedDragEvents(),!zc&&W.nativeDraggable&&(ge.draggable=!0),W._triggerDragStart(I,h),Dt({sortable:W,name:"choose",originalEvent:I}),en(ge,E.chosenClass,!0)},E.ignore.split(",").forEach(function(s){sh(ge,s.trim(),Sl)}),Ke($,"dragover",Mi),Ke($,"mousemove",Mi),Ke($,"touchmove",Mi),Ke($,"mouseup",W._onDrop),Ke($,"touchend",W._onDrop),Ke($,"touchcancel",W._onDrop),zc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ge.draggable=!0),Kt("delayStart",this,{evt:I}),E.delay&&(!E.delayOnTouchOnly||h)&&(!this.nativeDraggable||!(oo||Gn))){if(Ee.eventCanceled){this._onDrop();return}Ke($,"mouseup",W._disableDelayedDrag),Ke($,"touchend",W._disableDelayedDrag),Ke($,"touchcancel",W._disableDelayedDrag),Ke($,"mousemove",W._delayedDragTouchMoveHandler),Ke($,"touchmove",W._delayedDragTouchMoveHandler),E.supportPointer&&Ke($,"pointermove",W._delayedDragTouchMoveHandler),W._dragStartTimer=setTimeout(u,E.delay)}else u()}},_delayedDragTouchMoveHandler:function(I){var h=I.touches?I.touches[0]:I;Math.max(Math.abs(h.clientX-this._lastX),Math.abs(h.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ge&&Sl(ge),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var I=this.el.ownerDocument;He(I,"mouseup",this._disableDelayedDrag),He(I,"touchend",this._disableDelayedDrag),He(I,"touchcancel",this._disableDelayedDrag),He(I,"mousemove",this._delayedDragTouchMoveHandler),He(I,"touchmove",this._delayedDragTouchMoveHandler),He(I,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(I,h){h=h||I.pointerType=="touch"&&I,!this.nativeDraggable||h?this.options.supportPointer?Ke(document,"pointermove",this._onTouchMove):h?Ke(document,"touchmove",this._onTouchMove):Ke(document,"mousemove",this._onTouchMove):(Ke(ge,"dragend",this),Ke(et,"dragstart",this._onDragStart));try{document.selection?Es(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(I,h){if(nr=!1,et&&ge){Kt("dragStarted",this,{evt:h}),this.nativeDraggable&&Ke(document,"dragover",zy);var v=this.options;!I&&en(ge,v.dragClass,!1),en(ge,v.ghostClass,!0),Ee.active=this,I&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:h})}else this._nulling()},_emulateDragOver:function(){if(Sn){this._lastX=Sn.clientX,this._lastY=Sn.clientY,dh();for(var I=document.elementFromPoint(Sn.clientX,Sn.clientY),h=I;I&&I.shadowRoot&&(I=I.shadowRoot.elementFromPoint(Sn.clientX,Sn.clientY),I!==h);)h=I;if(ge.parentNode[rn]._isOutsideThisEl(I),h)do{if(h[rn]){var v=void 0;if(v=h[rn]._onDragOver({clientX:Sn.clientX,clientY:Sn.clientY,target:I,rootEl:h}),v&&!this.options.dragoverBubble)break}I=h}while(h=h.parentNode);ph()}},_onTouchMove:function(I){if(Li){var h=this.options,v=h.fallbackTolerance,W=h.fallbackOffset,T=I.touches?I.touches[0]:I,E=xe&&rr(xe,!0),$=xe&&E&&E.a,u=xe&&E&&E.d,c=bs&&Lt&&Kc(Lt),s=(T.clientX-Li.clientX+W.x)/($||1)+(c?c[0]-bl[0]:0)/($||1),a=(T.clientY-Li.clientY+W.y)/(u||1)+(c?c[1]-bl[1]:0)/(u||1);if(!Ee.active&&!nr){if(v&&Math.max(Math.abs(T.clientX-this._lastX),Math.abs(T.clientY-this._lastY))=0&&(Dt({rootEl:st,name:"add",toEl:st,fromEl:et,originalEvent:I}),Dt({sortable:this,name:"remove",toEl:st,originalEvent:I}),Dt({rootEl:st,name:"sort",toEl:st,fromEl:et,originalEvent:I}),Dt({sortable:this,name:"sort",toEl:st,originalEvent:I})),_t&&_t.save()):tn!==ir&&tn>=0&&(Dt({sortable:this,name:"update",toEl:st,originalEvent:I}),Dt({sortable:this,name:"sort",toEl:st,originalEvent:I})),Ee.active&&((tn==null||tn===-1)&&(tn=ir,ai=eo),Dt({sortable:this,name:"end",toEl:st,originalEvent:I}),this.save()))),this._nulling()},_nulling:function(){Kt("nulling",this),et=ge=st=xe=xi=at=$s=li=Li=Sn=jr=tn=ai=ir=eo=tr=to=_t=ys=Ee.dragged=Ee.ghost=Ee.clone=Ee.active=null,Is.forEach(function(I){I.checked=!0}),Is.length=yl=wl=0},handleEvent:function(I){switch(I.type){case"drop":case"dragend":this._onDrop(I);break;case"dragenter":case"dragover":ge&&(this._onDragOver(I),Vy(I));break;case"selectstart":I.preventDefault();break}},toArray:function(){for(var I=[],h,v=this.el.children,W=0,T=v.length,E=this.options;Wv.right+W||N.clientX<=v.right&&N.clientY>v.bottom&&N.clientX>=v.left:N.clientX>v.right&&N.clientY>v.top||N.clientX<=v.right&&N.clientY>v.bottom+W}function Yy(N,I,h,v,W,T,E,$){var u=v?N.clientY:N.clientX,c=v?h.height:h.width,s=v?h.top:h.left,a=v?h.bottom:h.right,o=!1;if(!E){if($&&Ass+c*T/2:ua-As)return-to}else if(u>s+c*(1-W)/2&&ua-c*T/2)?u>s+c/2?1:-1:0}function jy(N){return dn(ge)u>=T?W.length:W.indexOf($))}function ew(N){return["transition-group","TransitionGroup"].includes(N)}function Zc(N){if(!N||N.length!==1)return!1;const[{type:I}]=N;return I?ew(I.name):!1}function tw(N,I){return I?{...I.props,...I.attrs}:N}const Tl=["Start","Add","Remove","Update","End"],kl=["Choose","Unchoose","Sort","Filter","Clone"],nw=["Move",...Tl,...kl].map(N=>"on"+N);let Al=null;const iw=hi({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:N=>N},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...Tl.map(N=>N.toLowerCase()),...kl.map(N=>N.toLowerCase())],setup(N,{emit:I,slots:h,attrs:v}){const W=we(!1),T=we(!1),E=we(0),$=we(0),u=we([]),c=we(null),s=we(null),a=nn(()=>N.list?N.list:N.modelValue),o=Ym();function r(){return N.component?Rl(N.component):N.tag}function t(K){if(s.value)for(const X in K){const Z=Wc(X);nw.indexOf(Z)===-1&&s.value.option(Z,K[X])}}function i(){var K;return((K=o==null?void 0:o.proxy)==null?void 0:K.$el.children)||[]}async function l(){var K;await Qr(),u.value=qy(i(),((K=o==null?void 0:o.proxy)==null?void 0:K.$el.children)||[],W.value,$.value)}function f(K){const X=Jy(i()||[],K);if(X===-1)return null;const Z=a.value?a.value[X]:null;return{index:X,element:Z}}function d(K){Qr(()=>I("change",K))}function C(K){if(N.list){K(N.list);return}const X=[...N.modelValue||[]];K(X),I("update:modelValue",X)}function b(...K){C(Z=>Z.splice(...K))}function y(K,X){C(J=>J.splice(X,0,J.splice(K,1)[0]))}function m(K){const X=u.value,Z=X.length;return K>Z-1?Z:X[K]}function x(){var X,Z;return h.default&&((Z=(X=h.default()[0])==null?void 0:X.component)==null?void 0:Z.proxy)||null}function O(K){if(!N.noTransitionOnDrag||!W.value)return;const X=i();X[K]&&(X[K].data=null);const Z=x();Z&&(Z.children=[],Z.kept=void 0)}function k(K){l(),c.value=f(K.item),c.value&&(K.item._underlying_vm_=N.clone(c.value.element),Al=K.item)}function R(K){const X=K.item._underlying_vm_;if(X===void 0)return;gl(K.item);const Z=m(K.newIndex);b(Z,0,X),l(),d({added:{element:X,newIndex:Z}})}function B(K){var Z;if(Bc((Z=o==null?void 0:o.proxy)==null?void 0:Z.$el,K.item,K.oldIndex),K.pullMode==="clone"){gl(K.clone);return}if(!c.value)return;const X=c.value.index;b(X,1),O(X),d({removed:{element:c.value.element,oldIndex:X}})}function L(K){var J,re;gl(K.item),Bc(K.from,K.item,K.oldIndex);const X=(J=c.value)==null?void 0:J.index,Z=m(K.newIndex);y(X,Z),d({moved:{element:(re=c.value)==null?void 0:re.element,oldIndex:X,newIndex:Z}})}function A(K,X){Object.prototype.hasOwnProperty.call(K,X)&&(K[X]+=E.value)}function w(K){return K.__draggable_component__}function g({to:K,related:X}){const Z=w(K);if(!Z)return{component:Z};const J=Z.realList,re={list:J,component:Z};if(K!==X&&J&&Z.getUnderlyingVm){const ae=Z.getUnderlyingVm(X);if(ae)return Object.assign(ae,re)}return re}function _(K,X){const Z=[...X.to.children].filter(he=>he.style.display!=="none");if(Z.length===0)return 0;const J=Z.indexOf(X.related),re=K.component.getVmIndex(J);return Z.indexOf(Al)!==-1||!X.willInsertAfter?re:re+1}const D=()=>{var re,ae;const K={};Tl.forEach(he=>{K["on"+he]=H(he)}),kl.forEach(he=>{K["on"+he]=P.bind(null,he)});const X=Object.keys(v).reduce((he,pe)=>(he[Wc(pe)]=v[pe],he),{}),Z=Object.assign({},X,K,{onMove:(he,pe)=>U(he,pe)});"draggable"in Z||(Z.draggable=">*");const J=((re=o==null?void 0:o.proxy)==null?void 0:re.$el.nodeType)===1?o.proxy.$el:((ae=o==null?void 0:o.proxy)==null?void 0:ae.$el.parentElement)||null;J&&(s.value=new Ee(J,Z),J.__draggable_component__=o==null?void 0:o.proxy,l())};function P(K,X){Qr(()=>I(K.toLowerCase(),X))}function H(K){return X=>{if(a.value!==null){const Z="onDrag"+K,J=te[Z];J&&J(X)}P(K,X)}}function U(K,X){const Z=N.move;if(!Z||!a.value)return!0;const J=g(K),re=c.value,ae=_(J,K);re&&Object.assign(re,{futureIndex:ae});const he=Object.assign({},K,{relatedContext:J,draggedContext:re});return Z(he,X)}function Y(){l(),Al=null}const te={onDragStart:k,onDragAdd:R,onDragRemove:B,onDragUpdate:L,onDragMove:U,onDragEnd:Y};return io(()=>{D()}),N.list!==null&&N.modelValue!==null&&Cy.error("list props are mutually exclusive! Please set one."),{getTag:r,realList:a,visibleIndexes:u,noneFunctionalComponentMode:T,headerOffset:E,footerOffset:$,transitionMode:W,computeIndexes:l,updateOptions:t,getChildrenNodes:i,getUnderlyingVm:f,emitChanges:d,alterList:C,spliceList:b,updatePosition:y,getVmIndex:m,getComponent:x,resetTransitionData:O,onDragStart:k,onDragAdd:R,onDragRemove:B,onDragUpdate:L,updateProperty:A,onDragMove:U,onDragEnd:Y,mounted:D,context:c,sortableInstance:s,getRelatedContextFromMoveEvent:g,getTargetedComponent:w,computeFutureIndex:_}},render(){const N=this.getTag(),I=tw(this.$attrs,this.componentData);if(typeof N=="string"){const v=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return v?(this.transitionMode=Zc(v),Cs(N,I,v)):Cs(N,I,[])}const h=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const v=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=Zc(v||[])}return Cs(N,I,h)}});var vh={exports:{}};(function(N,I){(function(){var h="ace",v=function(){return this}();!v&&typeof window<"u"&&(v=window);var W=function(s,a,o){if(typeof s!="string"){W.original?W.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(o=a),W.modules[s]||(W.payloads[s]=o,W.modules[s]=null)};W.modules={},W.payloads={};var T=function(s,a,o){if(typeof a=="string"){var r=u(s,a);if(r!=null)return o&&o(),r}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var t=[],i=0,l=a.length;iu.length)&&($=u.length),$-=E.length;var c=u.indexOf(E,$);return c!==-1&&c===$}),String.prototype.repeat||T(String.prototype,"repeat",function(E){for(var $="",u=this;E>0;)E&1&&($+=u),(E>>=1)&&(u+=u);return $}),String.prototype.includes||T(String.prototype,"includes",function(E,$){return this.indexOf(E,$)!=-1}),Object.assign||(Object.assign=function(E){if(E==null)throw new TypeError("Cannot convert undefined or null to object");for(var $=Object(E),u=1;u>>0,c=arguments[1],s=c>>0,a=s<0?Math.max(u+s,0):Math.min(s,u),o=arguments[2],r=o===void 0?u:o>>0,t=r<0?Math.max(u+r,0):Math.min(r,u);a0;)u&1&&(c+=$),(u>>=1)&&($+=$);return c};var T=/^\s\s*/,E=/\s\s*$/;v.stringTrimLeft=function($){return $.replace(T,"")},v.stringTrimRight=function($){return $.replace(E,"")},v.copyObject=function($){var u={};for(var c in $)u[c]=$[c];return u},v.copyArray=function($){for(var u=[],c=0,s=$.length;c65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(h,v,W){v.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},v.getOS=function(){return v.isMac?v.OS.MAC:v.isLinux?v.OS.LINUX:v.OS.WINDOWS};var T=typeof navigator=="object"?navigator:{},E=(/mac|win|linux/i.exec(T.platform)||["other"])[0].toLowerCase(),$=T.userAgent||"",u=T.appName||"";v.isWin=E=="win",v.isMac=E=="mac",v.isLinux=E=="linux",v.isIE=u=="Microsoft Internet Explorer"||u.indexOf("MSAppHost")>=0?parseFloat(($.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat(($.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),v.isOldIE=v.isIE&&v.isIE<9,v.isGecko=v.isMozilla=$.match(/ Gecko\/\d+/),v.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",v.isWebKit=parseFloat($.split("WebKit/")[1])||void 0,v.isChrome=parseFloat($.split(" Chrome/")[1])||void 0,v.isSafari=parseFloat($.split(" Safari/")[1])&&!v.isChrome||void 0,v.isEdge=parseFloat($.split(" Edge/")[1])||void 0,v.isAIR=$.indexOf("AdobeAIR")>=0,v.isAndroid=$.indexOf("Android")>=0,v.isChromeOS=$.indexOf(" CrOS ")>=0,v.isIOS=/iPad|iPhone|iPod/.test($)&&!window.MSStream,v.isIOS&&(v.isMac=!0),v.isMobile=v.isIOS||v.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(h,v,W){var T=h("./useragent"),E="http://www.w3.org/1999/xhtml";v.buildDom=function o(r,t,i){if(typeof r=="string"&&r){var l=document.createTextNode(r);return t&&t.appendChild(l),l}if(!Array.isArray(r))return r&&r.appendChild&&t&&t.appendChild(r),r;if(typeof r[0]!="string"||!r[0]){for(var f=[],d=0;d"u")){if(u){if(t)c();else if(t===!1)return u.push([o,r])}if(!$){var i=t;!t||!t.getRootNode?i=document:(i=t.getRootNode(),(!i||i==t)&&(i=document));var l=i.ownerDocument||i;if(r&&v.hasCssString(r,i))return null;r&&(o+=` -/*# sourceURL=ace/css/`+r+" */");var f=v.createElement("style");f.appendChild(l.createTextNode(o)),r&&(f.id=r),i==l&&(i=v.getDocumentHead(l)),i.insertBefore(f,i.firstChild)}}}if(v.importCssString=s,v.importCssStylsheet=function(o,r){v.buildDom(["link",{rel:"stylesheet",href:o}],v.getDocumentHead(r))},v.$fixPositionBug=function(o){var r=o.getBoundingClientRect();if(o.style.left){var t=parseFloat(o.style.left),i=+r.left;Math.abs(t-i)>1&&(o.style.left=2*t-i+"px")}if(o.style.right){var t=parseFloat(o.style.right),i=window.innerWidth-r.right;Math.abs(t-i)>1&&(o.style.right=2*t-i+"px")}if(o.style.top){var t=parseFloat(o.style.top),i=+r.top;Math.abs(t-i)>1&&(o.style.top=2*t-i+"px")}if(o.style.bottom){var t=parseFloat(o.style.bottom),i=window.innerHeight-r.bottom;Math.abs(t-i)>1&&(o.style.bottom=2*t-i+"px")}},v.scrollbarWidth=function(o){var r=v.createElement("ace_inner");r.style.width="100%",r.style.minWidth="0px",r.style.height="200px",r.style.display="block";var t=v.createElement("ace_outer"),i=t.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",t.appendChild(r);var l=o&&o.documentElement||document&&document.documentElement;if(!l)return 0;l.appendChild(t);var f=r.offsetWidth;i.overflow="scroll";var d=r.offsetWidth;return f===d&&(d=t.clientWidth),l.removeChild(t),f-d},v.computedStyle=function(o,r){return window.getComputedStyle(o,"")||{}},v.setStyle=function(o,r,t){o[r]!==t&&(o[r]=t)},v.HAS_CSS_ANIMATION=!1,v.HAS_CSS_TRANSFORMS=!1,v.HI_DPI=T.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,T.isChromeOS&&(v.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");v.HI_DPI&&a.style.transform!==void 0&&(v.HAS_CSS_TRANSFORMS=!0),!T.isEdge&&typeof a.style.animationName<"u"&&(v.HAS_CSS_ANIMATION=!0),a=null}v.HAS_CSS_TRANSFORMS?v.translate=function(o,r,t){o.style.transform="translate("+Math.round(r)+"px, "+Math.round(t)+"px)"}:v.translate=function(o,r,t){o.style.top=Math.round(t)+"px",o.style.left=Math.round(r)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(h,v,W){/* -* based on code from: -* -* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. -* Available via the MIT or new BSD license. -* see: http://github.com/jrburke/requirejs for details -*/var T=h("./dom");v.get=function(E,$){var u=new XMLHttpRequest;u.open("GET",E,!0),u.onreadystatechange=function(){u.readyState===4&&$(u.responseText)},u.send(null)},v.loadScript=function(E,$){var u=T.getDocumentHead(),c=document.createElement("script");c.src=E,u.appendChild(c),c.onload=c.onreadystatechange=function(s,a){(a||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,a||$())}},v.qualifyURL=function(E){var $=document.createElement("a");return $.href=E,$.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(h,v,W){v.inherits=function(T,E){T.super_=E,T.prototype=Object.create(E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}})},v.mixin=function(T,E){for(var $ in E)T[$]=E[$];return T},v.implement=function(T,E){v.mixin(T,E)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(h,v,W){var T={},E=function(){this.propagationStopped=!0},$=function(){this.defaultPrevented=!0};T._emit=T._dispatchEvent=function(u,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[u]||[],a=this._defaultHandlers[u];if(!(!s.length&&!a)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=u),c.stopPropagation||(c.stopPropagation=E),c.preventDefault||(c.preventDefault=$),s=s.slice();for(var o=0;o1&&(f=i[i.length-2]);var C=c[t+"Path"];return C==null?C=c.basePath:l=="/"&&(t=l=""),C&&C.slice(-1)!="/"&&(C+="/"),C+t+l+f+this.get("suffix")},v.setModuleUrl=function(r,t){return c.$moduleUrls[r]=t};var s=function(r,t){if(r==="ace/theme/textmate"||r==="./theme/textmate")return t(null,h("./theme/textmate"));if(a)return a(r,t);console.error("loader is not configured")},a;v.setLoader=function(r){a=r},v.dynamicModules=Object.create(null),v.$loading={},v.$loaded={},v.loadModule=function(r,t){var i;if(Array.isArray(r))var l=r[0],f=r[1];else if(typeof r=="string")var f=r;var d=function(C){if(C&&!v.$loading[f])return t&&t(C);if(v.$loading[f]||(v.$loading[f]=[]),v.$loading[f].push(t),!(v.$loading[f].length>1)){var b=function(){s(f,function(y,m){m&&(v.$loaded[f]=m),v._emit("load.module",{name:f,module:m});var x=v.$loading[f];v.$loading[f]=null,x.forEach(function(O){O&&O(m)})})};if(!v.get("packaged"))return b();E.loadScript(v.moduleUrl(f,l),b),o()}};if(v.dynamicModules[f])v.dynamicModules[f]().then(function(C){C.default?d(C.default):d(C)});else{try{i=this.$require(f)}catch{}d(i||v.$loaded[f])}},v.$require=function(r){if(typeof W.require=="function"){var t="require";return W[t](r)}},v.setModuleLoader=function(r,t){v.dynamicModules[r]=t};var o=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),o=function(){})};v.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(h,v,W){h("./lib/fixoldbrowsers");var T=h("./config");T.setLoader(function(c,s){h([c],function(a){s(null,a)})});var E=function(){return this||typeof window<"u"&&window}();W.exports=function(c){T.init=$,T.$require=h,c.require=h},$(!0);function $(c){if(!(!E||!E.document)){T.set("packaged",c||h.packaged||W.packaged||E.define&&(void 0).packaged);var s={},a="",o=document.currentScript||document._currentScript,r=o&&o.ownerDocument||document;o&&o.src&&(a=o.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var t=r.getElementsByTagName("script"),i=0;i ["+this.end.row+"/"+this.end.column+"]"},E.prototype.contains=function($,u){return this.compare($,u)==0},E.prototype.compareRange=function($){var u,c=$.end,s=$.start;return u=this.compare(c.row,c.column),u==1?(u=this.compare(s.row,s.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(s.row,s.column),u==-1?-1:u==1?42:0)},E.prototype.comparePoint=function($){return this.compare($.row,$.column)},E.prototype.containsRange=function($){return this.comparePoint($.start)==0&&this.comparePoint($.end)==0},E.prototype.intersects=function($){var u=this.compareRange($);return u==-1||u==0||u==1},E.prototype.isEnd=function($,u){return this.end.row==$&&this.end.column==u},E.prototype.isStart=function($,u){return this.start.row==$&&this.start.column==u},E.prototype.setStart=function($,u){typeof $=="object"?(this.start.column=$.column,this.start.row=$.row):(this.start.row=$,this.start.column=u)},E.prototype.setEnd=function($,u){typeof $=="object"?(this.end.column=$.column,this.end.row=$.row):(this.end.row=$,this.end.column=u)},E.prototype.inside=function($,u){return this.compare($,u)==0?!(this.isEnd($,u)||this.isStart($,u)):!1},E.prototype.insideStart=function($,u){return this.compare($,u)==0?!this.isEnd($,u):!1},E.prototype.insideEnd=function($,u){return this.compare($,u)==0?!this.isStart($,u):!1},E.prototype.compare=function($,u){return!this.isMultiLine()&&$===this.start.row?uthis.end.column?1:0:$this.end.row?1:this.start.row===$?u>=this.start.column?0:-1:this.end.row===$?u<=this.end.column?0:1:0},E.prototype.compareStart=function($,u){return this.start.row==$&&this.start.column==u?-1:this.compare($,u)},E.prototype.compareEnd=function($,u){return this.end.row==$&&this.end.column==u?1:this.compare($,u)},E.prototype.compareInside=function($,u){return this.end.row==$&&this.end.column==u?1:this.start.row==$&&this.start.column==u?-1:this.compare($,u)},E.prototype.clipRows=function($,u){if(this.end.row>u)var c={row:u+1,column:0};else if(this.end.row<$)var c={row:$,column:0};if(this.start.row>u)var s={row:u+1,column:0};else if(this.start.row<$)var s={row:$,column:0};return E.fromPoints(s||this.start,c||this.end)},E.prototype.extend=function($,u){var c=this.compare($,u);if(c==0)return this;if(c==-1)var s={row:$,column:u};else var a={row:$,column:u};return E.fromPoints(s||this.start,a||this.end)},E.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},E.prototype.isMultiLine=function(){return this.start.row!==this.end.row},E.prototype.clone=function(){return E.fromPoints(this.start,this.end)},E.prototype.collapseRows=function(){return this.end.column==0?new E(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new E(this.start.row,0,this.end.row,0)},E.prototype.toScreenRange=function($){var u=$.documentToScreenPosition(this.start),c=$.documentToScreenPosition(this.end);return new E(u.row,u.column,c.row,c.column)},E.prototype.moveBy=function($,u){this.start.row+=$,this.start.column+=u,this.end.row+=$,this.end.column+=u},E}();T.fromPoints=function(E,$){return new T(E.row,E.column,$.row,$.column)},T.comparePoints=function(E,$){return E.row-$.row||E.column-$.column},v.Range=T}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(h,v,W){for(var T=h("./oop"),E={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},$={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},u=0;u<10;u++)$["Digit"+u]=48+u,$["Numpad"+u]=96+u,E.PRINTABLE_KEYS[48+u]=""+u,E.FUNCTION_KEYS[96+u]="Numpad"+u;for(var u=65;u<91;u++){var c=String.fromCharCode(u+32);$["Key"+c.toUpperCase()]=u,E.PRINTABLE_KEYS[u]=c}for(var u=1;u<13;u++)$["F"+u]=111+u,E.FUNCTION_KEYS[111+u]="F"+u;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var a in s)$[a]=$[a+"Left"]=$[a+"Right"]=s[a];v.$codeToKeyCode=$,E.PRINTABLE_KEYS[173]="-";for(var o in E.FUNCTION_KEYS){var r=E.FUNCTION_KEYS[o].toLowerCase();E[r]=parseInt(o,10)}for(var o in E.PRINTABLE_KEYS){var r=E.PRINTABLE_KEYS[o].toLowerCase();E[r]=parseInt(o,10)}T.mixin(E,E.MODIFIER_KEYS),T.mixin(E,E.PRINTABLE_KEYS),T.mixin(E,E.FUNCTION_KEYS),E.enter=E.return,E.escape=E.esc,E.del=E.delete,function(){for(var t=["cmd","ctrl","alt","shift"],i=Math.pow(2,t.length);i--;)E.KEY_MODS[i]=t.filter(function(l){return i&E.KEY_MODS[l]}).join("-")+"-"}(),E.KEY_MODS[0]="",E.KEY_MODS[-1]="input-",T.mixin(v,E),v.default=v,v.keyCodeToString=function(t){var i=E[t];return typeof i!="string"&&(i=String.fromCharCode(t)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(h,v,W){var T=h("./keys"),E=h("./useragent"),$=null,u=0,c;function s(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return c={passive:!1},!0}})}catch{}}function a(){return c==null&&s(),c}function o(C,b,y){this.elem=C,this.type=b,this.callback=y}o.prototype.destroy=function(){t(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=v.addListener=function(C,b,y,m){C.addEventListener(b,y,a()),m&&m.$toDestroy.push(new o(C,b,y))},t=v.removeListener=function(C,b,y){C.removeEventListener(b,y,a())};v.stopEvent=function(C){return v.stopPropagation(C),v.preventDefault(C),!1},v.stopPropagation=function(C){C.stopPropagation&&C.stopPropagation()},v.preventDefault=function(C){C.preventDefault&&C.preventDefault()},v.getButton=function(C){return C.type=="dblclick"?0:C.type=="contextmenu"||E.isMac&&C.ctrlKey&&!C.altKey&&!C.shiftKey?2:C.button},v.capture=function(C,b,y){var m=C&&C.ownerDocument||document;function x(O){b&&b(O),y&&y(O),t(m,"mousemove",b),t(m,"mouseup",x),t(m,"dragstart",x)}return r(m,"mousemove",b),r(m,"mouseup",x),r(m,"dragstart",x),x},v.addMouseWheelListener=function(C,b,y){r(C,"wheel",function(m){var x=.15,O=m.deltaX||0,k=m.deltaY||0;switch(m.deltaMode){case m.DOM_DELTA_PIXEL:m.wheelX=O*x,m.wheelY=k*x;break;case m.DOM_DELTA_LINE:var R=15;m.wheelX=O*R,m.wheelY=k*R;break;case m.DOM_DELTA_PAGE:var B=150;m.wheelX=O*B,m.wheelY=k*B;break}b(m)},y)},v.addMultiMouseDownListener=function(C,b,y,m,x){var O=0,k,R,B,L={2:"dblclick",3:"tripleclick",4:"quadclick"};function A(w){if(v.getButton(w)!==0?O=0:w.detail>1?(O++,O>4&&(O=1)):O=1,E.isIE){var g=Math.abs(w.clientX-k)>5||Math.abs(w.clientY-R)>5;(!B||g)&&(O=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},b[O-1]||600),O==1&&(k=w.clientX,R=w.clientY)}if(w._clicks=O,y[m]("mousedown",w),O>4)O=0;else if(O>1)return y[m](L[O],w)}Array.isArray(C)||(C=[C]),C.forEach(function(w){r(w,"mousedown",A,x)})};function i(C){return 0|(C.ctrlKey?1:0)|(C.altKey?2:0)|(C.shiftKey?4:0)|(C.metaKey?8:0)}v.getModifierString=function(C){return T.KEY_MODS[i(C)]};function l(C,b,y){var m=i(b);if(!y&&b.code&&(y=T.$codeToKeyCode[b.code]||y),!E.isMac&&$){if(b.getModifierState&&(b.getModifierState("OS")||b.getModifierState("Win"))&&(m|=8),$.altGr)if((3&m)!=3)$.altGr=0;else return;if(y===18||y===17){var x=b.location;if(y===17&&x===1)$[y]==1&&(u=b.timeStamp);else if(y===18&&m===3&&x===2){var O=b.timeStamp-u;O<50&&($.altGr=!0)}}}if(y in T.MODIFIER_KEYS&&(y=-1),!(!m&&y===13&&b.location===3&&(C(b,m,-y),b.defaultPrevented))){if(E.isChromeOS&&m&8){if(C(b,m,y),b.defaultPrevented)return;m&=-9}return!m&&!(y in T.FUNCTION_KEYS)&&!(y in T.PRINTABLE_KEYS)?!1:C(b,m,y)}}v.addCommandKeyListener=function(C,b,y){var m=null;r(C,"keydown",function(x){$[x.keyCode]=($[x.keyCode]||0)+1;var O=l(b,x,x.keyCode);return m=x.defaultPrevented,O},y),r(C,"keypress",function(x){m&&(x.ctrlKey||x.altKey||x.shiftKey||x.metaKey)&&(v.stopEvent(x),m=null)},y),r(C,"keyup",function(x){$[x.keyCode]=null},y),$||(f(),r(window,"focus",f))};function f(){$=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!E.isOldIE){var d=1;v.nextTick=function(C,b){b=b||window;var y="zero-timeout-message-"+d++,m=function(x){x.data==y&&(v.stopPropagation(x),t(b,"message",m),C())};r(b,"message",m),b.postMessage(y,"*")}}v.$idleBlocked=!1,v.onIdle=function(C,b){return setTimeout(function y(){v.$idleBlocked?setTimeout(y,100):C()},b)},v.$idleBlockId=null,v.blockIdle=function(C){v.$idleBlockId&&clearTimeout(v.$idleBlockId),v.$idleBlocked=!0,v.$idleBlockId=setTimeout(function(){v.$idleBlocked=!1},C||100)},v.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),v.nextFrame?v.nextFrame=v.nextFrame.bind(window):v.nextFrame=function(C){setTimeout(C,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(h,v,W){var T;W.exports={lineMode:!1,pasteCancelled:function(){return T&&T>Date.now()-50?!0:T=!1},cancel:function(){T=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(h,v,W){var T=h("../lib/event"),E=h("../config").nls,$=h("../lib/useragent"),u=h("../lib/dom"),c=h("../lib/lang"),s=h("../clipboard"),a=$.isChrome<18,o=$.isIE,r=$.isChrome>63,t=400,i=h("../lib/keys"),l=i.KEY_MODS,f=$.isIOS,d=f?/\s/:/\n/,C=$.isMobile,b=function(){function y(m,x){var O=this;this.host=x,this.text=u.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",m.insertBefore(this.text,m.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",C||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),T.addListener(this.text,"blur",function(k){O.ignoreFocusEvents||(x.onBlur(k),O.$isFocused=!1)},x),T.addListener(this.text,"focus",function(k){if(!O.ignoreFocusEvents){if(O.$isFocused=!0,$.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(k),$.isEdge?setTimeout(O.resetSelection.bind(O)):O.resetSelection()}},x),this.$focusScroll=!1,x.on("beforeEndOperation",function(){var k=x.curOp,R=k&&k.command&&k.command.name;if(R!="insertstring"){var B=R&&(k.docChanged||k.selectionChanged);O.inComposition&&B&&(O.lastValue=O.text.value="",O.onCompositionEnd()),O.resetSelection()}}),x.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=f?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&x.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,T.addCommandKeyListener(this.text,function(k,R,B){if(!O.inComposition)return x.onCommandKey(k,R,B)},x),T.addListener(this.text,"select",this.onSelect.bind(this),x),T.addListener(this.text,"input",this.onInput.bind(this),x),T.addListener(this.text,"cut",this.onCut.bind(this),x),T.addListener(this.text,"copy",this.onCopy.bind(this),x),T.addListener(this.text,"paste",this.onPaste.bind(this),x),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&T.addListener(m,"keydown",function(k){if(!($.isMac&&!k.metaKey||!k.ctrlKey))switch(k.keyCode){case 67:O.onCopy(k);break;case 86:O.onPaste(k);break;case 88:O.onCut(k);break}},x),this.syncComposition=c.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),T.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),x),T.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),x),T.addListener(this.text,"keyup",this.onKeyup.bind(this),x),T.addListener(this.text,"keydown",this.syncComposition.bind(this),x),T.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),x),this.closeTimeout,T.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),x),T.addListener(this.text,"mousedown",function(k){k.preventDefault(),O.onContextMenuClose()},x),T.addListener(x.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),x),T.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),x),f&&this.addIosSelectionHandler(m,x,this.text)}return y.prototype.addIosSelectionHandler=function(m,x,O){var k=this,R=null,B=!1;O.addEventListener("keydown",function(A){R&&clearTimeout(R),B=!0},!0),O.addEventListener("keyup",function(A){R=setTimeout(function(){B=!1},100)},!0);var L=function(A){if(document.activeElement===O&&!(B||k.inComposition||x.$mouseHandler.isMousePressed)&&!k.copied){var w=O.selectionStart,g=O.selectionEnd,_=null,D=0;if(w==0?_=i.up:w==1?_=i.home:g>k.lastSelectionEnd&&k.lastValue[g]==` -`?_=i.end:wk.lastSelectionEnd&&k.lastValue.slice(0,g).split(` -`).length>2?_=i.down:g>k.lastSelectionEnd&&k.lastValue[g-1]==" "?(_=i.right,D=l.option):(g>k.lastSelectionEnd||g==k.lastSelectionEnd&&k.lastSelectionEnd!=k.lastSelectionStart&&w==g)&&(_=i.right),w!==g&&(D|=l.shift),_){var P=x.onCommandKey({},D,_);if(!P&&x.commands){_=i.keyCodeToString(_);var H=x.commands.findKeyCommand(D,_);H&&x.execCommand(H)}k.lastSelectionStart=w,k.lastSelectionEnd=g,k.resetSelection("")}}};document.addEventListener("selectionchange",L),x.on("destroy",function(){document.removeEventListener("selectionchange",L)})},y.prototype.onContextMenuClose=function(){var m=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){m.tempStyle&&(m.text.style.cssText=m.tempStyle,m.tempStyle=""),m.host.renderer.$isMousePressed=!1,m.host.renderer.$keepTextAreaAtCursor&&m.host.renderer.$moveTextAreaToCursor()},0)},y.prototype.$onContextMenu=function(m){this.host.textInput.onContextMenu(m),this.onContextMenuClose()},y.prototype.onKeyup=function(m){m.keyCode==27&&this.text.value.lengtht+100||d.test(O)||C&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},y.prototype.sendText=function(m,x){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),m&&this.host.onPaste(m),this.pasted=!1,"";for(var O=this.text.selectionStart,k=this.text.selectionEnd,R=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,L=m,A=m.length-O,w=m.length-k,g=0;R>0&&this.lastValue[g]==m[g];)g++,R--;for(L=L.slice(g),g=1;B>0&&this.lastValue.length-g>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-g]==m[m.length-g];)g++,B--;A-=g-1,w-=g-1;var _=L.length-g+1;if(_<0&&(R=-_,_=0),L=L.slice(0,_),!x&&!L&&!A&&!R&&!B&&!w)return"";this.sendingText=!0;var D=!1;return $.isAndroid&&L==". "&&(L=" ",D=!0),L&&!R&&!B&&!A&&!w||this.commandMode?this.host.onTextInput(L):this.host.onTextInput(L,{extendLeft:R,extendRight:B,restoreStart:A,restoreEnd:w}),this.sendingText=!1,this.lastValue=m,this.lastSelectionStart=O,this.lastSelectionEnd=k,this.lastRestoreEnd=w,D?` -`:L},y.prototype.onSelect=function(m){var x=this;if(!this.inComposition){var O=function(k){return k.selectionStart===0&&k.selectionEnd>=x.lastValue.length&&k.value===x.lastValue&&x.lastValue&&k.selectionEnd!==x.lastSelectionEnd};this.copied?this.copied=!1:O(this.text)?(this.host.selectAll(),this.resetSelection()):C&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},y.prototype.$resetSelectionIOS=function(m){if(!(!this.$isFocused||this.copied&&!m||this.sendingText)){m||(m="");var x=` - ab`+m+`cde fg -`;x!=this.text.value&&(this.text.value=this.lastValue=x);var O=4,k=4+(m.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=O||this.lastSelectionEnd!=k)&&this.text.setSelectionRange(O,k),this.lastSelectionStart=O,this.lastSelectionEnd=k}},y.prototype.$resetSelection=function(){var m=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var x=0,O=0,k="",R=function(H,U){for(var Y=U,te=1;te<=H-m.rowStart&&te<2*m.numberOfExtraLines+1;te++)Y+=m.host.session.getLine(H-te).length+1;return Y};if(this.host.session){var B=this.host.selection,L=B.getRange(),A=B.cursor.row;A===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):A===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(Athis.rowEnd+1)&&(this.rowStart=A>this.numberOfExtraLines?A-this.numberOfExtraLines:0,this.rowEnd=A>this.numberOfExtraLines?A+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var w=[],g=this.rowStart;g<=this.rowEnd;g++)w.push(this.host.session.getLine(g));if(k=w.join(` -`),x=R(L.start.row,L.start.column),O=R(L.end.row,L.end.column),L.start.rowthis.rowEnd){var D=this.host.session.getLine(this.rowEnd+1);O=L.end.row>this.rowEnd+1?D.length:L.end.column,O+=k.length+1,k=k+` -`+D}else C&&A>0&&(k=` -`+k,O+=1,x+=1);k.length>t&&(x1),o.preventDefault()},a.prototype.startSelect=function(o,r){o=o||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var t=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?t.selection.selectToPosition(o):r||t.selection.moveToPosition(o),r||this.select(),t.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var o,r=this.editor,t=r.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(t);if(i==-1)o=this.$clickSelection.end;else if(i==1)o=this.$clickSelection.start;else{var l=s(this.$clickSelection,t,r.session);t=l.cursor,o=l.anchor}r.selection.setSelectionAnchor(o.row,o.column)}r.selection.selectToPosition(t),r.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(o){var r,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y),l=t.selection[o](i.row,i.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(l.start),d=this.$clickSelection.comparePoint(l.end);if(f==-1&&d<=0)r=this.$clickSelection.end,(l.end.row!=i.row||l.end.column!=i.column)&&(i=l.start);else if(d==1&&f>=0)r=this.$clickSelection.start,(l.start.row!=i.row||l.start.column!=i.column)&&(i=l.end);else if(f==-1&&d==1)i=l.end,r=l.start;else{var C=s(this.$clickSelection,i,t.session);i=C.cursor,r=C.anchor}t.selection.setSelectionAnchor(r.row,r.column)}t.selection.selectToPosition(i),t.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var o=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(o>E||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(o){var r=o.getDocumentPosition(),t=this.editor,i=t.session,l=i.getBracketRange(r);l?(l.isEmpty()&&(l.start.column--,l.end.column++),this.setState("select")):(l=t.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=l,this.select()},a.prototype.onTripleClick=function(o){var r=o.getDocumentPosition(),t=this.editor;this.setState("selectByLines");var i=t.getSelectionRange();i.isMultiLine()&&i.contains(r.row,r.column)?(this.$clickSelection=t.selection.getLineRange(i.start.row),this.$clickSelection.end=t.selection.getLineRange(i.end.row).end):this.$clickSelection=t.selection.getLineRange(r.row),this.select()},a.prototype.onQuadClick=function(o){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(o){if(!o.getAccelKey()){o.getShiftKey()&&o.wheelY&&!o.wheelX&&(o.wheelX=o.wheelY,o.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var t=this.$lastScroll,i=o.domEvent.timeStamp,l=i-t.t,f=l?o.wheelX/l:t.vx,d=l?o.wheelY/l:t.vy;l<$&&(f=(f+t.vx)/2,d=(d+t.vy)/2);var C=Math.abs(f/d),b=!1;if(C>=1&&r.renderer.isScrollableBy(o.wheelX*o.speed,0)&&(b=!0),C<=1&&r.renderer.isScrollableBy(0,o.wheelY*o.speed)&&(b=!0),b)t.allowed=i;else if(i-t.allowed<$){var y=Math.abs(f)<=1.5*Math.abs(t.vx)&&Math.abs(d)<=1.5*Math.abs(t.vy);y?(b=!0,t.allowed=i):t.allowed=0}if(t.t=i,t.vx=f,t.vy=d,b)return r.renderer.scrollBy(o.wheelX*o.speed,o.wheelY*o.speed),o.stop()}},a}();u.prototype.selectEnd=u.prototype.selectByLinesEnd,u.prototype.selectAllEnd=u.prototype.selectByLinesEnd,u.prototype.selectByWordsEnd=u.prototype.selectByLinesEnd,v.DefaultHandlers=u;function c(a,o,r,t){return Math.sqrt(Math.pow(r-a,2)+Math.pow(t-o,2))}function s(a,o,r){if(a.start.row==a.end.row)var t=2*o.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var t=3*o.column-2*r.getLine(a.start.row).length;else var t=2*o.row-a.start.row-a.end.row;return t<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(h,v,W){var T=h("../lib/event"),E=h("../lib/useragent"),$=function(){function u(c,s){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=s,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return u.prototype.stopPropagation=function(){T.stopPropagation(this.domEvent),this.propagationStopped=!0},u.prototype.preventDefault=function(){T.preventDefault(this.domEvent),this.defaultPrevented=!0},u.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},u.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},u.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(c,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},u.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,s=c.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},u.prototype.getButton=function(){return T.getButton(this.domEvent)},u.prototype.getShiftKey=function(){return this.domEvent.shiftKey},u.prototype.getAccelKey=function(){return E.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},u}();v.MouseEvent=$}),ace.define("ace/lib/scroll",["require","exports","module"],function(h,v,W){v.preventParentScroll=function(E){E.stopPropagation();var $=E.currentTarget,u=$.scrollHeight>$.clientHeight;u||E.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(h,v,W){var T=this&&this.__extends||function(){var i=function(l,f){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,C){d.__proto__=C}||function(d,C){for(var b in C)Object.prototype.hasOwnProperty.call(C,b)&&(d[b]=C[b])},i(l,f)};return function(l,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");i(l,f);function d(){this.constructor=l}l.prototype=f===null?Object.create(f):(d.prototype=f.prototype,new d)}}(),E=this&&this.__values||function(i){var l=typeof Symbol=="function"&&Symbol.iterator,f=l&&i[l],d=0;if(f)return f.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&d>=i.length&&(i=void 0),{value:i&&i[d++],done:!i}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},$=h("./lib/dom");h("./lib/event");var u=h("./range").Range,c=h("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function i(l){this.isOpen=!1,this.$element=null,this.$parentNode=l}return i.prototype.$init=function(){return this.$element=$.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(l){this.getElement().textContent=l},i.prototype.setHtml=function(l){this.getElement().innerHTML=l},i.prototype.setPosition=function(l,f){this.getElement().style.left=l+"px",this.getElement().style.top=f+"px"},i.prototype.setClassName=function(l){$.addCssClass(this.getElement(),l)},i.prototype.setTheme=function(l){this.theme&&(this.theme.isDark&&$.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&$.removeCssClass(this.getElement(),this.theme.cssClass)),l.isDark&&$.addCssClass(this.getElement(),"ace_dark"),l.cssClass&&$.addCssClass(this.getElement(),l.cssClass),this.theme={isDark:l.isDark,cssClass:l.cssClass}},i.prototype.show=function(l,f,d){l!=null&&this.setText(l),f!=null&&d!=null&&this.setPosition(f,d),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(l){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i}(),o=function(){function i(){this.popups=[]}return i.prototype.addPopup=function(l){this.popups.push(l),this.updatePopups()},i.prototype.removePopup=function(l){var f=this.popups.indexOf(l);f!==-1&&(this.popups.splice(f,1),this.updatePopups())},i.prototype.updatePopups=function(){var l,f,d,C;this.popups.sort(function(L,A){return A.priority-L.priority});var b=[];try{for(var y=E(this.popups),m=y.next();!m.done;m=y.next()){var x=m.value,O=!0;try{for(var k=(d=void 0,E(b)),R=k.next();!R.done;R=k.next()){var B=R.value;if(this.doPopupsOverlap(B,x)){O=!1;break}}}catch(L){d={error:L}}finally{try{R&&!R.done&&(C=k.return)&&C.call(k)}finally{if(d)throw d.error}}O?b.push(x):x.hide()}}catch(L){l={error:L}}finally{try{m&&!m.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}},i.prototype.doPopupsOverlap=function(l,f){var d=l.getElement().getBoundingClientRect(),C=f.getElement().getBoundingClientRect();return d.leftC.left&&d.topC.top},i}(),r=new o;v.popupManager=r,v.Tooltip=a;var t=function(i){T(l,i);function l(f){f===void 0&&(f=document.body);var d=i.call(this,f)||this;d.timeout=void 0,d.lastT=0,d.idleTime=350,d.lastEvent=void 0,d.onMouseOut=d.onMouseOut.bind(d),d.onMouseMove=d.onMouseMove.bind(d),d.waitForHover=d.waitForHover.bind(d),d.hide=d.hide.bind(d);var C=d.getElement();return C.style.whiteSpace="pre-wrap",C.style.pointerEvents="auto",C.addEventListener("mouseout",d.onMouseOut),C.tabIndex=-1,C.addEventListener("blur",(function(){C.contains(document.activeElement)||this.hide()}).bind(d)),C.addEventListener("wheel",c),d}return l.prototype.addToEditor=function(f){f.on("mousemove",this.onMouseMove),f.on("mousedown",this.hide);var d=f.renderer.getMouseEventTarget();d&&typeof d.removeEventListener=="function"&&d.addEventListener("mouseout",this.onMouseOut,!0)},l.prototype.removeFromEditor=function(f){f.off("mousemove",this.onMouseMove),f.off("mousedown",this.hide);var d=f.renderer.getMouseEventTarget();d&&typeof d.removeEventListener=="function"&&d.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},l.prototype.onMouseMove=function(f,d){this.lastEvent=f,this.lastT=Date.now();var C=d.$mouseHandler.isMousePressed;if(this.isOpen){var b=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(b.row,b.column)||C||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||C||(this.lastEvent=f,this.timeout=setTimeout(this.waitForHover,this.idleTime))},l.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var f=Date.now()-this.lastT;if(this.idleTime-f>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-f);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},l.prototype.isOutsideOfText=function(f){var d=f.editor,C=f.getDocumentPosition(),b=d.session.getLine(C.row);if(C.column==b.length){var y=d.renderer.pixelToScreenCoordinates(f.clientX,f.clientY),m=d.session.documentToScreenPosition(C.row,C.column);if(m.column!=y.column||m.row!=y.row)return!0}return!1},l.prototype.setDataProvider=function(f){this.$gatherData=f},l.prototype.showForRange=function(f,d,C,b){if(!(b&&b!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var y=f.renderer;this.isOpen||(r.addPopup(this),this.$registerCloseEvents(),this.setTheme(y.theme)),this.isOpen=!0,this.range=u.fromPoints(d.start,d.end);var m=y.textToScreenCoordinates(d.start.row,d.start.column),x=y.scroller.getBoundingClientRect();m.pageX=t.length&&(t=void 0),{value:t&&t[f++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},$=h("../lib/dom"),u=h("./mouse_event").MouseEvent,c=h("../tooltip").HoverTooltip,s=h("../config").nls,a=h("../range").Range;function o(t){var i=t.editor,l=i.renderer.$gutterLayer;t.$tooltip=new r(i),t.$tooltip.addToEditor(i),t.$tooltip.setDataProvider(function(f,d){var C=f.getDocumentPosition().row;t.$tooltip.showTooltip(C)}),t.editor.setDefaultHandler("guttermousedown",function(f){if(!(!i.isFocused()||f.getButton()!=0)){var d=l.getRegion(f);if(d!="foldWidgets"){var C=f.getDocumentPosition().row,b=i.session.selection;if(f.getShiftKey())b.selectTo(C,0);else{if(f.domEvent.detail==2)return i.selectAll(),f.preventDefault();t.$clickSelection=i.selection.getLineRange(C)}return t.setState("selectByLines"),t.captureMouse(f),f.preventDefault()}}})}v.GutterHandler=o;var r=function(t){T(i,t);function i(l){var f=t.call(this,l.container)||this;f.id="gt"+ ++i.$uid,f.editor=l,f.visibleTooltipRow;var d=f.getElement();return d.setAttribute("role","tooltip"),d.setAttribute("id",f.id),d.style.pointerEvents="auto",f.idleTime=50,f.onDomMouseMove=f.onDomMouseMove.bind(f),f.onDomMouseOut=f.onDomMouseOut.bind(f),f.setClassName("ace_gutter-tooltip"),f}return i.prototype.onDomMouseMove=function(l){var f=new u(l,this.editor);this.onMouseMove(f,this.editor)},i.prototype.onDomMouseOut=function(l){var f=new u(l,this.editor);this.onMouseOut(f)},i.prototype.addToEditor=function(l){var f=l.renderer.$gutter;f.addEventListener("mousemove",this.onDomMouseMove),f.addEventListener("mouseout",this.onDomMouseOut),t.prototype.addToEditor.call(this,l)},i.prototype.removeFromEditor=function(l){var f=l.renderer.$gutter;f.removeEventListener("mousemove",this.onDomMouseMove),f.removeEventListener("mouseout",this.onDomMouseOut),t.prototype.removeFromEditor.call(this,l)},i.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),t.prototype.destroy.call(this)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(l){var f,d=this.editor.renderer.$gutterLayer,C=d.$annotations[l],b;C?b={displayText:Array.from(C.displayText),type:Array.from(C.type)}:b={displayText:[],type:[]};var y=d.session.getFoldLine(l);if(y&&d.$showFoldedAnnotations){for(var m={error:[],security:[],warning:[],info:[],hint:[]},x={error:1,security:2,warning:3,info:4,hint:5},O,k=l+1;k<=y.end.row;k++)if(d.$annotations[k])for(var R=0;R2)return d.childNodes[2]}},i.prototype.$findCellByRow=function(l){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(f){return f.row===l})},i.prototype.hide=function(l){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var f=this.$findLinkedAnnotationNode(this.visibleTooltipRow);f&&f.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),t.prototype.hide.call(this,l)}},i.annotationsToSummaryString=function(l){var f,d,C=[],b=["error","security","warning","info","hint"];try{for(var y=E(b),m=y.next();!m.done;m=y.next()){var x=m.value;if(l[x].length){var O=l[x].length===1?i.annotationLabels[x].singular:i.annotationLabels[x].plural;C.push("".concat(l[x].length," ").concat(O))}}}catch(k){f={error:k}}finally{try{m&&!m.done&&(d=y.return)&&d.call(y)}finally{if(f)throw f.error}}return C.join(", ")},i.prototype.isOutsideOfText=function(l){var f=l.editor,d=f.renderer.$gutter.getBoundingClientRect();return!(l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom)},i}(c);r.$uid=0,v.GutterTooltip=r}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(h,v,W){var T=h("../lib/dom"),E=h("../lib/event"),$=h("../lib/useragent"),u=200,c=200,s=5;function a(r){var t=r.editor,i=T.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var l=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];l.forEach(function(K){r[K]=this[K]},this),t.on("mousedown",this.onMouseDown.bind(r));var f=t.container,d,C,b,y,m,x,O=0,k,R,B,L,A;this.onDragStart=function(K){if(this.cancelDrag||!f.draggable){var X=this;return setTimeout(function(){X.startSelect(),X.captureMouse(K)},0),K.preventDefault()}m=t.getSelectionRange();var Z=K.dataTransfer;Z.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(i),Z.setDragImage&&Z.setDragImage(i,0,0),setTimeout(function(){t.container.removeChild(i)}),Z.clearData(),Z.setData("Text",t.session.getTextRange()),R=!0,this.setState("drag")},this.onDragEnd=function(K){if(f.draggable=!1,R=!1,this.setState(null),!t.getReadOnly()){var X=K.dataTransfer.dropEffect;!k&&X=="move"&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(K){if(!(t.getReadOnly()||!Y(K.dataTransfer)))return C=K.clientX,b=K.clientY,d||D(),O++,K.dataTransfer.dropEffect=k=te(K),E.preventDefault(K)},this.onDragOver=function(K){if(!(t.getReadOnly()||!Y(K.dataTransfer)))return C=K.clientX,b=K.clientY,d||(D(),O++),H!==null&&(H=null),K.dataTransfer.dropEffect=k=te(K),E.preventDefault(K)},this.onDragLeave=function(K){if(O--,O<=0&&d)return P(),k=null,E.preventDefault(K)},this.onDrop=function(K){if(x){var X=K.dataTransfer;if(R)switch(k){case"move":m.contains(x.row,x.column)?m={start:x,end:x}:m=t.moveText(m,x);break;case"copy":m=t.moveText(m,x,!0);break}else{var Z=X.getData("Text");m={start:x,end:t.session.insert(x,Z)},t.focus(),k=null}return P(),E.preventDefault(K)}},E.addListener(f,"dragstart",this.onDragStart.bind(r),t),E.addListener(f,"dragend",this.onDragEnd.bind(r),t),E.addListener(f,"dragenter",this.onDragEnter.bind(r),t),E.addListener(f,"dragover",this.onDragOver.bind(r),t),E.addListener(f,"dragleave",this.onDragLeave.bind(r),t),E.addListener(f,"drop",this.onDrop.bind(r),t);function w(K,X){var Z=Date.now(),J=!X||K.row!=X.row,re=!X||K.column!=X.column;if(!L||J||re)t.moveCursorToPosition(K),L=Z,A={x:C,y:b};else{var ae=o(A.x,A.y,C,b);ae>s?L=null:Z-L>=c&&(t.renderer.scrollCursorIntoView(),L=null)}}function g(K,X){var Z=Date.now(),J=t.renderer.layerConfig.lineHeight,re=t.renderer.layerConfig.characterWidth,ae=t.renderer.scroller.getBoundingClientRect(),he={x:{left:C-ae.left,right:ae.right-C},y:{top:b-ae.top,bottom:ae.bottom-b}},pe=Math.min(he.x.left,he.x.right),_e=Math.min(he.y.top,he.y.bottom),De={row:K.row,column:K.column};pe/re<=2&&(De.column+=he.x.left=u&&t.renderer.scrollCursorIntoView(De):B=Z:B=null}function _(){var K=x;x=t.renderer.screenToTextCoordinates(C,b),w(x,K),g(x,K)}function D(){m=t.selection.toOrientedRange(),d=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(y),_(),y=setInterval(_,20),O=0,E.addListener(document,"mousemove",U)}function P(){clearInterval(y),t.session.removeMarker(d),d=null,t.selection.fromOrientedRange(m),t.isFocused()&&!R&&t.$resetCursorStyle(),m=null,x=null,O=0,B=null,L=null,E.removeListener(document,"mousemove",U)}var H=null;function U(){H==null&&(H=setTimeout(function(){H!=null&&d&&P()},20))}function Y(K){var X=K.types;return!X||Array.prototype.some.call(X,function(Z){return Z=="text/plain"||Z=="Text"})}function te(K){var X=["copy","copymove","all","uninitialized"],Z=["move","copymove","linkmove","all","uninitialized"],J=$.isMac?K.altKey:K.ctrlKey,re="uninitialized";try{re=K.dataTransfer.effectAllowed.toLowerCase()}catch{}var ae="none";return J&&X.indexOf(re)>=0?ae="copy":Z.indexOf(re)>=0?ae="move":X.indexOf(re)>=0&&(ae="copy"),ae}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,t=r.container;t.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var i=$.isWin?"default":"move";r.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(r){var t=this.editor.container;if($.isIE&&this.state=="dragReady"){var i=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if(this.state==="dragWait"){var i=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var t=this.editor,i=r.inSelection(),l=r.getButton(),f=r.domEvent.detail||1;if(f===1&&l===0&&i){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var d=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in d&&(d.unselectable="on"),t.getDragDelay()){if($.isWebKit){this.cancelDrag=!0;var C=t.container;C.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(a.prototype);function o(r,t,i,l){return Math.sqrt(Math.pow(i-r,2)+Math.pow(l-t,2))}v.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(h,v,W){var T=h("./mouse_event").MouseEvent,E=h("../lib/event"),$=h("../lib/dom");v.addTouchListeners=function(u,c){var s="scroll",a,o,r,t,i,l,f=0,d,C=0,b=0,y=0,m,x;function O(){var w=window.navigator&&window.navigator.clipboard,g=!1,_=function(){var H=c.getCopyText(),U=c.session.getUndoManager().hasUndo();x.replaceChild($.buildDom(g?["span",!H&&D("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],H&&D("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],H&&D("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&D("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],U&&D("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],D("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],D("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),x.firstChild)},D=function(H){return c.commands.canExecute(H,c)},P=function(H){var U=H.target.getAttribute("action");if(U=="more"||!g)return g=!g,_();U=="paste"?w.readText().then(function(Y){c.execCommand(U,Y)}):U&&((U=="cut"||U=="copy")&&(w?w.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(U)),x.firstChild.style.display="none",g=!1,U!="openCommandPalette"&&c.focus()};x=$.buildDom(["div",{class:"ace_mobile-menu",onclick:P},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container),x.addEventListener("touchstart",function(H){s="menu",H.stopPropagation(),H.preventDefault(),c.textInput.focus()}),x.addEventListener("touchend",function(H){H.stopPropagation(),H.preventDefault(),P(H)})}function k(){if(!c.getOption("enableMobileMenu")){x&&R();return}x||O();var w=c.selection.cursor,g=c.renderer.textToScreenCoordinates(w.row,w.column),_=c.renderer.textToScreenCoordinates(0,0).pageX,D=c.renderer.scrollLeft,P=c.container.getBoundingClientRect();x.style.top=g.pageY-P.top-3+"px",g.pageX-P.left=2?c.selection.getLineRange(d.row):c.session.getBracketRange(d);w&&!w.isEmpty()?c.selection.setRange(w):c.selection.selectWord(),s="wait"}E.addListener(u,"contextmenu",function(w){if(m){var g=c.textInput.getElement();g.focus()}},c),E.addListener(u,"touchstart",function(w){var g=w.touches;if(i||g.length>1){clearTimeout(i),i=null,r=-1,s="zoom";return}m=c.$mouseHandler.isMousePressed=!0;var _=c.renderer.layerConfig.lineHeight,D=c.renderer.layerConfig.lineHeight,P=w.timeStamp;t=P;var H=g[0],U=H.clientX,Y=H.clientY;Math.abs(a-U)+Math.abs(o-Y)>_&&(r=-1),a=w.clientX=U,o=w.clientY=Y,b=y=0;var te=new T(w,c);if(d=te.getDocumentPosition(),P-r<500&&g.length==1&&!f)C++,w.preventDefault(),w.button=0,L();else{C=0;var K=c.selection.cursor,X=c.selection.isEmpty()?K:c.selection.anchor,Z=c.renderer.$cursorLayer.getPixelPosition(K,!0),J=c.renderer.$cursorLayer.getPixelPosition(X,!0),re=c.renderer.scroller.getBoundingClientRect(),ae=c.renderer.layerConfig.offset,he=c.renderer.scrollLeft,pe=function(je,it){return je=je/D,it=it/_-.75,je*je+it*it};if(w.clientXDe?"cursor":"anchor"),De<3.5?s="anchor":_e<3.5?s="cursor":s="scroll",i=setTimeout(B,450)}r=P},c),E.addListener(u,"touchend",function(w){m=c.$mouseHandler.isMousePressed=!1,l&&clearInterval(l),s=="zoom"?(s="",f=0):i?(c.selection.moveToPosition(d),f=0,k()):s=="scroll"?(A(),R()):k(),clearTimeout(i),i=null},c),E.addListener(u,"touchmove",function(w){i&&(clearTimeout(i),i=null);var g=w.touches;if(!(g.length>1||s=="zoom")){var _=g[0],D=a-_.clientX,P=o-_.clientY;if(s=="wait")if(D*D+P*P>4)s="cursor";else return w.preventDefault();a=_.clientX,o=_.clientY,w.clientX=_.clientX,w.clientY=_.clientY;var H=w.timeStamp,U=H-t;if(t=H,s=="scroll"){var Y=new T(w,c);Y.speed=1,Y.wheelX=D,Y.wheelY=P,10*Math.abs(D)0)if(De==16){for(Oe=it;Oe-1){for(Oe=it;Oe=0&&J[bt]==m;bt--)X[bt]=T}}}function U(K,X,Z){if(!(E=K){for(ae=re+1;ae=K;)ae++;for(he=re,pe=ae-1;he=X.length||(ae=Z[J-1])!=l&&ae!=f||(he=X[J+1])!=l&&he!=f?d:($&&(he=f),he==ae?he:d);case O:return ae=J>0?Z[J-1]:C,ae==l&&J+10&&Z[J-1]==l)return l;if($)return d;for(_e=J+1,pe=X.length;_e=1425&&De<=2303||De==64286;if(ae=X[_e],je&&(ae==i||ae==y))return i}return J<1||(ae=X[J-1])==C?d:Z[J-1];case C:return $=!1,u=!0,T;case b:return c=!0,d;case B:case L:case w:case g:case A:$=!1;case _:return d}}function te(K){var X=K.charCodeAt(0),Z=X>>8;return Z==0?X>191?t:D[X]:Z==5?/[\u0591-\u05f4]/.test(K)?i:t:Z==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(K)?R:/[\u0660-\u0669\u066b-\u066c]/.test(K)?f:X==1642?k:/[\u06f0-\u06f9]/.test(K)?l:y:Z==32&&X<=8287?P[X&255]:Z==254&&X>=65136?y:d}v.L=t,v.R=i,v.EN=l,v.ON_R=3,v.AN=4,v.R_H=5,v.B=6,v.RLE=7,v.DOT="·",v.doBidiReorder=function(K,X,Z){if(K.length<2)return{};var J=K.split(""),re=new Array(J.length),ae=new Array(J.length),he=[];T=Z?r:o,H(J,he,J.length,X);for(var pe=0;pey&&X[pe]0&&J[pe-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(J[pe])&&(he[pe-1]=he[pe]=v.R_H,pe++);J[J.length-1]===v.DOT&&(he[J.length-1]=v.B),J[0]==="‫"&&(he[0]=v.RLE);for(var pe=0;pe=0&&(s=this.session.$docRowCache[o])}return s},c.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var o,r=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(o=this.session.$getRowCacheIndex(a,this.currentRow-s-1),o===r);)r=o,s++;else s=this.currentRow;return s},c.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var o=s===this.session.getLength()-1,r=o?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var t=this.session.$wrapData[s];t&&(a===void 0&&(a=this.getSplitIndex()),a>0&&t.length?(this.wrapIndent=t.indent,this.wrapOffset=this.wrapIndent*this.charWidths[T.L],this.line=aa?this.session.getOverwrite()?s:s-1:a,r=T.getVisualFromLogicalIdx(o,this.bidiMap),t=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&s<=a&&t[r]%2!==0&&r++;for(var l=0;la&&t[r]%2===0&&(i+=this.charWidths[t[r]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},c.prototype.getSelections=function(s,a){var o=this.bidiMap,r=o.bidiLevels,t,i=[],l=0,f=Math.min(s,a)-this.wrapIndent,d=Math.max(s,a)-this.wrapIndent,C=!1,b=!1,y=0;this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var m,x=0;x=f&&mr+l/2;){if(r+=l,t===i.length-1){l=0;break}l=this.charWidths[i[++t]]}return t>0&&i[t-1]%2!==0&&i[t]%2===0?(o0&&i[t-1]%2===0&&i[t]%2!==0?a=1+(o>r?this.bidiMap.logicalFromVisual[t]:this.bidiMap.logicalFromVisual[t-1]):this.isRtlDir&&t===i.length-1&&l===0&&i[t-1]%2===0||!this.isRtlDir&&t===0&&i[t]%2!==0?a=1+this.bidiMap.logicalFromVisual[t]:(t>0&&i[t-1]%2!==0&&l!==0&&t--,a=this.bidiMap.logicalFromVisual[t]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},c}();v.BidiHandler=u}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(h,v,W){var T=h("./lib/oop"),E=h("./lib/lang"),$=h("./lib/event_emitter").EventEmitter,u=h("./range").Range,c=function(){function s(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var o=this;this.cursor.on("change",function(r){o.$cursorChanged=!0,o.$silent||o._emit("changeCursor"),!o.$isEmpty&&!o.$silent&&o._emit("changeSelection"),!o.$keepDesiredColumnOnChange&&r.old.column!=r.value.column&&(o.$desiredColumn=null)}),this.anchor.on("change",function(){o.$anchorChanged=!0,!o.$isEmpty&&!o.$silent&&o._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,o){this.$isEmpty=!1,this.anchor.setPosition(a,o)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,o=this.lead;return a.row>o.row||a.row==o.row&&a.column>o.column},s.prototype.getRange=function(){var a=this.anchor,o=this.lead;return this.$isEmpty?u.fromPoints(o,o):this.isBackwards()?u.fromPoints(o,a):u.fromPoints(a,o)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,o){var r=o?a.end:a.start,t=o?a.start:a.end;this.$setSelection(r.row,r.column,t.row,t.column)},s.prototype.$setSelection=function(a,o,r,t){if(!this.$silent){var i=this.$isEmpty,l=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,o),this.cursor.setPosition(r,t),this.$isEmpty=!u.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||l)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var o=this.lead;this.$isEmpty&&this.setSelectionAnchor(o.row,o.column),a.call(this)},s.prototype.selectTo=function(a,o){this.$moveSelection(function(){this.moveCursorTo(a,o)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,o){this.clearSelection(),this.moveCursorTo(a,o)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,o){if(typeof o>"u"){var r=a||this.lead;a=r.row,o=r.column}return this.session.getWordRange(a,o)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),o=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(o)},s.prototype.getLineRange=function(a,o){var r=typeof a=="number"?a:this.lead.row,t,i=this.session.getFoldLine(r);return i?(r=i.start.row,t=i.end.row):t=r,o===!0?new u(r,0,t,this.session.getLine(t).length):new u(r,0,t+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,o,r){var t=a.column,i=a.column+o;return r<0&&(t=a.column-o,i=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(t,i).split(" ").length-1==o},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),o;if(o=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(o.start.row,o.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var r=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,r,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-r):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),o;if(o=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(o.end.row,o.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(o.column=t)}}this.moveCursorTo(o.row,o.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,o=this.doc.getLine(a).length;this.moveCursorTo(a,o)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,o=this.lead.column,r=this.doc.getLine(a),t=r.substring(o);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(a,o,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(t)&&(o+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,t=r.substring(o)),o>=r.length){this.moveCursorTo(a,r.length),this.moveCursorRight(),a0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(i)&&(o-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,o)},s.prototype.$shortWordEndIndex=function(a){var o=0,r,t=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(a))o=this.session.tokenRe.lastIndex;else{for(;(r=a[o])&&t.test(r);)o++;if(o<1){for(i.lastIndex=0;(r=a[o])&&!i.test(r);)if(i.lastIndex=0,o++,t.test(r))if(o>2){o--;break}else{for(;(r=a[o])&&t.test(r);)o++;if(o>2)break}}}return i.lastIndex=0,o},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,o=this.lead.column,r=this.doc.getLine(a),t=r.substring(o),i=this.session.getFoldAt(a,o,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(o==r.length){var l=this.doc.getLength();do a++,t=this.doc.getLine(a);while(a0&&/^\s*$/.test(t));o=t.length,/\s+$/.test(t)||(t="")}var i=E.stringReverse(t),l=this.$shortWordEndIndex(i);return this.moveCursorTo(a,o-l)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,o){var r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),t;if(o===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(t=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(t/this.session.$bidiHandler.charWidths[0])):t=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];a<0?a-=i.rowsAbove||0:a>0&&(a+=i.rowCount-(i.rowsAbove||0))}var l=this.session.screenToDocumentPosition(r.row+a,r.column,t);a!==0&&o===0&&l.row===this.lead.row&&(l.column,this.lead.column),this.moveCursorTo(l.row,l.column+o,o===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,o,r){var t=this.session.getFoldAt(a,o,1);t&&(a=t.start.row,o=t.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(i.charAt(o))&&i.charAt(o-1)&&(this.lead.row==a&&this.lead.column==o+1?o=o-1:o=o+1),this.lead.setPosition(a,o),this.$keepDesiredColumnOnChange=!1,r||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,o,r){var t=this.session.screenToDocumentPosition(a,o);this.moveCursorTo(t.row,t.column,r)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var o=this.getRange();return a?(a.start.column=o.start.column,a.start.row=o.start.row,a.end.column=o.end.column,a.end.row=o.end.row):a=o,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var o=this.getCursor();try{a(this);var r=this.getCursor();return u.fromPoints(o,r)}catch{return u.fromPoints(o,o)}finally{this.moveCursorToPosition(o)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(o){var r=o.clone();return r.isBackwards=o.cursor==o.start,r});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var o=a.length;o--;){var r=u.fromPoints(a[o].start,a[o].end);a[o].isBackwards&&(r.cursor=r.start),this.addRange(r,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var o=this.ranges.length;o--;)if(!this.ranges[o].isEqual(a[o]))return!1;return!0},s}();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,T.implement(c.prototype,$),v.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(h,v,W){var T=h("./lib/report_error").reportError,E=2e3,$=function(){function u(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],o=[],r=0,t=this.matchMappings[s]={defaultToken:"text"},i="g",l=[],f=0;f1?d.onMatch=this.$applyToken:d.onMatch=d.token),b>1&&(/\\\d/.test(d.regex)?C=d.regex.replace(/\\([0-9]+)/g,function(y,m){return"\\"+(parseInt(m,10)+r+1)}):(b=1,C=this.removeCapturingGroups(d.regex)),!d.splitRegex&&typeof d.token!="string"&&l.push(d)),t[r]=f,r+=b,o.push(C),d.onMatch||(d.onMatch=null)}}o.length||(t[0]=0,o.push("$")),l.forEach(function(y){y.splitRegex=this.createSplitterRegexp(y.regex,i)},this),this.regExps[s]=new RegExp("("+o.join(")|(")+")|($)",i)}}return u.prototype.$setMaxTokenCount=function(c){E=c|0},u.prototype.$applyToken=function(c){var s=this.splitRegex.exec(c).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:c}];for(var o=[],r=0,t=a.length;rd){var k=c.substring(d,O-x.length);b.type==y?b.value+=k:(b.type&&f.push(b),b={type:y,value:k})}for(var R=0;RE){for(C>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:c});d1&&a[0]!==o&&a.unshift("#tmp",o),{tokens:f,state:a.length?a:o}},u}();$.prototype.reportError=T,v.Tokenizer=$}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(h,v,W){var T=h("../lib/deep_copy").deepCopy,E;E=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(c,s){if(!s){for(var a in c)this.$rules[a]=c[a];return}for(var a in c){for(var o=c[a],r=0;r=this.$rowTokens.length;){if(this.$row+=1,u||(u=this.$session.getLength()),this.$row>=u)return this.$row=u-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},$.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},$.prototype.getCurrentTokenRow=function(){return this.$row},$.prototype.getCurrentTokenColumn=function(){var u=this.$rowTokens,c=this.$tokenIndex,s=u[c].start;if(s!==void 0)return s;for(s=0;c>0;)c-=1,s+=u[c].value.length;return s},$.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},$.prototype.getCurrentTokenRange=function(){var u=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new T(this.$row,c,this.$row,c+u.value.length)},$}();v.TokenIterator=E}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(h,v,W){var T=h("../../lib/oop"),E=h("../behaviour").Behaviour,$=h("../../token_iterator").TokenIterator,u=h("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,o={},r={'"':'"',"'":"'"},t=function(f){var d=-1;if(f.multiSelect&&(d=f.selection.index,o.rangeCount!=f.multiSelect.rangeCount&&(o={rangeCount:f.multiSelect.rangeCount})),o[d])return a=o[d];a=o[d]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(f,d,C,b){var y=f.end.row-f.start.row;return{text:C+d+b,selection:[0,f.start.column+1,y,f.end.column+(y?0:1)]}},l;l=function(f){f=f||{},this.add("braces","insertion",function(d,C,b,y,m){var x=b.getCursorPosition(),O=y.doc.getLine(x.row);if(m=="{"){t(b);var k=b.getSelectionRange(),R=y.doc.getTextRange(k),B=y.getTokenAt(x.row,x.column);if(R!==""&&R!=="{"&&b.getWrapBehavioursEnabled())return i(k,R,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var L=[/tag\-(?:open|name)/,/attribute\-name/];return L.some(function(H){return H.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[x.column-B.start-1]!=="$"?void 0:(l.recordAutoInsert(b,y,"}"),{text:"{}",selection:[1,1]})}else if(l.isSaneInsertion(b,y))return/[\]\}\)]/.test(O[x.column])||b.inMultiSelectMode||f.braces?(l.recordAutoInsert(b,y,"}"),{text:"{}",selection:[1,1]}):(l.recordMaybeInsert(b,y,"{"),{text:"{",selection:[1,1]})}else if(m=="}"){t(b);var A=O.substring(x.column,x.column+1);if(A=="}"){var w=y.$findOpeningBracket("}",{column:x.column+1,row:x.row});if(w!==null&&l.isAutoInsertedClosing(x,O,m))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(m==` -`||m==`\r -`){t(b);var g="";l.isMaybeInsertedClosing(x,O)&&(g=u.stringRepeat("}",a.maybeInsertedBrackets),l.clearMaybeInsertedClosing());var A=O.substring(x.column,x.column+1);if(A==="}"){var _=y.findMatchingBracket({row:x.row,column:x.column+1},"}");if(!_)return null;var D=this.$getIndent(y.getLine(_.row))}else if(g)var D=this.$getIndent(O);else{l.clearMaybeInsertedClosing();return}var P=D+y.getTabString();return{text:` -`+P+` -`+D+g,selection:[1,P.length,1,P.length]}}else l.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(d,C,b,y,m){var x=y.doc.getTextRange(m);if(!m.isMultiLine()&&x=="{"){t(b);var O=y.doc.getLine(m.start.row),k=O.substring(m.end.column,m.end.column+1);if(k=="}")return m.end.column++,m;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(d,C,b,y,m){if(m=="("){t(b);var x=b.getSelectionRange(),O=y.doc.getTextRange(x);if(O!==""&&b.getWrapBehavioursEnabled())return i(x,O,"(",")");if(l.isSaneInsertion(b,y))return l.recordAutoInsert(b,y,")"),{text:"()",selection:[1,1]}}else if(m==")"){t(b);var k=b.getCursorPosition(),R=y.doc.getLine(k.row),B=R.substring(k.column,k.column+1);if(B==")"){var L=y.$findOpeningBracket(")",{column:k.column+1,row:k.row});if(L!==null&&l.isAutoInsertedClosing(k,R,m))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(d,C,b,y,m){var x=y.doc.getTextRange(m);if(!m.isMultiLine()&&x=="("){t(b);var O=y.doc.getLine(m.start.row),k=O.substring(m.start.column+1,m.start.column+2);if(k==")")return m.end.column++,m}}),this.add("brackets","insertion",function(d,C,b,y,m){if(m=="["){t(b);var x=b.getSelectionRange(),O=y.doc.getTextRange(x);if(O!==""&&b.getWrapBehavioursEnabled())return i(x,O,"[","]");if(l.isSaneInsertion(b,y))return l.recordAutoInsert(b,y,"]"),{text:"[]",selection:[1,1]}}else if(m=="]"){t(b);var k=b.getCursorPosition(),R=y.doc.getLine(k.row),B=R.substring(k.column,k.column+1);if(B=="]"){var L=y.$findOpeningBracket("]",{column:k.column+1,row:k.row});if(L!==null&&l.isAutoInsertedClosing(k,R,m))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(d,C,b,y,m){var x=y.doc.getTextRange(m);if(!m.isMultiLine()&&x=="["){t(b);var O=y.doc.getLine(m.start.row),k=O.substring(m.start.column+1,m.start.column+2);if(k=="]")return m.end.column++,m}}),this.add("string_dquotes","insertion",function(d,C,b,y,m){var x=y.$mode.$quotes||r;if(m.length==1&&x[m]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(m)!=-1)return;t(b);var O=m,k=b.getSelectionRange(),R=y.doc.getTextRange(k);if(R!==""&&(R.length!=1||!x[R])&&b.getWrapBehavioursEnabled())return i(k,R,O,O);if(!R){var B=b.getCursorPosition(),L=y.doc.getLine(B.row),A=L.substring(B.column-1,B.column),w=L.substring(B.column,B.column+1),g=y.getTokenAt(B.row,B.column),_=y.getTokenAt(B.row,B.column+1);if(A=="\\"&&g&&/escape/.test(g.type))return null;var D=g&&/string|escape/.test(g.type),P=!_||/string|escape/.test(_.type),H;if(w==O)H=D!==P,H&&/string\.end/.test(_.type)&&(H=!1);else{if(D&&!P||D&&P)return null;var U=y.$mode.tokenRe;U.lastIndex=0;var Y=U.test(A);U.lastIndex=0;var te=U.test(w),K=y.$mode.$pairQuotesAfter,X=K&&K[O]&&K[O].test(A);if(!X&&Y||te||w&&!/[\s;,.})\]\\]/.test(w))return null;var Z=L[B.column-2];if(A==O&&(Z==O||U.test(Z)))return null;H=!0}return{text:H?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(d,C,b,y,m){var x=y.$mode.$quotes||r,O=y.doc.getTextRange(m);if(!m.isMultiLine()&&x.hasOwnProperty(O)){t(b);var k=y.doc.getLine(m.start.row),R=k.substring(m.start.column+1,m.start.column+2);if(R==O)return m.end.column++,m}}),f.closeDocComment!==!1&&this.add("doc comment end","insertion",function(d,C,b,y,m){if(d==="doc-start"&&(m===` -`||m===`\r -`)&&b.selection.isEmpty()){var x=b.getCursorPosition();if(x.column===0)return;for(var O=y.doc.getLine(x.row),k=y.doc.getLine(x.row+1),R=y.getTokens(x.row),B=0,L=0;L=x.column){if(B===x.column){if(!/\.doc/.test(A.type))return;if(/\*\//.test(A.value)){var w=R[L+1];if(!w||!/\.doc/.test(w.type))return}}var g=x.column-(B-A.value.length),_=A.value.indexOf("*/"),D=A.value.indexOf("/**",_>-1?_+2:0);if(D!==-1&&g>D&&g=_&&g<=D||!/\.doc/.test(A.type))return;break}}var P=this.$getIndent(O);if(/\s*\*/.test(k))return/^\s*\*/.test(O)?{text:m+P+"* ",selection:[1,2+P.length,1,2+P.length]}:{text:m+P+" * ",selection:[1,3+P.length,1,3+P.length]};if(/\/\*\*/.test(O.substring(0,x.column)))return{text:m+P+" * "+m+" "+P+"*/",selection:[1,4+P.length,1,4+P.length]}}})},l.isSaneInsertion=function(f,d){var C=f.getCursorPosition(),b=new $(d,C.row,C.column);if(!this.$matchTokenType(b.getCurrentToken()||"text",c)){if(/[)}\]]/.test(f.session.getLine(C.row)[C.column]))return!0;var y=new $(d,C.row,C.column+1);if(!this.$matchTokenType(y.getCurrentToken()||"text",c))return!1}return b.stepForward(),b.getCurrentTokenRow()!==C.row||this.$matchTokenType(b.getCurrentToken()||"text",s)},l.$matchTokenType=function(f,d){return d.indexOf(f.type||f)>-1},l.recordAutoInsert=function(f,d,C){var b=f.getCursorPosition(),y=d.doc.getLine(b.row);this.isAutoInsertedClosing(b,y,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=b.row,a.autoInsertedLineEnd=C+y.substr(b.column),a.autoInsertedBrackets++},l.recordMaybeInsert=function(f,d,C){var b=f.getCursorPosition(),y=d.doc.getLine(b.row);this.isMaybeInsertedClosing(b,y)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=b.row,a.maybeInsertedLineStart=y.substr(0,b.column)+C,a.maybeInsertedLineEnd=y.substr(b.column),a.maybeInsertedBrackets++},l.isAutoInsertedClosing=function(f,d,C){return a.autoInsertedBrackets>0&&f.row===a.autoInsertedRow&&C===a.autoInsertedLineEnd[0]&&d.substr(f.column)===a.autoInsertedLineEnd},l.isMaybeInsertedClosing=function(f,d){return a.maybeInsertedBrackets>0&&f.row===a.maybeInsertedRow&&d.substr(f.column)===a.maybeInsertedLineEnd&&d.substr(0,f.column)==a.maybeInsertedLineStart},l.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},l.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},T.inherits(l,E),v.CstyleBehaviour=l}),ace.define("ace/unicode",["require","exports","module"],function(h,v,W){for(var T=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],E=0,$=[],u=0;u2?Z%m!=m-1:Z%m==0}}else{if(!this.blockComment)return!1;var O=this.blockComment.start,k=this.blockComment.end,R=new RegExp("^(\\s*)(?:"+s.escapeRegExp(O)+")"),B=new RegExp("(?:"+s.escapeRegExp(k)+")\\s*$"),L=function(H,U){w(H,U)||(!C||/\S/.test(H))&&(d.insertInLine({row:U,column:H.length},k),d.insertInLine({row:U,column:y},O))},A=function(H,U){var Y;(Y=H.match(B))&&d.removeInLine(U,H.length-Y[0].length,H.length),(Y=H.match(R))&&d.removeInLine(U,Y[1].length,Y[0].length)},w=function(H,U){if(R.test(H))return!0;for(var Y=i.getTokens(U),te=0;teH.length&&(P=H.length)}),y==1/0&&(y=P,C=!1,b=!1),x&&y%m!=0&&(y=Math.floor(y/m)*m),D(b?A:L)},this.toggleBlockComment=function(t,i,l,f){var d=this.blockComment;if(d){!d.start&&d[0]&&(d=d[0]);var C=new a(i,f.row,f.column),b=C.getCurrentToken();i.selection;var y=i.selection.toOrientedRange(),m,x;if(b&&/comment/.test(b.type)){for(var O,k;b&&/comment/.test(b.type);){var R=b.value.indexOf(d.start);if(R!=-1){var B=C.getCurrentTokenRow(),L=C.getCurrentTokenColumn()+R;O=new o(B,L,B,L+d.start.length);break}b=C.stepBackward()}for(var C=new a(i,f.row,f.column),b=C.getCurrentToken();b&&/comment/.test(b.type);){var R=b.value.indexOf(d.end);if(R!=-1){var B=C.getCurrentTokenRow(),L=C.getCurrentTokenColumn()+R;k=new o(B,L,B,L+d.end.length);break}b=C.stepForward()}k&&i.remove(k),O&&(i.remove(O),m=O.start.row,x=-d.start.length)}else x=d.start.length,m=l.start.row,i.insert(l.end,d.end),i.insert(l.start,d.start);y.start.row==m&&(y.start.column+=x),y.end.row==m&&(y.end.column+=x),i.selection.fromOrientedRange(y)}},this.getNextLineIndent=function(t,i,l){return this.$getIndent(i)},this.checkOutdent=function(t,i,l){return!1},this.autoOutdent=function(t,i,l){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){this.$embeds=[],this.$modes={};for(var i in t)if(t[i]){var l=t[i],f=l.prototype.$id,d=T.$modes[f];d||(T.$modes[f]=d=new l),T.$modes[i]||(T.$modes[i]=d),this.$embeds.push(i),this.$modes[i]=d}for(var C=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=function(m){(function(x){var O=C[m],k=x[O];x[C[m]]=function(){return this.$delegator(O,arguments,k)}})(y)},y=this,i=0;ic[s].column&&s++,r.unshift(s,0),c.splice.apply(c,r),this.$updateRows()}}},$.prototype.$updateRows=function(){var u=this.session.lineWidgets;if(u){var c=!0;u.forEach(function(s,a){if(s)for(c=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),c&&(this.session.lineWidgets=null)}},$.prototype.$registerLineWidget=function(u){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[u.row];return c&&(u.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[u.row]=u,u},$.prototype.addLineWidget=function(u){if(this.$registerLineWidget(u),u.session=this.session,!this.editor)return u;var c=this.editor.renderer;u.html&&!u.el&&(u.el=T.createElement("div"),u.el.innerHTML=u.html),u.text&&!u.el&&(u.el=T.createElement("div"),u.el.textContent=u.text),u.el&&(T.addCssClass(u.el,"ace_lineWidgetContainer"),u.className&&T.addCssClass(u.el,u.className),u.el.style.position="absolute",u.el.style.zIndex="5",c.container.appendChild(u.el),u._inDocument=!0,u.coverGutter||(u.el.style.zIndex="3"),u.pixelHeight==null&&(u.pixelHeight=u.el.offsetHeight)),u.rowCount==null&&(u.rowCount=u.pixelHeight/c.layerConfig.lineHeight);var s=this.session.getFoldAt(u.row,0);if(u.$fold=s,s){var a=this.session.lineWidgets;u.row==s.end.row&&!a[s.start.row]?a[s.start.row]=u:u.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(u),u},$.prototype.removeLineWidget=function(u){if(u._inDocument=!1,u.session=null,u.el&&u.el.parentNode&&u.el.parentNode.removeChild(u.el),u.editor&&u.editor.destroy)try{u.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[u.row];if(c==u)this.session.lineWidgets[u.row]=u.$oldWidget,u.$oldWidget&&this.onWidgetChanged(u.$oldWidget);else for(;c;){if(c.$oldWidget==u){c.$oldWidget=u.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows()},$.prototype.getWidgetsAtRow=function(u){for(var c=this.session.lineWidgets,s=c&&c[u],a=[];s;)a.push(s),s=s.$oldWidget;return a},$.prototype.onWidgetChanged=function(u){this.session._changedWidgets.push(u),this.editor&&this.editor.renderer.updateFull()},$.prototype.measureWidgets=function(u,c){var s=this.session._changedWidgets,a=c.layerConfig;if(!(!s||!s.length)){for(var o=1/0,r=0;r0&&!a[o];)o--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,c.$cursorLayer.config=s;for(var t=o;t<=r;t++){var i=a[t];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,c.container.appendChild(i.el));var l=c.$cursorLayer.getPixelPosition({row:t,column:0},!0).top;i.coverLine||(l+=s.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=l-s.offset+"px";var f=i.coverGutter?0:c.gutterWidth;i.fixedWidth||(f-=c.scrollLeft),i.el.style.left=f+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=s.width+2*s.padding+"px"),i.fixedWidth?i.el.style.right=c.scrollBar.getWidth()+"px":i.el.style.right=""}}}},$}();v.LineWidgets=E}),ace.define("ace/apply_delta",["require","exports","module"],function(h,v,W){v.applyDelta=function(T,E,$){var u=E.start.row,c=E.start.column,s=T[u]||"";switch(E.action){case"insert":var a=E.lines;if(a.length===1)T[u]=s.substring(0,c)+E.lines[0]+s.substring(c);else{var o=[u,1].concat(E.lines);T.splice.apply(T,o),T[u]=s.substring(0,c)+T[u],T[u+E.lines.length-1]+=s.substring(c)}break;case"remove":var r=E.end.column,t=E.end.row;u===t?T[u]=s.substring(0,c)+s.substring(r):T.splice(u,t-u+1,s.substring(0,c)+T[t].substring(r));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(h,v,W){var T=h("./lib/oop"),E=h("./lib/event_emitter").EventEmitter,$=function(){function s(a,o,r){this.$onChange=this.onChange.bind(this),this.attach(a),typeof o!="number"?this.setPosition(o.row,o.column):this.setPosition(o,r)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var o=c(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(o.row,o.column,!0)}},s.prototype.setPosition=function(a,o,r){var t;if(r?t={row:a,column:o}:t=this.$clipPositionToDocument(a,o),!(this.row==t.row&&this.column==t.column)){var i={row:this.row,column:this.column};this.row=t.row,this.column=t.column,this._signal("change",{old:i,value:t})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(a,o){var r={};return a>=this.document.getLength()?(r.row=Math.max(0,this.document.getLength()-1),r.column=this.document.getLine(r.row).length):a<0?(r.row=0,r.column=0):(r.row=a,r.column=Math.min(this.document.getLine(r.row).length,Math.max(0,o))),o<0&&(r.column=0),r},s}();$.prototype.$insertRight=!1,T.implement($.prototype,E);function u(s,a,o){var r=o?s.column<=a.column:s.column=t&&(o=t-1,r=void 0);var i=this.getLine(o);return r==null&&(r=i.length),r=Math.min(Math.max(r,0),i.length),{row:o,column:r}},a.prototype.clonePos=function(o){return{row:o.row,column:o.column}},a.prototype.pos=function(o,r){return{row:o,column:r}},a.prototype.$clipPosition=function(o){var r=this.getLength();return o.row>=r?(o.row=Math.max(0,r-1),o.column=this.getLine(r-1).length):(o.row=Math.max(0,o.row),o.column=Math.min(Math.max(o.column,0),this.getLine(o.row).length)),o},a.prototype.insertFullLines=function(o,r){o=Math.min(Math.max(o,0),this.getLength());var t=0;o0,i=r=0&&this.applyDelta({start:this.pos(o,this.getLine(o).length),end:this.pos(o+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(o,r){if(o instanceof u||(o=u.fromPoints(o.start,o.end)),r.length===0&&o.isEmpty())return o.start;if(r==this.getTextRange(o))return o.end;this.remove(o);var t;return r?t=this.insert(o.start,r):t=o.start,t},a.prototype.applyDeltas=function(o){for(var r=0;r=0;r--)this.revertDelta(o[r])},a.prototype.applyDelta=function(o,r){var t=o.action=="insert";(t?o.lines.length<=1&&!o.lines[0]:!u.comparePoints(o.start,o.end))||(t&&o.lines.length>2e4?this.$splitAndapplyLargeDelta(o,2e4):(E(this.$lines,o,r),this._signal("change",o)))},a.prototype.$safeApplyDelta=function(o){var r=this.$lines.length;(o.action=="remove"&&o.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=r,t==-1&&(t=r),l<=t&&a.fireUpdateEvent(l,t)}}}return u.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},u.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},u.prototype.fireUpdateEvent=function(c,s){var a={first:c,last:s};this._signal("update",{data:a})},u.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},u.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},u.prototype.$updateOnChange=function(c){var s=c.start.row,a=c.end.row-s;if(a===0)this.lines[s]=null;else if(c.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var o=Array(a+1);o.unshift(s,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},u.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},u.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},u.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},u.prototype.$tokenizeRow=function(c){var s=this.doc.getLine(c),a=this.states[c-1],o=this.tokenizer.getLineTokens(s,a,c);return this.states[c]+""!=o.state+""?(this.states[c]=o.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=o.tokens},u.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},u}();T.implement($.prototype,E),v.BackgroundTokenizer=$}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(h,v,W){var T=h("./lib/lang"),E=h("./range").Range,$=function(){function u(c,s,a){a===void 0&&(a="text"),this.setRegexp(c),this.clazz=s,this.type=a,this.docLen=0}return u.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},u.prototype.update=function(c,s,a,o){if(this.regExp){for(var r=o.firstRow,t=o.lastRow,i={},l=a.$editor&&a.$editor.$search,f=l&&l.$isMultilineSearch(a.$editor.getLastSearchOptions()),d=r;d<=t;d++){var C=this.cache[d];if(C==null||a.getValue().length!=this.docLen){if(f){C=[];var b=l.$multiLineForward(a,this.regExp,d,t);if(b){var y=b.endRow<=t?b.endRow-1:t;y>d&&(d=y),C.push(new E(b.startRow,b.startCol,b.endRow,b.endCol))}C.length>this.MAX_RANGES&&(C=C.slice(0,this.MAX_RANGES))}else C=T.getMatchOffsets(a.getLine(d),this.regExp),C.length>this.MAX_RANGES&&(C=C.slice(0,this.MAX_RANGES)),C=C.map(function(k){return new E(d,k.offset,d,k.offset+k.length)});this.cache[d]=C.length?C:""}if(C.length!==0)for(var m=C.length;m--;){var x=C[m].toScreenRange(a),O=x.toString();i[O]||(i[O]=!0,s.drawSingleLineMarker(c,x,this.clazz,o))}}this.docLen=a.getValue().length}},u}();$.prototype.MAX_RANGES=500,v.SearchHighlight=$}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(h,v,W){var T=function(){function y(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return y.prototype.addSession=function(m){this.$session=m},y.prototype.add=function(m,x,O){if(!this.$fromUndo&&m!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),x===!1||!this.lastDeltas){this.lastDeltas=[];var k=this.$undoStack.length;k>this.$undoDepth-1&&this.$undoStack.splice(0,k-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),m.id=this.$rev=++this.$maxRev}(m.action=="remove"||m.action=="insert")&&(this.$lastDelta=m),this.lastDeltas.push(m)}},y.prototype.addSelection=function(m,x){this.selections.push({value:m,rev:x||this.$rev})},y.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},y.prototype.markIgnored=function(m,x){x==null&&(x=this.$rev+1);for(var O=this.$undoStack,k=O.length;k--;){var R=O[k][0];if(R.id<=m)break;R.id0},y.prototype.canRedo=function(){return this.$redoStack.length>0},y.prototype.bookmark=function(m){m==null&&(m=this.$rev),this.mark=m},y.prototype.isAtBookmark=function(){return this.$rev===this.mark},y.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},y.prototype.fromJSON=function(m){this.reset(),this.$undoStack=m.$undoStack,this.$redoStack=m.$redoStack},y.prototype.$prettyPrint=function(m){return m?a(m):a(this.$undoStack)+` ---- -`+a(this.$redoStack)},y}();T.prototype.hasUndo=T.prototype.canUndo,T.prototype.hasRedo=T.prototype.canRedo,T.prototype.isClean=T.prototype.isAtBookmark,T.prototype.markClean=T.prototype.bookmark;function E(y,m){for(var x=m;x--;){var O=y[x];if(O&&!O[0].ignore){for(;x"+y.end.row+":"+y.end.column}function r(y,m){var x=y.action=="insert",O=m.action=="insert";if(x&&O)if(u(m.start,y.end)>=0)l(m,y,-1);else if(u(m.start,y.start)<=0)l(y,m,1);else return null;else if(x&&!O)if(u(m.start,y.end)>=0)l(m,y,-1);else if(u(m.end,y.start)<=0)l(y,m,-1);else return null;else if(!x&&O)if(u(m.start,y.start)>=0)l(m,y,1);else if(u(m.start,y.start)<=0)l(y,m,1);else return null;else if(!x&&!O)if(u(m.start,y.start)>=0)l(m,y,1);else if(u(m.end,y.start)<=0)l(y,m,-1);else return null;return[m,y]}function t(y,m){for(var x=y.length;x--;)for(var O=0;O=0?l(y,m,-1):(u(y.start,m.start)<=0||l(y,$.fromPoints(m.start,y.start),-1),l(m,y,1));else if(!x&&O)u(m.start,y.end)>=0?l(m,y,-1):(u(m.start,y.start)<=0||l(m,$.fromPoints(y.start,m.start),-1),l(y,m,1));else if(!x&&!O)if(u(m.start,y.end)>=0)l(m,y,-1);else if(u(m.end,y.start)<=0)l(y,m,-1);else{var k,R;return u(y.start,m.start)<0&&(k=y,y=d(y,m.start)),u(y.end,m.end)>0&&(R=d(y,m.end)),f(m.end,y.start,y.end,-1),R&&!k&&(y.lines=R.lines,y.start=R.start,y.end=R.end,R=y),[m,k,R].filter(Boolean)}return[m,y]}function l(y,m,x){f(y.start,m.start,m.end,x),f(y.end,m.start,m.end,x)}function f(y,m,x,O){y.row==(O==1?m:x).row&&(y.column+=O*(x.column-m.column)),y.row+=O*(x.row-m.row)}function d(y,m){var x=y.lines,O=y.end;y.end=c(m);var k=y.end.row-y.start.row,R=x.splice(k,x.length),B=k?m.column:m.column-y.start.column;x.push(R[0].substring(0,B)),R[0]=R[0].substr(B);var L={start:c(m),end:O,lines:R,action:y.action};return L}function C(y,m){m=s(m);for(var x=y.length;x--;){for(var O=y[x],k=0;kthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(u),this.folds.sort(function(c,s){return-c.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(u.start.row,u.start.column)>0?(this.end.row=u.end.row,this.end.column=u.end.column):this.range.compareStart(u.end.row,u.end.column)<0&&(this.start.row=u.start.row,this.start.column=u.start.column)}else if(u.start.row==this.end.row)this.folds.push(u),this.end.row=u.end.row,this.end.column=u.end.column;else if(u.end.row==this.start.row)this.folds.unshift(u),this.start.row=u.start.row,this.start.column=u.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");u.foldLine=this},$.prototype.containsRow=function(u){return u>=this.start.row&&u<=this.end.row},$.prototype.walk=function(u,c,s){var a=0,o=this.folds,r,t,i,l=!0;c==null&&(c=this.end.row,s=this.end.column);for(var f=0;f0)){var l=E(c,t.start);return i===0?s&&l!==0?-r-2:r:l>0||l===0&&!s?r:-r-1}}return-r-1},u.prototype.add=function(c){var s=!c.isEmpty(),a=this.pointIndex(c.start,s);a<0&&(a=-a-1);var o=this.pointIndex(c.end,s,a);return o<0?o=-o-1:o++,this.ranges.splice(a,o-a,c)},u.prototype.addList=function(c){for(var s=[],a=c.length;a--;)s.push.apply(s,this.add(c[a]));return s},u.prototype.substractPoint=function(c){var s=this.pointIndex(c);if(s>=0)return this.ranges.splice(s,1)},u.prototype.merge=function(){var c=[],s=this.ranges;s=s.sort(function(i,l){return E(i.start,l.start)});for(var a=s[0],o,r=1;r=0},u.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},u.prototype.rangeAtPoint=function(c){var s=this.pointIndex(c);if(s>=0)return this.ranges[s]},u.prototype.clipRows=function(c,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row=o)break}if(c.action=="insert")for(var d=r-o,C=-s.column+a.column;io)break;if(f.start.row==o&&f.start.column>=s.column&&(f.start.column==s.column&&this.$bias<=0||(f.start.column+=C,f.start.row+=d)),f.end.row==o&&f.end.column>=s.column){if(f.end.column==s.column&&this.$bias<0)continue;f.end.column==s.column&&C>0&&if.start.column&&f.end.column==t[i+1].start.column&&(f.end.column-=C),f.end.column+=C,f.end.row+=d}}else for(var d=o-r,C=s.column-a.column;ir)break;f.end.rows.column)&&(f.end.column=s.column,f.end.row=s.row):(f.end.column+=C,f.end.row+=d):f.end.row>r&&(f.end.row+=d),f.start.rows.column)&&(f.start.column=s.column,f.start.row=s.row):(f.start.column+=C,f.start.row+=d):f.start.row>r&&(f.start.row+=d)}if(d!=0&&i=a)return i;if(i.end.row>a)return null}return null},this.getNextFoldLine=function(a,o){var r=this.$foldData,t=0;for(o&&(t=r.indexOf(o)),t==-1&&(t=0),t;t=a)return i}return null},this.getFoldedRowCount=function(a,o){for(var r=this.$foldData,t=o-a+1,i=0;i=o){d=a?t-=o-d:t=0);break}else f>=a&&(d>=a?t-=f-d:t-=f-a+1)}return t},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(o,r){return o.start.row-r.start.row}),a},this.addFold=function(a,o){var r=this.$foldData,t=!1,i;a instanceof $?i=a:(i=new $(o,a),i.collapseChildren=o.collapseChildren),this.$clipRangeToDocument(i.range);var l=i.start.row,f=i.start.column,d=i.end.row,C=i.end.column,b=this.getFoldAt(l,f,1),y=this.getFoldAt(d,C,-1);if(b&&y==b)return b.addSubFold(i);b&&!b.range.isStart(l,f)&&this.removeFold(b),y&&!y.range.isEnd(d,C)&&this.removeFold(y);var m=this.getFoldsInRange(i.range);m.length>0&&(this.removeFolds(m),i.collapseChildren||m.forEach(function(R){i.addSubFold(R)}));for(var x=0;x0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(o){this.expandFold(o)},this)},this.unfold=function(a,o){var r,t;if(a==null)r=new T(0,0,this.getLength(),0),o==null&&(o=!0);else if(typeof a=="number")r=new T(a,0,a,this.getLine(a).length);else if("row"in a)r=T.fromPoints(a,a);else{if(Array.isArray(a))return t=[],a.forEach(function(l){t=t.concat(this.unfold(l))},this),t;r=a}t=this.getFoldsInRangeList(r);for(var i=t;t.length==1&&T.comparePoints(t[0].start,r.start)<0&&T.comparePoints(t[0].end,r.end)>0;)this.expandFolds(t),t=this.getFoldsInRangeList(r);if(o!=!1?this.removeFolds(t):this.expandFolds(t),i.length)return i},this.isRowFolded=function(a,o){return!!this.getFoldLine(a,o)},this.getRowFoldEnd=function(a,o){var r=this.getFoldLine(a,o);return r?r.end.row:a},this.getRowFoldStart=function(a,o){var r=this.getFoldLine(a,o);return r?r.start.row:a},this.getFoldDisplayLine=function(a,o,r,t,i){t==null&&(t=a.start.row),i==null&&(i=0),o==null&&(o=a.end.row),r==null&&(r=this.getLine(o).length);var l=this.doc,f="";return a.walk(function(d,C,b,y){if(!(Cb)break;while(i&&f.test(i.type));i=t.stepBackward()}else i=t.getCurrentToken();return d.end.row=t.getCurrentTokenRow(),d.end.column=t.getCurrentTokenColumn(),d.start.row==d.end.row&&d.start.column>d.end.column?void 0:d}},this.foldAll=function(a,o,r,t){r==null&&(r=1e5);var i=this.foldWidgets;if(i){o=o||this.getLength(),a=a||0;for(var l=a;l=a&&(l=f.end.row,f.collapseChildren=r,this.addFold("...",f))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(o){for(var r=a.getTokens(o),t=0;t=0;){var l=r[t];if(l==null&&(l=r[t]=this.getFoldWidget(t)),l=="start"){var f=this.getFoldWidgetRange(t);if(i||(i=f),f&&f.end.row>=a)break}t--}return{range:t!==-1&&f,firstRange:i}},this.onFoldWidgetClick=function(a,o){o instanceof c&&(o=o.domEvent);var r={children:o.shiftKey,all:o.ctrlKey||o.metaKey,siblings:o.altKey},t=this.$toggleFoldWidget(a,r);if(!t){var i=o.target||o.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,o){if(this.getFoldWidget){var r=this.getFoldWidget(a),t=this.getLine(a),i=r==="end"?-1:1,l=this.getFoldAt(a,i===-1?0:t.length,i);if(l)return o.children||o.all?this.removeFold(l):this.expandFold(l),l;var f=this.getFoldWidgetRange(a,!0);if(f&&!f.isMultiLine()&&(l=this.getFoldAt(f.start.row,f.start.column,1),l&&f.isEqual(l.range)))return this.removeFold(l),l;if(o.siblings){var d=this.getParentFoldRangeData(a);if(d.range)var C=d.range.start.row+1,b=d.range.end.row;this.foldAll(C,b,o.all?1e4:0)}else o.children?(b=f?f.end.row:this.getLength(),this.foldAll(a+1,b,o.all?1e4:0)):f&&(o.all&&(f.collapseChildren=1e4),this.addFold("...",f));return f}},this.toggleFoldWidget=function(a){var o=this.selection.getCursor().row;o=this.getRowFoldStart(o);var r=this.$toggleFoldWidget(o,{});if(!r){var t=this.getParentFoldRangeData(o,!0);if(r=t.range||t.firstRange,r){o=r.start.row;var i=this.getFoldAt(o,this.getLine(o).length,1);i?this.removeFold(i):this.addFold("...",r)}}},this.updateFoldWidgets=function(a){var o=a.start.row,r=a.end.row-o;if(r===0)this.foldWidgets[o]=null;else if(a.action=="remove")this.foldWidgets.splice(o,r+1,null);else{var t=Array(r+1);t.unshift(o,1),this.foldWidgets.splice.apply(this.foldWidgets,t)}},this.tokenizerUpdateFoldWidgets=function(a){var o=a.data;o.first!=o.last&&this.foldWidgets.length>o.first&&this.foldWidgets.splice(o.first,this.foldWidgets.length)}}v.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(h,v,W){var T=h("../token_iterator").TokenIterator,E=h("../range").Range;function $(){this.findMatchingBracket=function(u,c){if(u.column==0)return null;var s=c||this.getLine(u.row).charAt(u.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],u):this.$findOpeningBracket(a[2],u):null},this.getBracketRange=function(u){var c=this.getLine(u.row),s=!0,a,o=c.charAt(u.column-1),r=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(r||(o=c.charAt(u.column),u={row:u.row,column:u.column+1},r=o&&o.match(/([\(\[\{])|([\)\]\}])/),s=!1),!r)return null;if(r[1]){var t=this.$findClosingBracket(r[1],u);if(!t)return null;a=E.fromPoints(u,t),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var t=this.$findOpeningBracket(r[2],u);if(!t)return null;a=E.fromPoints(t,u),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(u,c){var s=this.getLine(u.row),a=/([\(\[\{])|([\)\]\}])/,o=!c&&s.charAt(u.column-1),r=o&&o.match(a);if(r||(o=(c===void 0||c)&&s.charAt(u.column),u={row:u.row,column:u.column+1},r=o&&o.match(a)),!r)return null;var t=new E(u.row,u.column-1,u.row,u.column),i=r[1]?this.$findClosingBracket(r[1],u):this.$findOpeningBracket(r[2],u);if(!i)return[t];var l=new E(i.row,i.column,i.row,i.column+1);return[t,l]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(u,c,s){var a=this.$brackets[u],o=1,r=new T(this,c.row,c.column),t=r.getCurrentToken();if(t||(t=r.stepForward()),!!t){s||(s=new RegExp("(\\.?"+t.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=c.column-r.getCurrentTokenColumn()-2,l=t.value;;){for(;i>=0;){var f=l.charAt(i);if(f==a){if(o-=1,o==0)return{row:r.getCurrentTokenRow(),column:i+r.getCurrentTokenColumn()}}else f==u&&(o+=1);i-=1}do t=r.stepBackward();while(t&&!s.test(t.type));if(t==null)break;l=t.value,i=l.length-1}return null}},this.$findClosingBracket=function(u,c,s){var a=this.$brackets[u],o=1,r=new T(this,c.row,c.column),t=r.getCurrentToken();if(t||(t=r.stepForward()),!!t){s||(s=new RegExp("(\\.?"+t.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=c.column-r.getCurrentTokenColumn();;){for(var l=t.value,f=l.length;i"?a=!0:c.type.indexOf("tag-name")!==-1&&(s=!0));while(c&&!s);return c},this.$findClosingTag=function(u,c){var s,a=c.value,o=c.value,r=0,t=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);c=u.stepForward();var i=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+c.value.length),l=!1;do{if(s=c,s.type.indexOf("tag-close")!==-1&&!l){var f=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);l=!0}if(c=u.stepForward(),c){if(c.value===">"&&!l){var f=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);l=!0}if(c.type.indexOf("tag-name")!==-1){if(a=c.value,o===a){if(s.value==="<")r++;else if(s.value==="")var b=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);else return}}}else if(o===a&&c.value==="/>"&&(r--,r<0))var d=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2),C=d,b=C,f=new E(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(c&&r>=0);if(t&&f&&d&&b&&i&&C)return{openTag:new E(t.start.row,t.start.column,f.end.row,f.end.column),closeTag:new E(d.start.row,d.start.column,b.end.row,b.end.column),openTagName:i,closeTagName:C}},this.$findOpeningTag=function(u,c){var s=u.getCurrentToken(),a=c.value,o=0,r=u.getCurrentTokenRow(),t=u.getCurrentTokenColumn(),i=t+2,l=new E(r,t,r,i);u.stepForward();var f=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=u.stepForward()),!(!c||c.value!==">")){var d=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);u.stepBackward(),u.stepBackward();do if(c=s,r=u.getCurrentTokenRow(),t=u.getCurrentTokenColumn(),i=t+c.value.length,s=u.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(a===c.value)if(s.value==="<"){if(o++,o>0){var C=new E(r,t,r,i),b=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);do c=u.stepForward();while(c&&c.value!==">");var y=new E(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1)}}else s.value===""){for(var m=0,x=s;x;){if(x.type.indexOf("tag-name")!==-1&&x.value===a){o--;break}else if(x.value==="<")break;x=u.stepBackward(),m++}for(var O=0;Og&&(this.$docRowCache.splice(g,w),this.$screenRowCache.splice(g,w))},L.prototype.$getRowCacheIndex=function(A,w){for(var g=0,_=A.length-1;g<=_;){var D=g+_>>1,P=A[D];if(w>P)g=D+1;else if(w=w));P++);return _=g[P],_?(_.index=P,_.start=D-_.value.length,_):null},L.prototype.setUndoManager=function(A){if(this.$undoManager=A,this.$informUndoManager&&this.$informUndoManager.cancel(),A){var w=this;A.addSession(this),this.$syncInformUndoManager=function(){w.$informUndoManager.cancel(),w.mergeUndoDeltas=!1},this.$informUndoManager=E.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},L.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},L.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},L.prototype.getTabString=function(){return this.getUseSoftTabs()?E.stringRepeat(" ",this.getTabSize()):" "},L.prototype.setUseSoftTabs=function(A){this.setOption("useSoftTabs",A)},L.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},L.prototype.setTabSize=function(A){this.setOption("tabSize",A)},L.prototype.getTabSize=function(){return this.$tabSize},L.prototype.isTabStop=function(A){return this.$useSoftTabs&&A.column%this.$tabSize===0},L.prototype.setNavigateWithinSoftTabs=function(A){this.setOption("navigateWithinSoftTabs",A)},L.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},L.prototype.setOverwrite=function(A){this.setOption("overwrite",A)},L.prototype.getOverwrite=function(){return this.$overwrite},L.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},L.prototype.addGutterDecoration=function(A,w){this.$decorations[A]||(this.$decorations[A]=""),this.$decorations[A]+=" "+w,this._signal("changeBreakpoint",{})},L.prototype.removeGutterCustomWidget=function(A){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(A)},L.prototype.addGutterCustomWidget=function(A,w){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(A,w)},L.prototype.removeGutterDecoration=function(A,w){this.$decorations[A]=(this.$decorations[A]||"").replace(" "+w,""),this._signal("changeBreakpoint",{})},L.prototype.getBreakpoints=function(){return this.$breakpoints},L.prototype.setBreakpoints=function(A){this.$breakpoints=[];for(var w=0;w0&&(_=!!g.charAt(w-1).match(this.tokenRe)),_||(_=!!g.charAt(w).match(this.tokenRe)),_)var D=this.tokenRe;else if(/^\s+$/.test(g.slice(w-1,w+1)))var D=/\s/;else var D=this.nonTokenRe;var P=w;if(P>0){do P--;while(P>=0&&g.charAt(P).match(D));P++}for(var H=w;HA&&(A=w.screenWidth)}),this.lineWidgetWidth=A},L.prototype.$computeWidth=function(A){if(this.$modified||A){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var w=this.doc.getAllLines(),g=this.$rowLengthCache,_=0,D=0,P=this.$foldData[D],H=P?P.start.row:1/0,U=w.length,Y=0;YH){if(Y=P.end.row+1,Y>=U)break;P=this.$foldData[D++],H=P?P.start.row:1/0}g[Y]==null&&(g[Y]=this.$getStringScreenWidth(w[Y])[0]),g[Y]>_&&(_=g[Y])}this.screenWidth=_}},L.prototype.getLine=function(A){return this.doc.getLine(A)},L.prototype.getLines=function(A,w){return this.doc.getLines(A,w)},L.prototype.getLength=function(){return this.doc.getLength()},L.prototype.getTextRange=function(A){return this.doc.getTextRange(A||this.selection.getRange())},L.prototype.insert=function(A,w){return this.doc.insert(A,w)},L.prototype.remove=function(A){return this.doc.remove(A)},L.prototype.removeFullLines=function(A,w){return this.doc.removeFullLines(A,w)},L.prototype.undoChanges=function(A,w){if(A.length){this.$fromUndo=!0;for(var g=A.length-1;g!=-1;g--){var _=A[g];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!w&&this.$undoSelect&&(A.selectionBefore?this.selection.fromJSON(A.selectionBefore):this.selection.setRange(this.$getUndoSelection(A,!0))),this.$fromUndo=!1}},L.prototype.redoChanges=function(A,w){if(A.length){this.$fromUndo=!0;for(var g=0;gA.end.column&&(P.start.column+=U),P.end.row==A.end.row&&P.end.column>A.end.column&&(P.end.column+=U)),H&&P.start.row>=A.end.row&&(P.start.row+=H,P.end.row+=H)}if(P.end=this.insert(P.start,_),D.length){var Y=A.start,te=P.start,H=te.row-Y.row,U=te.column-Y.column;this.addFolds(D.map(function(Z){return Z=Z.clone(),Z.start.row==Y.row&&(Z.start.column+=U),Z.end.row==Y.row&&(Z.end.column+=U),Z.start.row+=H,Z.end.row+=H,Z}))}return P},L.prototype.indentRows=function(A,w,g){g=g.replace(/\t/g,this.getTabString());for(var _=A;_<=w;_++)this.doc.insertInLine({row:_,column:0},g)},L.prototype.outdentRows=function(A){for(var w=A.collapseRows(),g=new o(0,0,0,0),_=this.getTabSize(),D=w.start.row;D<=w.end.row;++D){var P=this.getLine(D);g.start.row=D,g.end.row=D;for(var H=0;H<_&&P.charAt(H)==" ";++H);H<_&&P.charAt(H)==" "?(g.start.column=H,g.end.column=H+1):(g.start.column=0,g.end.column=H),this.remove(g)}},L.prototype.$moveLines=function(A,w,g){if(A=this.getRowFoldStart(A),w=this.getRowFoldEnd(w),g<0){var _=this.getRowFoldStart(A+g);if(_<0)return 0;var D=_-A}else if(g>0){var _=this.getRowFoldEnd(w+g);if(_>this.doc.getLength()-1)return 0;var D=_-w}else{A=this.$clipRowToDocument(A),w=this.$clipRowToDocument(w);var D=w-A+1}var P=new o(A,0,w,Number.MAX_VALUE),H=this.getFoldsInRange(P).map(function(Y){return Y=Y.clone(),Y.start.row+=D,Y.end.row+=D,Y}),U=g==0?this.doc.getLines(A,w):this.doc.removeFullLines(A,w);return this.doc.insertFullLines(A+D,U),H.length&&this.addFolds(H),D},L.prototype.moveLinesUp=function(A,w){return this.$moveLines(A,w,-1)},L.prototype.moveLinesDown=function(A,w){return this.$moveLines(A,w,1)},L.prototype.duplicateLines=function(A,w){return this.$moveLines(A,w,0)},L.prototype.$clipRowToDocument=function(A){return Math.max(0,Math.min(A,this.doc.getLength()-1))},L.prototype.$clipColumnToRow=function(A,w){return w<0?0:Math.min(this.doc.getLine(A).length,w)},L.prototype.$clipPositionToDocument=function(A,w){if(w=Math.max(0,w),A<0)A=0,w=0;else{var g=this.doc.getLength();A>=g?(A=g-1,w=this.doc.getLine(g-1).length):w=Math.min(this.doc.getLine(A).length,w)}return{row:A,column:w}},L.prototype.$clipRangeToDocument=function(A){A.start.row<0?(A.start.row=0,A.start.column=0):A.start.column=this.$clipColumnToRow(A.start.row,A.start.column);var w=this.doc.getLength()-1;return A.end.row>w?(A.end.row=w,A.end.column=this.doc.getLine(w).length):A.end.column=this.$clipColumnToRow(A.end.row,A.end.column),A},L.prototype.setUseWrapMode=function(A){if(A!=this.$useWrapMode){if(this.$useWrapMode=A,this.$modified=!0,this.$resetRowCache(0),A){var w=this.getLength();this.$wrapData=Array(w),this.$updateWrapData(0,w-1)}this._signal("changeWrapMode")}},L.prototype.getUseWrapMode=function(){return this.$useWrapMode},L.prototype.setWrapLimitRange=function(A,w){(this.$wrapLimitRange.min!==A||this.$wrapLimitRange.max!==w)&&(this.$wrapLimitRange={min:A,max:w},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},L.prototype.adjustWrapLimit=function(A,w){var g=this.$wrapLimitRange;g.max<0&&(g={min:w,max:w});var _=this.$constrainWrapLimit(A,g.min,g.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},L.prototype.$constrainWrapLimit=function(A,w,g){return w&&(A=Math.max(w,A)),g&&(A=Math.min(g,A)),A},L.prototype.getWrapLimit=function(){return this.$wrapLimit},L.prototype.setWrapLimit=function(A){this.setWrapLimitRange(A,A)},L.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},L.prototype.$updateInternalDataOnChange=function(A){var w=this.$useWrapMode,g=A.action,_=A.start,D=A.end,P=_.row,H=D.row,U=H-P,Y=null;if(this.$updating=!0,U!=0)if(g==="remove"){this[w?"$wrapData":"$rowLengthCache"].splice(P,U);var te=this.$foldData;Y=this.getFoldsInRange(A),this.removeFolds(Y);var K=this.getFoldLine(D.row),X=0;if(K){K.addRemoveChars(D.row,D.column,_.column-D.column),K.shiftRow(-U);var Z=this.getFoldLine(P);Z&&Z!==K&&(Z.merge(K),K=Z),X=te.indexOf(K)+1}for(X;X=D.row&&K.shiftRow(-U)}H=P}else{var J=Array(U);J.unshift(P,0);var re=w?this.$wrapData:this.$rowLengthCache;re.splice.apply(re,J);var te=this.$foldData,K=this.getFoldLine(P),X=0;if(K){var ae=K.range.compareInside(_.row,_.column);ae==0?(K=K.split(_.row,_.column),K&&(K.shiftRow(U),K.addRemoveChars(H,0,D.column-_.column))):ae==-1&&(K.addRemoveChars(P,0,D.column-_.column),K.shiftRow(U)),X=te.indexOf(K)+1}for(X;X=P&&K.shiftRow(U)}}else{U=Math.abs(A.start.column-A.end.column),g==="remove"&&(Y=this.getFoldsInRange(A),this.removeFolds(Y),U=-U);var K=this.getFoldLine(P);K&&K.addRemoveChars(P,_.column,U)}return w&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,w?this.$updateWrapData(P,H):this.$updateRowLengthCache(P,H),Y},L.prototype.$updateRowLengthCache=function(A,w){this.$rowLengthCache[A]=null,this.$rowLengthCache[w]=null},L.prototype.$updateWrapData=function(A,w){var g=this.doc.getAllLines(),_=this.getTabSize(),D=this.$wrapData,P=this.$wrapLimit,H,U,Y=A;for(w=Math.min(w,g.length-1);Y<=w;)U=this.getFoldLine(Y,U),U?(H=[],U.walk((function(te,K,X,Z){var J;if(te!=null){J=this.$getDisplayTokens(te,H.length),J[0]=y;for(var re=1;rew-Z;){var J=P+w-Z;if(A[J-1]>=O&&A[J]>=O){X(J);continue}if(A[J]==y||A[J]==m){for(J;J!=P-1&&A[J]!=y;J--);if(J>P){X(J);continue}for(J=P+w,J;J>2)),P-1);J>re&&A[J]re&&A[J]re&&A[J]==x;)J--}else for(;J>re&&A[J]re){X(++J);continue}J=P+w,A[J]==b&&J--,X(J-Z)}return _},L.prototype.$getDisplayTokens=function(A,w){var g=[],_;w=w||0;for(var D=0;D39&&P<48||P>57&&P<64?g.push(x):P>=4352&&B(P)?g.push(C,b):g.push(C)}return g},L.prototype.$getStringScreenWidth=function(A,w,g){if(w==0)return[0,0];w==null&&(w=1/0),g=g||0;var _,D;for(D=0;D=4352&&B(_)?g+=2:g+=1,!(g>w));D++);return[g,D]},L.prototype.getRowLength=function(A){var w=1;return this.lineWidgets&&(w+=this.lineWidgets[A]&&this.lineWidgets[A].rowCount||0),!this.$useWrapMode||!this.$wrapData[A]?w:this.$wrapData[A].length+w},L.prototype.getRowLineCount=function(A){return!this.$useWrapMode||!this.$wrapData[A]?1:this.$wrapData[A].length+1},L.prototype.getRowWrapIndent=function(A){if(this.$useWrapMode){var w=this.screenToDocumentPosition(A,Number.MAX_VALUE),g=this.$wrapData[w.row];return g.length&&g[0]=0)var U=te[K],D=this.$docRowCache[K],Z=A>te[X-1];else var Z=!X;for(var J=this.getLength()-1,re=this.getNextFoldLine(D),ae=re?re.start.row:1/0;U<=A&&(Y=this.getRowLength(D),!(U+Y>A||D>=J));)U+=Y,D++,D>ae&&(D=re.end.row+1,re=this.getNextFoldLine(D,re),ae=re?re.start.row:1/0),Z&&(this.$docRowCache.push(D),this.$screenRowCache.push(U));if(re&&re.start.row<=D)_=this.getFoldDisplayLine(re),D=re.start.row;else{if(U+Y<=A||D>J)return{row:J,column:this.getLine(J).length};_=this.getLine(D),re=null}var he=0,pe=Math.floor(A-U);if(this.$useWrapMode){var _e=this.$wrapData[D];_e&&(H=_e[pe],pe>0&&_e.length&&(he=_e.indent,P=_e[pe-1]||_e[_e.length-1],_=_.substring(P)))}return g!==void 0&&this.$bidiHandler.isBidiRow(U+pe,D,pe)&&(w=this.$bidiHandler.offsetToCol(g)),P+=this.$getStringScreenWidth(_,w-he)[1],this.$useWrapMode&&P>=H&&(P=H-1),re?re.idxToPosition(P):{row:D,column:P}},L.prototype.documentToScreenPosition=function(A,w){if(typeof w>"u")var g=this.$clipPositionToDocument(A.row,A.column);else g=this.$clipPositionToDocument(A,w);A=g.row,w=g.column;var _=0,D=null,P=null;P=this.getFoldAt(A,w,1),P&&(A=P.start.row,w=P.start.column);var H,U=0,Y=this.$docRowCache,te=this.$getRowCacheIndex(Y,A),K=Y.length;if(K&&te>=0)var U=Y[te],_=this.$screenRowCache[te],X=A>Y[K-1];else var X=!K;for(var Z=this.getNextFoldLine(U),J=Z?Z.start.row:1/0;U=J){if(H=Z.end.row+1,H>A)break;Z=this.getNextFoldLine(H,Z),J=Z?Z.start.row:1/0}else H=U+1;_+=this.getRowLength(U),U=H,X&&(this.$docRowCache.push(U),this.$screenRowCache.push(_))}var re="";Z&&U>=J?(re=this.getFoldDisplayLine(Z,A,w),D=Z.start.row):(re=this.getLine(A).substring(0,w),D=A);var ae=0;if(this.$useWrapMode){var he=this.$wrapData[D];if(he){for(var pe=0;re.length>=he[pe];)_++,pe++;re=re.substring(he[pe-1]||0,re.length),ae=pe>0?he.indent:0}}return this.lineWidgets&&this.lineWidgets[U]&&this.lineWidgets[U].rowsAbove&&(_+=this.lineWidgets[U].rowsAbove),{row:_,column:ae+this.$getStringScreenWidth(re)[0]}},L.prototype.documentToScreenColumn=function(A,w){return this.documentToScreenPosition(A,w).column},L.prototype.documentToScreenRow=function(A,w){return this.documentToScreenPosition(A,w).row},L.prototype.getScreenLength=function(){var A=0,w=null;if(this.$useWrapMode)for(var D=this.$wrapData.length,P=0,_=0,w=this.$foldData[_++],H=w?w.start.row:1/0;PH&&(P=w.end.row+1,w=this.$foldData[_++],H=w?w.start.row:1/0)}else{A=this.getLength();for(var g=this.$foldData,_=0;_g));P++);return[_,P]})},L.prototype.getPrecedingCharacter=function(){var A=this.selection.getCursor();if(A.column===0)return A.row===0?"":this.doc.getNewLineCharacter();var w=this.getLine(A.row);return w[A.column-1]},L.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},L}();d.$uid=0,d.prototype.$modes=u.$modes,d.prototype.getValue=d.prototype.toString,d.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},d.prototype.$overwrite=!1,d.prototype.$mode=null,d.prototype.$modeId=null,d.prototype.$scrollTop=0,d.prototype.$scrollLeft=0,d.prototype.$wrapLimit=80,d.prototype.$useWrapMode=!1,d.prototype.$wrapLimitRange={min:null,max:null},d.prototype.lineWidgets=null,d.prototype.isFullWidth=B,T.implement(d.prototype,c);var C=1,b=2,y=3,m=4,x=9,O=10,k=11,R=12;function B(L){return L<4352?!1:L>=4352&&L<=4447||L>=4515&&L<=4519||L>=4602&&L<=4607||L>=9001&&L<=9002||L>=11904&&L<=11929||L>=11931&&L<=12019||L>=12032&&L<=12245||L>=12272&&L<=12283||L>=12288&&L<=12350||L>=12353&&L<=12438||L>=12441&&L<=12543||L>=12549&&L<=12589||L>=12593&&L<=12686||L>=12688&&L<=12730||L>=12736&&L<=12771||L>=12784&&L<=12830||L>=12832&&L<=12871||L>=12880&&L<=13054||L>=13056&&L<=19903||L>=19968&&L<=42124||L>=42128&&L<=42182||L>=43360&&L<=43388||L>=44032&&L<=55203||L>=55216&&L<=55238||L>=55243&&L<=55291||L>=63744&&L<=64255||L>=65040&&L<=65049||L>=65072&&L<=65106||L>=65108&&L<=65126||L>=65128&&L<=65131||L>=65281&&L<=65376||L>=65504&&L<=65510}h("./edit_session/folding").Folding.call(d.prototype),h("./edit_session/bracket_match").BracketMatch.call(d.prototype),u.defineOptions(d.prototype,"session",{wrap:{set:function(L){if(!L||L=="off"?L=!1:L=="free"?L=!0:L=="printMargin"?L=-1:typeof L=="string"&&(L=parseInt(L,10)||!1),this.$wrap!=L)if(this.$wrap=L,!L)this.setUseWrapMode(!1);else{var A=typeof L=="number"?L:null;this.setWrapLimitRange(A,A),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(L){L=L=="auto"?this.$mode.type!="text":L!="text",L!=this.$wrapAsCode&&(this.$wrapAsCode=L,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(L){this.$useWorker=L,this.$stopWorker(),L&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(L){L=parseInt(L),L>0&&this.$tabSize!==L&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=L,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(L){this.setFoldStyle(L)},handlesSet:!0},overwrite:{set:function(L){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(L){this.doc.setNewLineMode(L)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(L){this.setMode(L)},get:function(){return this.$modeId},handlesSet:!0}}),v.EditSession=d}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(h,v,W){var T=h("./lib/lang"),E=h("./lib/oop"),$=h("./range").Range,u=function(){function o(){this.$options={}}return o.prototype.set=function(r){return E.mixin(this.$options,r),this},o.prototype.getOptions=function(){return T.copyObject(this.$options)},o.prototype.setOptions=function(r){this.$options=r},o.prototype.find=function(r){var t=this.$options,i=this.$matchIterator(r,t);if(!i)return!1;var l=null;return i.forEach(function(f,d,C,b){return l=new $(f,d,C,b),d==b&&t.start&&t.start.start&&t.skipCurrent!=!1&&l.isEqual(t.start)?(l=null,!1):!0}),l},o.prototype.findAll=function(r){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,l=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),f=[],d=t.re;if(t.$isMultiLine){var C=d.length,b=l.length-C,y;e:for(var m=d.offset||0;m<=b;m++){for(var x=0;xR||(f.push(y=new $(m,R,m+C-1,B)),C>2&&(m=m+C-2))}}else for(var L,A=0;AA&&(A=g),f.push(new $(L.startRow,L.startCol,L.endRow,L.endCol))}}else{L=T.getMatchOffsets(l[A],d);for(var x=0;xP&&f[x].end.row==H;)x--;for(f=f.slice(A,x+1),A=0,x=f.length;A=f){i+="\\";break}var C=r.charCodeAt(l);switch(C){case t.Backslash:i+="\\";break;case t.n:i+=` -`;break;case t.t:i+=" ";break}continue}if(d===t.DollarSign){if(l++,l>=f){i+="$";break}var b=r.charCodeAt(l);if(b===t.DollarSign){i+="$$";continue}if(b===t.Digit0||b===t.Ampersand){i+="$&";continue}if(t.Digit1<=b&&b<=t.Digit9){i+="$"+r[l];continue}}i+=r[l]}return i||r},o.prototype.replace=function(r,t){var i=this.$options,l=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(l){var f=this.$isMultilineSearch(i);f&&(r=r.replace(/\r\n|\r|\n/g,` -`));var d=l.exec(r);if(!d||!f&&d[0].length!=r.length)return null;if(t=i.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=r.replace(l,t),i.preserveCase){t=t.split("");for(var C=Math.min(r.length,r.length);C--;){var b=r[C];b&&b.toLowerCase()!=b?t[C]=t[C].toUpperCase():t[C]=t[C].toLowerCase()}t=t.join("")}return t}},o.prototype.$assembleRegExp=function(r,t){if(r.needle instanceof RegExp)return r.re=r.needle;var i=r.needle;if(!r.needle)return r.re=!1;r.regExp||(i=T.escapeRegExp(i));var l=r.caseSensitive?"gm":"gmi";try{new RegExp(i,"u"),r.$supportsUnicodeFlag=!0,l+="u"}catch{r.$supportsUnicodeFlag=!1}if(r.wholeWord&&(i=c(i,r)),r.$isMultiLine=!t&&/[\n\r]/.test(i),r.$isMultiLine)return r.re=this.$assembleMultilineRegExp(i,l);try{var f=new RegExp(i,l)}catch{f=!1}return r.re=f},o.prototype.$assembleMultilineRegExp=function(r,t){for(var i=r.replace(/\r\n|\r|\n/g,`$ -^`).split(` -`),l=[],f=0;fl);b++){var y=r.getLine(C++);f=f==null?y:f+` -`+y}var m=t.exec(f);if(t.lastIndex=0,m){var x=f.slice(0,m.index).split(` -`),O=m[0].split(` -`),k=i+x.length-1,R=x[x.length-1].length,B=k+O.length-1,L=O.length==1?R+O[0].length:O[O.length-1].length;return{startRow:k,startCol:R,endRow:B,endCol:L}}}return null},o.prototype.$multiLineBackward=function(r,t,i,l,f){for(var d,C=a(r,l),b=r.getLine(l).length-i,y=l;y>=f;){for(var m=0;m=f;m++){var x=r.getLine(y--);d=d==null?x:x+` -`+d}var O=s(d,t,b);if(O){var k=d.slice(0,O.index).split(` -`),R=O[0].split(` -`),B=y+k.length,L=k[k.length-1].length,A=B+R.length-1,w=R.length==1?L+R[0].length:R[R.length-1].length;return{startRow:B,startCol:L,endRow:A,endCol:w}}}return null},o.prototype.$matchIterator=function(r,t){var i=this.$assembleRegExp(t);if(!i)return!1;var l=this.$isMultilineSearch(t),f=this.$multiLineForward,d=this.$multiLineBackward,C=t.backwards==!0,b=t.skipCurrent!=!1,y=i.unicode,m=t.range,x=t.start;x||(x=m?m[C?"end":"start"]:r.selection.getRange()),x.start&&(x=x[b!=C?"end":"start"]);var O=m?m.start.row:0,k=m?m.end.row:r.getLength()-1;if(C)var R=function(A){var w=x.row;if(!L(w,x.column,A)){for(w--;w>=O;w--)if(L(w,Number.MAX_VALUE,A))return;if(t.wrap!=!1){for(w=k,O=x.row;w>=O;w--)if(L(w,Number.MAX_VALUE,A))return}}};else var R=function(w){var g=x.row;if(!L(g,x.column,w)){for(g=g+1;g<=k;g++)if(L(g,0,w))return;if(t.wrap!=!1){for(g=O,k=x.row;g<=k;g++)if(L(g,0,w))return}}};if(t.$isMultiLine)var B=i.length,L=function(A,w,g){var _=C?A-B+1:A;if(!(_<0||_+B>r.getLength())){var D=r.getLine(_),P=D.search(i[0]);if(!(!C&&Pw)&&g(_,P,_+B-1,U))return!0}}};else if(C)var L=function(w,g,_){if(l){var D=d(r,i,g,w,O);if(!D)return!1;if(_(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var P=r.getLine(w),H=[],U,Y=0;for(i.lastIndex=0;U=i.exec(P);){var te=U[0].length;if(Y=U.index,!te){if(Y>=P.length)break;i.lastIndex=Y+=T.skipEmptyMatch(P,Y,y)}if(U.index+te>g)break;H.push(U.index,te)}for(var K=H.length-1;K>=0;K-=2){var X=H[K-1],te=H[K];if(_(w,X,w,X+te))return!0}}};else var L=function(w,g,_){if(i.lastIndex=g,l){var D=f(r,i,w,k);if(D){var P=D.endRow<=k?D.endRow-1:k;P>w&&(w=P)}if(!D)return!1;if(_(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var H=r.getLine(w),U,Y;Y=i.exec(H);){var te=Y[0].length;if(U=Y.index,_(w,U,w,U+te))return!0;if(!te&&(i.lastIndex=U+=T.skipEmptyMatch(H,U,y),U>=H.length))return!1}};return{forEach:R}},o}();function c(o,r){var t=T.supportsLookbehind();function i(C,b){b===void 0&&(b=!0);var y=t&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return y.test(C)||r.regExp?t&&r.$supportsUnicodeFlag?b?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var l=Array.from(o),f=l[0],d=l[l.length-1];return i(f)+o+i(d,!1)}function s(o,r,t){for(var i=null,l=0;l<=o.length;){r.lastIndex=l;var f=r.exec(o);if(!f)break;var d=f.index+f[0].length;if(d>o.length-t)break;(!i||d>i.index+i[0].length)&&(i=f),l=f.index+1}return i}function a(o,r){var t=5e3,i={row:r,column:0},l=o.doc.positionToIndex(i),f=l+t,d=o.doc.indexToPosition(f),C=d.row;return C+1}v.Search=u}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(h,v,W){var T=this&&this.__extends||function(){var o=function(r,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(i[f]=l[f])},o(r,t)};return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(r,t);function i(){this.constructor=r}r.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),E=h("../lib/keys"),$=h("../lib/useragent"),u=E.KEY_MODS,c=function(){function o(r,t){this.$init(r,t,!1)}return o.prototype.$init=function(r,t,i){this.platform=t||($.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=i},o.prototype.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),this.commands[r.name]=r,r.bindKey&&this._buildKeyHash(r)},o.prototype.removeCommand=function(r,t){var i=r&&(typeof r=="string"?r:r.name);r=this.commands[i],t||delete this.commands[i];var l=this.commandKeyBinding;for(var f in l){var d=l[f];if(d==r)delete l[f];else if(Array.isArray(d)){var C=d.indexOf(r);C!=-1&&(d.splice(C,1),d.length==1&&(l[f]=d[0]))}}},o.prototype.bindKey=function(r,t,i){if(typeof r=="object"&&r&&(i==null&&(i=r.position),r=r[this.platform]),!!r){if(typeof t=="function")return this.addCommand({exec:t,bindKey:r,name:t.name||r});r.split("|").forEach(function(l){var f="";if(l.indexOf(" ")!=-1){var d=l.split(/\s+/);l=d.pop(),d.forEach(function(y){var m=this.parseKeys(y),x=u[m.hashId]+m.key;f+=(f?" ":"")+x,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var C=this.parseKeys(l),b=u[C.hashId]+C.key;this._addCommandToBinding(f+b,t,i)},this)}},o.prototype._addCommandToBinding=function(r,t,i){var l=this.commandKeyBinding,f;if(!t)delete l[r];else if(!l[r]||this.$singleCommand)l[r]=t;else{Array.isArray(l[r])?(f=l[r].indexOf(t))!=-1&&l[r].splice(f,1):l[r]=[l[r]],typeof i!="number"&&(i=s(t));var d=l[r];for(f=0;fi)break}d.splice(f,0,t)}},o.prototype.addCommands=function(r){r&&Object.keys(r).forEach(function(t){var i=r[t];if(i){if(typeof i=="string")return this.bindKey(i,t);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=t),this.addCommand(i))}},this)},o.prototype.removeCommands=function(r){Object.keys(r).forEach(function(t){this.removeCommand(r[t])},this)},o.prototype.bindKeys=function(r){Object.keys(r).forEach(function(t){this.bindKey(t,r[t])},this)},o.prototype._buildKeyHash=function(r){this.bindKey(r.bindKey,r)},o.prototype.parseKeys=function(r){var t=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(b){return b}),i=t.pop(),l=E[i];if(E.FUNCTION_KEYS[l])i=E.FUNCTION_KEYS[l].toLowerCase();else if(t.length){if(t.length==1&&t[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var f=0,d=t.length;d--;){var C=E.KEY_MODS[t[d]];if(C==null)return typeof console<"u"&&console.error("invalid modifier "+t[d]+" in "+r),!1;f|=C}return{key:i,hashId:f}},o.prototype.findKeyCommand=function(r,t){var i=u[r]+t;return this.commandKeyBinding[i]},o.prototype.handleKeyboard=function(r,t,i,l){if(!(l<0)){var f=u[t]+i,d=this.commandKeyBinding[f];return r.$keyChain&&(r.$keyChain+=" "+f,d=this.commandKeyBinding[r.$keyChain]||d),d&&(d=="chainKeys"||d[d.length-1]=="chainKeys")?(r.$keyChain=r.$keyChain||f,{command:"null"}):(r.$keyChain&&((!t||t==4)&&i.length==1?r.$keyChain=r.$keyChain.slice(0,-f.length-1):(t==-1||l>0)&&(r.$keyChain="")),{command:d})}},o.prototype.getStatusText=function(r,t){return t.$keyChain||""},o}();function s(o){return typeof o=="object"&&o.bindKey&&o.bindKey.position||(o.isDefault?-100:0)}var a=function(o){T(r,o);function r(t,i){var l=o.call(this,t,i)||this;return l.$singleCommand=!0,l}return r}(c);a.call=function(o,r,t){c.prototype.$init.call(o,r,t,!0)},c.call=function(o,r,t){c.prototype.$init.call(o,r,t,!1)},v.HashHandler=a,v.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(h,v,W){var T=this&&this.__extends||function(){var s=function(a,o){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])},s(a,o)};return function(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");s(a,o);function r(){this.constructor=a}a.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}}(),E=h("../lib/oop"),$=h("../keyboard/hash_handler").MultiHashHandler,u=h("../lib/event_emitter").EventEmitter,c=function(s){T(a,s);function a(o,r){var t=s.call(this,r,o)||this;return t.byName=t.commands,t.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),t}return a.prototype.exec=function(o,r,t){if(Array.isArray(o)){for(var i=o.length;i--;)if(this.exec(o[i],r,t))return!0;return!1}typeof o=="string"&&(o=this.commands[o]);var l={editor:r,command:o,args:t};return this.canExecute(o,r)?(l.returnValue=this._emit("exec",l),this._signal("afterExec",l),l.returnValue!==!1):(this._signal("commandUnavailable",l),!1)},a.prototype.canExecute=function(o,r){return typeof o=="string"&&(o=this.commands[o]),!(!o||r&&r.$readOnly&&!o.readOnly||this.$checkCommandState!=!1&&o.isAvailable&&!o.isAvailable(r))},a.prototype.toggleRecording=function(o){if(!this.$inReplay)return o&&o._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(r){this.macro.push([r.command,r.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(o){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(o);try{this.$inReplay=!0,this.macro.forEach(function(r){typeof r=="string"?this.exec(r,o):this.exec(r[0],o,r[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(o){return o.map(function(r){return typeof r[0]!="string"&&(r[0]=r[0].name),r[1]||(r=r[0]),r})},a}($);E.implement(c.prototype,u),v.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(h,v,W){var T=h("../lib/lang"),E=h("../config"),$=h("../range").Range;function u(s,a){return{win:s,mac:a}}v.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:u("Ctrl-,","Command-,"),exec:function(s){E.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:u("Alt-E","F4"),exec:function(s){E.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:u("Alt-Shift-E","Shift-F4"),exec:function(s){E.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:u("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:u(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:u("Ctrl-L","Command-L"),exec:function(s,a){typeof a=="number"&&!isNaN(a)&&s.gotoLine(a),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:u("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:u("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:u("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:u("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:u("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:u("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:u("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:u("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:u("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:u("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:u("Ctrl-F","Command-F"),exec:function(s){E.loadModule("ace/ext/searchbox",function(a){a.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:u("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:u("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:u("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:u("Up","Up|Ctrl-P"),exec:function(s,a){s.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:u("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:u("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:u("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:u("Down","Down|Ctrl-N"),exec:function(s,a){s.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:u("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:u("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:u("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:u("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:u("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:u("Left","Left|Ctrl-B"),exec:function(s,a){s.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:u("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:u("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:u("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:u("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:u("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:u("Right","Right|Ctrl-F"),exec:function(s,a){s.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:u(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:u("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:u(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:u("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:u("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:u("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:u("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:u("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:u("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:u("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:u(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var a=s.$copyWithEmptySelection&&s.selection.isEmpty(),o=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",o),o.isEmpty()||s.session.remove(o),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,a){s.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:u("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:u("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:u("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:u("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:u("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:u("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:u("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:u("Ctrl-H","Command-Option-F"),exec:function(s){E.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:u("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:u("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:u("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:u("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:u("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:u("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:u("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:u("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:u("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:u("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:u("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:u("Ctrl-Shift-Backspace",null),exec:function(s){var a=s.selection.getRange();a.start.column=0,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:u("Ctrl-Shift-Delete",null),exec:function(s){var a=s.selection.getRange();a.end.column=Number.MAX_VALUE,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:u("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:u("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:u("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:u("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:u("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:u("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,a){s.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,a){s.insert(T.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:u(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:u("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:u("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:u("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:u(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:u("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var a=s.selection.getRange();a.start.column=a.end.column=0,a.end.row++,s.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:u("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:u(null,null),exec:function(s){for(var a=s.selection.isBackwards(),o=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),r=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),t=s.session.doc.getLine(o.row).length,i=s.session.doc.getTextRange(s.selection.getRange()),l=i.replace(/\n\s*/," ").length,f=s.session.doc.getLine(o.row),d=o.row+1;d<=r.row+1;d++){var C=T.stringTrimLeft(T.stringTrimRight(s.session.doc.getLine(d)));C.length!==0&&(C=" "+C),f+=C}r.row+10?(s.selection.moveCursorTo(o.row,o.column),s.selection.selectTo(o.row,o.column+l)):(t=s.session.doc.getLine(o.row).length>t?t+1:t,s.selection.moveCursorTo(o.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:u(null,null),exec:function(s){var a=s.session.doc.getLength()-1,o=s.session.doc.getLine(a).length,r=s.selection.rangeList.ranges,t=[];r.length<1&&(r=[s.selection.getRange()]);for(var i=0;i0||c+s=0&&this.$isCustomWidgetVisible(c-s))return c-s;if(c+s<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(c+s))return c+s;if(c-s>=0&&this.$isFoldWidgetVisible(c-s))return c-s;if(c+s<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+s))return c+s}return null},u.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var s=0;c-s>0||c+s=0&&this.$isAnnotationVisible(c-s))return c-s;if(c+s<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+s))return c+s}return null},u.prototype.$focusFoldWidget=function(c){if(c!=null){var s=this.$getFoldWidget(c);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},u.prototype.$focusCustomWidget=function(c){if(c!=null){var s=this.$getCustomWidget(c);s&&(s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus())}},u.prototype.$focusAnnotation=function(c){if(c!=null){var s=this.$getAnnotation(c);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},u.prototype.$blurFoldWidget=function(c){var s=this.$getFoldWidget(c);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},u.prototype.$blurCustomWidget=function(c){var s=this.$getCustomWidget(c);s&&(s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur())},u.prototype.$blurAnnotation=function(c){var s=this.$getAnnotation(c);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)||this.$isCustomWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=c,this.$isFoldWidgetVisible(c)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c=w.length&&(w=void 0),{value:w&&w[D++],done:!w}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},E=h("./lib/oop"),$=h("./lib/dom"),u=h("./lib/lang"),c=h("./lib/useragent"),s=h("./keyboard/textinput").TextInput,a=h("./mouse/mouse_handler").MouseHandler,o=h("./mouse/fold_handler").FoldHandler,r=h("./keyboard/keybinding").KeyBinding,t=h("./edit_session").EditSession,i=h("./search").Search,l=h("./range").Range,f=h("./lib/event_emitter").EventEmitter,d=h("./commands/command_manager").CommandManager,C=h("./commands/default_commands").commands,b=h("./config"),y=h("./token_iterator").TokenIterator,m=h("./keyboard/gutter_handler").GutterKeyboardHandler,x=h("./config").nls,O=h("./clipboard"),k=h("./lib/keys"),R=h("./lib/event"),B=h("./tooltip").HoverTooltip,L=function(){function w(g,_,D){this.id="editor"+ ++w.$uid,this.session,this.$toDestroy=[];var P=g.getContainerElement();this.container=P,this.renderer=g,this.commands=new d(c.isMac?"mac":"win",C),typeof document=="object"&&(this.textInput=new s(g.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new o(this)),this.keyBinding=new r(this),this.$search=new i().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=u.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(H,U){U._$emitInputEvent.schedule(31)}),this.setSession(_||D&&D.session||new t("")),b.resetOptions(this),D&&this.setOptions(D),b._signal("editor",this)}return w.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},w.prototype.startOperation=function(g){this.session.startOperation(g)},w.prototype.endOperation=function(g){this.session.endOperation(g)},w.prototype.onStartOperation=function(g){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,g||(this.previousCommand=null)},w.prototype.onEndOperation=function(g){if(this.curOp&&this.session){if(g&&g.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var _=this.curOp.command,D=_&&_.scrollIntoView;if(D){switch(D){case"center-animate":D="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var P=this.selection.getRange(),H=this.renderer.layerConfig;(P.start.row>=H.lastRow||P.end.row<=H.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}D=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},w.prototype.$historyTracker=function(g){if(this.$mergeUndoDeltas){var _=this.prevOp,D=this.$mergeableCommands,P=_.command&&g.command.name==_.command.name;if(g.command.name=="insertstring"){var H=g.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),P=P&&this.mergeNextCommand&&(!/\s/.test(H)||/\s/.test(_.args)),this.mergeNextCommand=!0}else P=P&&D.indexOf(g.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(P=!1),P?this.session.mergeUndoDeltas=!0:D.indexOf(g.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},w.prototype.setKeyboardHandler=function(g,_){if(g&&typeof g=="string"&&g!="ace"){this.$keybindingId=g;var D=this;b.loadModule(["keybinding",g],function(P){D.$keybindingId==g&&D.keyBinding.setKeyboardHandler(P&&P.handler),_&&_()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(g),_&&_()},w.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},w.prototype.setSession=function(g){if(this.session!=g){this.curOp&&this.endOperation(),this.curOp={};var _=this.session;if(_){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var D=this.session.getSelection();D.off("changeCursor",this.$onCursorChange),D.off("changeSelection",this.$onSelectionChange)}this.session=g,g?(this.$onDocumentChange=this.onDocumentChange.bind(this),g.on("change",this.$onDocumentChange),this.renderer.setSession(g),this.$onChangeMode=this.onChangeMode.bind(this),g.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),g.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),g.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),g.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),g.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),g.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=g.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(g)),this._signal("changeSession",{session:g,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),_&&(_.$editor=null),g&&g._signal("changeEditor",{editor:this}),g&&(g.$editor=this),g&&!g.destroyed&&g.bgTokenizer.scheduleStart()}},w.prototype.getSession=function(){return this.session},w.prototype.setValue=function(g,_){return this.session.doc.setValue(g),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),g},w.prototype.getValue=function(){return this.session.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.resize=function(g){this.renderer.onResize(g)},w.prototype.setTheme=function(g,_){this.renderer.setTheme(g,_)},w.prototype.getTheme=function(){return this.renderer.getTheme()},w.prototype.setStyle=function(g,_){this.renderer.setStyle(g,_)},w.prototype.unsetStyle=function(g){this.renderer.unsetStyle(g)},w.prototype.getFontSize=function(){return this.getOption("fontSize")||$.computedStyle(this.container).fontSize},w.prototype.setFontSize=function(g){this.setOption("fontSize",g)},w.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var g=this;this.$highlightPending=!0,setTimeout(function(){g.$highlightPending=!1;var _=g.session;if(!(!_||_.destroyed)){_.$bracketHighlight&&(_.$bracketHighlight.markerIds.forEach(function(Z){_.removeMarker(Z)}),_.$bracketHighlight=null);var D=g.getCursorPosition(),P=g.getKeyboardHandler(),H=P&&P.$getDirectionForHighlight&&P.$getDirectionForHighlight(g),U=_.getMatchingBracketRanges(D,H);if(!U){var Y=new y(_,D.row,D.column),te=Y.getCurrentToken();if(te&&/\b(?:tag-open|tag-name)/.test(te.type)){var K=_.getMatchingTags(D);K&&(U=[K.openTagName.isEmpty()?K.openTag:K.openTagName,K.closeTagName.isEmpty()?K.closeTag:K.closeTagName])}}if(!U&&_.$mode.getMatching&&(U=_.$mode.getMatching(g.session)),!U){g.getHighlightIndentGuides()&&g.renderer.$textLayer.$highlightIndentGuide();return}var X="ace_bracket";Array.isArray(U)?U.length==1&&(X="ace_error_bracket"):U=[U],U.length==2&&(l.comparePoints(U[0].end,U[1].start)==0?U=[l.fromPoints(U[0].start,U[1].end)]:l.comparePoints(U[0].start,U[1].end)==0&&(U=[l.fromPoints(U[1].start,U[0].end)])),_.$bracketHighlight={ranges:U,markerIds:U.map(function(Z){return _.addMarker(Z,X,"text")})},g.getHighlightIndentGuides()&&g.renderer.$textLayer.$highlightIndentGuide()}},50)}},w.prototype.focus=function(){this.textInput.focus()},w.prototype.isFocused=function(){return this.textInput.isFocused()},w.prototype.blur=function(){this.textInput.blur()},w.prototype.onFocus=function(g){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",g))},w.prototype.onBlur=function(g){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",g))},w.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},w.prototype.onDocumentChange=function(g){var _=this.session.$useWrapMode,D=g.start.row==g.end.row?g.end.row:1/0;this.renderer.updateLines(g.start.row,D,_),this._signal("change",g),this.$cursorChange()},w.prototype.onTokenizerUpdate=function(g){var _=g.data;this.renderer.updateLines(_.first,_.last)},w.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},w.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},w.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},w.prototype.$updateHighlightActiveLine=function(){var g=this.getSession(),_;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(_=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(_=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(_=!1)),g.$highlightLineMarker&&!_)g.removeMarker(g.$highlightLineMarker.id),g.$highlightLineMarker=null;else if(!g.$highlightLineMarker&&_){var D=new l(_.row,_.column,_.row,1/0);D.id=g.addMarker(D,"ace_active-line","screenLine"),g.$highlightLineMarker=D}else _&&(g.$highlightLineMarker.start.row=_.row,g.$highlightLineMarker.end.row=_.row,g.$highlightLineMarker.start.column=_.column,g._signal("changeBackMarker"))},w.prototype.onSelectionChange=function(g){var _=this.session;if(_.$selectionMarker&&_.removeMarker(_.$selectionMarker),_.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var D=this.selection.getRange(),P=this.getSelectionStyle();_.$selectionMarker=_.addMarker(D,"ace_selection",P)}var H=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(H),this._signal("changeSelection")},w.prototype.$getSelectionHighLightRegexp=function(){var g=this.session,_=this.getSelectionRange();if(!(_.isEmpty()||_.isMultiLine())){var D=_.start.column,P=_.end.column,H=g.getLine(_.start.row),U=H.substring(D,P);if(!(U.length>5e3||!/[\w\d]/.test(U))){var Y=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:U}),te=H.substring(D-1,P+1);if(Y.test(te))return Y}}},w.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},w.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},w.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},w.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},w.prototype.onChangeMode=function(g){this.renderer.updateText(),this._emit("changeMode",g)},w.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},w.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},w.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},w.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},w.prototype.getCopyText=function(){var g=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),D=!1;if(!g&&this.$copyWithEmptySelection){D=!0;for(var P=this.selection.getAllRanges(),H=0;HZ.search(/\S|$/)){var te=Z.substr(H.column).search(/\S|$/);D.doc.removeInLine(H.row,H.column,H.column+te)}}this.clearSelection();var K=H.column,X=D.getState(H.row),Z=D.getLine(H.row),J=P.checkOutdent(X,Z,g);if(D.insert(H,g),U&&U.selection&&(U.selection.length==2?this.selection.setSelectionRange(new l(H.row,K+U.selection[0],H.row,K+U.selection[1])):this.selection.setSelectionRange(new l(H.row+U.selection[0],U.selection[1],H.row+U.selection[2],U.selection[3]))),this.$enableAutoIndent){if(D.getDocument().isNewLine(g)){var re=P.getNextLineIndent(X,Z.slice(0,H.column),D.getTabString());D.insert({row:H.row+1,column:0},re)}J&&P.autoOutdent(X,D,H.row)}},w.prototype.autoIndent=function(){for(var g=this.session,_=g.getMode(),D=this.selection.isEmpty()?[new l(0,0,g.doc.getLength()-1,0)]:this.selection.getAllRanges(),P="",H="",U="",Y=g.getTabString(),te=0;te0&&(P=g.getState(Z-1),H=g.getLine(Z-1),U=_.getNextLineIndent(P,H,Y));var J=g.getLine(Z),re=_.$getIndent(J);if(U!==re){if(re.length>0){var ae=new l(Z,0,Z,re.length);g.remove(ae)}U.length>0&&g.insert({row:Z,column:0},U)}_.autoOutdent(P,g,Z)}},w.prototype.onTextInput=function(g,_){if(!_)return this.keyBinding.onTextInput(g);this.startOperation({command:{name:"insertstring"}});var D=this.applyComposition.bind(this,g,_);this.selection.rangeCount?this.forEachSelection(D):D(),this.endOperation()},w.prototype.applyComposition=function(g,_){if(_.extendLeft||_.extendRight){var D=this.selection.getRange();D.start.column-=_.extendLeft,D.end.column+=_.extendRight,D.start.column<0&&(D.start.row--,D.start.column+=this.session.getLine(D.start.row).length+1),this.selection.setRange(D),!g&&!D.isEmpty()&&this.remove()}if((g||!this.selection.isEmpty())&&this.insert(g,!0),_.restoreStart||_.restoreEnd){var D=this.selection.getRange();D.start.column-=_.restoreStart,D.end.column-=_.restoreEnd,this.selection.setRange(D)}},w.prototype.onCommandKey=function(g,_,D){return this.keyBinding.onCommandKey(g,_,D)},w.prototype.setOverwrite=function(g){this.session.setOverwrite(g)},w.prototype.getOverwrite=function(){return this.session.getOverwrite()},w.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},w.prototype.setScrollSpeed=function(g){this.setOption("scrollSpeed",g)},w.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},w.prototype.setDragDelay=function(g){this.setOption("dragDelay",g)},w.prototype.getDragDelay=function(){return this.getOption("dragDelay")},w.prototype.setSelectionStyle=function(g){this.setOption("selectionStyle",g)},w.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},w.prototype.setHighlightActiveLine=function(g){this.setOption("highlightActiveLine",g)},w.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},w.prototype.setHighlightGutterLine=function(g){this.setOption("highlightGutterLine",g)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.setHighlightSelectedWord=function(g){this.setOption("highlightSelectedWord",g)},w.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},w.prototype.setAnimatedScroll=function(g){this.renderer.setAnimatedScroll(g)},w.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},w.prototype.setShowInvisibles=function(g){this.renderer.setShowInvisibles(g)},w.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},w.prototype.setDisplayIndentGuides=function(g){this.renderer.setDisplayIndentGuides(g)},w.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},w.prototype.setHighlightIndentGuides=function(g){this.renderer.setHighlightIndentGuides(g)},w.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},w.prototype.setShowPrintMargin=function(g){this.renderer.setShowPrintMargin(g)},w.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},w.prototype.setPrintMarginColumn=function(g){this.renderer.setPrintMarginColumn(g)},w.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},w.prototype.setReadOnly=function(g){this.setOption("readOnly",g)},w.prototype.getReadOnly=function(){return this.getOption("readOnly")},w.prototype.setBehavioursEnabled=function(g){this.setOption("behavioursEnabled",g)},w.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},w.prototype.setWrapBehavioursEnabled=function(g){this.setOption("wrapBehavioursEnabled",g)},w.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},w.prototype.setShowFoldWidgets=function(g){this.setOption("showFoldWidgets",g)},w.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},w.prototype.setFadeFoldWidgets=function(g){this.setOption("fadeFoldWidgets",g)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.remove=function(g){this.selection.isEmpty()&&(g=="left"?this.selection.selectLeft():this.selection.selectRight());var _=this.getSelectionRange();if(this.getBehavioursEnabled()){var D=this.session,P=D.getState(_.start.row),H=D.getMode().transformAction(P,"deletion",this,D,_);if(_.end.column===0){var U=D.getTextRange(_);if(U[U.length-1]==` -`){var Y=D.getLine(_.end.row);/^\s+$/.test(Y)&&(_.end.column=Y.length)}}H&&(_=H)}this.session.remove(_),this.clearSelection()},w.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var g=this.getSelectionRange();g.start.column==g.end.column&&g.start.row==g.end.row&&(g.end.column=0,g.end.row++),this.session.remove(g),this.clearSelection()},w.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var g=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(g)},w.prototype.setGhostText=function(g,_){this.renderer.setGhostText(g,_)},w.prototype.removeGhostText=function(){this.renderer.removeGhostText()},w.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var g=this.getCursorPosition(),_=g.column;if(_!==0){var D=this.session.getLine(g.row),P,H;_te.toLowerCase()?1:0});for(var H=new l(0,0,0,0),P=g.first;P<=g.last;P++){var U=_.getLine(P);H.start.row=P,H.end.row=P,H.end.column=U.length,_.replace(H,D[P-g.first])}},w.prototype.toggleCommentLines=function(){var g=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(g,this.session,_.first,_.last)},w.prototype.toggleBlockComment=function(){var g=this.getCursorPosition(),_=this.session.getState(g.row),D=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,D,g)},w.prototype.getNumberAt=function(g,_){var D=/[\-]?[0-9]+(?:\.[0-9]+)?/g;D.lastIndex=0;for(var P=this.session.getLine(g);D.lastIndex<_;){var H=D.exec(P);if(H.index<=_&&H.index+H[0].length>=_){var U={value:H[0],start:H.index,end:H.index+H[0].length};return U}}return null},w.prototype.modifyNumber=function(g){var _=this.selection.getCursor().row,D=this.selection.getCursor().column,P=new l(_,D-1,_,D),H=this.session.getTextRange(P);if(!isNaN(parseFloat(H))&&isFinite(H)){var U=this.getNumberAt(_,D);if(U){var Y=U.value.indexOf(".")>=0?U.start+U.value.indexOf(".")+1:U.end,te=U.start+U.value.length-Y,K=parseFloat(U.value);K*=Math.pow(10,te),Y!==U.end&&D=Y&&U<=te&&(D=De,K.selection.clearSelection(),K.moveCursorTo(g,Y+P),K.selection.selectTo(g,te+P)),Y=te});for(var X=this.$toggleWordPairs,Z,J=0;J=te&&Y<=K&&re.match(/((?:https?|ftp):\/\/[\S]+)/)){X=re.replace(/[\s:.,'";}\]]+$/,"");break}te=K}}catch(ae){D={error:ae}}finally{try{J&&!J.done&&(P=Z.return)&&P.call(Z)}finally{if(D)throw D.error}}return X},w.prototype.openLink=function(){var g=this.selection.getCursor(),_=this.findLinkAt(g.row,g.column);return _&&window.open(_,"_blank"),_!=null},w.prototype.removeLines=function(){var g=this.$getSelectedRows();this.session.removeFullLines(g.first,g.last),this.clearSelection()},w.prototype.duplicateSelection=function(){var g=this.selection,_=this.session,D=g.getRange(),P=g.isBackwards();if(D.isEmpty()){var H=D.start.row;_.duplicateLines(H,H)}else{var U=P?D.start:D.end,Y=_.insert(U,_.getTextRange(D));D.start=U,D.end=Y,g.setSelectionRange(D,P)}},w.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},w.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},w.prototype.moveText=function(g,_,D){return this.session.moveText(g,_,D)},w.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},w.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},w.prototype.$moveLines=function(g,_){var D,P,H=this.selection;if(!H.inMultiSelectMode||this.inVirtualSelectionMode){var U=H.toOrientedRange();D=this.$getSelectedRows(U),P=this.session.$moveLines(D.first,D.last,_?0:g),_&&g==-1&&(P=0),U.moveBy(P,0),H.fromOrientedRange(U)}else{var Y=H.rangeList.ranges;H.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var te=0,K=0,X=Y.length,Z=0;Zae+1)break;ae=he.last}for(Z--,te=this.session.$moveLines(re,ae,_?0:g),_&&g==-1&&(J=Z+1);J<=Z;)Y[J].moveBy(te,0),J++;_||(te=0),K+=te}H.fromOrientedRange(H.ranges[0]),H.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},w.prototype.$getSelectedRows=function(g){return g=(g||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(g.start.row),last:this.session.getRowFoldEnd(g.end.row)}},w.prototype.onCompositionStart=function(g){this.renderer.showComposition(g)},w.prototype.onCompositionUpdate=function(g){this.renderer.setCompositionText(g)},w.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},w.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},w.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},w.prototype.isRowVisible=function(g){return g>=this.getFirstVisibleRow()&&g<=this.getLastVisibleRow()},w.prototype.isRowFullyVisible=function(g){return g>=this.renderer.getFirstFullyVisibleRow()&&g<=this.renderer.getLastFullyVisibleRow()},w.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},w.prototype.$moveByPage=function(g,_){var D=this.renderer,P=this.renderer.layerConfig,H=g*Math.floor(P.height/P.lineHeight);_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(H,0)}):_===!1&&(this.selection.moveCursorBy(H,0),this.selection.clearSelection());var U=D.scrollTop;D.scrollBy(0,H*P.lineHeight),_!=null&&D.scrollCursorIntoView(null,.5),D.animateScrolling(U)},w.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},w.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},w.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},w.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},w.prototype.scrollPageDown=function(){this.$moveByPage(1)},w.prototype.scrollPageUp=function(){this.$moveByPage(-1)},w.prototype.scrollToRow=function(g){this.renderer.scrollToRow(g)},w.prototype.scrollToLine=function(g,_,D,P){this.renderer.scrollToLine(g,_,D,P)},w.prototype.centerSelection=function(){var g=this.getSelectionRange(),_={row:Math.floor(g.start.row+(g.end.row-g.start.row)/2),column:Math.floor(g.start.column+(g.end.column-g.start.column)/2)};this.renderer.alignCursor(_,.5)},w.prototype.getCursorPosition=function(){return this.selection.getCursor()},w.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},w.prototype.getSelectionRange=function(){return this.selection.getRange()},w.prototype.selectAll=function(){this.selection.selectAll()},w.prototype.clearSelection=function(){this.selection.clearSelection()},w.prototype.moveCursorTo=function(g,_){this.selection.moveCursorTo(g,_)},w.prototype.moveCursorToPosition=function(g){this.selection.moveCursorToPosition(g)},w.prototype.jumpToMatching=function(g,_){var D=this.getCursorPosition(),P=new y(this.session,D.row,D.column),H=P.getCurrentToken(),U=0;H&&H.type.indexOf("tag-name")!==-1&&(H=P.stepBackward());var Y=H||P.stepForward();if(Y){var te,K=!1,X={},Z=D.column-Y.start,J,re={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Y.value.match(/[{}()\[\]]/g)){for(;Z1?X[Y.value]++:H.value==="=0;--U)this.$tryReplace(D[U],g)&&P++;return this.selection.setSelectionRange(H),P},w.prototype.$tryReplace=function(g,_){var D=this.session.getTextRange(g);return _=this.$search.replace(D,_),_!==null?(g.end=this.session.replace(g,_),g):null},w.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},w.prototype.find=function(g,_,D){_||(_={}),typeof g=="string"||g instanceof RegExp?_.needle=g:typeof g=="object"&&E.mixin(_,g);var P=this.selection.getRange();_.needle==null&&(g=this.session.getTextRange(P)||this.$search.$options.needle,g||(P=this.session.getWordRange(P.start.row,P.start.column),g=this.session.getTextRange(P)),this.$search.set({needle:g})),this.$search.set(_),_.start||this.$search.set({start:P});var H=this.$search.find(this.session);if(_.preventScroll)return H;if(H)return this.revealRange(H,D),H;_.backwards?P.start=P.end:P.end=P.start,this.selection.setRange(P)},w.prototype.findNext=function(g,_){this.find({skipCurrent:!0,backwards:!1},g,_)},w.prototype.findPrevious=function(g,_){this.find(g,{skipCurrent:!0,backwards:!0},_)},w.prototype.revealRange=function(g,_){this.session.unfold(g),this.selection.setSelectionRange(g);var D=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(g.start,g.end,.5),_!==!1&&this.renderer.animateScrolling(D)},w.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(g){g.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},w.prototype.setAutoScrollEditorIntoView=function(g){if(g){var _,D=this,P=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var H=this.$scrollAnchor;H.style.cssText="position:absolute",this.container.insertBefore(H,this.container.firstChild);var U=this.on("changeSelection",function(){P=!0}),Y=this.renderer.on("beforeRender",function(){P&&(_=D.renderer.container.getBoundingClientRect())}),te=this.renderer.on("afterRender",function(){if(P&&_&&(D.isFocused()||D.searchBox&&D.searchBox.isFocused())){var K=D.renderer,X=K.$cursorLayer.$pixelPos,Z=K.layerConfig,J=X.top-Z.offset;X.top>=0&&J+_.top<0?P=!0:X.topwindow.innerHeight?P=!1:P=null,P!=null&&(H.style.top=J+"px",H.style.left=X.left+"px",H.style.height=Z.lineHeight+"px",H.scrollIntoView(P)),P=_=null}});this.setAutoScrollEditorIntoView=function(K){K||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",U),this.renderer.off("afterRender",te),this.renderer.off("beforeRender",Y))}}},w.prototype.$resetCursorStyle=function(){var g=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(g)),_.isBlinking=!this.$readOnly&&g!="wide",$.setCssClass(_.element,"ace_slim-cursors",/slim/.test(g)))},w.prototype.prompt=function(g,_,D){var P=this;b.loadModule("ace/ext/prompt",function(H){H.prompt(P,g,_,D)})},Object.defineProperty(w.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new B(this.container))},set:function(g){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=g},enumerable:!1,configurable:!0}),w}();L.$uid=0,L.prototype.curOp=null,L.prototype.prevOp={},L.prototype.$mergeableCommands=["backspace","del","insertstring"],L.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],E.implement(L.prototype,f),b.defineOptions(L.prototype,"editor",{selectionStyle:{set:function(w){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:w})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(w){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(w){var g=this;if(this.textInput.setReadOnly(w),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(D){var P=!1;if(D&&D.type=="keydown"){if(D&&D.key&&!D.ctrlKey&&!D.metaKey&&(D.key==" "&&D.preventDefault(),P=D.key.length==1),!P)return}else D&&D.type!=="exec"&&(P=!0);if(P){var H=$.createElement("div");H.textContent=x("editor.tooltip.disable-editing","Editing is disabled"),g.hoverTooltip.isOpen||g.hoverTooltip.showForRange(g,g.getSelectionRange(),H)}else g.hoverTooltip&&g.hoverTooltip.isOpen&&g.hoverTooltip.hide()});var _=this.textInput.getElement();w?(R.addListener(_,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(R.removeListener(_,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(w){this.textInput.setCopyWithEmptySelection(w)},initialValue:!1},cursorStyle:{set:function(w){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(w){this.setAutoScrollEditorIntoView(w)}},keyboardHandler:{set:function(w){this.setKeyboardHandler(w)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(w){this.session.setValue(w)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(w){this.setSession(w)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(w){this.renderer.$gutterLayer.setShowLineNumbers(w),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),w&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(w){this.$showLineNumbers&&w?A.attach(this):A.detach(this)}},placeholder:{set:function(w){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var g=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(g&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),$.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!g&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),$.addCssClass(this.container,"ace_hasPlaceholder");var _=$.createElement("div");_.className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!g&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(w){var g={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(P){P.blur(),P.renderer.scroller.focus()},readOnly:!0},_=function(P){if(P.target==this.renderer.scroller&&P.keyCode===k.enter){P.preventDefault();var H=this.getCursorPosition().row;this.isRowVisible(H)||this.scrollToLine(H,!0,!0),this.focus()}},D;w?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(g),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),D||(D=new m(this)),D.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",_.bind(this)),this.commands.removeCommand(g),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),D&&D.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(w){this.$textInputAriaLabel=w},initialValue:""},enableMobileMenu:{set:function(w){this.$enableMobileMenu=w},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(w,g){return(Math.abs(w.selection.lead.row-g)||g+1+(g<9?"·":""))+""},getWidth:function(w,g,_){return Math.max(g.toString().length,(_.lastRow+1).toString().length,2)*_.characterWidth},update:function(w,g){g.renderer.$loop.schedule(g.renderer.CHANGE_GUTTER)},attach:function(w){w.renderer.$gutterLayer.$renderer=this,w.on("changeSelection",this.update),this.update(null,w)},detach:function(w){w.renderer.$gutterLayer.$renderer==this&&(w.renderer.$gutterLayer.$renderer=null),w.off("changeSelection",this.update),this.update(null,w)}};v.Editor=L}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(h,v,W){var T=h("../lib/dom"),E=function(){function $(u,c){this.element=u,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return $.prototype.moveContainer=function(u){T.translate(this.element,0,-(u.firstRowScreen*u.lineHeight%this.canvasHeight)-u.offset*this.$offsetCoefficient)},$.prototype.pageChanged=function(u,c){return Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},$.prototype.computeLineTop=function(u,c,s){var a=c.firstRowScreen*c.lineHeight,o=Math.floor(a/this.canvasHeight),r=s.documentToScreenRow(u,0)*c.lineHeight;return r-o*this.canvasHeight},$.prototype.computeLineHeight=function(u,c,s){return c.lineHeight*s.getRowLineCount(u)},$.prototype.getLength=function(){return this.cells.length},$.prototype.get=function(u){return this.cells[u]},$.prototype.shift=function(){this.$cacheCell(this.cells.shift())},$.prototype.pop=function(){this.$cacheCell(this.cells.pop())},$.prototype.push=function(u){if(Array.isArray(u)){this.cells.push.apply(this.cells,u);for(var c=T.createFragment(this.element),s=0;sC&&(m=d.end.row+1,d=i.getNextFoldLine(m,d),C=d?d.start.row:1/0),m>f){for(;this.$lines.getLength()>y+1;)this.$lines.pop();break}b=this.$lines.get(++y),b?b.row=m:(b=this.$lines.createCell(m,t,this.session,o),this.$lines.push(b)),this.$renderCell(b,t,d,m),m++}this._signal("afterRender"),this.$updateGutterWidth(t),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},r.prototype.$updateGutterWidth=function(t){var i=this.session,l=i.gutterRenderer||this.$renderer,f=i.$firstLineNumber,d=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(d=i.getLength()+f-1);var C=l?l.getWidth(i,d,t):d.toString().length*t.characterWidth,b=this.$padding||this.$computePadding();C+=b.left+b.right,C!==this.gutterWidth&&!isNaN(C)&&(this.gutterWidth=C,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",C))},r.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},r.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!(this.$cursorCell&&this.$cursorCell.row==t)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var l=0;l=this.$cursorRow){if(f.row>this.$cursorRow){var d=this.session.getFoldLine(this.$cursorRow);if(l>0&&d&&d.start.row==i[l-1].row)f=i[l-1];else break}f.element.className="ace_gutter-active-line "+f.element.className,this.$cursorCell=f;break}}}}},r.prototype.$updateCursorMarker=function(){if(this.session){var t=this.session;this.$highlightElement||(this.$highlightElement=T.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=t.selection.cursor,l=this.config,f=this.$lines,d=l.firstRowScreen*l.lineHeight,C=Math.floor(d/f.canvasHeight),b=t.documentToScreenRow(i)*l.lineHeight,y=b-C*f.canvasHeight;T.setStyle(this.$highlightElement.style,"height",l.lineHeight+"px"),T.setStyle(this.$highlightElement.style,"top",y+"px")}},r.prototype.scrollLines=function(t){var i=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(i,t))return this.update(t);this.$lines.moveContainer(t);var l=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),f=this.oldLastRow;if(this.oldLastRow=l,!i||f0;d--)this.$lines.shift();if(f>l)for(var d=this.session.getFoldedRowCount(l+1,f);d>0;d--)this.$lines.pop();t.firstRowf&&this.$lines.push(this.$renderLines(t,f+1,l)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},r.prototype.$renderLines=function(t,i,l){for(var f=[],d=i,C=this.session.getNextFoldLine(d),b=C?C.start.row:1/0;d>b&&(d=C.end.row+1,C=this.session.getNextFoldLine(d,C),b=C?C.start.row:1/0),!(d>l);){var y=this.$lines.createCell(d,t,this.session,o);this.$renderCell(y,t,C,d),f.push(y),d++}return f},r.prototype.$renderCell=function(t,i,l,f){var d=t.element,C=this.session,b=d.childNodes[0],y=d.childNodes[1],m=d.childNodes[2],x=d.childNodes[3],O=m.firstChild,k=C.$firstLineNumber,R=C.$breakpoints,B=C.$decorations,L=C.gutterRenderer||this.$renderer,A=this.$showFoldWidgets&&C.foldWidgets,w=l?l.start.row:Number.MAX_VALUE,g=i.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",D=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",P=(L?L.getText(C,f):f+k).toString();if(this.$highlightGutterLine&&(f==this.$cursorRow||l&&f=w&&this.$cursorRow<=l.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),R[f]&&(_+=R[f]),B[f]&&(_+=B[f]),this.$annotations[f]&&f!==w&&(_+=this.$annotations[f].className),A){var H=A[f];H==null&&(H=A[f]=C.getFoldWidget(f))}if(H){var U="ace_fold-widget ace_"+H,Y=H=="start"&&f==w&&fi[f].row)){for(;l<=f;){var d=Math.floor((l+f)/2),C=i[d];if(C.row>t)f=d-1;else if(C.rowl.right-i.right)return"foldWidgets"},r}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,E.implement(a.prototype,u);function o(r){var t=document.createTextNode("");r.appendChild(t);var i=T.createElement("span");r.appendChild(i);var l=T.createElement("span");r.appendChild(l);var f=T.createElement("span");return l.appendChild(f),r}v.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(h,v,W){var T=h("../range").Range,E=h("../lib/dom"),$=function(){function c(s){this.element=E.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return c.prototype.setPadding=function(s){this.$padding=s},c.prototype.setSession=function(s){this.session=s},c.prototype.setMarkers=function(s){this.markers=s},c.prototype.elt=function(s,a){var o=this.i!=-1&&this.element.childNodes[this.i];o?this.i++:(o=document.createElement("div"),this.element.appendChild(o),this.i=-1),o.style.cssText=a,o.className=s},c.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var o in this.markers){var r=this.markers[o];if(!r.range){r.update(a,this,this.session,s);continue}var t=r.range.clipRows(s.firstRow,s.lastRow);if(!t.isEmpty())if(t=t.toScreenRange(this.session),r.renderer){var i=this.$getTop(t.start.row,s),l=this.$padding+t.start.column*s.characterWidth;r.renderer(a,t,l,i,s)}else r.type=="fullLine"?this.drawFullLineMarker(a,t,r.clazz,s):r.type=="screenLine"?this.drawScreenLineMarker(a,t,r.clazz,s):t.isMultiLine()?r.type=="text"?this.drawTextMarker(a,t,r.clazz,s):this.drawMultiLineMarker(a,t,r.clazz,s):this.drawSingleLineMarker(a,t,r.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.iy,d==f),r,d==f?0:1,t)},c.prototype.drawMultiLineMarker=function(s,a,o,r,t){var i=this.$padding,l=r.lineHeight,f=this.$getTop(a.start.row,r),d=i+a.start.column*r.characterWidth;if(t=t||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var C=a.clone();C.end.row=C.start.row,C.end.column=this.session.getLine(C.start.row).length,this.drawBidiSingleLineMarker(s,C,o+" ace_br1 ace_start",r,null,t)}else this.elt(o+" ace_br1 ace_start","height:"+l+"px;right:"+i+"px;top:"+f+"px;left:"+d+"px;"+(t||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var C=a.clone();C.start.row=C.end.row,C.start.column=0,this.drawBidiSingleLineMarker(s,C,o+" ace_br12",r,null,t)}else{f=this.$getTop(a.end.row,r);var b=a.end.column*r.characterWidth;this.elt(o+" ace_br12","height:"+l+"px;width:"+b+"px;top:"+f+"px;left:"+i+"px;"+(t||""))}if(l=(a.end.row-a.start.row-1)*r.lineHeight,!(l<=0)){f=this.$getTop(a.start.row+1,r);var y=(a.start.column?1:0)|(a.end.column?0:8);this.elt(o+(y?" ace_br"+y:""),"height:"+l+"px;right:"+i+"px;top:"+f+"px;left:"+i+"px;"+(t||""))}},c.prototype.drawSingleLineMarker=function(s,a,o,r,t,i){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,o,r,t,i);var l=r.lineHeight,f=(a.end.column+(t||0)-a.start.column)*r.characterWidth,d=this.$getTop(a.start.row,r),C=this.$padding+a.start.column*r.characterWidth;this.elt(o,"height:"+l+"px;width:"+f+"px;top:"+d+"px;left:"+C+"px;"+(i||""))},c.prototype.drawBidiSingleLineMarker=function(s,a,o,r,t,i){var l=r.lineHeight,f=this.$getTop(a.start.row,r),d=this.$padding,C=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);C.forEach(function(b){this.elt(o,"height:"+l+"px;width:"+(b.width+(t||0))+"px;top:"+f+"px;left:"+(d+b.left)+"px;"+(i||""))},this)},c.prototype.drawFullLineMarker=function(s,a,o,r,t){var i=this.$getTop(a.start.row,r),l=r.lineHeight;a.start.row!=a.end.row&&(l+=this.$getTop(a.end.row,r)-i),this.elt(o,"height:"+l+"px;top:"+i+"px;left:0;right:0;"+(t||""))},c.prototype.drawScreenLineMarker=function(s,a,o,r,t){var i=this.$getTop(a.start.row,r),l=r.lineHeight;this.elt(o,"height:"+l+"px;top:"+i+"px;left:0;right:0;"+(t||""))},c}();$.prototype.$padding=0;function u(c,s,a,o){return(c?1:0)|(s?2:0)|(a?4:0)|(o?8:0)}v.Marker=$}),ace.define("ace/layer/text_util",["require","exports","module"],function(h,v,W){var T=new Set(["text","rparen","lparen"]);v.isTextToken=function(E){return T.has(E)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(h,v,W){var T=h("../lib/oop"),E=h("../lib/dom"),$=h("../lib/lang"),u=h("./lines").Lines,c=h("../lib/event_emitter").EventEmitter,s=h("../config").nls,a=h("./text_util").isTextToken,o=function(){function r(t){this.dom=E,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new u(this.element)}return r.prototype.$updateEolChar=function(){var t=this.session.doc,i=t.getNewLineCharacter()==` -`&&t.getNewLineMode()!="windows",l=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=l)return this.EOL_CHAR=l,!0},r.prototype.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},r.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},r.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},r.prototype.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).bind(this)),this.$pollSizeChanges()},r.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},r.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},r.prototype.setSession=function(t){this.session=t,t&&this.$computeTabString()},r.prototype.setShowInvisibles=function(t){return this.showInvisibles==t?!1:(this.showInvisibles=t,typeof t=="string"?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},r.prototype.setDisplayIndentGuides=function(t){return this.displayIndentGuides==t?!1:(this.displayIndentGuides=t,this.$computeTabString(),!0)},r.prototype.setHighlightIndentGuides=function(t){return this.$highlightIndentGuides===t?!1:(this.$highlightIndentGuides=t,t)},r.prototype.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var i=this.$tabStrings=[0],l=1;lO&&(m=x.end.row+1,x=this.session.getNextFoldLine(m,x),O=x?x.start.row:1/0),!(m>d);){var k=C[b++];if(k){this.dom.removeChildren(k),this.$renderLine(k,m,m==O?x:!1),y&&(k.style.top=this.$lines.computeLineTop(m,t,this.session)+"px");var R=t.lineHeight*this.session.getRowLength(m)+"px";k.style.height!=R&&(y=!0,k.style.height=R)}m++}if(y)for(;b0;d--)this.$lines.shift();if(i.lastRow>t.lastRow)for(var d=this.session.getFoldedRowCount(t.lastRow+1,i.lastRow);d>0;d--)this.$lines.pop();t.firstRowi.lastRow&&this.$lines.push(this.$renderLinesFragment(t,i.lastRow+1,t.lastRow)),this.$highlightIndentGuide()},r.prototype.$renderLinesFragment=function(t,i,l){for(var f=[],d=i,C=this.session.getNextFoldLine(d),b=C?C.start.row:1/0;d>b&&(d=C.end.row+1,C=this.session.getNextFoldLine(d,C),b=C?C.start.row:1/0),!(d>l);){var y=this.$lines.createCell(d,t,this.session),m=y.element;this.dom.removeChildren(m),E.setStyle(m.style,"height",this.$lines.computeLineHeight(d,t,this.session)+"px"),E.setStyle(m.style,"top",this.$lines.computeLineTop(d,t,this.session)+"px"),this.$renderLine(m,d,d==b?C:!1),this.$useLineGroups()?m.className="ace_line_group":m.className="ace_line",f.push(y),d++}return f},r.prototype.update=function(t){this.$lines.moveContainer(t),this.config=t;for(var i=t.firstRow,l=t.lastRow,f=this.$lines;f.getLength();)f.pop();f.push(this.$renderLinesFragment(t,i,l))},r.prototype.$renderToken=function(t,i,l,f){for(var d=this,C=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,b=this.dom.createFragment(this.element),y,m=0;y=C.exec(f);){var x=y[1],O=y[2],k=y[3],R=y[4],B=y[5];if(!(!d.showSpaces&&O)){var L=m!=y.index?f.slice(m,y.index):"";if(m=y.index+y[0].length,L&&b.appendChild(this.dom.createTextNode(L,this.element)),x){var A=d.session.getScreenTabSize(i+y.index),w=d.$tabStrings[A].cloneNode(!0);w.charCount=1,b.appendChild(w),i+=A-1}else if(O)if(d.showSpaces){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_space",g.textContent=$.stringRepeat(d.SPACE_CHAR,O.length),b.appendChild(g)}else b.appendChild(this.dom.createTextNode(O,this.element));else if(k){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_space ace_invalid",g.textContent=$.stringRepeat(d.SPACE_CHAR,k.length),b.appendChild(g)}else if(R){i+=1;var g=this.dom.createElement("span");g.style.width=d.config.characterWidth*2+"px",g.className=d.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",g.textContent=d.showSpaces?d.SPACE_CHAR:R,b.appendChild(g)}else if(B){i+=1;var g=this.dom.createElement("span");g.style.width=d.config.characterWidth*2+"px",g.className="ace_cjk",g.textContent=B,b.appendChild(g)}}}if(b.appendChild(this.dom.createTextNode(m?f.slice(m):f,this.element)),a(l.type))t.appendChild(b);else{var _="ace_"+l.type.replace(/\./g," ace_"),g=this.dom.createElement("span");l.type=="fold"&&(g.style.width=l.value.length*this.config.characterWidth+"px",g.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),g.className=_,g.appendChild(b),t.appendChild(g)}return i+f.length},r.prototype.renderIndentGuide=function(t,i,l){var f=i.search(this.$indentGuideRe);if(f<=0||f>=l)return i;if(i[0]==" "){f-=f%this.tabSize;for(var d=f/this.tabSize,C=0;CC[b].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&t[i.row]!==""&&i.column===t[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var b=i.row+1;b0)f=t.element.childNodes[0];else return;var d=f.childNodes;if(d){var C=d[i-1];C&&C.classList&&C.classList.contains("ace_indent-guide")&&C.classList.add("ace_indent-guide-active")}}},r.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var t=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var l=0;l=this.$highlightIndentGuideMarker.start+1){if(f.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,i)}}else for(var l=t.length-1;l>=0;l--){var f=t[l];if(this.$highlightIndentGuideMarker.end&&f.row=C;){b=this.$renderToken(y,b,x,O.substring(0,C-f)),O=O.substring(C-f),f=C,y=this.$createLineElement(),t.appendChild(y);var k=this.dom.createTextNode($.stringRepeat(" ",l.indent),this.element);k.charCount=0,y.appendChild(k),d++,b=0,C=l[d]||Number.MAX_VALUE}O.length!=0&&(f+=O.length,b=this.$renderToken(y,b,x,O))}}l[l.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(y,b,null,"",!0)},r.prototype.$renderSimpleLine=function(t,i){for(var l=0,f=0;fthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,l,d,C);l=this.$renderToken(t,l,d,C)}}},r.prototype.$renderOverflowMessage=function(t,i,l,f,d){l&&this.$renderToken(t,i,l,f.slice(0,this.MAX_LINE_LENGTH-i));var C=this.dom.createElement("span");C.className="ace_inline_button ace_keyword ace_toggle_wrap",C.textContent=d?"":"",t.appendChild(C)},r.prototype.$renderLine=function(t,i,l){if(!l&&l!=!1&&(l=this.session.getFoldLine(i)),l)var f=this.$getFoldLineTokens(i,l);else var f=this.session.getTokens(i);var d=t;if(f.length){var C=this.session.getRowSplitData(i);if(C&&C.length){this.$renderWrappedLine(t,f,C);var d=t.lastChild}else{var d=t;this.$useLineGroups()&&(d=this.$createLineElement(),t.appendChild(d)),this.$renderSimpleLine(d,f)}}else this.$useLineGroups()&&(d=this.$createLineElement(),t.appendChild(d));if(this.showEOL&&d){l&&(i=l.end.row);var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_eol",b.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,d.appendChild(b)}},r.prototype.$getFoldLineTokens=function(t,i){var l=this.session,f=[];function d(b,y,m){for(var x=0,O=0;O+b[x].value.lengthm-y&&(k=k.substring(0,m-y)),f.push({type:b[x].type,value:k}),O=y+k.length,x+=1}for(;Om?f.push({type:b[x].type,value:k.substring(0,m-O)}):f.push(b[x]),O+=k.length,x+=1}}var C=l.getTokens(t);return i.walk(function(b,y,m,x,O){b!=null?f.push({type:"fold",value:b}):(O&&(C=l.getTokens(y)),C.length&&d(C,x,m))},i.end.row,this.session.getLine(i.end.row).length),f},r.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},r}();o.prototype.EOF_CHAR="¶",o.prototype.EOL_CHAR_LF="¬",o.prototype.EOL_CHAR_CRLF="¤",o.prototype.EOL_CHAR=o.prototype.EOL_CHAR_LF,o.prototype.TAB_CHAR="—",o.prototype.SPACE_CHAR="·",o.prototype.$padding=0,o.prototype.MAX_LINE_LENGTH=1e4,o.prototype.showInvisibles=!1,o.prototype.showSpaces=!1,o.prototype.showTabs=!1,o.prototype.showEOL=!1,o.prototype.displayIndentGuides=!0,o.prototype.$highlightIndentGuides=!0,o.prototype.$tabStrings=[],o.prototype.destroy={},o.prototype.onChangeTabSize=o.prototype.$computeTabString,T.implement(o.prototype,c),v.Text=o}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(h,v,W){var T=h("../lib/dom"),E=function(){function $(u){this.element=T.createElement("div"),this.element.className="ace_layer ace_cursor-layer",u.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),T.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return $.prototype.$updateOpacity=function(u){for(var c=this.cursors,s=c.length;s--;)T.setStyle(c[s].style,"opacity",u?"":"0")},$.prototype.$startCssAnimation=function(){for(var u=this.cursors,c=u.length;c--;)u[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&T.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},$.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,T.removeCssClass(this.element,"ace_animate-blinking")},$.prototype.setPadding=function(u){this.$padding=u},$.prototype.setSession=function(u){this.session=u},$.prototype.setBlinking=function(u){u!=this.isBlinking&&(this.isBlinking=u,this.restartTimer())},$.prototype.setBlinkInterval=function(u){u!=this.blinkInterval&&(this.blinkInterval=u,this.restartTimer())},$.prototype.setSmoothBlinking=function(u){u!=this.smoothBlinking&&(this.smoothBlinking=u,T.setCssClass(this.element,"ace_smooth-blinking",u),this.$updateCursors(!0),this.restartTimer())},$.prototype.addCursor=function(){var u=T.createElement("div");return u.className="ace_cursor",this.element.appendChild(u),this.cursors.push(u),u},$.prototype.removeCursor=function(){if(this.cursors.length>1){var u=this.cursors.pop();return u.parentNode.removeChild(u),u}},$.prototype.hideCursor=function(){this.isVisible=!1,T.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.showCursor=function(){this.isVisible=!0,T.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.restartTimer=function(){var u=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,T.removeCssClass(this.element,"ace_smooth-blinking")),u(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&T.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),T.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=(function(){this.timeoutId=setTimeout(function(){u(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){u(!0),c()},this.blinkInterval),c()}},$.prototype.getPixelPosition=function(u,c){if(!this.config||!this.session)return{left:0,top:0};u||(u=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(u),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,u.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),o=(s.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:o}},$.prototype.isCursorInView=function(u,c){return u.top>=0&&u.topu.height+u.offset||r.top<0)&&s>1)){var t=this.cursors[a++]||this.addCursor(),i=t.style;this.drawCursor?this.drawCursor(t,r,u,c[s],this.session):this.isCursorInView(r,u)?(T.setStyle(i,"display","block"),T.translate(t,r.left,r.top),T.setStyle(i,"width",Math.round(u.characterWidth)+"px"),T.setStyle(i,"height",u.lineHeight+"px")):T.setStyle(i,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=r,this.restartTimer()},$.prototype.$setOverwrite=function(u){u!=this.overwrite&&(this.overwrite=u,u?T.addCssClass(this.element,"ace_overwrite-cursors"):T.removeCssClass(this.element,"ace_overwrite-cursors"))},$.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},$}();E.prototype.$padding=0,E.prototype.drawCursor=null,v.Cursor=E}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(h,v,W){var T=this&&this.__extends||function(){var t=function(i,l){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var C in d)Object.prototype.hasOwnProperty.call(d,C)&&(f[C]=d[C])},t(i,l)};return function(i,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");t(i,l);function f(){this.constructor=i}i.prototype=l===null?Object.create(l):(f.prototype=l.prototype,new f)}}(),E=h("./lib/oop"),$=h("./lib/dom"),u=h("./lib/event"),c=h("./lib/event_emitter").EventEmitter,s=32768,a=function(){function t(i,l){this.element=$.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+l,this.element.tabIndex=-1,this.inner=$.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addListener(this.element,"scroll",this.onScroll.bind(this)),u.addListener(this.element,"mousedown",u.preventDefault)}return t.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},t}();E.implement(a.prototype,c);var o=function(t){T(i,t);function i(l,f){var d=t.call(this,l,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,f.$scrollbarWidth=d.width=$.scrollbarWidth(l.ownerDocument),d.inner.style.width=d.element.style.width=(d.width||15)+5+"px",d.$minWidth=0,d}return i.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var l=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-l)/(this.coeff-l)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(l){this.element.style.height=l+"px"},i.prototype.setScrollHeight=function(l){this.scrollHeight=l,l>s?(this.coeff=s/l,l=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=l+"px"},i.prototype.setScrollTop=function(l){this.scrollTop!=l&&(this.skipEvent=!0,this.scrollTop=l,this.element.scrollTop=l*this.coeff)},i}(a);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=function(t){T(i,t);function i(l,f){var d=t.call(this,l,"-h")||this;return d.scrollLeft=0,d.height=f.$scrollbarWidth,d.inner.style.height=d.element.style.height=(d.height||15)+5+"px",d}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(l){this.element.style.width=l+"px"},i.prototype.setInnerWidth=function(l){this.inner.style.width=l+"px"},i.prototype.setScrollWidth=function(l){this.inner.style.width=l+"px"},i.prototype.setScrollLeft=function(l){this.scrollLeft!=l&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=l)},i}(a);v.ScrollBar=o,v.ScrollBarV=o,v.ScrollBarH=r,v.VScrollBar=o,v.HScrollBar=r}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(h,v,W){var T=this&&this.__extends||function(){var r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,f){l.__proto__=f}||function(l,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d])},r(t,i)};return function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(t,i);function l(){this.constructor=t}t.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}}(),E=h("./lib/oop"),$=h("./lib/dom"),u=h("./lib/event"),c=h("./lib/event_emitter").EventEmitter;$.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ - position: absolute; - background: rgba(128, 128, 128, 0.6); - -moz-box-sizing: border-box; - box-sizing: border-box; - border: 1px solid #bbb; - border-radius: 2px; - z-index: 8; -} -.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { - position: absolute; - z-index: 6; - background: none; - overflow: hidden!important; -} -.ace_editor>.ace_sb-v { - z-index: 6; - right: 0; - top: 0; - width: 12px; -} -.ace_editor>.ace_sb-v div { - z-index: 8; - right: 0; - width: 100%; -} -.ace_editor>.ace_sb-h { - bottom: 0; - left: 0; - height: 12px; -} -.ace_editor>.ace_sb-h div { - bottom: 0; - height: 100%; -} -.ace_editor>.ace_sb_grabbed { - z-index: 8; - background: #000; -}`,"ace_scrollbar.css",!1);var s=function(){function r(t,i){this.element=$.createElement("div"),this.element.className="ace_sb"+i,this.inner=$.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return r.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},r}();E.implement(s.prototype,c);var a=function(r){T(t,r);function t(i,l){var f=r.call(this,i,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,f.parent=i,f.width=f.VScrollWidth,f.renderer=l,f.inner.style.width=f.element.style.width=(f.width||15)+"px",f.$minWidth=0,f}return t.prototype.onMouseDown=function(i,l){if(i==="mousedown"&&!(u.getButton(l)!==0||l.detail===2)){if(l.target===this.inner){var f=this,d=l.clientY,C=function(R){d=R.clientY},b=function(){clearInterval(O)},y=l.clientY,m=this.thumbTop,x=function(){if(d!==void 0){var R=f.scrollTopFromThumbTop(m+d-y);R!==f.scrollTop&&f._emit("scroll",{data:R})}};u.capture(this.inner,C,b);var O=setInterval(x,20);return u.preventDefault(l)}var k=l.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(k)}),u.preventDefault(l)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(i){var l=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return l=l>>0,l<0?l=0:l>this.pageHeight-this.viewHeight&&(l=this.pageHeight-this.viewHeight),l},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(i,l){this.pageHeight===i&&!l||(this.pageHeight=i,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var o=function(r){T(t,r);function t(i,l){var f=r.call(this,i,"-h")||this;return f.scrollLeft=0,f.scrollWidth=0,f.height=f.HScrollHeight,f.inner.style.height=f.element.style.height=(f.height||12)+"px",f.renderer=l,f}return t.prototype.onMouseDown=function(i,l){if(i==="mousedown"&&!(u.getButton(l)!==0||l.detail===2)){if(l.target===this.inner){var f=this,d=l.clientX,C=function(R){d=R.clientX},b=function(){clearInterval(O)},y=l.clientX,m=this.thumbLeft,x=function(){if(d!==void 0){var R=f.scrollLeftFromThumbLeft(m+d-y);R!==f.scrollLeft&&f._emit("scroll",{data:R})}};u.capture(this.inner,C,b);var O=setInterval(x,20);return u.preventDefault(l)}var k=l.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(k)}),u.preventDefault(l)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(i){var l=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return l=l>>0,l<0?l=0:l>this.pageWidth-this.viewWidth&&(l=this.pageWidth-this.viewWidth),l},t.prototype.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(i,l){this.pageWidth===i&&!l||(this.pageWidth=i,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(s);o.prototype.setInnerWidth=o.prototype.setScrollWidth,v.ScrollBar=a,v.ScrollBarV=a,v.ScrollBarH=o,v.VScrollBar=a,v.HScrollBar=o}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(h,v,W){var T=h("./lib/event"),E=function(){function $(u,c){this.onRender=u,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var s=this;this._flush=function(a){s.pending=!1;var o=s.changes;if(o&&(T.blockIdle(100),s.changes=0,s.onRender(o)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return $.prototype.schedule=function(u){this.changes=this.changes|u,this.changes&&!this.pending&&(T.nextFrame(this._flush),this.pending=!0)},$.prototype.clear=function(u){var c=this.changes;return this.changes=0,c},$}();v.RenderLoop=E}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(h,v,W){var T=h("../lib/oop"),E=h("../lib/dom"),$=h("../lib/lang"),u=h("../lib/event"),c=h("../lib/useragent"),s=h("../lib/event_emitter").EventEmitter,a=512,o=typeof ResizeObserver=="function",r=200,t=function(){function i(l){this.el=E.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=E.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=E.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),l.appendChild(this.el),this.$measureNode.textContent=$.stringRepeat("X",a),this.$characterSize={width:0,height:0},o?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(l,f){l.width=l.height="auto",l.left=l.top="0px",l.visibility="hidden",l.position="absolute",l.whiteSpace="pre",c.isIE<8?l["font-family"]="inherit":l.font="inherit",l.overflow=f?"hidden":"visible"},i.prototype.checkForSizeChanges=function(l){if(l===void 0&&(l=this.$measureSizes()),l&&(this.$characterSize.width!==l.width||this.$characterSize.height!==l.height)){this.$measureNode.style.fontWeight="bold";var f=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=l,this.charSizes=Object.create(null),this.allowBoldFonts=f&&f.width===l.width&&f.height===l.height,this._emit("changeCharacterSize",{data:l})}},i.prototype.$addObserver=function(){var l=this;this.$observer=new window.ResizeObserver(function(f){l.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var l=this;return this.$pollSizeChangesTimer=u.onIdle(function f(){l.checkForSizeChanges(),u.onIdle(f,500)},500)},i.prototype.setPolling=function(l){l?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(l){var f={height:(l||this.$measureNode).clientHeight,width:(l||this.$measureNode).clientWidth/a};return f.width===0||f.height===0?null:f},i.prototype.$measureCharWidth=function(l){this.$main.textContent=$.stringRepeat(l,a);var f=this.$main.getBoundingClientRect();return f.width/a},i.prototype.getCharacterWidth=function(l){var f=this.charSizes[l];return f===void 0&&(f=this.charSizes[l]=this.$measureCharWidth(l)/this.$characterSize.width),f},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(l){return!l||!l.parentElement?1:(Number(window.getComputedStyle(l).zoom)||1)*this.$getZoom(l.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var l=function(f,d){return["div",{style:"position: absolute;top:"+f+"px;left:"+d+"px;"}]};this.els=E.buildDom([l(0,0),l(r,0),l(0,r),l(r,r)],this.el)},i.prototype.transformCoordinates=function(l,f){if(l){var d=this.$getZoom(this.el);l=m(1/d,l)}function C(U,Y,te){var K=U[1]*Y[0]-U[0]*Y[1];return[(-Y[1]*te[0]+Y[0]*te[1])/K,(+U[1]*te[0]-U[0]*te[1])/K]}function b(U,Y){return[U[0]-Y[0],U[1]-Y[1]]}function y(U,Y){return[U[0]+Y[0],U[1]+Y[1]]}function m(U,Y){return[U*Y[0],U*Y[1]]}this.els||this.$initTransformMeasureNodes();function x(U){var Y=U.getBoundingClientRect();return[Y.left,Y.top]}var O=x(this.els[0]),k=x(this.els[1]),R=x(this.els[2]),B=x(this.els[3]),L=C(b(B,k),b(B,R),b(y(k,R),y(B,O))),A=m(1+L[0],b(k,O)),w=m(1+L[1],b(R,O));if(f){var g=f,_=L[0]*g[0]/r+L[1]*g[1]/r+1,D=y(m(g[0],A),m(g[1],w));return y(m(1/_/r,D),O)}var P=b(l,O),H=C(b(A,m(L[0],P)),b(w,m(L[1],P)),P);return m(r,H)},i}();t.prototype.$characterSize={width:0,height:0},T.implement(t.prototype,s),v.FontMetrics=t}),ace.define("ace/css/editor-css",["require","exports","module"],function(h,v,W){W.exports=` -.ace_br1 {border-top-left-radius : 3px;} -.ace_br2 {border-top-right-radius : 3px;} -.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} -.ace_br4 {border-bottom-right-radius: 3px;} -.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} -.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} -.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} -.ace_br8 {border-bottom-left-radius : 3px;} -.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} -.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} -.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} - - -.ace_editor { - position: relative; - overflow: hidden; - padding: 0; - font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; - direction: ltr; - text-align: left; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - forced-color-adjust: none; -} - -.ace_scroller { - position: absolute; - overflow: hidden; - top: 0; - bottom: 0; - background-color: inherit; - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - cursor: text; -} - -.ace_content { - position: absolute; - box-sizing: border-box; - min-width: 100%; - contain: style size layout; - font-variant-ligatures: no-common-ligatures; -} -.ace_invisible { - font-variant-ligatures: none; -} - -.ace_keyboard-focus:focus { - box-shadow: inset 0 0 0 2px #5E9ED6; - outline: none; -} - -.ace_dragging .ace_scroller:before{ - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - content: ''; - background: rgba(250, 250, 250, 0.01); - z-index: 1000; -} -.ace_dragging.ace_dark .ace_scroller:before{ - background: rgba(0, 0, 0, 0.01); -} - -.ace_gutter { - position: absolute; - overflow : hidden; - width: auto; - top: 0; - bottom: 0; - left: 0; - cursor: default; - z-index: 4; - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - contain: style size layout; -} - -.ace_gutter-active-line { - position: absolute; - left: 0; - right: 0; -} - -.ace_scroller.ace_scroll-left:after { - content: ""; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; - pointer-events: none; -} - -.ace_gutter-cell, .ace_gutter-cell_svg-icons { - position: absolute; - top: 0; - left: 0; - right: 0; - padding-left: 19px; - padding-right: 6px; - background-repeat: no-repeat; -} - -.ace_gutter-cell_svg-icons .ace_gutter_annotation { - margin-left: -14px; - float: left; -} - -.ace_gutter-cell .ace_gutter_annotation { - margin-left: -19px; - float: left; -} - -.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); - background-repeat: no-repeat; - background-position: 2px center; -} - -.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); - background-repeat: no-repeat; - background-position: 2px center; -} - -.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); - background-repeat: no-repeat; - background-position: 2px center; -} - -.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); -} - -.ace_icon_svg.ace_error { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); - background-color: crimson; -} -.ace_icon_svg.ace_security { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); - background-color: crimson; -} -.ace_icon_svg.ace_warning { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); - background-color: darkorange; -} -.ace_icon_svg.ace_info { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); - background-color: royalblue; -} -.ace_icon_svg.ace_hint { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); - background-color: silver; -} - -.ace_icon_svg.ace_error_fold { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); - background-color: crimson; -} -.ace_icon_svg.ace_security_fold { - -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); - background-color: crimson; -} -.ace_icon_svg.ace_warning_fold { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); - background-color: darkorange; -} - -.ace_scrollbar { - contain: strict; - position: absolute; - right: 0; - bottom: 0; - z-index: 6; -} - -.ace_scrollbar-inner { - position: absolute; - cursor: text; - left: 0; - top: 0; -} - -.ace_scrollbar-v{ - overflow-x: hidden; - overflow-y: scroll; - top: 0; -} - -.ace_scrollbar-h { - overflow-x: scroll; - overflow-y: hidden; - left: 0; -} - -.ace_print-margin { - position: absolute; - height: 100%; -} - -.ace_text-input { - position: absolute; - z-index: 0; - width: 0.5em; - height: 1em; - opacity: 0; - background: transparent; - -moz-appearance: none; - appearance: none; - border: none; - resize: none; - outline: none; - overflow: hidden; - font: inherit; - padding: 0 1px; - margin: 0 -1px; - contain: strict; - -ms-user-select: text; - -moz-user-select: text; - -webkit-user-select: text; - user-select: text; - /*with \`pre-line\` chrome inserts   instead of space*/ - white-space: pre!important; -} -.ace_text-input.ace_composition { - background: transparent; - color: inherit; - z-index: 1000; - opacity: 1; -} -.ace_composition_placeholder { color: transparent } -.ace_composition_marker { - border-bottom: 1px solid; - position: absolute; - border-radius: 0; - margin-top: 1px; -} - -[ace_nocontext=true] { - transform: none!important; - filter: none!important; - clip-path: none!important; - mask : none!important; - contain: none!important; - perspective: none!important; - mix-blend-mode: initial!important; - z-index: auto; -} - -.ace_layer { - z-index: 1; - position: absolute; - overflow: hidden; - /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ - word-wrap: normal; - white-space: pre; - height: 100%; - width: 100%; - box-sizing: border-box; - /* setting pointer-events: auto; on node under the mouse, which changes - during scroll, will break mouse wheel scrolling in Safari */ - pointer-events: none; -} - -.ace_gutter-layer { - position: relative; - width: auto; - text-align: right; - pointer-events: auto; - height: 1000000px; - contain: style size layout; -} - -.ace_text-layer { - font: inherit !important; - position: absolute; - height: 1000000px; - width: 1000000px; - contain: style size layout; -} - -.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { - contain: style size layout; - position: absolute; - top: 0; - left: 0; - right: 0; -} - -.ace_hidpi .ace_text-layer, -.ace_hidpi .ace_gutter-layer, -.ace_hidpi .ace_content, -.ace_hidpi .ace_gutter { - contain: strict; -} -.ace_hidpi .ace_text-layer > .ace_line, -.ace_hidpi .ace_text-layer > .ace_line_group { - contain: strict; -} - -.ace_cjk { - display: inline-block; - text-align: center; -} - -.ace_cursor-layer { - z-index: 4; -} - -.ace_cursor { - z-index: 4; - position: absolute; - box-sizing: border-box; - border-left: 2px solid; - /* workaround for smooth cursor repaintng whole screen in chrome */ - transform: translatez(0); -} - -.ace_multiselect .ace_cursor { - border-left-width: 1px; -} - -.ace_slim-cursors .ace_cursor { - border-left-width: 1px; -} - -.ace_overwrite-cursors .ace_cursor { - border-left-width: 0; - border-bottom: 1px solid; -} - -.ace_hidden-cursors .ace_cursor { - opacity: 0.2; -} - -.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { - opacity: 0; -} - -.ace_smooth-blinking .ace_cursor { - transition: opacity 0.18s; -} - -.ace_animate-blinking .ace_cursor { - animation-duration: 1000ms; - animation-timing-function: step-end; - animation-name: blink-ace-animate; - animation-iteration-count: infinite; -} - -.ace_animate-blinking.ace_smooth-blinking .ace_cursor { - animation-duration: 1000ms; - animation-timing-function: ease-in-out; - animation-name: blink-ace-animate-smooth; -} - -@keyframes blink-ace-animate { - from, to { opacity: 1; } - 60% { opacity: 0; } -} - -@keyframes blink-ace-animate-smooth { - from, to { opacity: 1; } - 45% { opacity: 1; } - 60% { opacity: 0; } - 85% { opacity: 0; } -} - -.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { - position: absolute; - z-index: 3; -} - -.ace_marker-layer .ace_selection { - position: absolute; - z-index: 5; -} - -.ace_marker-layer .ace_bracket { - position: absolute; - z-index: 6; -} - -.ace_marker-layer .ace_error_bracket { - position: absolute; - border-bottom: 1px solid #DE5555; - border-radius: 0; -} - -.ace_marker-layer .ace_active-line { - position: absolute; - z-index: 2; -} - -.ace_marker-layer .ace_selected-word { - position: absolute; - z-index: 4; - box-sizing: border-box; -} - -.ace_line .ace_fold { - box-sizing: border-box; - - display: inline-block; - height: 11px; - margin-top: -2px; - vertical-align: middle; - - background-image: - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); - background-repeat: no-repeat, repeat-x; - background-position: center center, top left; - color: transparent; - - border: 1px solid black; - border-radius: 2px; - - cursor: pointer; - pointer-events: auto; -} - -.ace_dark .ace_fold { -} - -.ace_fold:hover{ - background-image: - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); -} - -.ace_tooltip { - background-color: #f5f5f5; - border: 1px solid gray; - border-radius: 1px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); - color: black; - padding: 3px 4px; - position: fixed; - z-index: 999999; - box-sizing: border-box; - cursor: default; - white-space: pre-wrap; - word-wrap: break-word; - line-height: normal; - font-style: normal; - font-weight: normal; - letter-spacing: normal; - pointer-events: none; - overflow: auto; - max-width: min(33em, 66vw); - overscroll-behavior: contain; -} -.ace_tooltip pre { - white-space: pre-wrap; -} - -.ace_tooltip.ace_dark { - background-color: #636363; - color: #fff; -} - -.ace_tooltip:focus { - outline: 1px solid #5E9ED6; -} - -.ace_icon { - display: inline-block; - width: 18px; - vertical-align: top; -} - -.ace_icon_svg { - display: inline-block; - width: 12px; - vertical-align: top; - -webkit-mask-repeat: no-repeat; - -webkit-mask-size: 12px; - -webkit-mask-position: center; -} - -.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { - padding-right: 13px; -} - -.ace_fold-widget, .ace_custom-widget { - box-sizing: border-box; - - margin: 0 -12px 0 1px; - display: none; - width: 11px; - vertical-align: top; - - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); - background-repeat: no-repeat; - background-position: center; - - border-radius: 3px; - - border: 1px solid transparent; - cursor: pointer; - pointer-events: auto; -} - -.ace_custom-widget { - background: none; -} - -.ace_folding-enabled .ace_fold-widget { - display: inline-block; -} - -.ace_fold-widget.ace_end { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); -} - -.ace_fold-widget.ace_closed { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); -} - -.ace_fold-widget:hover { - border: 1px solid rgba(0, 0, 0, 0.3); - background-color: rgba(255, 255, 255, 0.2); - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); -} - -.ace_fold-widget:active { - border: 1px solid rgba(0, 0, 0, 0.4); - background-color: rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); -} -/** - * Dark version for fold widgets - */ -.ace_dark .ace_fold-widget { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); -} -.ace_dark .ace_fold-widget.ace_end { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); -} -.ace_dark .ace_fold-widget.ace_closed { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); -} -.ace_dark .ace_fold-widget:hover { - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); - background-color: rgba(255, 255, 255, 0.1); -} -.ace_dark .ace_fold-widget:active { - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); -} - -.ace_inline_button { - border: 1px solid lightgray; - display: inline-block; - margin: -1px 8px; - padding: 0 5px; - pointer-events: auto; - cursor: pointer; -} -.ace_inline_button:hover { - border-color: gray; - background: rgba(200,200,200,0.2); - display: inline-block; - pointer-events: auto; -} - -.ace_fold-widget.ace_invalid { - background-color: #FFB4B4; - border-color: #DE5555; -} - -.ace_fade-fold-widgets .ace_fold-widget { - transition: opacity 0.4s ease 0.05s; - opacity: 0; -} - -.ace_fade-fold-widgets:hover .ace_fold-widget { - transition: opacity 0.05s ease 0.05s; - opacity:1; -} - -.ace_underline { - text-decoration: underline; -} - -.ace_bold { - font-weight: bold; -} - -.ace_nobold .ace_bold { - font-weight: normal; -} - -.ace_italic { - font-style: italic; -} - - -.ace_error-marker { - background-color: rgba(255, 0, 0,0.2); - position: absolute; - z-index: 9; -} - -.ace_highlight-marker { - background-color: rgba(255, 255, 0,0.2); - position: absolute; - z-index: 8; -} - -.ace_mobile-menu { - position: absolute; - line-height: 1.5; - border-radius: 4px; - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - background: white; - box-shadow: 1px 3px 2px grey; - border: 1px solid #dcdcdc; - color: black; -} -.ace_dark > .ace_mobile-menu { - background: #333; - color: #ccc; - box-shadow: 1px 3px 2px grey; - border: 1px solid #444; - -} -.ace_mobile-button { - padding: 2px; - cursor: pointer; - overflow: hidden; -} -.ace_mobile-button:hover { - background-color: #eee; - opacity:1; -} -.ace_mobile-button:active { - background-color: #ddd; -} - -.ace_placeholder { - position: relative; - font-family: arial; - transform: scale(0.9); - transform-origin: left; - white-space: pre; - opacity: 0.7; - margin: 0 10px; - z-index: 1; -} - -.ace_ghost_text { - opacity: 0.5; - font-style: italic; -} - -.ace_ghost_text_container > div { - white-space: pre; -} - -.ghost_text_line_wrapped::after { - content: "↩"; - position: absolute; -} - -.ace_lineWidgetContainer.ace_ghost_text { - margin: 0px 4px -} - -.ace_screenreader-only { - position:absolute; - left:-10000px; - top:auto; - width:1px; - height:1px; - overflow:hidden; -} - -.ace_hidden_token { - display: none; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(h,v,W){var T=h("../lib/dom"),E=h("../lib/oop"),$=h("../lib/event_emitter").EventEmitter,u=function(){function c(s,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(s)}return c.prototype.$createCanvas=function(){this.canvas=T.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},c.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},c.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var o=this.canvas.getContext("2d");function r(A,w){return A.priorityw.priority?1:0}var t=this.renderer.session.$annotations;if(o.clearRect(0,0,this.canvas.width,this.canvas.height),t){var i={info:1,warning:2,error:3};t.forEach(function(A){A.priority=i[A.type]||null}),t=t.sort(r);for(var l=0;lthis.canvasHeight&&(m=this.canvasHeight-x);var O=m-x,k=m+x,R=k-O;o.fillStyle=a[t[l].type]||null,o.fillRect(0,O,Math.round(this.oneZoneWidth-1),R)}}var B=this.renderer.session.selection.getCursor();if(B){var L=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);o.fillStyle="rgba(0, 0, 0, 0.5)",o.fillRect(0,L,this.canvasWidth,2)}},c.prototype.getVerticalOffsetForRow=function(s){s=s|0;var a=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return a},c.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeightR&&(this.$changedLines.firstRow=R),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},k.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},k.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},k.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},k.prototype.updateFull=function(R){R?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},k.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},k.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},k.prototype.onResize=function(R,B,L,A){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=R?1:0;var w=this.container;A||(A=w.clientHeight||w.scrollHeight),!A&&this.$maxLines&&this.lineHeight>1&&(!w.style.height||w.style.height=="0px")&&(w.style.height="1px",A=w.clientHeight||w.scrollHeight),L||(L=w.clientWidth||w.scrollWidth);var g=this.$updateCachedSize(R,B,L,A);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!L&&!A)return this.resizing=0;R&&(this.$gutterLayer.$padding=null),R?this.$renderChanges(g|this.$changes,!0):this.$loop.schedule(g|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},k.prototype.$updateCachedSize=function(R,B,L,A){A-=this.$extraHeight||0;var w=0,g=this.$size,_={width:g.width,height:g.height,scrollerHeight:g.scrollerHeight,scrollerWidth:g.scrollerWidth};if(A&&(R||g.height!=A)&&(g.height=A,w|=this.CHANGE_SIZE,g.scrollerHeight=g.height,this.$horizScroll&&(g.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(g.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",w=w|this.CHANGE_SCROLL),L&&(R||g.width!=L)){w|=this.CHANGE_SIZE,g.width=L,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,E.setStyle(this.scrollBarH.element.style,"left",B+"px"),E.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),g.scrollerWidth=Math.max(0,L-B-this.scrollBarV.getWidth()-this.margin.h),E.setStyle(this.$gutter.style,"left",this.margin.left+"px");var D=this.scrollBarV.getWidth()+"px";E.setStyle(this.scrollBarH.element.style,"right",D),E.setStyle(this.scroller.style,"right",D),E.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(g.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||R)&&(w|=this.CHANGE_FULL)}return g.$dirty=!L||!A,w&&this._signal("resize",_),w},k.prototype.onGutterResize=function(R){var B=this.$showGutter?R:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},k.prototype.adjustWrapLimit=function(){var R=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(R/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},k.prototype.setAnimatedScroll=function(R){this.setOption("animatedScroll",R)},k.prototype.getAnimatedScroll=function(){return this.$animatedScroll},k.prototype.setShowInvisibles=function(R){this.setOption("showInvisibles",R),this.session.$bidiHandler.setShowInvisibles(R)},k.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},k.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},k.prototype.setDisplayIndentGuides=function(R){this.setOption("displayIndentGuides",R)},k.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},k.prototype.setHighlightIndentGuides=function(R){this.setOption("highlightIndentGuides",R)},k.prototype.setShowPrintMargin=function(R){this.setOption("showPrintMargin",R)},k.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},k.prototype.setPrintMarginColumn=function(R){this.setOption("printMarginColumn",R)},k.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},k.prototype.getShowGutter=function(){return this.getOption("showGutter")},k.prototype.setShowGutter=function(R){return this.setOption("showGutter",R)},k.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},k.prototype.setFadeFoldWidgets=function(R){this.setOption("fadeFoldWidgets",R)},k.prototype.setHighlightGutterLine=function(R){this.setOption("highlightGutterLine",R)},k.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},k.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var R=E.createElement("div");R.className="ace_layer ace_print-margin-layer",this.$printMarginEl=E.createElement("div"),this.$printMarginEl.className="ace_print-margin",R.appendChild(this.$printMarginEl),this.content.insertBefore(R,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},k.prototype.getContainerElement=function(){return this.container},k.prototype.getMouseEventTarget=function(){return this.scroller},k.prototype.getTextAreaContainer=function(){return this.container},k.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var R=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){E.translate(this.textarea,-100,0);return}var L=this.$cursorLayer.$pixelPos;if(L){B&&B.markerRange&&(L=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var A=this.layerConfig,w=L.top,g=L.left;w-=A.offset;var _=B&&B.useTextareaForIME||m.isMobile?this.lineHeight:1;if(w<0||w>A.height-_){E.translate(this.textarea,0,0);return}var D=1,P=this.$size.height-_;if(!B)w+=this.lineHeight;else if(B.useTextareaForIME){var H=this.textarea.value;D=this.characterWidth*this.session.$getStringScreenWidth(H)[0]}else w+=this.lineHeight+2;g-=this.scrollLeft,g>this.$size.scrollerWidth-D&&(g=this.$size.scrollerWidth-D),g+=this.gutterWidth+this.margin.left,E.setStyle(R,"height",_+"px"),E.setStyle(R,"width",D+"px"),E.translate(this.textarea,Math.min(g,this.$size.scrollerWidth-D),Math.min(w,P))}}},k.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},k.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},k.prototype.getLastFullyVisibleRow=function(){var R=this.layerConfig,B=R.lastRow,L=this.session.documentToScreenRow(B,0)*R.lineHeight;return L-this.session.getScrollTop()>R.height-R.lineHeight?B-1:B},k.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},k.prototype.setPadding=function(R){this.$padding=R,this.$textLayer.setPadding(R),this.$cursorLayer.setPadding(R),this.$markerFront.setPadding(R),this.$markerBack.setPadding(R),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},k.prototype.setScrollMargin=function(R,B,L,A){var w=this.scrollMargin;w.top=R|0,w.bottom=B|0,w.right=A|0,w.left=L|0,w.v=w.top+w.bottom,w.h=w.left+w.right,w.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-w.top),this.updateFull()},k.prototype.setMargin=function(R,B,L,A){var w=this.margin;w.top=R|0,w.bottom=B|0,w.right=A|0,w.left=L|0,w.v=w.top+w.bottom,w.h=w.left+w.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},k.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},k.prototype.setHScrollBarAlwaysVisible=function(R){this.setOption("hScrollBarAlwaysVisible",R)},k.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},k.prototype.setVScrollBarAlwaysVisible=function(R){this.setOption("vScrollBarAlwaysVisible",R)},k.prototype.$updateScrollBarV=function(){var R=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(R-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>R-B&&(R=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(R+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},k.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},k.prototype.freeze=function(){this.$frozen=!0},k.prototype.unfreeze=function(){this.$frozen=!1},k.prototype.$renderChanges=function(R,B){if(this.$changes&&(R|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!R&&!B){this.$changes|=R;return}if(this.$size.$dirty)return this.$changes|=R,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",R),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var L=this.layerConfig;if(R&this.CHANGE_FULL||R&this.CHANGE_SIZE||R&this.CHANGE_TEXT||R&this.CHANGE_LINES||R&this.CHANGE_SCROLL||R&this.CHANGE_H_SCROLL){if(R|=this.$computeLayerConfig()|this.$loop.clear(),L.firstRow!=this.layerConfig.firstRow&&L.firstRowScreen==this.layerConfig.firstRowScreen){var A=this.scrollTop+(L.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;A>0&&(this.scrollTop=A,R=R|this.CHANGE_SCROLL,R|=this.$computeLayerConfig()|this.$loop.clear())}L=this.layerConfig,this.$updateScrollBarV(),R&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),E.translate(this.content,-this.scrollLeft,-L.offset);var w=L.width+2*this.$padding+"px",g=L.minHeight+"px";E.setStyle(this.content.style,"width",w),E.setStyle(this.content.style,"height",g)}if(R&this.CHANGE_H_SCROLL&&(E.translate(this.content,-this.scrollLeft,-L.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),R&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(L),this.$showGutter&&this.$gutterLayer.update(L),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(L),this.$markerBack.update(L),this.$markerFront.update(L),this.$cursorLayer.update(L),this.$moveTextAreaToCursor(),this._signal("afterRender",R);return}if(R&this.CHANGE_SCROLL){this.$changedLines=null,R&this.CHANGE_TEXT||R&this.CHANGE_LINES?this.$textLayer.update(L):this.$textLayer.scrollLines(L),this.$showGutter&&(R&this.CHANGE_GUTTER||R&this.CHANGE_LINES?this.$gutterLayer.update(L):this.$gutterLayer.scrollLines(L)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(L),this.$markerBack.update(L),this.$markerFront.update(L),this.$cursorLayer.update(L),this.$moveTextAreaToCursor(),this._signal("afterRender",R);return}R&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(L),this.$showGutter&&this.$gutterLayer.update(L),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(L)):R&this.CHANGE_LINES?((this.$updateLines()||R&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(L),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(L)):R&this.CHANGE_TEXT||R&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(L),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(L)):R&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(L),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(L)),R&this.CHANGE_CURSOR&&(this.$cursorLayer.update(L),this.$moveTextAreaToCursor()),R&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(L),R&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(L),this._signal("afterRender",R)},k.prototype.$autosize=function(){var R=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,L=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,R))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(L+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&L>this.$maxPixelHeight&&(L=this.$maxPixelHeight);var A=L<=2*this.lineHeight,w=!A&&R>B;if(L!=this.desiredHeight||this.$size.height!=this.desiredHeight||w!=this.$vScroll){w!=this.$vScroll&&(this.$vScroll=w,this.scrollBarV.setVisible(w));var g=this.container.clientWidth;this.container.style.height=L+"px",this.$updateCachedSize(!0,this.$gutterWidth,g,L),this.desiredHeight=L,this._signal("autosize")}},k.prototype.$computeLayerConfig=function(){var R=this.session,B=this.$size,L=B.height<=2*this.lineHeight,A=this.session.getScreenLength(),w=A*this.lineHeight,g=this.$getLongestLine(),_=!L&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-g-2*this.$padding<0),D=this.$horizScroll!==_;D&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var P=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),L=B.height<=2*this.lineHeight);var H=B.scrollerHeight+this.lineHeight,U=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;w+=U;var Y=this.scrollMargin;this.session.setScrollTop(Math.max(-Y.top,Math.min(this.scrollTop,w-B.scrollerHeight+Y.bottom))),this.session.setScrollLeft(Math.max(-Y.left,Math.min(this.scrollLeft,g+2*this.$padding-B.scrollerWidth+Y.right)));var te=!L&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-w+U<0||this.scrollTop>Y.top),K=P!==te;K&&(this.$vScroll=te,this.scrollBarV.setVisible(te));var X=this.scrollTop%this.lineHeight,Z=Math.ceil(H/this.lineHeight)-1,J=Math.max(0,Math.round((this.scrollTop-X)/this.lineHeight)),re=J+Z,ae,he,pe=this.lineHeight;J=R.screenToDocumentRow(J,0);var _e=R.getFoldLine(J);_e&&(J=_e.start.row),ae=R.documentToScreenRow(J,0),he=R.getRowLength(J)*pe,re=Math.min(R.screenToDocumentRow(re,0),R.getLength()-1),H=B.scrollerHeight+R.getRowLength(re)*pe+he,X=this.scrollTop-ae*pe,X<0&&ae>0&&(ae=Math.max(0,ae+Math.floor(X/pe)),X=this.scrollTop-ae*pe);var De=0;return(this.layerConfig.width!=g||D)&&(De=this.CHANGE_H_SCROLL),(D||K)&&(De|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),K&&(g=this.$getLongestLine())),this.layerConfig={width:g,padding:this.$padding,firstRow:J,firstRowScreen:ae,lastRow:re,lineHeight:pe,characterWidth:this.characterWidth,minHeight:H,maxHeight:w,offset:X,gutterOffset:pe?Math.max(0,Math.ceil((X+B.height-B.scrollerHeight)/pe)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(g-this.$padding),De},k.prototype.$updateLines=function(){if(this.$changedLines){var R=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var L=this.layerConfig;if(!(R>L.lastRow+1)&&!(Bthis.$textLayer.MAX_LINE_LENGTH&&(R=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(R*this.characterWidth))},k.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},k.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},k.prototype.addGutterDecoration=function(R,B){this.$gutterLayer.addGutterDecoration(R,B)},k.prototype.removeGutterDecoration=function(R,B){this.$gutterLayer.removeGutterDecoration(R,B)},k.prototype.updateBreakpoints=function(R){this._rows=R,this.$loop.schedule(this.CHANGE_GUTTER)},k.prototype.setAnnotations=function(R){this.$gutterLayer.setAnnotations(R),this.$loop.schedule(this.CHANGE_GUTTER)},k.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},k.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},k.prototype.showCursor=function(){this.$cursorLayer.showCursor()},k.prototype.scrollSelectionIntoView=function(R,B,L){this.scrollCursorIntoView(R,L),this.scrollCursorIntoView(B,L)},k.prototype.scrollCursorIntoView=function(R,B,L){if(this.$size.scrollerHeight!==0){var A=this.$cursorLayer.getPixelPosition(R),w=A.left,g=A.top,_=L&&L.top||0,D=L&&L.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var P=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;P+_>g?(B&&P+_>g+this.lineHeight&&(g-=B*this.$size.scrollerHeight),g===0&&(g=-this.scrollMargin.top),this.session.setScrollTop(g)):P+this.$size.scrollerHeight-D=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||R<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||R>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},k.prototype.pixelToScreenCoordinates=function(R,B){var L;if(this.$hasCssTransforms){L={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([R,B]);R=A[1]-this.gutterWidth-this.margin.left,B=A[0]}else L=this.scroller.getBoundingClientRect();var w=R+this.scrollLeft-L.left-this.$padding,g=w/this.characterWidth,_=Math.floor((B+this.scrollTop-L.top)/this.lineHeight),D=this.$blockCursor?Math.floor(g):Math.round(g);return{row:_,column:D,side:g-D>0?1:-1,offsetX:w}},k.prototype.screenToTextCoordinates=function(R,B){var L;if(this.$hasCssTransforms){L={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([R,B]);R=A[1]-this.gutterWidth-this.margin.left,B=A[0]}else L=this.scroller.getBoundingClientRect();var w=R+this.scrollLeft-L.left-this.$padding,g=w/this.characterWidth,_=this.$blockCursor?Math.floor(g):Math.round(g),D=(B+this.scrollTop-L.top)/this.lineHeight;return this.session.screenToDocumentPosition(D,Math.max(_,0),w)},k.prototype.textToScreenCoordinates=function(R,B){var L=this.scroller.getBoundingClientRect(),A=this.session.documentToScreenPosition(R,B),w=this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,R)?this.session.$bidiHandler.getPosLeft(A.column):Math.round(A.column*this.characterWidth)),g=A.row*this.lineHeight;return{pageX:L.left+w-this.scrollLeft,pageY:L.top+g-this.scrollTop}},k.prototype.visualizeFocus=function(){E.addCssClass(this.container,"ace_focus")},k.prototype.visualizeBlur=function(){E.removeCssClass(this.container,"ace_focus")},k.prototype.showComposition=function(R){this.$composition=R,R.cssText||(R.cssText=this.textarea.style.cssText),R.useTextareaForIME==null&&(R.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(E.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):R.markerId=this.session.addMarker(R.markerRange,"ace_composition_marker","text")},k.prototype.setCompositionText=function(R){var B=this.session.selection.cursor;this.addToken(R,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},k.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),E.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var R=this.session.selection.cursor;this.removeExtraToken(R.row,R.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},k.prototype.setGhostText=function(R,B){var L=this.session.selection.cursor,A=B||{row:L.row,column:L.column};this.removeGhostText();var w=this.$calculateWrappedTextChunks(R,A);this.addToken(w[0].text,"ghost_text",A.row,A.column),this.$ghostText={text:R,position:{row:A.row,column:A.column}};var g=E.createElement("div");if(w.length>1){var _=this.hideTokensAfterPosition(A.row,A.column),D;w.slice(1).forEach(function(K){var X=E.createElement("div"),Z=E.createElement("span");Z.className="ace_ghost_text",K.wrapped&&(X.className="ghost_text_line_wrapped"),K.text.length===0&&(K.text=" "),Z.appendChild(E.createTextNode(K.text)),X.appendChild(Z),g.appendChild(X),D=X}),_.forEach(function(K){var X=E.createElement("span");x(K.type)||(X.className="ace_"+K.type.replace(/\./g," ace_")),X.appendChild(E.createTextNode(K.value)),D.appendChild(X)}),this.$ghostTextWidget={el:g,row:A.row,column:A.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var P=this.$cursorLayer.getPixelPosition(A,!0),H=this.container,U=H.getBoundingClientRect().height,Y=w.length*this.lineHeight,te=Y0){var H=0;P.push(w[_].length);for(var U=0;U1||Math.abs(R.$size.height-A)>1?R.$resizeTimer.delay():R.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},k}();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,T.implement(O.prototype,C),u.defineOptions(O.prototype,"renderer",{useResizeObserver:{set:function(k){!k&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):k&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(k){this.$textLayer.setShowInvisibles(k)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(k){typeof k=="number"&&(this.$printMarginColumn=k),this.$showPrintMargin=!!k,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(k){this.$gutter.style.display=k?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(k){this.$gutterLayer.$useSvgGutterIcons=k},initialValue:!1},showFoldedAnnotations:{set:function(k){this.$gutterLayer.$showFoldedAnnotations=k},initialValue:!1},fadeFoldWidgets:{set:function(k){E.setCssClass(this.$gutter,"ace_fade-fold-widgets",k)},initialValue:!1},showFoldWidgets:{set:function(k){this.$gutterLayer.setShowFoldWidgets(k),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(k){this.$textLayer.setDisplayIndentGuides(k)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(k){this.$textLayer.setHighlightIndentGuides(k)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(k){this.$gutterLayer.setHighlightGutterLine(k),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(k){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(k){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(k){typeof k=="number"&&(k=k+"px"),this.container.style.fontSize=k,this.updateFontSize()},initialValue:12},fontFamily:{set:function(k){this.container.style.fontFamily=k,this.updateFontSize()}},maxLines:{set:function(k){this.updateFull()}},minLines:{set:function(k){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(k){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(k){k=+k||0,this.$scrollPastEnd!=k&&(this.$scrollPastEnd=k,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(k){this.$gutterLayer.$fixedWidth=!!k,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(k){this.$updateCustomScrollbar(k)},initialValue:!1},theme:{set:function(k){this.setTheme(k)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!m.isMobile&&!m.isIE}}),v.VirtualRenderer=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(h,v,W){var T=h("../lib/oop"),E=h("../lib/net"),$=h("../lib/event_emitter").EventEmitter,u=h("../config");function c(r){var t="importScripts('"+E.qualifyURL(r)+"');";try{return new Blob([t],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,l=new i;return l.append(t),l.getBlob("application/javascript")}}function s(r){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(u.get("loadWorkerFromBlob")){var t=c(r),i=window.URL||window.webkitURL,l=i.createObjectURL(t);return new Worker(l)}return new Worker(r)}var a=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){T.implement(this,$),this.$createWorkerFromOldConfig=function(r,t,i,l,f){if(h.nameToUrl&&!h.toUrl&&(h.toUrl=h.nameToUrl),u.get("packaged")||!h.toUrl)l=l||u.moduleUrl(t,"worker");else{var d=this.$normalizePath;l=l||d(h.toUrl("ace/worker/worker.js",null,"_"));var C={};r.forEach(function(b){C[b]=d(h.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(l),f&&this.send("importScripts",f),this.$worker.postMessage({init:!0,tlns:C,module:t,classname:i}),this.$worker},this.onMessage=function(r){var t=r.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return E.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(r){r.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,t){this.$worker.postMessage({command:r,args:t})},this.call=function(r,t,i){if(i){var l=this.callbackId++;this.callbacks[l]=i,t.push(l)}this.send(r,t)},this.emit=function(r,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:r,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(a.prototype);var o=function(r,t,i){var l=null,f=!1,d=Object.create($),C=[],b=new a({messageBuffer:C,terminate:function(){},postMessage:function(m){C.push(m),l&&(f?setTimeout(y):y())}});b.setEmitSync=function(m){f=m};var y=function(){var m=C.shift();m.command?l[m.command].apply(l,m.args):m.event&&d._signal(m.event,m.data)};return d.postMessage=function(m){b.onMessage({data:m})},d.callback=function(m,x){this.postMessage({type:"call",id:x,data:m})},d.emit=function(m,x){this.postMessage({type:"event",name:m,data:x})},u.loadModule(["worker",t],function(m){for(l=new m[i](d);C.length;)y()}),b};v.UIWorkerClient=o,v.WorkerClient=a,v.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(h,v,W){var T=h("./range").Range,E=h("./lib/event_emitter").EventEmitter,$=h("./lib/oop"),u=function(){function c(s,a,o,r,t,i){var l=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=t,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){l.onCursorChange()})},this.$pos=o;var f=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=f.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var s=this,a=this.doc,o=this.session;this.selectionBefore=o.selection.toJSON(),o.selection.inMultiSelectMode&&o.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=o.addMarker(new T(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(t){var i=a.createAnchor(t.row,t.column);i.$insertRight=!0,i.detach(),s.others.push(i)}),o.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(o){o.markerId=s.addMarker(new T(o.row,o.column,o.row,o.column+a.length),a.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s=this.pos.column&&a.start.column<=this.pos.column+this.length+1,t=a.start.column-this.pos.column;if(this.updateAnchors(s),r&&(this.length+=o),r&&!this.session.$fromUndo){if(s.action==="insert")for(var i=this.others.length-1;i>=0;i--){var l=this.others[i],f={row:l.row,column:l.column+t};this.doc.insertMergedLines(f,s.lines)}else if(s.action==="remove")for(var i=this.others.length-1;i>=0;i--){var l=this.others[i],f={row:l.row,column:l.column+t};this.doc.remove(new T(f.row,f.column,f.row,f.column-o))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,o=function(t,i){a.removeMarker(t.markerId),t.markerId=a.addMarker(new T(t.row,t.column,t.row,t.column+s.length),i,null,!1)};o(this.pos,this.mainClass);for(var r=this.others.length;r--;)o(this.others[r],this.othersClass)}},c.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,o=0;o1?E.multiSelect.joinSelections():E.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(E){E.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(E){E.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(E){E.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],v.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(E){E.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(E){return E&&E.inMultiSelectMode}}];var T=h("../keyboard/hash_handler").HashHandler;v.keyboardHandler=new T(v.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(h,v,W){var T=h("./range_list").RangeList,E=h("./range").Range,$=h("./selection").Selection,u=h("./mouse/multi_select_handler").onMouseDown,c=h("./lib/event"),s=h("./lib/lang"),a=h("./commands/multi_select_commands");v.commands=a.defaultCommands.concat(a.multiSelectCommands);var o=h("./search").Search,r=new o;function t(b,y,m){return r.$options.wrap=!0,r.$options.needle=y,r.$options.backwards=m==-1,r.find(b)}var i=h("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(b,y){if(b){if(!this.inMultiSelectMode&&this.rangeCount===0){var m=this.toOrientedRange();if(this.rangeList.add(m),this.rangeList.add(b),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),y||this.fromOrientedRange(b);this.rangeList.removeAll(),this.rangeList.add(m),this.$onAddRange(m)}b.cursor||(b.cursor=b.end);var x=this.rangeList.add(b);return this.$onAddRange(b),x.length&&this.$onRemoveRange(x),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),y||this.fromOrientedRange(b)}},this.toSingleRange=function(b){b=b||this.ranges[0];var y=this.rangeList.removeAll();y.length&&this.$onRemoveRange(y),b&&this.fromOrientedRange(b)},this.substractPoint=function(b){var y=this.rangeList.substractPoint(b);if(y)return this.$onRemoveRange(y),y[0]},this.mergeOverlappingRanges=function(){var b=this.rangeList.merge();b.length&&this.$onRemoveRange(b)},this.$onAddRange=function(b){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(b),this._signal("addRange",{range:b})},this.$onRemoveRange=function(b){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var y=this.rangeList.ranges.pop();b.push(y),this.rangeCount=0}for(var m=b.length;m--;){var x=this.ranges.indexOf(b[m]);this.ranges.splice(x,1)}this._signal("removeRange",{ranges:b}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),y=y||this.ranges[0],y&&!y.isEqual(this.getRange())&&this.fromOrientedRange(y)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new T,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var b=this.ranges.length?this.ranges:[this.getRange()],y=[],m=0;m1){var b=this.rangeList.ranges,y=b[b.length-1],m=E.fromPoints(b[0].start,y.end);this.toSingleRange(),this.setSelectionRange(m,y.cursor==y.start)}else{var x=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),k=this.rectangularRangeBlock(x,O);k.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(b,y,m){var x=[],O=b.column0;)H--;if(H>0)for(var U=0;x[U].isEmpty();)U++;for(var Y=H;Y>=U;Y--)x[Y].isEmpty()&&x.splice(Y,1)}return x}}).call($.prototype);var l=h("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(b){b.cursor||(b.cursor=b.end);var y=this.getSelectionStyle();return b.marker=this.session.addMarker(b,"ace_selection",y),this.session.$selectionMarkers.push(b),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,b},this.removeSelectionMarker=function(b){if(b.marker){this.session.removeMarker(b.marker);var y=this.session.$selectionMarkers.indexOf(b);y!=-1&&this.session.$selectionMarkers.splice(y,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(b){for(var y=this.session.$selectionMarkers,m=b.length;m--;){var x=b[m];if(x.marker){this.session.removeMarker(x.marker);var O=y.indexOf(x);O!=-1&&y.splice(O,1)}}this.session.selectionMarkerCount=y.length},this.$onAddRange=function(b){this.addSelectionMarker(b.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(b){this.removeSelectionMarkers(b.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(b){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(b){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(b){var y=b.command,m=b.editor;if(m.multiSelect){if(y.multiSelectAction)y.multiSelectAction=="forEach"?x=m.forEachSelection(y,b.args):y.multiSelectAction=="forEachLine"?x=m.forEachSelection(y,b.args,!0):y.multiSelectAction=="single"?(m.exitMultiSelectMode(),x=y.exec(m,b.args||{})):x=y.multiSelectAction(m,b.args||{});else{var x=y.exec(m,b.args||{});m.multiSelect.addRange(m.multiSelect.toOrientedRange()),m.multiSelect.mergeOverlappingRanges()}return x}},this.forEachSelection=function(b,y,m){if(!this.inVirtualSelectionMode){var x=m&&m.keepOrder,O=m==!0||m&&m.$byLines,k=this.session,R=this.selection,B=R.rangeList,L=(x?R:B).ranges,A;if(!L.length)return b.exec?b.exec(this,y||{}):b(this,y||{});var w=R._eventRegistry;R._eventRegistry={};var g=new $(k);this.inVirtualSelectionMode=!0;for(var _=L.length;_--;){if(O)for(;_>0&&L[_].start.row==L[_-1].end.row;)_--;g.fromOrientedRange(L[_]),g.index=_,this.selection=k.selection=g;var D=b.exec?b.exec(this,y||{}):b(this,y||{});!A&&D!==void 0&&(A=D),g.toOrientedRange(L[_])}g.detach(),this.selection=k.selection=R,this.inVirtualSelectionMode=!1,R._eventRegistry=w,R.mergeOverlappingRanges(),R.ranges[0]&&R.fromOrientedRange(R.ranges[0]);var P=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),P&&P.from==P.to&&this.renderer.animateScrolling(P.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var b="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var y=this.multiSelect.rangeList.ranges,m=[],x=0;x0);R<0&&(R=0),B>=A&&(B=A-1)}var g=this.session.removeFullLines(R,B);g=this.$reAlignText(g,L),this.session.insert({row:R,column:0},g.join(` -`)+` -`),L||(k.start.column=0,k.end.column=g[g.length-1].length),this.selection.setRange(k)}else{O.forEach(function(H){y.substractPoint(H.cursor)});var _=0,D=1/0,P=m.map(function(H){var U=H.cursor,Y=b.getLine(U.row),te=Y.substr(U.column).search(/\S/g);return te==-1&&(te=0),U.column>_&&(_=U.column),teK?b.insert(Y,s.stringRepeat(" ",te-K)):b.remove(new E(Y.row,Y.column,Y.row,Y.column-te+K)),H.start.column=H.end.column=_,H.start.row=H.end.row=Y.row,H.cursor=H.end}),y.fromOrientedRange(m[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(b,y){var m=!0,x=!0,O,k,R;return b.map(function(g){var _=g.match(/(\s*)(.*?)(\s*)([=:].*)/);return _?O==null?(O=_[1].length,k=_[2].length,R=_[3].length,_):(O+k+R!=_[1].length+_[2].length+_[3].length&&(x=!1),O!=_[1].length&&(m=!1),O>_[1].length&&(O=_[1].length),k<_[2].length&&(k=_[2].length),R>_[3].length&&(R=_[3].length),_):[g]}).map(y?L:m?x?A:L:w);function B(g){return s.stringRepeat(" ",g)}function L(g){return g[2]?B(O)+g[2]+B(k-g[2].length+R)+g[4].replace(/^([=:])\s+/,"$1 "):g[0]}function A(g){return g[2]?B(O+k-g[2].length)+g[2]+B(R)+g[4].replace(/^([=:])\s+/,"$1 "):g[0]}function w(g){return g[2]?B(O)+g[2]+B(R)+g[4].replace(/^([=:])\s+/,"$1 "):g[0]}}}).call(l.prototype);function f(b,y){return b.row==y.row&&b.column==y.column}v.onSessionChange=function(b){var y=b.session;y&&!y.multiSelect&&(y.$selectionMarkers=[],y.selection.$initRangeList(),y.multiSelect=y.selection),this.multiSelect=y&&y.multiSelect;var m=b.oldSession;m&&(m.multiSelect.off("addRange",this.$onAddRange),m.multiSelect.off("removeRange",this.$onRemoveRange),m.multiSelect.off("multiSelect",this.$onMultiSelect),m.multiSelect.off("singleSelect",this.$onSingleSelect),m.multiSelect.lead.off("change",this.$checkMultiselectChange),m.multiSelect.anchor.off("change",this.$checkMultiselectChange)),y&&(y.multiSelect.on("addRange",this.$onAddRange),y.multiSelect.on("removeRange",this.$onRemoveRange),y.multiSelect.on("multiSelect",this.$onMultiSelect),y.multiSelect.on("singleSelect",this.$onSingleSelect),y.multiSelect.lead.on("change",this.$checkMultiselectChange),y.multiSelect.anchor.on("change",this.$checkMultiselectChange)),y&&this.inMultiSelectMode!=y.selection.inMultiSelectMode&&(y.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function d(b){b.$multiselectOnSessionChange||(b.$onAddRange=b.$onAddRange.bind(b),b.$onRemoveRange=b.$onRemoveRange.bind(b),b.$onMultiSelect=b.$onMultiSelect.bind(b),b.$onSingleSelect=b.$onSingleSelect.bind(b),b.$multiselectOnSessionChange=v.onSessionChange.bind(b),b.$checkMultiselectChange=b.$checkMultiselectChange.bind(b),b.$multiselectOnSessionChange(b),b.on("changeSession",b.$multiselectOnSessionChange),b.on("mousedown",u),b.commands.addCommands(a.defaultCommands),C(b))}function C(b){if(!b.textInput)return;var y=b.textInput.getElement(),m=!1;c.addListener(y,"keydown",function(O){var k=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);b.$blockSelectEnabled&&k?m||(b.renderer.setMouseCursor("crosshair"),m=!0):m&&x()},b),c.addListener(y,"keyup",x,b),c.addListener(y,"blur",x,b);function x(O){m&&(b.renderer.setMouseCursor(""),m=!1)}}v.MultiSelect=d,h("./config").defineOptions(l.prototype,"editor",{enableMultiselect:{set:function(b){d(this),b?this.on("mousedown",u):this.off("mousedown",u)},value:!0},enableBlockSelect:{set:function(b){this.$blockSelectEnabled=b},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(h,v,W){var T=h("../../range").Range,E=v.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function($,u,c){var s=$.getLine(c);return this.foldingStartMarker.test(s)?"start":u=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function($,u,c){return null},this.indentationBlock=function($,u,c){var s=/\S/,a=$.getLine(u),o=a.search(s);if(o!=-1){for(var r=c||a.length,t=$.getLength(),i=u,l=u;++ui){var C=$.getLine(l).length;return new T(i,r,l,C)}}},this.openingBracketBlock=function($,u,c,s,a){var o={row:c,column:s+1},r=$.$findClosingBracket(u,o,a);if(r){var t=$.foldWidgets[r.row];return t==null&&(t=$.getFoldWidget(r.row)),t=="start"&&r.row>o.row&&(r.row--,r.column=$.getLine(r.row).length),T.fromPoints(o,r)}},this.closingBracketBlock=function($,u,c,s,a){var o={row:c,column:s},r=$.$findOpeningBracket(u,o);if(r)return r.column++,o.column--,T.fromPoints(r,o)}}).call(E.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(h,v,W){var T=h("../lib/dom"),E=h("../range").Range,$=h("../config").nls;function u(s,a,o){for(var r=0,t=s.length-1;r<=t;){var i=r+t>>1,l=o(a,s[i]);if(l>0)r=i+1;else if(l<0)t=i-1;else return i}return-(r+1)}function c(s,a,o){var r=s.getAnnotations().sort(E.comparePoints);if(r.length){var t=u(r,{row:a,column:-1},E.comparePoints);t<0&&(t=-t-1),t>=r.length?t=o>0?0:r.length-1:t===0&&o<0&&(t=r.length-1);var i=r[t];if(!(!i||!o)){if(i.row===a){do i=r[t+=o];while(i&&i.row===a);if(!i)return r.slice()}var l=[];a=i.row;do l[o<0?"unshift":"push"](i),i=r[t+=o];while(i&&i.row==a);return l.length&&l}}}v.showErrorMarker=function(s,a){var o=s.session,r=s.getCursorPosition(),t=r.row,i=o.widgetManager.getWidgetsAtRow(t).filter(function(O){return O.type=="errorMarker"})[0];i?i.destroy():t-=a;var l=c(o,t,a),f;if(l){var d=l[0];r.column=(d.pos&&typeof d.column!="number"?d.pos.sc:d.column)||0,r.row=d.row,f=s.renderer.$gutterLayer.$annotations[r.row]}else{if(i)return;f={displayText:[$("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(r.row),s.selection.moveToPosition(r);var C={row:r.row,fixedWidth:!0,coverGutter:!0,el:T.createElement("div"),type:"errorMarker"},b=C.el.appendChild(T.createElement("div")),y=C.el.appendChild(T.createElement("div"));y.className="error_widget_arrow "+f.className;var m=s.renderer.$cursorLayer.getPixelPosition(r).left;y.style.left=m+s.renderer.gutterWidth-5+"px",C.el.className="error_widget_wrapper",b.className="error_widget "+f.className,f.displayText.forEach(function(O,k){b.appendChild(T.createTextNode(O)),k0},N.prototype.connect_=function(){!Il||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),hw?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},N.prototype.disconnect_=function(){!Il||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},N.prototype.onTransitionEnd_=function(I){var h=I.propertyName,v=h===void 0?"":h,W=cw.some(function(T){return!!~v.indexOf(T)});W&&this.refresh()},N.getInstance=function(){return this.instance_||(this.instance_=new N),this.instance_},N.instance_=null,N}(),yh=function(N,I){for(var h=0,v=Object.keys(I);h"u"||!(Element instanceof Object))){if(!(I instanceof sr(I).Element))throw new TypeError('parameter 1 is not of type "Element".');var h=this.observations_;h.has(I)||(h.set(I,new bw(I)),this.controller_.addObserver(this),this.controller_.refresh())}},N.prototype.unobserve=function(I){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(I instanceof sr(I).Element))throw new TypeError('parameter 1 is not of type "Element".');var h=this.observations_;h.has(I)&&(h.delete(I),h.size||this.controller_.removeObserver(this))}},N.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},N.prototype.gatherActive=function(){var I=this;this.clearActive(),this.observations_.forEach(function(h){h.isActive()&&I.activeObservations_.push(h)})},N.prototype.broadcastActive=function(){if(this.hasActive()){var I=this.callbackCtx_,h=this.activeObservations_.map(function(v){return new Sw(v.target,v.broadcastRect())});this.callback_.call(I,h,I),this.clearActive()}},N.prototype.clearActive=function(){this.activeObservations_.splice(0)},N.prototype.hasActive=function(){return this.activeObservations_.length>0},N}(),bh=typeof WeakMap<"u"?new WeakMap:new mh,Sh=function(){function N(I){if(!(this instanceof N))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var h=fw.getInstance(),v=new Cw(I,h,this);bh.set(this,v)}return N}();["observe","unobserve","disconnect"].forEach(function(N){Sh.prototype[N]=function(){var I;return(I=bh.get(this))[N].apply(I,arguments)}});var _w=function(){return typeof Ns.ResizeObserver<"u"?Ns.ResizeObserver:Sh}();const Jc=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],$w=hi({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...Jc],render(){return Cs("div")},mounted(){const N=this._editor=jm(ow.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,N.on("change",()=>{if(this._isSettingContent)return;const I=N.getValue();this._contentBackup=I,this.$emit("update:value",I)}),Jc.forEach(I=>{const h="on"+Xm(I);typeof this.$.vnode.props[h]=="function"&&N.on(I,this.$emit.bind(this,I))}),this._ro=new _w(()=>N.resize()),this._ro.observe(this.$el),this.$emit("init",N)},beforeUnmount(){var N,I;(N=this._ro)===null||N===void 0||N.disconnect(),(I=this._editor)===null||I===void 0||I.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(N){if(this._contentBackup!==N){try{this._isSettingContent=!0,this._editor.setValue(N,1)}finally{this._isSettingContent=!1}this._contentBackup=N}},theme(N){this._editor.setTheme("ace/theme/"+N)},options(N){this._editor.setOptions(N)},readonly(N){this._editor.setReadOnly(N)},placeholder(N){this._editor.setOption("placeholder",N)},wrap(N){this._editor.setWrapBehavioursEnabled(N)},printMargin(N){this._editor.setOption("printMargin",N)},lang(N){this._editor.setOption("mode","ace/mode/"+N)},minLines(N){this._editor.setOption("minLines",N)},maxLines(N){this._editor.setOption("maxLines",N)}}});var Aw={exports:{}};(function(N,I){(function(){ace.require(["ace/mode/text"],function(h){N&&(N.exports=h)})})()})(Aw);var Ew={exports:{}};(function(N,I){ace.define("ace/theme/chrome-css",["require","exports","module"],function(h,v,W){W.exports=`.ace-chrome .ace_gutter { - background: #ebebeb; - color: #333; - overflow : hidden; -} - -.ace-chrome .ace_print-margin { - width: 1px; - background: #e8e8e8; -} - -.ace-chrome { - background-color: #FFFFFF; - color: black; -} - -.ace-chrome .ace_cursor { - color: black; -} - -.ace-chrome .ace_invisible { - color: rgb(191, 191, 191); -} - -.ace-chrome .ace_constant.ace_buildin { - color: rgb(88, 72, 246); -} - -.ace-chrome .ace_constant.ace_language { - color: rgb(88, 92, 246); -} - -.ace-chrome .ace_constant.ace_library { - color: rgb(6, 150, 14); -} - -.ace-chrome .ace_invalid { - background-color: rgb(153, 0, 0); - color: white; -} - -.ace-chrome .ace_fold { -} - -.ace-chrome .ace_support.ace_function { - color: rgb(60, 76, 114); -} - -.ace-chrome .ace_support.ace_constant { - color: rgb(6, 150, 14); -} - -.ace-chrome .ace_support.ace_type, -.ace-chrome .ace_support.ace_class -.ace-chrome .ace_support.ace_other { - color: rgb(109, 121, 222); -} - -.ace-chrome .ace_variable.ace_parameter { - font-style:italic; - color:#FD971F; -} -.ace-chrome .ace_keyword.ace_operator { - color: rgb(104, 118, 135); -} - -.ace-chrome .ace_comment { - color: #236e24; -} - -.ace-chrome .ace_comment.ace_doc { - color: #236e24; -} - -.ace-chrome .ace_comment.ace_doc.ace_tag { - color: #236e24; -} - -.ace-chrome .ace_constant.ace_numeric { - color: rgb(0, 0, 205); -} - -.ace-chrome .ace_variable { - color: rgb(49, 132, 149); -} - -.ace-chrome .ace_xml-pe { - color: rgb(104, 104, 91); -} - -.ace-chrome .ace_entity.ace_name.ace_function { - color: #0000A2; -} - - -.ace-chrome .ace_heading { - color: rgb(12, 7, 255); -} - -.ace-chrome .ace_list { - color:rgb(185, 6, 144); -} - -.ace-chrome .ace_marker-layer .ace_selection { - background: rgb(181, 213, 255); -} - -.ace-chrome .ace_marker-layer .ace_step { - background: rgb(252, 255, 0); -} - -.ace-chrome .ace_marker-layer .ace_stack { - background: rgb(164, 229, 101); -} - -.ace-chrome .ace_marker-layer .ace_bracket { - margin: -1px 0 0 -1px; - border: 1px solid rgb(192, 192, 192); -} - -.ace-chrome .ace_marker-layer .ace_active-line { - background: rgba(0, 0, 0, 0.07); -} - -.ace-chrome .ace_gutter-active-line { - background-color : #dcdcdc; -} - -.ace-chrome .ace_marker-layer .ace_selected-word { - background: rgb(250, 250, 255); - border: 1px solid rgb(200, 200, 250); -} - -.ace-chrome .ace_storage, -.ace-chrome .ace_keyword, -.ace-chrome .ace_meta.ace_tag { - color: rgb(147, 15, 128); -} - -.ace-chrome .ace_string.ace_regex { - color: rgb(255, 0, 0) -} - -.ace-chrome .ace_string { - color: #1A1AA6; -} - -.ace-chrome .ace_entity.ace_other.ace_attribute-name { - color: #994409; -} - -.ace-chrome .ace_indent-guide { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; -} - -.ace-chrome .ace_indent-guide-active { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; -} -`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(h,v,W){v.isDark=!1,v.cssClass="ace-chrome",v.cssText=h("./chrome-css");var T=h("../lib/dom");T.importCssString(v.cssText,v.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(h){N&&(N.exports=h)})}()})(Ew);const Lw={"v-slot":"label",class:"col-10",style:{"margin-top":"10px !important"}},Mw={key:0,style:{"margin-bottom":"0px !important"}},xw={class:"col-2"},Tw=hi({__name:"PipelineList",props:{idx:{},pipelineInfo:{},pipelineScriptList:{},dragFlag:{type:Boolean}},emits:["on-delete-pipeline"],setup(N,{emit:I}){const h=N,{pipelineInfo:v}=th(h),W=()=>{var o;if(!v.value.workflowStageIdx||!Array.isArray(h.pipelineScriptList))return"";for(const r of h.pipelineScriptList){const t=(o=r==null?void 0:r.list)==null?void 0:o.find(i=>i.workflowStageIdx===v.value.workflowStageIdx);if(typeof(t==null?void 0:t.workflowStageContent)=="string")return t.workflowStageContent;if(typeof(t==null?void 0:t.stageContent)=="string")return t.stageContent}return""},T=o=>{if(!v.value.workflowStageIdx||v.value.isDefaultScript)return!1;if(typeof o!="string")return!0;const r=o.trim().toLowerCase();return r==="true"||r==="false"||!r.includes("stage(")},E=()=>{if(!T(v.value.stageContent))return;const o=W();o&&(v.value.stageContent=o)},$=nn(()=>(E(),typeof v.value.stageContent=="string"?v.value.stageContent:"")),u=o=>{v.value.stageContent=o};Vn(()=>[v.value.stageContent,v.value.workflowStageIdx,h.pipelineScriptList],()=>E(),{immediate:!0,deep:!0});const c=I,s=o=>{c("on-delete-pipeline",o)},a=o=>({infra:"Infra",k8s:"K8s",app:"App",database:"Database","object-storage":"Object Storage",utility:"Utility","app-deploy":"App","db-backup-restore":"Database","common-util":"Utility"})[o]||o;return(o,r)=>(Te(),Ie("div",{class:Ms(["row",{draggable:!pt(v).isDefaultScript}])},[se("span",Lw,[(Te(!0),Ie(Cn,null,ci(N.pipelineScriptList,(t,i)=>(Te(),Ie("div",{key:i},[(Te(!0),Ie(Cn,null,ci(t.list,(l,f)=>(Te(),Ie("div",{key:f},[pt(v).workflowStageIdx>0&&pt(v).workflowStageIdx===l.workflowStageIdx?(Te(),Ie("p",Mw,qe(a(l.workflowStageTypeName))+" ("+qe(l.workflowStageName)+") ",1)):pn("",!0)]))),128))]))),128))]),se("span",xw,[!pt(v).isDefaultScript&&pt(v).workflowStageIdx!==null?(Te(),Ie("button",{key:0,class:"btn btn-danger btn",onClick:r[0]||(r[0]=t=>s(h.idx))}," delete ")):pn("",!0)]),ht(pt($w),{ref:"pipeline",value:$.value,id:pt(v).mappingIdx,options:{readOnly:N.dragFlag,maxLines:9999,minLines:10,selectionStyle:"text",highlightActiveLine:!1,cursorStyle:"smooth",hasCssTransforms:!0},"onUpdate:value":u},null,8,["value","id","options"])],2))}}),kw=ro(Tw,[["__scopeId","data-v-3dfd077a"]]);var Os={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Os.exports;(function(N,I){(function(){var h,v="4.18.1",W=200,T="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",E="Expected a function",$="Invalid `variable` option passed into `_.template`",u="Invalid `imports` option passed into `_.template`",c="__lodash_hash_undefined__",s=500,a="__lodash_placeholder__",o=1,r=2,t=4,i=1,l=2,f=1,d=2,C=4,b=8,y=16,m=32,x=64,O=128,k=256,R=512,B=30,L="...",A=800,w=16,g=1,_=2,D=3,P=1/0,H=9007199254740991,U=17976931348623157e292,Y=NaN,te=4294967295,K=te-1,X=te>>>1,Z=[["ary",O],["bind",f],["bindKey",d],["curry",b],["curryRight",y],["flip",R],["partial",m],["partialRight",x],["rearg",k]],J="[object Arguments]",re="[object Array]",ae="[object AsyncFunction]",he="[object Boolean]",pe="[object Date]",_e="[object DOMException]",De="[object Error]",je="[object Function]",it="[object GeneratorFunction]",Oe="[object Map]",lt="[object Number]",Yn="[object Null]",bt="[object Object]",ao="[object Promise]",Ws="[object Proxy]",jn="[object RegExp]",Ot="[object Set]",fi="[object String]",Ti="[object Symbol]",Bs="[object Undefined]",Mt="[object WeakMap]",ar="[object WeakSet]",Xn="[object ArrayBuffer]",Zn="[object DataView]",ki="[object Float32Array]",lr="[object Float64Array]",ur="[object Int8Array]",$t="[object Int16Array]",xn="[object Int32Array]",cr="[object Uint8Array]",di="[object Uint8ClampedArray]",hr="[object Uint16Array]",Tn="[object Uint32Array]",lo=/\b__p \+= '';/g,Hs=/\b(__p \+=) '' \+/g,zs=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fr=/&(?:amp|lt|gt|quot|#39);/g,Ii=/[&<>"']/g,Gt=RegExp(fr.source),Vs=RegExp(Ii.source),Us=/<%-([\s\S]+?)%>/g,Qn=/<%([\s\S]+?)%>/g,uo=/<%=([\s\S]+?)%>/g,xt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ks=/^\w*$/,Gs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ft=/[\\^$.*+?()[\]{}|]/g,Ys=RegExp(Ft.source),pi=/^\s+/,dr=/\s/,co=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pr=/\{\n\/\* \[wrapped with (.+)\] \*/,js=/,? & /,gr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ho=/[()=,{}\[\]\/\s]/,Xs=/\\(\\)?/g,Zs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fo=/\w*$/,Qs=/^[-+]0x[0-9a-f]+$/i,Js=/^0b[01]+$/i,qs=/^\[object .+?Constructor\]$/,ea=/^0o[0-7]+$/i,vr=/^(?:0|[1-9]\d*)$/,ta=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ri=/($^)/,na=/['\n\r\u2028\u2029\\]/g,Ni="\\ud800-\\udfff",ia="\\u0300-\\u036f",ra="\\ufe20-\\ufe2f",kn="\\u20d0-\\u20ff",gi=ia+ra+kn,mr="\\u2700-\\u27bf",Di="a-z\\xdf-\\xf6\\xf8-\\xff",oa="\\xac\\xb1\\xd7\\xf7",Oi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vi="\\u2000-\\u206f",po=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fi="A-Z\\xc0-\\xd6\\xd8-\\xde",Yt="\\ufe0e\\ufe0f",go=oa+Oi+vi+po,mi="['’]",sa="["+Ni+"]",vo="["+go+"]",Pi="["+gi+"]",yr="\\d+",on="["+mr+"]",Wi="["+Di+"]",mo="[^"+Ni+go+yr+mr+Di+Fi+"]",Bi="\\ud83c[\\udffb-\\udfff]",wr="(?:"+Pi+"|"+Bi+")",br="[^"+Ni+"]",Sr="(?:\\ud83c[\\udde6-\\uddff]){2}",Cr="[\\ud800-\\udbff][\\udc00-\\udfff]",In="["+Fi+"]",_r="\\u200d",yo="(?:"+Wi+"|"+mo+")",Rn="(?:"+In+"|"+mo+")",wo="(?:"+mi+"(?:d|ll|m|re|s|t|ve))?",Pt="(?:"+mi+"(?:D|LL|M|RE|S|T|VE))?",$r=wr+"?",bo="["+Yt+"]?",Ar="(?:"+_r+"(?:"+[br,Sr,Cr].join("|")+")"+bo+$r+")*",Je="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",So=bo+$r+Ar,ft="(?:"+[on,Sr,Cr].join("|")+")"+So,Co="(?:"+[br+Pi+"?",Pi,Sr,Cr,sa].join("|")+")",Jn=RegExp(mi,"g"),gt=RegExp(Pi,"g"),Er=RegExp(Bi+"(?="+Bi+")|"+Co+So,"g"),qn=RegExp([In+"?"+Wi+"+"+wo+"(?="+[vo,In,"$"].join("|")+")",Rn+"+"+Pt+"(?="+[vo,In+yo,"$"].join("|")+")",In+"?"+yo+"+"+wo,In+"+"+Pt,yi,Je,yr,ft].join("|"),"g"),_o=RegExp("["+_r+Ni+gi+Yt+"]"),aa=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$o=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ve=-1,Be={};Be[ki]=Be[lr]=Be[ur]=Be[$t]=Be[xn]=Be[cr]=Be[di]=Be[hr]=Be[Tn]=!0,Be[J]=Be[re]=Be[Xn]=Be[he]=Be[Zn]=Be[pe]=Be[De]=Be[je]=Be[Oe]=Be[lt]=Be[bt]=Be[jn]=Be[Ot]=Be[fi]=Be[Mt]=!1;var ze={};ze[J]=ze[re]=ze[Xn]=ze[Zn]=ze[he]=ze[pe]=ze[ki]=ze[lr]=ze[ur]=ze[$t]=ze[xn]=ze[Oe]=ze[lt]=ze[bt]=ze[jn]=ze[Ot]=ze[fi]=ze[Ti]=ze[cr]=ze[di]=ze[hr]=ze[Tn]=!0,ze[De]=ze[je]=ze[Mt]=!1;var Lr={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},la={"&":"&","<":"<",">":">",'"':""","'":"'"},ua={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ao={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ca=parseFloat,Eo=parseInt,Lo=typeof Yr=="object"&&Yr&&Yr.Object===Object&&Yr,Mo=typeof self=="object"&&self&&self.Object===Object&&self,vt=Lo||Mo||Function("return this")(),Mr=I&&!I.nodeType&&I,Nn=Mr&&!0&&N&&!N.nodeType&&N,xo=Nn&&Nn.exports===Mr,xr=xo&&Lo.process,Wt=function(){try{var q=Nn&&Nn.require&&Nn.require("util").types;return q||xr&&xr.binding&&xr.binding("util")}catch{}}(),To=Wt&&Wt.isArrayBuffer,ko=Wt&&Wt.isDate,Io=Wt&&Wt.isMap,Ro=Wt&&Wt.isRegExp,No=Wt&&Wt.isSet,Tr=Wt&&Wt.isTypedArray;function Tt(q,oe,ie){switch(ie.length){case 0:return q.call(oe);case 1:return q.call(oe,ie[0]);case 2:return q.call(oe,ie[0],ie[1]);case 3:return q.call(oe,ie[0],ie[1],ie[2])}return q.apply(oe,ie)}function ha(q,oe,ie,me){for(var Le=-1,Ue=q==null?0:q.length;++Le-1}function de(q,oe,ie){for(var me=-1,Le=q==null?0:q.length;++me-1;);return ie}function Vl(q,oe){for(var ie=q.length;ie--&&Hi(oe,q[ie],0)>-1;);return ie}function Ah(q,oe){for(var ie=q.length,me=0;ie--;)q[ie]===oe&&++me;return me}var Eh=pa(Lr),Lh=pa(la);function Mh(q){return"\\"+Ao[q]}function xh(q,oe){return q==null?h:q[oe]}function zi(q){return _o.test(q)}function Th(q){return aa.test(q)}function kh(q){for(var oe,ie=[];!(oe=q.next()).done;)ie.push(oe.value);return ie}function ya(q){var oe=-1,ie=Array(q.size);return q.forEach(function(me,Le){ie[++oe]=[Le,me]}),ie}function Ul(q,oe){return function(ie){return q(oe(ie))}}function ei(q,oe){for(var ie=-1,me=q.length,Le=0,Ue=[];++ie-1}function wf(e,n){var p=this.__data__,M=Zo(p,e);return M<0?(++this.size,p.push([e,n])):p[M][1]=n,this}Dn.prototype.clear=gf,Dn.prototype.delete=vf,Dn.prototype.get=mf,Dn.prototype.has=yf,Dn.prototype.set=wf;function On(e){var n=-1,p=e==null?0:e.length;for(this.clear();++n=n?e:n)),e}function un(e,n,p,M,F,V){var j,Q=n&o,ee=n&r,ue=n&t;if(p&&(j=F?p(e,M,F,V):p(e)),j!==h)return j;if(!nt(e))return e;var ce=Me(e);if(ce){if(j=_d(e),!Q)return Ht(e,j)}else{var fe=Et(e),ve=fe==je||fe==it;if(si(e))return Eu(e,Q);if(fe==bt||fe==J||ve&&!F){if(j=ee||ve?{}:Ku(e),!Q)return ee?fd(e,Df(j,e)):hd(e,nu(j,e))}else{if(!ze[fe])return F?e:{};j=$d(e,fe,Q)}}V||(V=new vn);var ye=V.get(e);if(ye)return ye;V.set(e,j),bc(e)?e.forEach(function(be){j.add(un(be,n,p,be,e,V))}):yc(e)&&e.forEach(function(be,Fe){j.set(Fe,un(be,n,p,Fe,e,V))});var $e=ue?ee?Ua:Va:ee?Vt:St,Re=ce?h:$e(e);return kt(Re||e,function(be,Fe){Re&&(Fe=be,be=e[Fe]),Pr(j,Fe,un(be,n,p,Fe,e,V))}),j}function Of(e){var n=St(e);return function(p){return iu(p,e,n)}}function iu(e,n,p){var M=p.length;if(e==null)return!M;for(e=Ze(e);M--;){var F=p[M],V=n[F],j=e[F];if(j===h&&!(F in e)||!V(j))return!1}return!0}function ru(e,n,p){if(typeof e!="function")throw new an(E);return Kr(function(){e.apply(h,p)},n)}function Wr(e,n,p,M){var F=-1,V=ne,j=!0,Q=e.length,ee=[],ue=n.length;if(!Q)return ee;p&&(n=le(n,Xt(p))),M?(V=de,j=!1):n.length>=W&&(V=Ir,j=!1,n=new Si(n));e:for(;++FF?0:F+p),M=M===h||M>F?F:ke(M),M<0&&(M+=F),M=p>M?0:Cc(M);p0&&p(Q)?n>1?Ct(Q,n-1,p,M,F):Se(F,Q):M||(F[F.length]=Q)}return F}var Aa=Iu(),au=Iu(!0);function $n(e,n){return e&&Aa(e,n,St)}function Ea(e,n){return e&&au(e,n,St)}function Jo(e,n){return G(n,function(p){return Bn(e[p])})}function _i(e,n){n=ri(n,e);for(var p=0,M=n.length;e!=null&&pn}function Wf(e,n){return e!=null&&Ge.call(e,n)}function Bf(e,n){return e!=null&&n in Ze(e)}function Hf(e,n,p){return e>=At(n,p)&&e=120&&ce.length>=120)?new Si(j&&ce):h}ce=e[0];var fe=-1,ve=Q[0];e:for(;++fe-1;)Q!==e&&Vo.call(Q,ee,1),Vo.call(e,ee,1);return e}function yu(e,n){for(var p=e?n.length:0,M=p-1;p--;){var F=n[p];if(p==M||F!==V){var V=F;Wn(F)?Vo.call(e,F,1):Oa(e,F)}}return e}function Ra(e,n){return e+Go(Jl()*(n-e+1))}function ed(e,n,p,M){for(var F=-1,V=yt(Ko((n-e)/(p||1)),0),j=ie(V);V--;)j[M?V:++F]=e,e+=p;return j}function Na(e,n){var p="";if(!e||n<1||n>H)return p;do n%2&&(p+=e),n=Go(n/2),n&&(e+=e);while(n);return p}function Ne(e,n){return Qa(ju(e,n,Ut),e+"")}function td(e){return tu(qi(e))}function nd(e,n){var p=qi(e);return us(p,Ci(n,0,p.length))}function zr(e,n,p,M){if(!nt(e))return e;n=ri(n,e);for(var F=-1,V=n.length,j=V-1,Q=e;Q!=null&&++FF?0:F+n),p=p>F?F:p,p<0&&(p+=F),F=n>p?0:p-n>>>0,n>>>=0;for(var V=ie(F);++M>>1,j=e[V];j!==null&&!Qt(j)&&(p?j<=n:j=W){var ue=n?null:vd(e);if(ue)return Do(ue);j=!1,F=Ir,ee=new Si}else ee=n?[]:Q;e:for(;++M=M?e:cn(e,n,p)}var Au=Gh||function(e){return vt.clearTimeout(e)};function Eu(e,n){if(n)return e.slice();var p=e.length,M=Yl?Yl(p):new e.constructor(p);return e.copy(M),M}function Ba(e){var n=new e.constructor(e.byteLength);return new Ho(n).set(new Ho(e)),n}function ad(e,n){var p=n?Ba(e.buffer):e.buffer;return new e.constructor(p,e.byteOffset,e.byteLength)}function ld(e){var n=new e.constructor(e.source,fo.exec(e));return n.lastIndex=e.lastIndex,n}function ud(e){return Fr?Ze(Fr.call(e)):{}}function Lu(e,n){var p=n?Ba(e.buffer):e.buffer;return new e.constructor(p,e.byteOffset,e.length)}function Mu(e,n){if(e!==n){var p=e!==h,M=e===null,F=e===e,V=Qt(e),j=n!==h,Q=n===null,ee=n===n,ue=Qt(n);if(!Q&&!ue&&!V&&e>n||V&&j&&ee&&!Q&&!ue||M&&j&&ee||!p&&ee||!F)return 1;if(!M&&!V&&!ue&&e=Q)return ee;var ue=p[M];return ee*(ue=="desc"?-1:1)}}return e.index-n.index}function xu(e,n,p,M){for(var F=-1,V=e.length,j=p.length,Q=-1,ee=n.length,ue=yt(V-j,0),ce=ie(ee+ue),fe=!M;++Q1?p[F-1]:h,j=F>2?p[2]:h;for(V=e.length>3&&typeof V=="function"?(F--,V):h,j&&Rt(p[0],p[1],j)&&(V=F<3?h:V,F=1),n=Ze(n);++M-1?F[V?n[j]:j]:h}}function Du(e){return Pn(function(n){var p=n.length,M=p,F=ln.prototype.thru;for(e&&n.reverse();M--;){var V=n[M];if(typeof V!="function")throw new an(E);if(F&&!j&&as(V)=="wrapper")var j=new ln([],!0)}for(M=j?M:p;++M1&&We.reverse(),ce&&eeQ))return!1;var ue=V.get(e),ce=V.get(n);if(ue&&ce)return ue==n&&ce==e;var fe=-1,ve=!0,ye=p&l?new Si:h;for(V.set(e,n),V.set(n,e);++fe1?"& ":"")+n[M],n=n.join(p>2?", ":" "),e.replace(co,`{ -/* [wrapped with `+n+`] */ -`)}function Ed(e){return Me(e)||Ei(e)||!!(Zl&&e&&e[Zl])}function Wn(e,n){var p=typeof e;return n=n??H,!!n&&(p=="number"||p!="symbol"&&vr.test(e))&&e>-1&&e%1==0&&e0){if(++n>=A)return arguments[0]}else n=0;return e.apply(h,arguments)}}function us(e,n){var p=-1,M=e.length,F=M-1;for(n=n===h?M:n;++p1?e[n-1]:h;return p=typeof p=="function"?(e.pop(),p):h,sc(e,p)});function ac(e){var n=z(e);return n.__chain__=!0,n}function Fp(e,n){return n(e),e}function cs(e,n){return n(e)}var Pp=Pn(function(e){var n=e.length,p=n?e[0]:0,M=this.__wrapped__,F=function(V){return $a(V,e)};return n>1||this.__actions__.length||!(M instanceof Pe)||!Wn(p)?this.thru(F):(M=M.slice(p,+p+(n?1:0)),M.__actions__.push({func:cs,args:[F],thisArg:h}),new ln(M,this.__chain__).thru(function(V){return n&&!V.length&&V.push(h),V}))});function Wp(){return ac(this)}function Bp(){return new ln(this.value(),this.__chain__)}function Hp(){this.__values__===h&&(this.__values__=Sc(this.value()));var e=this.__index__>=this.__values__.length,n=e?h:this.__values__[this.__index__++];return{done:e,value:n}}function zp(){return this}function Vp(e){for(var n,p=this;p instanceof Xo;){var M=ec(p);M.__index__=0,M.__values__=h,n?F.__wrapped__=M:n=M;var F=M;p=p.__wrapped__}return F.__wrapped__=e,n}function Up(){var e=this.__wrapped__;if(e instanceof Pe){var n=e;return this.__actions__.length&&(n=new Pe(this)),n=n.reverse(),n.__actions__.push({func:cs,args:[Ja],thisArg:h}),new ln(n,this.__chain__)}return this.thru(Ja)}function Kp(){return _u(this.__wrapped__,this.__actions__)}var Gp=ns(function(e,n,p){Ge.call(e,p)?++e[p]:_n(e,p,1)});function Yp(e,n,p){var M=Me(e)?S:Ff;return p&&Rt(e,n,p)&&(n=h),M(e,Ce(n,3))}function jp(e,n){var p=Me(e)?G:su;return p(e,Ce(n,3))}var Xp=Nu(tc),Zp=Nu(nc);function Qp(e,n){return Ct(hs(e,n),1)}function Jp(e,n){return Ct(hs(e,n),P)}function qp(e,n,p){return p=p===h?1:ke(p),Ct(hs(e,n),p)}function lc(e,n){var p=Me(e)?kt:ni;return p(e,Ce(n,3))}function uc(e,n){var p=Me(e)?fa:ou;return p(e,Ce(n,3))}var eg=ns(function(e,n,p){Ge.call(e,p)?e[p].push(n):_n(e,p,[n])});function tg(e,n,p,M){e=zt(e)?e:qi(e),p=p&&!M?ke(p):0;var F=e.length;return p<0&&(p=yt(F+p,0)),vs(e)?p<=F&&e.indexOf(n,p)>-1:!!F&&Hi(e,n,p)>-1}var ng=Ne(function(e,n,p){var M=-1,F=typeof n=="function",V=zt(e)?ie(e.length):[];return ni(e,function(j){V[++M]=F?Tt(n,j,p):Br(j,n,p)}),V}),ig=ns(function(e,n,p){_n(e,p,n)});function hs(e,n){var p=Me(e)?le:fu;return p(e,Ce(n,3))}function rg(e,n,p,M){return e==null?[]:(Me(n)||(n=n==null?[]:[n]),p=M?h:p,Me(p)||(p=p==null?[]:[p]),vu(e,n,p))}var og=ns(function(e,n,p){e[p?0:1].push(n)},function(){return[[],[]]});function sg(e,n,p){var M=Me(e)?Xe:Bl,F=arguments.length<3;return M(e,Ce(n,4),p,F,ni)}function ag(e,n,p){var M=Me(e)?rt:Bl,F=arguments.length<3;return M(e,Ce(n,4),p,F,ou)}function lg(e,n){var p=Me(e)?G:su;return p(e,ps(Ce(n,3)))}function ug(e){var n=Me(e)?tu:td;return n(e)}function cg(e,n,p){(p?Rt(e,n,p):n===h)?n=1:n=ke(n);var M=Me(e)?If:nd;return M(e,n)}function hg(e){var n=Me(e)?Rf:rd;return n(e)}function fg(e){if(e==null)return 0;if(zt(e))return vs(e)?Vi(e):e.length;var n=Et(e);return n==Oe||n==Ot?e.size:Ta(e).length}function dg(e,n,p){var M=Me(e)?Qe:od;return p&&Rt(e,n,p)&&(n=h),M(e,Ce(n,3))}var pg=Ne(function(e,n){if(e==null)return[];var p=n.length;return p>1&&Rt(e,n[0],n[1])?n=[]:p>2&&Rt(n[0],n[1],n[2])&&(n=[n[0]]),vu(e,Ct(n,1),[])}),fs=Yh||function(){return vt.Date.now()};function gg(e,n){if(typeof n!="function")throw new an(E);return e=ke(e),function(){if(--e<1)return n.apply(this,arguments)}}function cc(e,n,p){return n=p?h:n,n=e&&n==null?e.length:n,Fn(e,O,h,h,h,h,n)}function hc(e,n){var p;if(typeof n!="function")throw new an(E);return e=ke(e),function(){return--e>0&&(p=n.apply(this,arguments)),e<=1&&(n=h),p}}var el=Ne(function(e,n,p){var M=f;if(p.length){var F=ei(p,Qi(el));M|=m}return Fn(e,M,n,p,F)}),fc=Ne(function(e,n,p){var M=f|d;if(p.length){var F=ei(p,Qi(fc));M|=m}return Fn(n,M,e,p,F)});function dc(e,n,p){n=p?h:n;var M=Fn(e,b,h,h,h,h,h,n);return M.placeholder=dc.placeholder,M}function pc(e,n,p){n=p?h:n;var M=Fn(e,y,h,h,h,h,h,n);return M.placeholder=pc.placeholder,M}function gc(e,n,p){var M,F,V,j,Q,ee,ue=0,ce=!1,fe=!1,ve=!0;if(typeof e!="function")throw new an(E);n=fn(n)||0,nt(p)&&(ce=!!p.leading,fe="maxWait"in p,V=fe?yt(fn(p.maxWait)||0,n):V,ve="trailing"in p?!!p.trailing:ve);function ye(ct){var wn=M,zn=F;return M=F=h,ue=ct,j=e.apply(zn,wn),j}function $e(ct){return ue=ct,Q=Kr(Fe,n),ce?ye(ct):j}function Re(ct){var wn=ct-ee,zn=ct-ue,Dc=n-wn;return fe?At(Dc,V-zn):Dc}function be(ct){var wn=ct-ee,zn=ct-ue;return ee===h||wn>=n||wn<0||fe&&zn>=V}function Fe(){var ct=fs();if(be(ct))return We(ct);Q=Kr(Fe,Re(ct))}function We(ct){return Q=h,ve&&M?ye(ct):(M=F=h,j)}function Jt(){Q!==h&&Au(Q),ue=0,M=ee=F=Q=h}function Nt(){return Q===h?j:We(fs())}function qt(){var ct=fs(),wn=be(ct);if(M=arguments,F=this,ee=ct,wn){if(Q===h)return $e(ee);if(fe)return Au(Q),Q=Kr(Fe,n),ye(ee)}return Q===h&&(Q=Kr(Fe,n)),j}return qt.cancel=Jt,qt.flush=Nt,qt}var vg=Ne(function(e,n){return ru(e,1,n)}),mg=Ne(function(e,n,p){return ru(e,fn(n)||0,p)});function yg(e){return Fn(e,R)}function ds(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new an(E);var p=function(){var M=arguments,F=n?n.apply(this,M):M[0],V=p.cache;if(V.has(F))return V.get(F);var j=e.apply(this,M);return p.cache=V.set(F,j)||V,j};return p.cache=new(ds.Cache||On),p}ds.Cache=On;function ps(e){if(typeof e!="function")throw new an(E);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function wg(e){return hc(2,e)}var bg=sd(function(e,n){n=n.length==1&&Me(n[0])?le(n[0],Xt(Ce())):le(Ct(n,1),Xt(Ce()));var p=n.length;return Ne(function(M){for(var F=-1,V=At(M.length,p);++F=n}),Ei=uu(function(){return arguments}())?uu:function(e){return ot(e)&&Ge.call(e,"callee")&&!Xl.call(e,"callee")},Me=ie.isArray,Dg=To?Xt(To):Vf;function zt(e){return e!=null&&gs(e.length)&&!Bn(e)}function ut(e){return ot(e)&&zt(e)}function Og(e){return e===!0||e===!1||ot(e)&&It(e)==he}var si=Xh||dl,Fg=ko?Xt(ko):Uf;function Pg(e){return ot(e)&&e.nodeType===1&&!Gr(e)}function Wg(e){if(e==null)return!0;if(zt(e)&&(Me(e)||typeof e=="string"||typeof e.splice=="function"||si(e)||Ji(e)||Ei(e)))return!e.length;var n=Et(e);if(n==Oe||n==Ot)return!e.size;if(Ur(e))return!Ta(e).length;for(var p in e)if(Ge.call(e,p))return!1;return!0}function Bg(e,n){return Hr(e,n)}function Hg(e,n,p){p=typeof p=="function"?p:h;var M=p?p(e,n):h;return M===h?Hr(e,n,h,p):!!M}function nl(e){if(!ot(e))return!1;var n=It(e);return n==De||n==_e||typeof e.message=="string"&&typeof e.name=="string"&&!Gr(e)}function zg(e){return typeof e=="number"&&Ql(e)}function Bn(e){if(!nt(e))return!1;var n=It(e);return n==je||n==it||n==ae||n==Ws}function mc(e){return typeof e=="number"&&e==ke(e)}function gs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=H}function nt(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function ot(e){return e!=null&&typeof e=="object"}var yc=Io?Xt(Io):Gf;function Vg(e,n){return e===n||xa(e,n,Ga(n))}function Ug(e,n,p){return p=typeof p=="function"?p:h,xa(e,n,Ga(n),p)}function Kg(e){return wc(e)&&e!=+e}function Gg(e){if(xd(e))throw new Le(T);return cu(e)}function Yg(e){return e===null}function jg(e){return e==null}function wc(e){return typeof e=="number"||ot(e)&&It(e)==lt}function Gr(e){if(!ot(e)||It(e)!=bt)return!1;var n=zo(e);if(n===null)return!0;var p=Ge.call(n,"constructor")&&n.constructor;return typeof p=="function"&&p instanceof p&&Po.call(p)==Vh}var il=Ro?Xt(Ro):Yf;function Xg(e){return mc(e)&&e>=-H&&e<=H}var bc=No?Xt(No):jf;function vs(e){return typeof e=="string"||!Me(e)&&ot(e)&&It(e)==fi}function Qt(e){return typeof e=="symbol"||ot(e)&&It(e)==Ti}var Ji=Tr?Xt(Tr):Xf;function Zg(e){return e===h}function Qg(e){return ot(e)&&Et(e)==Mt}function Jg(e){return ot(e)&&It(e)==ar}var qg=ss(ka),ev=ss(function(e,n){return e<=n});function Sc(e){if(!e)return[];if(zt(e))return vs(e)?gn(e):Ht(e);if(Rr&&e[Rr])return kh(e[Rr]());var n=Et(e),p=n==Oe?ya:n==Ot?Do:qi;return p(e)}function Hn(e){if(!e)return e===0?e:0;if(e=fn(e),e===P||e===-P){var n=e<0?-1:1;return n*U}return e===e?e:0}function ke(e){var n=Hn(e),p=n%1;return n===n?p?n-p:n:0}function Cc(e){return e?Ci(ke(e),0,te):0}function fn(e){if(typeof e=="number")return e;if(Qt(e))return Y;if(nt(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=nt(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Hl(e);var p=Js.test(e);return p||ea.test(e)?Eo(e.slice(2),p?2:8):Qs.test(e)?Y:+e}function _c(e){return An(e,Vt(e))}function tv(e){return e?Ci(ke(e),-H,H):e===0?e:0}function Ye(e){return e==null?"":Zt(e)}var nv=Xi(function(e,n){if(Ur(n)||zt(n)){An(n,St(n),e);return}for(var p in n)Ge.call(n,p)&&Pr(e,p,n[p])}),$c=Xi(function(e,n){An(n,Vt(n),e)}),Ac=Xi(function(e,n,p,M){An(n,Vt(n),e,M)}),rl=Xi(function(e,n,p,M){An(n,St(n),e,M)}),iv=Pn($a);function rv(e,n){var p=ji(e);return n==null?p:nu(p,n)}var ov=Ne(function(e,n){e=Ze(e);var p=-1,M=n.length,F=M>2?n[2]:h;for(F&&Rt(n[0],n[1],F)&&(M=1);++p1),V}),An(e,Ua(e),p),M&&(p=un(p,o|r|t,md));for(var F=n.length;F--;)Oa(p,n[F]);return p});function _v(e,n){return Lc(e,ps(Ce(n)))}var $v=Pn(function(e,n){return e==null?{}:Jf(e,n)});function Lc(e,n){if(e==null)return{};var p=le(Ua(e),function(M){return[M]});return n=Ce(n),mu(e,p,function(M,F){return n(M,F[0])})}function Av(e,n,p){n=ri(n,e);var M=-1,F=n.length;for(F||(F=1,e=h);++Mn){var M=e;e=n,n=M}if(p||e%1||n%1){var F=Jl();return At(e+F*(n-e+ca("1e-"+((F+"").length-1))),n)}return Ra(e,n)}var Ov=Zi(function(e,n,p){return n=n.toLowerCase(),e+(p?Tc(n):n)});function Tc(e){return al(Ye(e).toLowerCase())}function kc(e){return e=Ye(e),e&&e.replace(ta,Eh).replace(gt,"")}function Fv(e,n,p){e=Ye(e),n=Zt(n);var M=e.length;p=p===h?M:Ci(ke(p),0,M);var F=p;return p-=n.length,p>=0&&e.slice(p,F)==n}function Pv(e){return e=Ye(e),e&&Vs.test(e)?e.replace(Ii,Lh):e}function Wv(e){return e=Ye(e),e&&Ys.test(e)?e.replace(Ft,"\\$&"):e}var Bv=Zi(function(e,n,p){return e+(p?"-":"")+n.toLowerCase()}),Hv=Zi(function(e,n,p){return e+(p?" ":"")+n.toLowerCase()}),zv=Ru("toLowerCase");function Vv(e,n,p){e=Ye(e),n=ke(n);var M=n?Vi(e):0;if(!n||M>=n)return e;var F=(n-M)/2;return os(Go(F),p)+e+os(Ko(F),p)}function Uv(e,n,p){e=Ye(e),n=ke(n);var M=n?Vi(e):0;return n&&M>>0,p?(e=Ye(e),e&&(typeof n=="string"||n!=null&&!il(n))&&(n=Zt(n),!n&&zi(e))?oi(gn(e),0,p):e.split(n,p)):[]}var Qv=Zi(function(e,n,p){return e+(p?" ":"")+al(n)});function Jv(e,n,p){return e=Ye(e),p=p==null?0:Ci(ke(p),0,e.length),n=Zt(n),e.slice(p,p+n.length)==n}function qv(e,n,p){var M=z.templateSettings;p&&Rt(e,n,p)&&(n=h),e=Ye(e),n=rl({},n,M,Bu);var F=rl({},n.imports,M.imports,Bu),V=St(F),j=ma(F,V);kt(V,function(be){if(ho.test(be))throw new Le(u)});var Q,ee,ue=0,ce=n.interpolate||Ri,fe="__p += '",ve=wa((n.escape||Ri).source+"|"+ce.source+"|"+(ce===uo?Zs:Ri).source+"|"+(n.evaluate||Ri).source+"|$","g"),ye="//# sourceURL="+(Ge.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ve+"]")+` -`;e.replace(ve,function(be,Fe,We,Jt,Nt,qt){return We||(We=Jt),fe+=e.slice(ue,qt).replace(na,Mh),Fe&&(Q=!0,fe+=`' + -__e(`+Fe+`) + -'`),Nt&&(ee=!0,fe+=`'; -`+Nt+`; -__p += '`),We&&(fe+=`' + -((__t = (`+We+`)) == null ? '' : __t) + -'`),ue=qt+be.length,be}),fe+=`'; -`;var $e=Ge.call(n,"variable")&&n.variable;if(!$e)fe=`with (obj) { -`+fe+` -} -`;else if(ho.test($e))throw new Le($);fe=(ee?fe.replace(lo,""):fe).replace(Hs,"$1").replace(zs,"$1;"),fe="function("+($e||"obj")+`) { -`+($e?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Q?", __e = _.escape":"")+(ee?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+fe+`return __p -}`;var Re=Rc(function(){return Ue(V,ye+"return "+fe).apply(h,j)});if(Re.source=fe,nl(Re))throw Re;return Re}function em(e){return Ye(e).toLowerCase()}function tm(e){return Ye(e).toUpperCase()}function nm(e,n,p){if(e=Ye(e),e&&(p||n===h))return Hl(e);if(!e||!(n=Zt(n)))return e;var M=gn(e),F=gn(n),V=zl(M,F),j=Vl(M,F)+1;return oi(M,V,j).join("")}function im(e,n,p){if(e=Ye(e),e&&(p||n===h))return e.slice(0,Kl(e)+1);if(!e||!(n=Zt(n)))return e;var M=gn(e),F=Vl(M,gn(n))+1;return oi(M,0,F).join("")}function rm(e,n,p){if(e=Ye(e),e&&(p||n===h))return e.replace(pi,"");if(!e||!(n=Zt(n)))return e;var M=gn(e),F=zl(M,gn(n));return oi(M,F).join("")}function om(e,n){var p=B,M=L;if(nt(n)){var F="separator"in n?n.separator:F;p="length"in n?ke(n.length):p,M="omission"in n?Zt(n.omission):M}e=Ye(e);var V=e.length;if(zi(e)){var j=gn(e);V=j.length}if(p>=V)return e;var Q=p-Vi(M);if(Q<1)return M;var ee=j?oi(j,0,Q).join(""):e.slice(0,Q);if(F===h)return ee+M;if(j&&(Q+=ee.length-Q),il(F)){if(e.slice(Q).search(F)){var ue,ce=ee;for(F.global||(F=wa(F.source,Ye(fo.exec(F))+"g")),F.lastIndex=0;ue=F.exec(ce);)var fe=ue.index;ee=ee.slice(0,fe===h?Q:fe)}}else if(e.indexOf(Zt(F),Q)!=Q){var ve=ee.lastIndexOf(F);ve>-1&&(ee=ee.slice(0,ve))}return ee+M}function sm(e){return e=Ye(e),e&&Gt.test(e)?e.replace(fr,Dh):e}var am=Zi(function(e,n,p){return e+(p?" ":"")+n.toUpperCase()}),al=Ru("toUpperCase");function Ic(e,n,p){return e=Ye(e),n=p?h:n,n===h?Th(e)?Ph(e):tt(e):e.match(n)||[]}var Rc=Ne(function(e,n){try{return Tt(e,h,n)}catch(p){return nl(p)?p:new Le(p)}}),lm=Pn(function(e,n){return kt(n,function(p){p=mn(p),_n(e,p,el(e[p],e))}),e});function um(e){var n=e==null?0:e.length,p=Ce();return e=n?le(e,function(M){if(typeof M[1]!="function")throw new an(E);return[p(M[0]),M[1]]}):[],Ne(function(M){for(var F=-1;++FH)return[];var p=te,M=At(e,te);n=Ce(n),e-=te;for(var F=va(M,n);++p0||n<0)?new Pe(p):(e<0?p=p.takeRight(-e):e&&(p=p.drop(e)),n!==h&&(n=ke(n),p=n<0?p.dropRight(-n):p.take(n-e)),p)},Pe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Pe.prototype.toArray=function(){return this.take(te)},$n(Pe.prototype,function(e,n){var p=/^(?:filter|find|map|reject)|While$/.test(n),M=/^(?:head|last)$/.test(n),F=z[M?"take"+(n=="last"?"Right":""):n],V=M||/^find/.test(n);F&&(z.prototype[n]=function(){var j=this.__wrapped__,Q=M?[1]:arguments,ee=j instanceof Pe,ue=Q[0],ce=ee||Me(j),fe=function(Fe){var We=F.apply(z,Se([Fe],Q));return M&&ve?We[0]:We};ce&&p&&typeof ue=="function"&&ue.length!=1&&(ee=ce=!1);var ve=this.__chain__,ye=!!this.__actions__.length,$e=V&&!ve,Re=ee&&!ye;if(!V&&ce){j=Re?j:new Pe(this);var be=e.apply(j,Q);return be.__actions__.push({func:cs,args:[fe],thisArg:h}),new ln(be,ve)}return $e&&Re?e.apply(this,Q):(be=this.thru(fe),$e?M?be.value()[0]:be.value():be)})}),kt(["pop","push","shift","sort","splice","unshift"],function(e){var n=Oo[e],p=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",M=/^(?:pop|shift)$/.test(e);z.prototype[e]=function(){var F=arguments;if(M&&!this.__chain__){var V=this.value();return n.apply(Me(V)?V:[],F)}return this[p](function(j){return n.apply(Me(j)?j:[],F)})}}),$n(Pe.prototype,function(e,n){var p=z[n];if(p){var M=p.name+"";Ge.call(Yi,M)||(Yi[M]=[]),Yi[M].push({name:n,func:p})}}),Yi[is(h,d).name]=[{name:"wrapper",func:h}],Pe.prototype.clone=af,Pe.prototype.reverse=lf,Pe.prototype.value=uf,z.prototype.at=Pp,z.prototype.chain=Wp,z.prototype.commit=Bp,z.prototype.next=Hp,z.prototype.plant=Vp,z.prototype.reverse=Up,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=Kp,z.prototype.first=z.prototype.head,Rr&&(z.prototype[Rr]=zp),z},Ui=Wh();Nn?((Nn.exports=Ui)._=Ui,Mr._=Ui):vt._=Ui}).call(Yr)})(Os,Os.exports);var Iw=Os.exports;const Rw=eh(Iw),Nw={class:"card"},Dw={class:"accordion accordion-flush",id:"accordionArea"},Ow=["id"],Fw=["data-bs-target","aria-controls"],Pw=["id","aria-labelledby"],Ww={class:"accordion-body p-0"},Bw=["onClick"],Hw=hi({__name:"workflowStageList",props:{workflowStageMappingsFormData:{},pipelineScriptList:{}},emits:["on-start-drag","on-finish-drag","splice-workflow-stage-mappings-form-data","set-pipeline-order"],setup(N,{emit:I}){const h=N,v=I,W=a=>({infra:"Infra",k8s:"K8s",app:"App",database:"Database","object-storage":"Object Storage",utility:"Utility","app-deploy":"App","db-backup-restore":"Database","common-util":"Utility"})[a]||a,T=a=>{let o=a.draggedContext.futureIndex,r=a.draggedContext.element.isDefaultScript,t=!0;return r&&(t=!1),(o<1||o>h.workflowStageMappingsFormData.length-1)&&(t=!1),t},E=a=>({stageOrder:a.workflowStageOrder,workflowStageIdx:a.workflowStageIdx,workflowStageName:a.workflowStageName,workflowStageTypeName:a.workflowStageTypeName,stageContent:a.workflowStageContent,defaultParams:(a.defaultParams||[]).map(o=>({...o})),defaultScriptTag:"null",isDefaultScript:!1}),$=a=>E(a),u=a=>{h.workflowStageMappingsFormData.length<1||(v("splice-workflow-stage-mappings-form-data",E(a)),v("set-pipeline-order"))},c=()=>{v("on-start-drag")},s=()=>{v("on-finish-drag")};return(a,o)=>{const r=Rl("VueDraggableNext");return Te(),Ie("div",Nw,[se("div",Dw,[(Te(!0),Ie(Cn,null,ci(N.pipelineScriptList,(t,i)=>(Te(),Ie("div",{class:"accordion-item",key:i},[se("h2",{class:"accordion-header",id:"heading"+t},[se("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse"+i,"aria-expanded":"false","aria-controls":"collapse"+i},qe(t.label||W(t.title)),9,Fw)],8,Ow),se("div",{id:"collapse"+i,class:"accordion-collapse collapse","aria-labelledby":"heading"+i,"data-bs-parent":"#accordionArea"},[se("div",Ww,[ht(r,{list:t.list,group:{name:"pipelineEidtor",pull:"clone",put:!1},move:T,clone:$,onStart:c,onEnd:s},{default:nh(()=>[(Te(!0),Ie(Cn,null,ci(t.list,(l,f)=>(Te(),Ie("div",{key:f,class:"list-group-item list-group-item-action paletteItem",onClick:d=>u(l)},qe(l?l.workflowStageName:"No registered stages."),9,Bw))),128))]),_:2},1032,["list"])])],8,Pw)]))),128))])])}}}),zw=ro(Hw,[["__scopeId","data-v-9bafe92a"]]),Vw={class:"mb-3"},Uw={class:"p-1"},Kw={class:"grid gap-0 g-col-12"},Gw={key:0,class:"p-2 g-col-8"},Yw={key:1},jw={class:"p-2 g-col-4"},Xw=hi({__name:"PipelineGenerator",props:{mode:{},workflowStageMappingsFormData:{}},emits:["init-workflow-stage-mappings","on-click-create-script","splice-workflow-stage-mappings-form-data"],setup(N,{emit:I}){Nl();const h=N,v=I;io(()=>{$()});const{workflowStageMappingsFormData:W}=th(h),T=()=>{v("on-click-create-script")},E=we([]),$=async()=>{try{const i=await ry();E.value=i.data?i.data:{}}catch{E.value={}}},u=i=>{let l=i.draggedContext.futureIndex,f=i.draggedContext.element.isDefaultScript,d=!0;return f&&(d=!1),(l<1||l>W.value.length-1)&&(d=!1),d},c=we(!1),s=i=>{c.value=!0},a=i=>{c.value=!1,o()},o=()=>{let i=1;W.value.forEach(l=>{l.defaultScriptTag=="DEFAULT_START"?l.stageOrder=0:l.defaultScriptTag=="DEFAULT_END"?l.stageOrder=W.value.length-1:(l.stageOrder=i,i+=1)})},r=i=>{if(!(i==0||i==W.value.length-1)){if(!confirm("Do you want to delete this pipeline?"))return!1;W.value.splice(i,1)}},t=i=>{v("splice-workflow-stage-mappings-form-data",i)};return(i,l)=>(Te(),Ie("div",Vw,[se("div",{class:"grid gap-0 column-gap-3 border-bottom pb-2 pt-2"},[l[0]||(l[0]=se("label",{class:"form-label required p-2 g-col-11"}," Pipeline ",-1)),se("button",{class:"btn btn-primary",onClick:T}," Create Script ")]),se("div",Uw,[se("div",Kw,[pt(W)?(Te(),Ie("div",Gw,[ht(pt(iw),{list:pt(W),group:{name:"pipelineEidtor",pull:!1,put:!0},move:u,onStart:s,onEnd:a},{default:nh(()=>[(Te(!0),Ie(Cn,null,ci(pt(W),(f,d)=>(Te(),Ie("div",{key:d},[ht(kw,{idx:d,"pipeline-info":f,"pipeline-script-list":E.value,"drag-flag":c.value,onOnDeletePipeline:r},null,8,["idx","pipeline-info","pipeline-script-list","drag-flag"])]))),128))]),_:1},8,["list"])])):(Te(),Ie("div",Yw,[...l[1]||(l[1]=[se("span",null,"Click Create Script first.",-1)])])),se("div",jw,[ht(zw,{"workflow-stage-mappings-form-data":pt(W),"pipeline-script-list":E.value,onOnStartDrag:s,onOnFinishDrag:a,onSpliceWorkflowStageMappingsFormData:t,onSetPipelineOrder:o},null,8,["workflow-stage-mappings-form-data","pipeline-script-list"])])])])]))}}),Zw=ro(Xw,[["__scopeId","data-v-35dbfdb3"]]),Qw={class:"modal-dialog modal-xl modal-dialog-centered",role:"document"},Jw={class:"modal-content"},qw={class:"modal-header"},eb={class:"modal-title"},tb={class:"modal-body py-4"},nb={class:"steps steps-counter"},ib=["onClick"],rb={class:"card mt-8"},ob={class:"card-body"},sb={class:"row row-deck"},ab={class:"card"},lb={style:{display:"flex !important","justify-content":"space-between !important"}},ub={class:"stage-title"},cb={style:{cursor:"pointer"}},hb=["onClick"],fb=["onClick"],db={key:0},pb={key:1},gb=3e3,vb=hi({__name:"WorkflowHistoryPopoup",props:{workflowIdx:{},workflowName:{},buildName:{},workflowStages:{}},setup(N){const I=Nl(),h=N,v=we(),W=we();let T,E=!1;Vn(()=>h.workflowStages,async()=>{var d;i(),W.value&&((d=v.value)!=null&&d.classList.contains("show"))&&(await u(W.value,!1),r())},{deep:!0}),io(()=>{var d,C;(d=v.value)==null||d.addEventListener("show.bs.modal",a),(C=v.value)==null||C.addEventListener("hidden.bs.modal",o)}),ih(()=>{var d,C;(d=v.value)==null||d.removeEventListener("show.bs.modal",a),(C=v.value)==null||C.removeEventListener("hidden.bs.modal",o),t()});const $=we([]),u=async(d,C=!0)=>{if(!d||!h.workflowIdx||!h.buildName||E)return;E=!0;const b={workflowIdx:h.workflowIdx,buildName:h.buildName,stageIdx:d.id};await oy(b).then(({data:y})=>{var x;const m=new Map((((x=$.value)==null?void 0:x.stageFlowNodes)||[]).map((O,k)=>[f(O,k),!!O.flag]));((y==null?void 0:y.stageFlowNodes)||[]).forEach((O,k)=>{O.flag=m.get(f(O,k))||!1}),$.value=y}).catch(y=>{console.log(y),C&&I.error("Failed to load workflow stage logs.")}).finally(()=>{E=!1})},c=d=>{$.value.stageFlowNodes[d].flag=!$.value.stageFlowNodes[d].flag},s=async d=>{W.value=d,await u(d),r()},a=async()=>{i(),W.value&&(await u(W.value),r())},o=()=>{t(),$.value=[],W.value=void 0},r=()=>{t(),l()&&(T=setInterval(async()=>{W.value&&await u(W.value,!1),l()||t()},gb))},t=()=>{T&&(clearInterval(T),T=void 0)},i=()=>{var C;if(!h.workflowStages.length){W.value=void 0,$.value=[],t();return}const d=(C=W.value)==null?void 0:C.id;W.value=h.workflowStages.find(b=>b.id===d)||h.workflowStages[0]},l=()=>{var d;return!((d=v.value)!=null&&d.classList.contains("show"))||!h.workflowStages.length||!W.value?!1:!!(h.workflowIdx&&h.buildName)},f=(d,C)=>`${(d==null?void 0:d.id)||""}:${(d==null?void 0:d.name)||""}:${C}`;return(d,C)=>(Te(),Ie("div",{class:"modal modal-blur fade",id:"workflowHistoryDetailPopup",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:v},[se("div",Qw,[se("div",Jw,[C[3]||(C[3]=se("div",{class:"modal-status bg-info"},null,-1)),se("div",qw,[se("h3",eb,qe(h.workflowName),1),C[0]||(C[0]=se("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),se("div",tb,[se("div",nb,[(Te(!0),Ie(Cn,null,ci(N.workflowStages,(b,y)=>(Te(),Ie("span",{class:Ms(["step-item",{active:b.status==="IN_PROGRESS"}]),key:y,onClick:m=>s(b),style:{cursor:"pointer"}},qe(b.name),11,ib))),128))]),se("div",rb,[se("div",ob,[se("div",sb,[se("div",ab,[(Te(!0),Ie(Cn,null,ci($.value.stageFlowNodes,(b,y)=>(Te(),Ie("div",{key:y,class:"card-body"},[se("div",lb,[se("p",ub,qe(b.name),1),se("a",cb,[b.flag?(Te(),Ie("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",onClick:m=>c(y),width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-up"},[...C[2]||(C[2]=[se("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),se("path",{d:"M6 15l6 -6l6 6"},null,-1)])],8,fb)):(Te(),Ie("svg",{key:0,onClick:m=>c(y),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"},[...C[1]||(C[1]=[se("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),se("path",{d:"M6 9l6 6l6 -6"},null,-1)])],8,hb))])]),b.flag&&b.parameterDescription?(Te(),Ie("div",db,qe(b.parameterDescription),1)):pn("",!0),b.flag&&b.error!==null?(Te(),Ie("div",pb,qe(b.error.type),1)):pn("",!0)]))),128))])])])])]),C[4]||(C[4]=se("div",{class:"modal-footer"},[se("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ")],-1))])])],512))}}),mb=ro(vb,[["__scopeId","data-v-c559e65d"]]),yb={key:0,class:"mt-5 mb-5"},wb=hi({__name:"WorkflowHistoryList",props:{workflowIdx:{},workflowName:{}},setup(N){const I=we(!0),h=N;Vn(()=>h.workflowIdx,async()=>{$(),u(h.workflowIdx)?(await a(h.workflowIdx),c()):s()}),io(()=>{f(),u(h.workflowIdx)&&(a(h.workflowIdx),c())}),ih(()=>{s()});const v=we([]),W=nn(()=>v.value.length>0);let T,E=!1;function $(){v.value=[],r.value="",t.value=[]}const u=b=>b!==void 0&&b!==0&&b!=="0",c=()=>{s(),T=setInterval(()=>{a(h.workflowIdx,!1)},5e3)},s=()=>{T&&(clearInterval(T),T=void 0)},a=async(b,y=!0)=>{E||!u(b)||(E=!0,y&&(I.value=!0),await sy(b).then(({data:m})=>{const x=Array.isArray(m)?m:[];x.forEach(O=>{O.startTimeMillis=new Date(O.startTimeMillis).toLocaleString(),O.user="ADMIN"}),v.value=Rw.sortBy(x,"name").reverse(),v.value.length?l():$()}).catch(m=>{console.log(m)}).finally(()=>{y&&(I.value=!1),E=!1}))},o=we([]),r=we(""),t=we([]),i=b=>String(b||"").replace("#",""),l=()=>{if(!r.value)return;const b=v.value.find(y=>i(y.name)===r.value);t.value=(b==null?void 0:b.stages)||[]},f=()=>{o.value=[{title:"Name",field:"name",minWidth:120},{title:"Status",field:"status",minWidth:120,formatter:d},{title:"User",field:"user",minWidth:100},{title:"Run time",field:"startTimeMillis",minWidth:170},{title:"Action",minWidth:110,formatter:C,cellClick:function(b,y){const m=y.getRow().getData();!m.stages||m.stages.length===0||(r.value=i(m.name),t.value=m.stages)}}]},d=b=>{const y=b.getValue();return` -
- - - ${y} - -
- `},C=b=>{const y=b.getRow().getData();return!y.stages||y.stages.length===0?'LOG':` -
- -
`};return(b,y)=>{const m=Rl("b-overlay");return Te(),Ie(Cn,null,[W.value?(Te(),Ie("div",yb,[y[0]||(y[0]=se("h3",{class:"card-title mb-3"},"History",-1)),ht(m,{show:I.value,id:"overlay-background",variant:"transparent",opacity:"1",blur:"1rem",rounded:"lg",style:{"z-index":"1000"}},null,8,["show"]),se("div",null,[ht(by,{columns:o.value,"table-data":v.value},null,8,["columns","table-data"])])])):pn("",!0),W.value?(Te(),Zm(mb,{key:1,"workflow-idx":h.workflowIdx,"build-name":r.value,"workflow-name":h.workflowName,"workflow-stages":t.value},null,8,["workflow-idx","build-name","workflow-name","workflow-stages"])):pn("",!0)],64)}}}),bb={class:"page-header"},Sb={class:"row align-items-center"},Cb={class:"col"},_b={class:"page-title"},$b={class:"card card-flush w-100",ref:"workflowForm"},Ab={key:0,class:"card-body"},Eb={class:"card-title"},Lb={class:"mb-3"},Mb={class:"grid gap-0 column-gap-3"},xb={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},Tb={class:"mb-3"},kb={class:"grid gap-0 column-gap-3"},Ib=["value"],Rb={key:0,class:"mb-3"},Nb={class:"d-flex align-items-center justify-content-between mb-2"},Db={class:"form-check form-switch mb-0"},Ob={class:"form-check-label"},Fb={key:1,class:"mb-3"},Pb={class:"grid gap-0 column-gap-3 mb-2"},Wb={class:"tumblebug-param-field g-col-4"},Bb={class:"tumblebug-param-label"},Hb={class:"tumblebug-param-field g-col-4"},zb={class:"tumblebug-param-label"},Vb={class:"tumblebug-param-field g-col-4"},Ub={class:"tumblebug-param-label"},Kb={class:"grid gap-0 column-gap-3 mb-2"},Gb={class:"tumblebug-param-field g-col-6"},Yb={class:"tumblebug-param-label"},jb={class:"tumblebug-param-field g-col-6"},Xb={class:"tumblebug-param-label"},Zb={class:"tumblebug-param-label-actions"},Qb={class:"form-check form-switch tumblebug-k8s-toggle",title:"Load Kubernetes node images"},Jb={class:"grid gap-0 column-gap-3 mb-2"},qb={class:"tumblebug-param-field g-col-5"},e0={class:"tumblebug-param-label"},t0={class:"tumblebug-param-field g-col-5"},n0={class:"tumblebug-param-label"},i0={class:"grid gap-0 column-gap-3 mb-2"},r0={class:"tumblebug-param-label"},o0={class:"tumblebug-param-label"},s0={key:0,class:"tumblebug-param-field g-col-4"},a0={class:"tumblebug-param-label"},l0={key:0,class:"grid gap-0 column-gap-3 mt-2"},u0={class:"tumblebug-param-field g-col-12"},c0={class:"tumblebug-param-label"},h0={key:0,class:"text-secondary"},f0={class:"row align-items-center"},d0={class:"col-auto ms-auto"},p0={class:"btn-list"},qc="CREATE TABLE IF NOT EXISTS sample_data (id INT PRIMARY KEY, name VARCHAR(100));",g0="INSERT INTO sample_data (id, name) VALUES (1, 'sample row');",v0=hi({__name:"WorkflowForm",setup(N){const I=Nl(),h=ey(),v=ny(),W=Qm(),T=we(!1);let E=!1;io(async()=>{u(),await l(),await vt(),Lo(),await zs(),Jn(),await vr(),Jn(),T.value=!0,E&&(E=!1,await pr())});const $=we("new"),u=()=>{$.value=h.params.workflowIdx===void 0?"new":"detail"};let c=ty({});const s=we([]),a=we([]),o={workflowIdx:0,workflowName:"",workflowPurpose:"",ossIdx:0,script:""},r=[{paramKey:"",paramValue:"",eventListenerYn:"N"}],t=()=>(W.projectInfo.ns_id||W.projectInfo.name||"").trim(),i=S=>{var le,Se;const G=t(),ne=((Se=(le=S.find(Xe=>{var rt;return((rt=Xe.paramKey)==null?void 0:rt.trim().toUpperCase())==="NAMESPACE"}))==null?void 0:le.paramValue)==null?void 0:Se.trim())||"",de=G||ne;return de?S.map(Xe=>{var Bt;const rt=(Bt=Xe.paramKey)==null?void 0:Bt.trim().toUpperCase();return{...Xe,paramValue:rt==="NAMESPACE"||rt==="OBJECT_STORAGE_NAMESPACE"?de:Xe.paramValue}}):[...S]},l=async()=>{if($.value==="new")c={...o},s.value=[...r],a.value=[],Be.value=!1,ze.value="";else{const{data:S}=await ay(h.params.workflowIdx,"N");c={...S.workflowInfo,workflowPurpose:Eo(S.workflowInfo.workflowPurpose)},s.value=i(S.workflowParams),a.value=[...S.workflowStageMappings],c={...c,workflowIdx:h.params.workflowIdx},Be.value=!0,ze.value=c.workflowName}},f=["alibaba","aws","azure","gcp","ibm","kt","ncp","nhn","tencent"],d=we(go(f.map(S=>({label:S,value:S})))),C=we("aws"),b=we(""),y=we(""),m=we(""),x=we(""),O=we(""),k=we(""),R=we(""),B=we(""),L=we(""),A=we(""),w=we(!1),g=we([]),_=we([]),D=we([]),P=we([]),H=we([]),U=we([]),Y=we([]),te=we([]),K=we(!1),X=we([]),Z=we([]),J=we({}),re=we({});let ae=0,he=0,pe=0,_e=0,De=0,je=0,it=0,Oe=0,lt=0,Yn=0,bt=0;const ao=["infra-create","k8s-cluster-create","k8s-kubeconfig-get","mariadb-install","infra-ssh-connect-check","ssh-command-exec"],Ws=["TUMBLEBUG_SELECTOR_YN","NAMESPACE","PROVIDER","CSP","REGION","IMAGE","IMAGE_ID","SPEC","SPEC_ID","K8S_VERSION","INFRA_ID","SSH_HOST","DB_HOST","K8S_CLUSTER_ID","CONNECTION_NAME","ZONE"],jn=["PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID","K8S_VERSION"],Ot=["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"],fi=[...Ot,...ao],Ti=["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"],Bs=["object-storage-ensure","object-storage-delete","jupyter-object-storage-analysis-install","jupyter-object-storage-analysis-remove"],Mt=we(!1),ar=we(!1),Xn={label:"No zone required",value:"",searchText:"no zone optional blank"},Zn={alibaba:{region:"ap-northeast-2",connectionName:"alibaba-ap-northeast-2",zone:"ap-northeast-2a",specId:"alibaba+ap-northeast-2+ecs.g9i.large",imageId:"ubuntu_24_04_x64_20G_alibase_20260810.vhd"},aws:{region:"ap-northeast-2",connectionName:"aws-ap-northeast-2",zone:"ap-northeast-2a",specId:"aws+ap-northeast-2+m8i.large",imageId:"ami-01ed18897a4aadead"},azure:{region:"koreacentral",connectionName:"azure-koreacentral",zone:"1",specId:"azure+koreacentral+Standard_D2s_v6",imageId:"Canonical:ubuntu-24_04-lts:minimal:24.04.202608100"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+n2-standard-2",imageId:"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2404-noble-amd64-v20260817"},ibm:{region:"jp-tok",connectionName:"ibm-jp-tok",zone:"jp-tok-1",specId:"ibm+jp-tok+bx2-2x8",imageId:"r022-9130f04e-631a-4e91-ae4c-b85d54621c24"},kt:{region:"kr1",connectionName:"kt-kr1",zone:"DX-M1",specId:"kt+kr1+2x8.itl",imageId:"e55c5985-b420-4a19-8c92-aa3461cda86e"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+s2-g3",imageId:"104630229"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+r2.c2m8",imageId:"5c38715f-0375-4167-af4e-56f75ba8b252"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM8",imageId:"img-mmytdhbn"}},ki={alibaba:{region:"ap-northeast-2",connectionName:"alibaba-ap-northeast-2",zone:"ap-northeast-2a",specId:"alibaba+ap-northeast-2+ecs.c9i.xlarge",imageId:"Ubuntu",k8sVersion:"1.35.7-aliyun.1"},aws:{region:"ap-northeast-2",connectionName:"aws-ap-northeast-2",zone:"ap-northeast-2a",specId:"aws+ap-northeast-2+c8i.xlarge",imageId:"AL2023_x86_64_STANDARD",k8sVersion:"1.35"},azure:{region:"koreacentral",connectionName:"azure-koreacentral",zone:"1",specId:"azure+koreacentral+Standard_D4ls_v6",imageId:"",k8sVersion:"1.35.7"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+c3-highcpu-4",imageId:"UBUNTU_CONTAINERD",k8sVersion:"1.34.10-gke.1236000"},ibm:{region:"jp-tok",connectionName:"ibm-jp-tok",zone:"jp-tok-1",specId:"ibm+jp-tok+cx2-4x8",imageId:"",k8sVersion:"1.35.7"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c4-g3",imageId:"",k8sVersion:"1.34.3-nks.1"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c4m8",imageId:"107cc02d-02d8-44fd-84d6-6c316045b817",k8sVersion:"v1.34.3"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.LARGE8",imageId:"ubuntu22.04x86_64",k8sVersion:"1.34.1"}},lr=nn(()=>$.value==="new"||a.value.some(S=>fi.includes(S.workflowStageName||""))||s.value.some(S=>{var G;return Ws.includes(((G=S.paramKey)==null?void 0:G.trim().toUpperCase())||"")})),ur=nn(()=>a.value.some(S=>Ot.includes(S.workflowStageName||""))),$t=nn(()=>a.value.some(S=>Ti.includes((S.workflowStageName||"").toLowerCase()))),xn=nn(()=>a.value.some(S=>Bs.includes((S.workflowStageName||"").toLowerCase()))),cr=nn(()=>C.value.toLowerCase()==="azure"),di=nn(()=>te.value.length>0?te.value:!K.value&&cr.value&&m.value&&b.value&&(R.value||Gt())?[Xn]:[]),hr=nn(()=>di.value.length===1&&di.value[0].value===""?Xn.label:"Zone"),Tn=nn({get:()=>{const S=Je("TUMBLEBUG_SELECTOR_YN").trim().toUpperCase();return["Y","YES","TRUE","1"].includes(S)?!0:["N","NO","FALSE","0"].includes(S)?!1:ur.value},set:S=>{Ve("TUMBLEBUG_SELECTOR_YN",S?"Y":"N"),S?gt():Er()}}),lo=nn(()=>lr.value),Hs=nn(()=>lo.value&&Tn.value);Vn(b,async(S,G)=>{w.value||(Vs(S,G),await mr(),await Di(),await gi(),await kn(),await Oi(),await vi(),gt())}),Vn(m,async(S,G)=>{w.value||(S!==G&&(y.value=""),await kn(),await Oi(),gt())}),Vn($t,async S=>{ar.value||Mt.value===S||(Mt.value=S,w.value||(y.value="",dr(),await Di(),await kn(),gt()))});const zs=async()=>{w.value=!0;try{const S=fr(Je("SPEC_ID")||Je("IMAGE_ID"));S.provider&&(C.value=S.provider),x.value=ft(),O.value=Je("INFRA_ID")||Je("K8S_CLUSTER_ID"),k.value=Je("SSH_HOST")||Je("DB_HOST"),b.value=Je("REGION")||S.region,y.value=Je("IMAGE_ID")||Je("IMAGE"),m.value=Je("SPEC_ID")||Je("SPEC"),L.value=Je("K8S_VERSION"),A.value=Je("OBJECT_STORAGE_BUCKET"),R.value=Je("CONNECTION_NAME"),B.value=Je("ZONE"),co(),ar.value||(Mt.value=$t.value)}finally{await Qr(),w.value=!1}},fr=S=>{const G=(S||"").split("+");return G.length<3?{provider:"",region:""}:{provider:G[0],region:G[1]}},Ii=S=>(S||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),Gt=()=>C.value&&b.value?`${C.value}-${b.value}`:"",Vs=(S,G)=>{const ne=C.value&&G?`${C.value}-${G}`:"";(!S||R.value===ne||R.value&&!R.value.includes(S))&&(R.value=""),_r(),B.value="",L.value=""},Us=()=>Je("CSP_LIST").split(",").map(S=>S.trim()).filter(Boolean),Qn=()=>Us().length>0,uo=S=>{const G=S.trim().toUpperCase(),ne=["REGION","CONNECTION_NAME","ZONE","IMAGE_ID","SPEC_ID","K8S_VERSION"];if(Qn()&&ne.includes(G)){const de=Ii(C.value);return de?`${de}_${G}`:G}return G},xt=S=>(Array.isArray(S)?S:[S]).map(ne=>uo(ne)).join(" / "),Ks=()=>Qn()?xt("IMAGE_ID"):xt(["IMAGE","IMAGE_ID"]),Gs=()=>Qn()?xt("SPEC_ID"):xt(["SPEC","SPEC_ID"]),Ft=S=>{const G=Ii(C.value);return G?Je(`${G}_${S}`):""},Ys=()=>{if(!(Mt.value||$t.value))return Zn[C.value.toLowerCase()]},pi=()=>Mt.value||$t.value?ki[C.value.toLowerCase()]:Ys(),dr=()=>{const S=pi();S&&(b.value=b.value||S.region,R.value=R.value||S.connectionName,B.value=B.value||S.zone,m.value=m.value||S.specId,y.value=y.value||S.imageId,L.value=L.value||S.k8sVersion||"")},co=()=>{if(!Qn())return;const S=pi(),G=fr(Ft("SPEC_ID")||Ft("IMAGE_ID"));b.value=Ft("REGION")||G.region||(S==null?void 0:S.region)||"",y.value=Ft("IMAGE_ID")||(S==null?void 0:S.imageId)||"",m.value=Ft("SPEC_ID")||(S==null?void 0:S.specId)||"",L.value=Ft("K8S_VERSION")||(S==null?void 0:S.k8sVersion)||"",R.value=Ft("CONNECTION_NAME")||(S==null?void 0:S.connectionName)||"",B.value=Ft("ZONE")||(S==null?void 0:S.zone)||""},pr=async()=>{Ve("NAMESPACE",x.value),Jn(),k.value="",U.value=[],await Promise.all([gi(),po()]),await kn(),await vi(),O.value&&await Fi()};Vn(()=>[W.projectInfo.ns_id,W.projectInfo.name],async()=>{if($.value!=="detail"||s.value.length===0)return;const S=t();if(s.value=i(s.value),!S||x.value===S)return;const G=x.value;if(x.value=S,!T.value){E=!!G;return}await pr()});const js=async()=>{b.value="",y.value="",m.value="",R.value="",B.value="",L.value="",co(),dr(),Jn(),await vr(),gt()},gr=()=>{gt()},ho=async()=>{So(),k.value="",U.value=[],O.value&&await Fi()},Xs=()=>{var G;const S=U.value.find(ne=>ne.value===k.value);S&&(Ve("SSH_HOST",S.value),Ve("DB_HOST",S.value),(G=S.meta)!=null&&G.sshUser&&Ve("SSH_USER",S.meta.sshUser))},Zs=async()=>{_r(),L.value="",await gi(),await kn(),await Oi(),await vi(),gt()},fo=()=>{gt()},Qs=()=>{gt()},Js=()=>{A.value=(A.value||"").trim(),gt()},qs=async()=>{ar.value=!0,y.value="",D.value=[],await kn(),gt()},ea=async()=>{await vr()},vr=async()=>{const S=w.value;w.value=!0;try{await ta(),await Ri(),dr(),await na(),Ni(),await mr(),await Di(),await Promise.all([gi(),po()]),await kn(),await Oi(),await vi(),O.value&&await Fi()}finally{await Qr(),w.value=S,gt()}},ta=async()=>{var G;const S=++ae;d.value=[];try{const{data:ne}=await ly();if(S!==ae)return;const de=Yt(ne);d.value=de.length>0?de:f.map(le=>({label:le,value:le}))}catch{if(S!==ae)return;d.value=f.map(de=>({label:de,value:de}))}S===ae&&(d.value.some(ne=>ne.value===C.value)||(C.value=((G=d.value[0])==null?void 0:G.value)||""))},Ri=async()=>{const S=++he;g.value=[];try{const{data:G}=await uy();if(S!==he)return;g.value=Yt(G),x.value||(x.value=ft())}catch{if(S!==he)return;g.value=[]}},na=async()=>{const S=++pe;_.value=[];try{const{data:G}=await cy(C.value);if(S!==pe)return;_.value=Yt(G)}catch{if(S!==pe)return;_.value=[]}},Ni=()=>{var G;if(_.value.length===0||b.value&&Rn(b.value,_.value))return;const S=Ft("REGION");if(S&&Rn(S,_.value)){b.value=S;return}b.value=((G=_.value[0])==null?void 0:G.value)||b.value},ia=(S=!1)=>{if(Y.value.length===0){R.value="";return}if(!S&&R.value&&Rn(R.value,Y.value))return;const G=Gt(),ne=Y.value.find(Se=>Se.value===G);if(S&&!ne){R.value=G;return}const de=ne||Y.value[0];R.value=(de==null?void 0:de.value)||"";const le=ra(R.value);!b.value&&le&&(b.value=le)},ra=S=>{const G=`${C.value}-`;return S!=null&&S.startsWith(G)?S.slice(G.length):""},kn=async()=>{const S=++_e;if(D.value=[],!m.value){y.value="";return}try{const G={providerName:C.value,regionName:b.value,connectionName:R.value||Gt(),matchedSpecId:m.value,isKubernetesImage:Mt.value?"true":void 0},{data:ne}=await pl(Co(),"image",G);if(S!==_e)return;D.value=Yt(ne,"image"),yo()}catch{if(S!==_e)return;D.value=[]}},gi=async()=>{const S=++De;P.value=[];try{const G={providerName:C.value,regionName:b.value,connectionName:R.value||Gt()},{data:ne}=await pl(Co(),"spec",G);if(S!==De)return;P.value=Yt(ne,"spec"),In()}catch{if(S!==De)return;P.value=[],In()}},mr=async()=>{const S=++je;Y.value=[];try{const G={providerName:C.value,regionName:b.value,filterVerified:"true"},{data:ne}=await Pc(G);if(S!==je)return;let de=Yt(ne),le=!1;if(de.length===0&&b.value){const Se=await Pc({providerName:C.value,filterVerified:"true"});if(S!==je)return;de=Yt(Se.data),le=!0}Y.value=de,ia(le)}catch{if(S!==je)return;Y.value=[]}},Di=async()=>{const S=++Oe;if(X.value=[],!(!$t.value||!C.value||!b.value))try{const{data:G}=await hy({providerName:C.value,regionName:b.value});if(S!==Oe)return;X.value=Yt(G,"k8sVersion"),oa()}catch{if(S!==Oe)return;X.value=[]}},oa=()=>{var ne,de;if(!$t.value||X.value.length===0||L.value&&Rn(L.value,X.value))return;const S=Qn()?Ft("K8S_VERSION"):Je("K8S_VERSION");if(S&&Rn(S,X.value)){L.value=S,gt();return}const G=(ne=pi())==null?void 0:ne.k8sVersion;if(G&&Rn(G,X.value)){L.value=G,gt();return}L.value=((de=X.value[0])==null?void 0:de.value)||L.value,gt()},Oi=async()=>{const S=++it;if(te.value=[],!m.value){K.value=!1;return}K.value=!0;try{const{data:G}=await fy({specId:m.value,providerName:C.value,regionName:b.value,connectionName:R.value||Gt()});if(S!==it)return;te.value=Yt(G),B.value&&!te.value.some(ne=>ne.value===B.value)&&(B.value=""),K.value=!1}catch{if(S!==it)return;te.value=[],K.value=!1}},vi=async()=>{const S=++lt;if(Z.value=[],J.value={},re.value={},!xn.value)return;const G=Je("OBJECT_STORAGE_NAMESPACE")||x.value||ft(),ne=C.value;if(!(!G||!ne))try{const{data:de}=await pl(G,"objectStorage",{providerName:ne});if(S!==lt)return;const le=(de==null?void 0:de.data)??de,Se=Array.isArray(le)?le:[],Xe={},rt={};Z.value=Se.map(Qe=>{const Bt=String((Qe==null?void 0:Qe.id)||(Qe==null?void 0:Qe.name)||"").trim();if(!Bt)return null;Xe[Bt]=String((Qe==null?void 0:Qe.cspResourceName)||"").trim();const sn=String((Qe==null?void 0:Qe.region)||"").trim();return rt[Bt]=sn,{label:Bt,value:Bt}}).filter(Qe=>Qe!==null),J.value=Xe,re.value=rt}catch{if(S!==lt)return;Z.value=[],J.value={},re.value={}}},po=async()=>{const S=++Yn;if(H.value=[],!!x.value)try{const{data:G}=await dy(x.value,{option:"simple"});if(S!==Yn)return;H.value=Yt(G)}catch{if(S!==Yn)return;H.value=[]}},Fi=async()=>{const S=++bt;if(U.value=[],!(!x.value||!O.value))try{const{data:G}=await py(x.value,O.value,{option:"accessinfo",accessInfoOption:"showSshKey"});if(S!==bt)return;U.value=bo(G)}catch{if(S!==bt)return;U.value=[]}},Yt=(S,G="default")=>{const ne=(S==null?void 0:S.data)??S,de=$r(ne),le=new Set;return de.map(Se=>{const Xe=sa(Se,G),rt=vo(Se,Xe,G),Qe=Pi(Se,Xe,rt,G);return{label:rt,value:Xe,searchText:Qe}}).filter(Se=>!Se.value||le.has(Se.value)?!1:(le.add(Se.value),!0)).sort(mi)};function go(S){return[...S].sort(mi)}function mi(S,G){const ne=(S.label||S.value||"").trim(),de=(G.label||G.value||"").trim(),le=ne.localeCompare(de,void 0,{numeric:!0,sensitivity:"base"});return le!==0?le:(S.value||"").localeCompare(G.value||"",void 0,{numeric:!0,sensitivity:"base"})}const sa=(S,G)=>{if(G==="k8sVersion")return String(on([S==null?void 0:S.id,S==null?void 0:S.version,S==null?void 0:S.value,S==null?void 0:S.name,S]));if(G==="spec"){const ne=on([S==null?void 0:S.specId,S==null?void 0:S.id,S==null?void 0:S.cspSpecId,S==null?void 0:S.cspSpecName,S==null?void 0:S.CspSpecName,S==null?void 0:S.specName,S==null?void 0:S.Name,S==null?void 0:S.VMSpecName,S==null?void 0:S.name]);return String(Sr(S,ne))}return String(on(G==="image"?[S==null?void 0:S.imageId,S==null?void 0:S.id,S==null?void 0:S.cspImageId,S==null?void 0:S.name]:[],[S==null?void 0:S.id,S==null?void 0:S.specId,S==null?void 0:S.imageId,S==null?void 0:S.configName,S==null?void 0:S.connectionName,S==null?void 0:S.providerName,S==null?void 0:S.provider,S==null?void 0:S.csp,S==null?void 0:S.cspName,S==null?void 0:S.nsId,S==null?void 0:S.name,S==null?void 0:S.infraId,S==null?void 0:S.regionName,S==null?void 0:S.RegionName,S==null?void 0:S.region,S==null?void 0:S.assignedRegion,S==null?void 0:S.zoneId,S==null?void 0:S.zoneName,S==null?void 0:S.zone,S==null?void 0:S.assignedZone,S]))},vo=(S,G,ne)=>{if(ne==="k8sVersion")return wr(G,Wi(G,[S==null?void 0:S.name,S==null?void 0:S.displayName,S==null?void 0:S.version,S==null?void 0:S.value]));if(ne==="image")return wr(G,Wi(G,[S==null?void 0:S.displayName,S==null?void 0:S.imageName,S==null?void 0:S.cspImageName,S==null?void 0:S.guestOS,S==null?void 0:S.GuestOS,S==null?void 0:S.guestOs,S==null?void 0:S.osDistribution,S==null?void 0:S.OSDistribution,S==null?void 0:S.osPlatform,S==null?void 0:S.OSPlatform,S==null?void 0:S.description,S==null?void 0:S.Description,S==null?void 0:S.name]));if(ne==="spec"){const le=Wi(G,[S==null?void 0:S.displayName,S==null?void 0:S.specName,S==null?void 0:S.cspSpecName,S==null?void 0:S.CspSpecName,S==null?void 0:S.Name,S==null?void 0:S.VMSpecName,S==null?void 0:S.description,S==null?void 0:S.Description,S==null?void 0:S.name])||br(S);return wr(G,le)}const de=on([S==null?void 0:S.name,S==null?void 0:S.id,S==null?void 0:S.configName,S==null?void 0:S.connectionName,S==null?void 0:S.providerName,S==null?void 0:S.provider,S==null?void 0:S.csp,S==null?void 0:S.cspName,S==null?void 0:S.nsId,S==null?void 0:S.infraId,S==null?void 0:S.specName,S==null?void 0:S.imageName,S==null?void 0:S.specId,S==null?void 0:S.imageId,S==null?void 0:S.regionName,S==null?void 0:S.RegionName,S==null?void 0:S.region,S==null?void 0:S.assignedRegion,S==null?void 0:S.zoneId,S==null?void 0:S.zoneName,S==null?void 0:S.zone,S==null?void 0:S.assignedZone,G]);return String(de)},Pi=(S,G,ne,de)=>{const le=on([S==null?void 0:S.providerName,S==null?void 0:S.provider,S==null?void 0:S.csp,S==null?void 0:S.cspName,C.value]),Se=on([S==null?void 0:S.regionName,S==null?void 0:S.RegionName,S==null?void 0:S.region,S==null?void 0:S.assignedRegion,b.value]),Xe=de==="image"?[S==null?void 0:S.displayName,S==null?void 0:S.imageName,S==null?void 0:S.cspImageName,S==null?void 0:S.guestOS,S==null?void 0:S.GuestOS,S==null?void 0:S.guestOs,S==null?void 0:S.osDistribution,S==null?void 0:S.OSDistribution,S==null?void 0:S.osPlatform,S==null?void 0:S.OSPlatform,S==null?void 0:S.description,S==null?void 0:S.Description]:[],rt=de==="spec"?[S==null?void 0:S.displayName,S==null?void 0:S.specName,S==null?void 0:S.cspSpecName,S==null?void 0:S.CspSpecName,S==null?void 0:S.Name,S==null?void 0:S.VMSpecName,S==null?void 0:S.description,S==null?void 0:S.Description,br(S)]:[],Qe=de==="k8sVersion"?[S==null?void 0:S.name,S==null?void 0:S.displayName,S==null?void 0:S.version,S==null?void 0:S.value]:[],Bt=yr([G,ne,S==null?void 0:S.id,S==null?void 0:S.name,S==null?void 0:S.imageId,S==null?void 0:S.specId,S==null?void 0:S.cspImageId,S==null?void 0:S.cspSpecId,S==null?void 0:S.configName,S==null?void 0:S.connectionName,S==null?void 0:S.infraId,S==null?void 0:S.regionName,S==null?void 0:S.RegionName,S==null?void 0:S.region,S==null?void 0:S.assignedRegion,...Xe,...rt,...Qe]),sn=yr(Bt.flatMap(tt=>[le&&Se?`${le}+${Se}+${tt}`:"",le&&Se?`${le}-${Se}-${tt}`:"",le&&Se?`${le} ${Se} ${tt}`:""]));return[...Bt,...sn].join(` -`)},yr=S=>{const G=new Set;return S.map(ne=>ne==null?"":String(ne).trim()).filter(ne=>!ne||G.has(ne)?!1:(G.add(ne),!0))},on=(...S)=>{for(const G of S)for(const ne of G){const de=ne==null?"":String(ne).trim();if(de)return de}return""},Wi=(S,G)=>{const ne=Pt(S);for(const de of G){const le=mo(de==null?"":String(de).trim(),S);if(le&&Pt(le)!==ne)return le}return""},mo=(S,G)=>!S||!G?S:S.replace(new RegExp(`\\s*\\(${Bi(G)}\\)\\s*$`),"").replace(new RegExp(`^${Bi(G)}\\s*/\\s*`),"").trim(),Bi=S=>S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),wr=(S,G)=>G?`${S} / ${G}`:S,br=S=>{var le;const G=on([S==null?void 0:S.vCpu,(le=S==null?void 0:S.VCpu)==null?void 0:le.Count,S==null?void 0:S.VCpu,S==null?void 0:S.num_vCPU]),ne=on([S==null?void 0:S.memoryGiB,S==null?void 0:S.mem_GiB,Cr(S==null?void 0:S.MemSizeMib)]),de=[];return G&&de.push(`${G} vCPU`),ne&&de.push(`${ne} GiB`),de.join(" / ")},Sr=(S,G)=>{if(!G)return"";if(G.includes("+"))return G;const ne=on([S==null?void 0:S.providerName,S==null?void 0:S.provider,S==null?void 0:S.csp,S==null?void 0:S.cspName,C.value]),de=on([S==null?void 0:S.regionName,S==null?void 0:S.RegionName,S==null?void 0:S.region,S==null?void 0:S.Region,S==null?void 0:S.assignedRegion,b.value]);return ne&&de?`${ne}+${de}+${G}`:G},Cr=S=>{const G=S==null?"":String(S).trim();if(!G)return"";const ne=Number(G);if(Number.isNaN(ne))return"";const de=ne/1024;return Number.isInteger(de)?String(de):de.toFixed(2)},In=()=>{!m.value||!wo(m.value)||(m.value="",gt())},_r=()=>{y.value="",m.value=""},yo=()=>{!y.value||D.value.length===0||Rn(y.value,D.value)||(y.value="",gt())},Rn=(S,G)=>{const ne=Pt(S);return G.some(de=>Pt(de.value)===ne||Pt(de.label)===ne||Pt(de.searchText).split(` -`).some(le=>le.trim()===ne))},wo=S=>{const G=Pt(S);if(!G)return!1;const ne=Pt(Gt()),de=Pt(R.value),le=Pt(b.value),Se=Pt(C.value);return G===ne||G===de||G===le||G===Se},Pt=S=>(S||"").trim().toLowerCase(),$r=S=>{if(Array.isArray(S))return S;if(!S||typeof S!="object")return[];const G=["ns","namespace","namespaces","namespaceList","provider","providers","providerList","connectionconfig","connConfig","connConfigs","connectionConfig","connectionConfigs","infra","infras","infraList","regions","region","regionList","availableZones","allVerifiedZones","zones","zoneList","availableK8sVersion","availableK8sVersions","k8sVersion","k8sVersions","versions","versionList","images","image","imageList","specs","spec","specList","idList","output","resources","resource","resourceList","items","list","result"];for(const ne of G)if(Array.isArray(S[ne]))return S[ne];for(const ne of Object.values(S)){const de=$r(ne);if(de.length>0)return de}return[]},bo=S=>{const G=(S==null?void 0:S.data)??S,ne=[];Ar(G,ne);const de=new Set;return ne.map(le=>{const Se=String((le==null?void 0:le.publicIP)??(le==null?void 0:le.publicIp)??(le==null?void 0:le.privateIP)??(le==null?void 0:le.privateIp)??(le==null?void 0:le.host)??""),Xe=String((le==null?void 0:le.nodeId)??(le==null?void 0:le.id)??(le==null?void 0:le.name)??""),rt=String((le==null?void 0:le.nodeUserName)??(le==null?void 0:le.userName)??(le==null?void 0:le.sshUser)??"");return{label:`${Xe?`${Xe} / `:""}${Se}`,value:Se,meta:{sshUser:rt,nodeId:Xe}}}).filter(le=>!le.value||de.has(le.value)?!1:(de.add(le.value),!0)).sort(mi)},Ar=(S,G)=>{if(Array.isArray(S)){S.forEach(de=>Ar(de,G));return}if(!S||typeof S!="object")return;(S.publicIP||S.publicIp||S.privateIP||S.privateIp||S.host)&&G.push(S),Object.values(S).forEach(de=>Ar(de,G))},Je=S=>{var G;return((G=s.value.find(ne=>{var de;return((de=ne.paramKey)==null?void 0:de.toUpperCase())===S.toUpperCase()}))==null?void 0:G.paramValue)||""},yi=S=>s.value.some(G=>{var ne;return((ne=G.paramKey)==null?void 0:ne.trim().toUpperCase())===S.toUpperCase()}),So=()=>{Ve("INFRA_ID",O.value),($t.value||yi("K8S_CLUSTER_ID"))&&Ve("K8S_CLUSTER_ID",O.value)},ft=()=>x.value||Je("NAMESPACE")||W.projectInfo.ns_id||"",Co=()=>x.value||ft()||"system",Jn=()=>{const S=x.value||ft();if(S&&yi("OBJECT_STORAGE_NAMESPACE")&&Ve("OBJECT_STORAGE_NAMESPACE",S),!xn.value)return;C.value&&yi("OBJECT_STORAGE_PROVIDER")&&Ve("OBJECT_STORAGE_PROVIDER",C.value);const G=re.value[A.value]||b.value;G&&yi("OBJECT_STORAGE_REGION")&&Ve("OBJECT_STORAGE_REGION",G)},gt=()=>{if(!Tn.value)return;const S=x.value||ft();if(S&&Ve("NAMESPACE",S),Ve("PROVIDER",C.value),Ve("CSP",C.value),Qn()){const G=Ii(C.value);G&&(Ve(`${G}_REGION`,b.value),Ve(`${G}_CONNECTION_NAME`,R.value||Gt()),Ve(`${G}_ZONE`,B.value),Ve(`${G}_IMAGE_ID`,y.value),Ve(`${G}_SPEC_ID`,m.value),$t.value&&Ve(`${G}_K8S_VERSION`,L.value));return}Ve("REGION",b.value),Ve("CONNECTION_NAME",R.value||Gt()),Ve("ZONE",B.value),Ve("IMAGE",y.value),Ve("IMAGE_ID",y.value),Ve("SPEC",m.value),Ve("SPEC_ID",m.value),$t.value&&Ve("K8S_VERSION",L.value),Jn(),xn.value&&A.value&&yi("OBJECT_STORAGE_BUCKET")&&Ve("OBJECT_STORAGE_BUCKET",A.value)},Er=()=>{s.value=s.value.filter(S=>{var ne;const G=((ne=S.paramKey)==null?void 0:ne.trim().toUpperCase())||"";return jn.includes(G)?!1:!jn.some(de=>G.endsWith(`_${de}`))}),y.value="",m.value="",b.value="",R.value="",B.value="",L.value=""},qn=(S,G)=>{var ne;return G?((ne=S.find(de=>de.value===G))==null?void 0:ne.label)||G:""},_o=()=>{var S;return((S=C.value)==null?void 0:S.trim().toLowerCase())==="alibaba"?"cloud_essd":"default"},aa=()=>{var S,G;return((G=ki[(S=C.value)==null?void 0:S.trim().toLowerCase()])==null?void 0:G.k8sVersion)||"1.33"},$o=S=>{const G=typeof S=="string"?S:S==null?void 0:S.workflowStageName;if(!G)return;const ne=c.workflowName||"workflow",de=`${ne}-infra`,le=`${ne}-cluster`,Se=`${ne}-bucket`,Xe=typeof S=="string"?[]:(S==null?void 0:S.defaultParams)||[],rt={"infra-create":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:de,eventListenerYn:"N"},{paramKey:"REGION",paramValue:b.value,eventListenerYn:"N"},{paramKey:"CONNECTION_NAME",paramValue:Gt(),eventListenerYn:"N"},{paramKey:"ZONE",paramValue:"",eventListenerYn:"N"},{paramKey:"IMAGE",paramValue:y.value,eventListenerYn:"N"},{paramKey:"IMAGE_ID",paramValue:y.value,eventListenerYn:"N"},{paramKey:"SPEC",paramValue:m.value,eventListenerYn:"N"},{paramKey:"SPEC_ID",paramValue:m.value,eventListenerYn:"N"},{paramKey:"SSH_USER",paramValue:"cb-user",eventListenerYn:"N"},{paramKey:"INFRA_ACCESS_INFO_MAX_ATTEMPTS",paramValue:"30",eventListenerYn:"N"},{paramKey:"INFRA_ACCESS_INFO_INTERVAL_SECONDS",paramValue:"10",eventListenerYn:"N"}],"multi-csp-vm-delete":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:"multi-csp-vm",eventListenerYn:"N"},{paramKey:"INFRA_PREFIX",paramValue:"multi-csp-vm",eventListenerYn:"N"},{paramKey:"INFRA_ID_LIST",paramValue:"",eventListenerYn:"N"},{paramKey:"INFRA_DELETE_OPTION",paramValue:"terminate",eventListenerYn:"N"}],"k8s-cluster-create":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"PROVIDER",paramValue:C.value,eventListenerYn:"N"},{paramKey:"CSP",paramValue:C.value,eventListenerYn:"N"},{paramKey:"REGION",paramValue:b.value,eventListenerYn:"N"},{paramKey:"CONNECTION_NAME",paramValue:Gt(),eventListenerYn:"N"},{paramKey:"K8S_CLUSTER_ID",paramValue:le,eventListenerYn:"N"},{paramKey:"K8S_NODEGROUP_NAME",paramValue:"ng1",eventListenerYn:"N"},{paramKey:"IMAGE",paramValue:y.value,eventListenerYn:"N"},{paramKey:"IMAGE_ID",paramValue:y.value,eventListenerYn:"N"},{paramKey:"SPEC",paramValue:m.value,eventListenerYn:"N"},{paramKey:"SPEC_ID",paramValue:m.value,eventListenerYn:"N"},{paramKey:"K8S_VERSION",paramValue:L.value||aa(),eventListenerYn:"N"},{paramKey:"K8S_DESIRED_NODE_SIZE",paramValue:"1",eventListenerYn:"N"},{paramKey:"K8S_MIN_NODE_SIZE",paramValue:"1",eventListenerYn:"N"},{paramKey:"K8S_MAX_NODE_SIZE",paramValue:"3",eventListenerYn:"N"},{paramKey:"ROOT_DISK_TYPE",paramValue:_o(),eventListenerYn:"N"},{paramKey:"ROOT_DISK_SIZE",paramValue:"30",eventListenerYn:"N"},{paramKey:"K8S_NODEGROUP_CREATE_IF_MISSING",paramValue:"true",eventListenerYn:"N"},{paramKey:"K8S_STATUS_MAX_ATTEMPTS",paramValue:"60",eventListenerYn:"N"},{paramKey:"K8S_STATUS_INTERVAL_SECONDS",paramValue:"60",eventListenerYn:"N"},{paramKey:"K8S_READY_STATUS",paramValue:"Active,Running",eventListenerYn:"N"}],"k8s-kubeconfig-get":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"K8S_CLUSTER_ID",paramValue:Je("K8S_CLUSTER_ID")||le,eventListenerYn:"N"},{paramKey:"K8S_KUBECONFIG_MAX_ATTEMPTS",paramValue:"30",eventListenerYn:"N"},{paramKey:"K8S_KUBECONFIG_INTERVAL_SECONDS",paramValue:"10",eventListenerYn:"N"},{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"}],"app-deploy-helm":[{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"HELM_REPO_NAME",paramValue:"groundhog2k",eventListenerYn:"N"},{paramKey:"HELM_REPO_URL",paramValue:"https://groundhog2k.github.io/helm-charts",eventListenerYn:"N"},{paramKey:"HELM_CHART",paramValue:"groundhog2k/mariadb",eventListenerYn:"N"},{paramKey:"HELM_CHART_VERSION",paramValue:"4.5.0",eventListenerYn:"N"},{paramKey:"HELM_RECREATE_ON_IMMUTABLE_ERROR",paramValue:"true",eventListenerYn:"N"},{paramKey:"K8S_API_READY_MAX_ATTEMPTS",paramValue:"360",eventListenerYn:"N"},{paramKey:"K8S_API_READY_INTERVAL_SECONDS",paramValue:"10",eventListenerYn:"N"},{paramKey:"K8S_NODE_READY_MIN_COUNT",paramValue:"1",eventListenerYn:"N"},{paramKey:"HELM_VALUES_ARGS",paramValue:"--set settings.rootPassword.value=mariadb_pass --set userDatabase.name.value=testdb --set userDatabase.user.value=mariadb_user --set userDatabase.password.value=mariadb_pass --wait --timeout 10m",eventListenerYn:"N"},{paramKey:"DB_EXEC_MODE",paramValue:"k8s",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"app-deploy-manifest":[{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"K8S_MANIFEST",paramValue:"",eventListenerYn:"N"}],"app-deploy-status-check":[{paramKey:"KUBECONFIG_CONTENT",paramValue:"",eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"DEPLOYMENT_NAME",paramValue:"",eventListenerYn:"N"},{paramKey:"ROLLOUT_TIMEOUT",paramValue:"300s",eventListenerYn:"N"}],"mariadb-install":[{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:de,eventListenerYn:"N"},{paramKey:"DB_EXEC_MODE",paramValue:"ssh",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"SSH_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"SSH_USER",paramValue:"cb-user",eventListenerYn:"N"},{paramKey:"SSH_KEY_FILE",paramValue:"",eventListenerYn:"N"}],"db-backup-import":[{paramKey:"DB_EXEC_MODE",paramValue:"auto",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"DB_BACKUP_FILE",paramValue:"schema.sql",eventListenerYn:"N"},{paramKey:"SCHEMA_SQL_CONTENT",paramValue:qc,eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"db-schema-import":[{paramKey:"DB_EXEC_MODE",paramValue:"auto",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"SCHEMA_SQL_FILE",paramValue:"schema.sql",eventListenerYn:"N"},{paramKey:"SCHEMA_SQL_CONTENT",paramValue:qc,eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"db-data-insert":[{paramKey:"DB_EXEC_MODE",paramValue:"auto",eventListenerYn:"N"},{paramKey:"DB_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"DB_PORT",paramValue:"3306",eventListenerYn:"N"},{paramKey:"DB_NAME",paramValue:"testdb",eventListenerYn:"N"},{paramKey:"DB_USER",paramValue:"mariadb_user",eventListenerYn:"N"},{paramKey:"DB_PASSWORD",paramValue:"mariadb_pass",eventListenerYn:"N"},{paramKey:"INSERT_SQL",paramValue:g0,eventListenerYn:"N"},{paramKey:"KUBE_NAMESPACE",paramValue:"default",eventListenerYn:"N"},{paramKey:"RELEASE_NAME",paramValue:"mariadb",eventListenerYn:"N"},{paramKey:"DB_POD_SELECTOR",paramValue:"app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb",eventListenerYn:"N"}],"object-storage-ensure":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_BUCKET",paramValue:Se,eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_PROVIDER",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_REGION",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_READY_MAX_ATTEMPTS",paramValue:"30",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_READY_INTERVAL_SECONDS",paramValue:"5",eventListenerYn:"N"}],"object-storage-delete":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_DELETE_ENABLED",paramValue:"true",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_BUCKET",paramValue:Se,eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_PROVIDER",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_REGION",paramValue:"",eventListenerYn:"N"}],"jupyter-inbound-rule-add":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:de,eventListenerYn:"N"},{paramKey:"JUPYTER_BIND_HOST",paramValue:"0.0.0.0",eventListenerYn:"N"},{paramKey:"JUPYTER_PORT",paramValue:"8888",eventListenerYn:"N"},{paramKey:"JUPYTER_ALLOWED_CIDR",paramValue:"0.0.0.0/0",eventListenerYn:"N"}],"jupyter-inbound-rule-remove":[{paramKey:"TUMBLEBUG",paramValue:"http://mc-infra-manager:1323",eventListenerYn:"N"},{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:de,eventListenerYn:"N"},{paramKey:"JUPYTER_PORT",paramValue:"8888",eventListenerYn:"N"},{paramKey:"JUPYTER_ALLOWED_CIDR",paramValue:"0.0.0.0/0",eventListenerYn:"N"}],"jupyter-object-storage-analysis-remove":[{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"INFRA_ID",paramValue:de,eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"}],"jupyter-object-storage-analysis-install":[{paramKey:"USER",paramValue:"default",eventListenerYn:"N"},{paramKey:"USERPASS",paramValue:"default",eventListenerYn:"N"},{paramKey:"NAMESPACE",paramValue:ft(),eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_PROVIDER",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_BUCKET",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_NAMESPACE",paramValue:"",eventListenerYn:"N"},{paramKey:"OBJECT_STORAGE_REGION",paramValue:"",eventListenerYn:"N"},{paramKey:"PRESIGNED_URL_EXPIRES",paramValue:"600",eventListenerYn:"N"},{paramKey:"SSH_HOST",paramValue:"",eventListenerYn:"N"},{paramKey:"SSH_USER",paramValue:"cb-user",eventListenerYn:"N"},{paramKey:"SSH_KEY_FILE",paramValue:"",eventListenerYn:"N"},{paramKey:"DATA_PREFIX",paramValue:"",eventListenerYn:"N"},{paramKey:"RESULT_PREFIX",paramValue:"results",eventListenerYn:"N"},{paramKey:"WRITE_RESULT_ENABLED",paramValue:"true",eventListenerYn:"N"},{paramKey:"JUPYTER_IMAGE",paramValue:"quay.io/jupyter/scipy-notebook:2025-03-14",eventListenerYn:"N"},{paramKey:"DUCKDB_VERSION",paramValue:"1.3.2",eventListenerYn:"N"},{paramKey:"JUPYTER_BIND_HOST",paramValue:"0.0.0.0",eventListenerYn:"N"},{paramKey:"JUPYTER_PORT",paramValue:"8888",eventListenerYn:"N"}]},Qe=(sn,tt)=>{const jt=Je(sn);switch(sn.trim().toUpperCase()){case"NAMESPACE":return ft()||tt;case"PROVIDER":case"CSP":return C.value||tt;case"REGION":return b.value||tt;case"CONNECTION_NAME":return jt||R.value||Gt()||tt;case"ZONE":return B.value||jt||tt;case"IMAGE":case"IMAGE_ID":return y.value||tt;case"SPEC":case"SPEC_ID":return m.value||tt;case"K8S_VERSION":return L.value||jt||tt;case"ROOT_DISK_TYPE":return(G||"").trim().toLowerCase()==="k8s-cluster-create"?_o():jt||tt;case"INFRA_ID":return jt||tt||de;case"K8S_CLUSTER_ID":return jt||tt||le;case"SSH_HOST":case"DB_HOST":return k.value||jt||tt;default:return tt}};(Xe.length>0?Xe:rt[G]||[]).forEach(sn=>{var jt;const tt=(jt=sn.paramKey)==null?void 0:jt.trim().toUpperCase();tt&&Ve(tt,Qe(tt,sn.paramValue||""),sn.eventListenerYn,!1)})};Vn(()=>a.value.map(S=>S.workflowStageName).filter(Boolean).join("|"),()=>{a.value.filter(S=>!!S.workflowStageName).forEach(S=>$o(S))}),Vn(xn,async S=>{S&&(Jn(),await vi())});const Ve=(S,G,ne="N",de=!0)=>{if(!S)return;const le=S.trim().toUpperCase(),Se=s.value.find(Xe=>{var rt;return((rt=Xe.paramKey)==null?void 0:rt.trim().toUpperCase())===le});if(Se){(de||!Se.paramValue)&&(Se.paramValue=G),Se.eventListenerYn=Se.eventListenerYn||ne;return}s.value.push({paramIdx:0,paramKey:le,paramValue:G,eventListenerYn:ne})},Be=we(!1),ze=we(""),Lr=S=>(S||"").trim(),la=()=>{const S=Lr(c.workflowName);Be.value=!!(S&&S===ze.value)},ua=async S=>{const G=Lr(S);if(!G){I.error("Please enter Workflow Name.");return}const{data:ne}=await vy(G);ne?(I.error("Name is already in use."),Be.value=!1):(I.success("Name is available."),Be.value=!0,ze.value=G)},Ao=we([]),ca={deploy:"For Deployment",run:"For Execution",test:"For Testing",webhook:"For Webhook",clean:"For Cleanup"},Eo=S=>ca[S||""]||S||"",Lo=()=>{Ao.value=[{name:"For Deployment",value:"For Deployment"},{name:"For Execution",value:"For Execution"},{name:"For Testing",value:"For Testing"},{name:"For Webhook",value:"For Webhook"},{name:"For Cleanup",value:"For Cleanup"}]},Mo=we(""),vt=async()=>{try{const{data:S}=await iy("JENKINS");S&&c&&($.value==="new"?(c.ossIdx=S?S[0].ossIdx:"No OSS information",Mo.value=S?S[0].ossUrl:"NULL"):S.forEach(G=>{G.ossIdx===c.ossIdx&&(Mo.value=G.ossUrl)}))}catch(S){console.log(S)}},Mr=async()=>{if(!c.workflowName){I.error("Please enter Workflow Name.");return}if(!Be.value||ze.value!==Lr(c.workflowName)){I.error("Please perform duplicate check for the name.");return}if(!c.workflowPurpose){I.error("Please select Purpose.");return}if(!a.value||a.value.length===0){I.error("Please create Pipeline script.");return}xr()&&($.value==="new"?await Nn():await xo())},Nn=async()=>{const S={workflowInfo:{...c},workflowParams:[...s.value],workflowStageMappings:[...a.value]},{data:G}=await my(S);G?(I.success("Registered successfully."),v.push("/web/workflows/workflow/list")):I.error("Failed to register.")},xo=async()=>{const S={workflowInfo:{...c},workflowParams:[...s.value],workflowStageMappings:[...a.value]},{data:G}=await yy(S);G?(I.success("Updated successfully."),v.push("/web/workflows/workflow/list")):I.error("Failed to update.")},xr=()=>(Wt(),Io()?(ko(),$.value=="new"&&To(),!0):!1),Wt=()=>{let S="";a.value.forEach(G=>{S+=G.stageContent,G.isDefaultScript||(S+=` -`)}),c={...c,workflowPurpose:Eo(c.workflowPurpose),script:S}},To=()=>{delete c.workflowIdx},ko=()=>{s.value.forEach(S=>{delete S.paramIdx})},Io=()=>{var ne;const S=new Set,G=[];for(const de of s.value){const le=(ne=de.paramKey)==null?void 0:ne.trim();if(!le)continue;const Se=le.toUpperCase();if(S.has(Se))return I.error(`Duplicate parameter key: ${Se}`),!1;S.add(Se),G.push({...de,paramKey:Se,paramValue:de.paramValue??"",eventListenerYn:de.eventListenerYn||"N"})}return s.value=G,!0},Ro=()=>{v.push("/web/workflows/workflow/list")},No=()=>{v.push("/web/workflows/workflow/list")},Tr=()=>{a.value=[]},Tt=async()=>{if(c.workflowName===""){I.error("Please enter workflow name.");return}else if(!c.workflowPurpose){I.error("Please select purpose.");return}await kt(c.workflowName)},ha=["DEFAULT_START","DEFAULT_END"],kt=async S=>{try{Tr();const{data:G}=await wy(S),ne=G||[];ne.forEach((de,le)=>{de.isDefaultScript=!0,de.defaultScriptTag=ha[le]}),a.value=[...ne]}catch(G){a.value=[],I.error(String(G))}},fa=S=>{a.value.splice(a.value.length-1,0,S),$o(S)};return(S,G)=>(Te(),Ie("div",null,[se("div",bb,[se("div",Sb,[se("div",Cb,[se("h2",_b,qe($.value==="new"?"New":"Detail")+" Workflow",1)])])]),se("div",$b,[pt(c)&&s.value&&a.value?(Te(),Ie("div",Ab,[se("div",Eb,[se("div",Lb,[G[16]||(G[16]=se("label",{class:"form-label required"}," Workflow Name ",-1)),se("div",Mb,[ms(se("input",{type:"text",ref:"workflowName",class:"form-control p-2 g-col-11",placeholder:"Enter the workflow name","onUpdate:modelValue":G[0]||(G[0]=ne=>pt(c).workflowName=ne),onInput:la},null,544),[[Jm,pt(c).workflowName]]),Be.value?(Te(),Ie("button",xb,"Duplicate Check")):(Te(),Ie("button",{key:0,class:"btn btn-primary chk",onClick:G[1]||(G[1]=ne=>ua(pt(c).workflowName)),style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),se("div",Tb,[G[18]||(G[18]=se("label",{class:"form-label required"},"Purpose",-1)),se("div",kb,[ms(se("select",{ref:"workflowPurpose","onUpdate:modelValue":G[2]||(G[2]=ne=>pt(c).workflowPurpose=ne),class:"form-select p-2 g-col-12"},[G[17]||(G[17]=se("option",{value:""},"Select Workflow Purpose.",-1)),(Te(!0),Ie(Cn,null,ci(Ao.value,(ne,de)=>(Te(),Ie("option",{value:ne.value,key:de},qe(ne.name),9,Ib))),128))],512),[[qm,pt(c).workflowPurpose]])])]),lo.value?(Te(),Ie("div",Rb,[se("div",Nb,[G[19]||(G[19]=se("label",{class:"form-label mb-0"},"Tumblebug Parameter Selection",-1)),se("label",Db,[ms(se("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":G[3]||(G[3]=ne=>Tn.value=ne)},null,512),[[Oc,Tn.value]]),se("span",Ob,qe(Tn.value?"Enabled":"Disabled"),1)])])])):pn("",!0),Hs.value?(Te(),Ie("div",Fb,[se("div",Pb,[se("div",Wb,[se("label",Bb,[se("code",null,qe(xt("NAMESPACE")),1),G[20]||(G[20]=se("span",null,"Namespace",-1))]),ht(bn,{modelValue:x.value,"onUpdate:modelValue":G[4]||(G[4]=ne=>x.value=ne),options:g.value,placeholder:"Namespace",title:qn(g.value,x.value),"allow-custom":"",onChange:pr},null,8,["modelValue","options","title"])]),se("div",Hb,[se("label",zb,[se("code",null,qe(xt(["PROVIDER","CSP"])),1),G[21]||(G[21]=se("span",null,"CSP",-1))]),ht(bn,{modelValue:C.value,"onUpdate:modelValue":G[5]||(G[5]=ne=>C.value=ne),options:d.value,placeholder:"CSP",onChange:js},null,8,["modelValue","options"])]),se("div",Vb,[se("label",Ub,[se("code",null,qe(xt("REGION")),1),G[22]||(G[22]=se("span",null,"Region",-1))]),ht(bn,{modelValue:b.value,"onUpdate:modelValue":G[6]||(G[6]=ne=>b.value=ne),options:_.value,placeholder:"Region",onChange:gr},null,8,["modelValue","options"])])]),se("div",Kb,[se("div",Gb,[se("label",Yb,[se("code",null,qe(Gs()),1),G[23]||(G[23]=se("span",null,"VM/K8s Spec",-1))]),ht(bn,{modelValue:m.value,"onUpdate:modelValue":G[7]||(G[7]=ne=>m.value=ne),options:P.value,placeholder:"VM/K8s Spec",title:qn(P.value,m.value),onChange:gr},null,8,["modelValue","options","title"])]),se("div",jb,[se("label",Xb,[se("code",null,qe(Ks()),1),se("span",Zb,[G[25]||(G[25]=se("span",null,"Image",-1)),se("span",Qb,[ms(se("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":G[8]||(G[8]=ne=>Mt.value=ne),onChange:qs},null,544),[[Oc,Mt.value]]),G[24]||(G[24]=se("span",{class:"form-check-label"},"K8s",-1))])])]),ht(bn,{modelValue:y.value,"onUpdate:modelValue":G[9]||(G[9]=ne=>y.value=ne),options:D.value,placeholder:m.value?Mt.value?"K8s Image":"Image":"Select Spec first",title:qn(D.value,y.value),onChange:gr},null,8,["modelValue","options","placeholder","title"])])]),se("div",Jb,[se("div",qb,[se("label",e0,[se("code",null,qe(xt("INFRA_ID")),1),G[26]||(G[26]=se("span",null,"Existing Infra",-1))]),ht(bn,{modelValue:O.value,"onUpdate:modelValue":G[10]||(G[10]=ne=>O.value=ne),options:H.value,placeholder:"Infra ID",title:qn(H.value,O.value),"allow-custom":"",onChange:ho},null,8,["modelValue","options","title"])]),se("div",t0,[se("label",n0,[se("code",null,qe(xt(["SSH_HOST","DB_HOST"])),1),G[27]||(G[27]=se("span",null,"SSH/DB Host",-1))]),ht(bn,{modelValue:k.value,"onUpdate:modelValue":G[11]||(G[11]=ne=>k.value=ne),options:U.value,placeholder:"SSH/DB Host",onChange:Xs},null,8,["modelValue","options"])]),se("div",{class:"tumblebug-param-field g-col-2"},[G[28]||(G[28]=se("label",{class:"tumblebug-param-label tumblebug-param-action-label"},[se("span",null,"Reload")],-1)),se("button",{class:"btn btn-outline-primary w-100",onClick:ea}," Refresh ")])]),se("div",i0,[se("div",{class:Ms(["tumblebug-param-field",$t.value?"g-col-4":"g-col-6"])},[se("label",r0,[se("code",null,qe(xt("CONNECTION_NAME")),1),G[29]||(G[29]=se("span",null,"Connection Config",-1))]),ht(bn,{modelValue:R.value,"onUpdate:modelValue":G[12]||(G[12]=ne=>R.value=ne),options:Y.value,placeholder:"Connection Config",onChange:Zs},null,8,["modelValue","options"])],2),se("div",{class:Ms(["tumblebug-param-field",$t.value?"g-col-4":"g-col-6"])},[se("label",o0,[se("code",null,qe(xt("ZONE")),1),G[30]||(G[30]=se("span",null,"Zone",-1))]),ht(bn,{modelValue:B.value,"onUpdate:modelValue":G[13]||(G[13]=ne=>B.value=ne),options:di.value,placeholder:hr.value,onChange:fo},null,8,["modelValue","options","placeholder"])],2),$t.value?(Te(),Ie("div",s0,[se("label",a0,[se("code",null,qe(xt("K8S_VERSION")),1),G[31]||(G[31]=se("span",null,"K8s Version",-1))]),ht(bn,{modelValue:L.value,"onUpdate:modelValue":G[14]||(G[14]=ne=>L.value=ne),options:X.value,placeholder:"K8s Version",title:qn(X.value,L.value),onChange:Qs},null,8,["modelValue","options","title"])])):pn("",!0)]),xn.value?(Te(),Ie("div",l0,[se("div",u0,[se("label",c0,[se("code",null,qe(xt("OBJECT_STORAGE_BUCKET")),1),G[32]||(G[32]=se("span",null,"Bucket Name",-1))]),ht(bn,{modelValue:A.value,"onUpdate:modelValue":G[15]||(G[15]=ne=>A.value=ne),options:Z.value,placeholder:"Bucket Name",title:qn(Z.value,A.value),"allow-custom":"",onChange:Js},null,8,["modelValue","options","title"]),A.value?(Te(),Ie("small",h0,[J.value[A.value]?(Te(),Ie(Cn,{key:0},[Fc(" CSP bucket: "+qe(J.value[A.value]),1)],64)):(Te(),Ie(Cn,{key:1},[Fc(" Not registered yet. The run creates it and resolves the CSP bucket name. ")],64))])):pn("",!0)])])):pn("",!0)])):pn("",!0),ht(Zw,{mode:$.value,"workflow-stage-mappings-form-data":a.value,onInitWorkflowStageMappings:Tr,onOnClickCreateScript:Tt,onSpliceWorkflowStageMappingsFormData:fa},null,8,["mode","workflow-stage-mappings-form-data"]),ht(gy,{popup:!1,"workflow-param-data":s.value,"event-listener-yn":"N"},null,8,["workflow-param-data"]),ht(wb,{"workflow-idx":pt(c).workflowIdx,"workflow-name":pt(c).workflowName},null,8,["workflow-idx","workflow-name"]),se("div",f0,[G[33]||(G[33]=se("div",{id:"gap",class:"col"},null,-1)),se("div",d0,[se("div",p0,[se("button",{class:"btn btn-primary",onClick:Mr},qe($.value==="new"?"Regist":"Edit"),1),se("button",{class:"btn btn-secondary",onClick:No}," Go Back "),se("button",{class:"btn btn-right border",onClick:Ro}," To List ")])])])])])):pn("",!0)],512)]))}}),C0=ro(v0,[["__scopeId","data-v-414f7597"]]);export{C0 as default}; diff --git a/src/main/resources/static/assets/WorkflowList-Bz6FHGJQ.js b/src/main/resources/static/assets/WorkflowList-DCqydMLr.js similarity index 98% rename from src/main/resources/static/assets/WorkflowList-Bz6FHGJQ.js rename to src/main/resources/static/assets/WorkflowList-DCqydMLr.js index 3f5d997..0d26eda 100644 --- a/src/main/resources/static/assets/WorkflowList-Bz6FHGJQ.js +++ b/src/main/resources/static/assets/WorkflowList-DCqydMLr.js @@ -1,4 +1,4 @@ -import{_ as Re}from"./TableHeader.vue_vue_type_script_setup_true_lang-l3eqvMpD.js";import{_ as $e}from"./request-1ziJwdRS.js";import{e as Oe,d as We,g as xe,P as Ae,r as De,a as Me,b as Ge,c as Fe,f as Ve}from"./SearchableSelect-uzEoHd_d.js";import{d as Q,u as ee,a as $,b as s,t as K,h as E,l as Te,c as ae,r as S,w as Ie,o as se,m as re,j as z,n as Be,p as be,q as Ke,M as ye,s as Ne,x as ze,F as je,f as Ue,y as _e,i as B,z as qe}from"./index-DhGk3pPk.js";import{T as He}from"./TumblebugParamSelector-CLgObYff.js";import{_ as Ze}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Ye={class:"modal modal-blur fade",id:"deleteWorkflow",tabindex:"-1","aria-hidden":"true"},Xe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Je={class:"modal-content"},Qe={class:"modal-body py-4"},et={class:"modal-footer"},tt=Q({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=F,C=x,N=async()=>{const{data:v}=await Oe(L.workflowIdx);if(v){p.error("Workflows linked to an Event Listener cannot be deleted."),C("get-workflow-list");return}const{data:l}=await We(L.workflowIdx);l?p.success("Deleted successfully."):p.error("Failed to delete."),C("get-workflow-list")};return(v,l)=>(E(),$("div",Ye,[s("div",Xe,[s("div",Je,[l[2]||(l[2]=s("div",{class:"modal-status bg-danger"},null,-1)),l[3]||(l[3]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Delete Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),s("div",Qe,[s("h4",null,"Are you sure you want to delete "+K(L.workflowName)+"?",1)]),s("div",et,[l[1]||(l[1]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:l[0]||(l[0]=h=>N())}," Delete ")])])])]))}}),ot={class:"modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable",role:"document"},at={class:"modal-content"},st={key:0,class:"run-progress"},rt={class:"d-flex align-items-center justify-content-between mb-2"},nt={class:"text-muted"},lt={class:"text-muted"},it={class:"progress"},ct=["aria-valuenow"],ut={class:"modal-body py-4"},dt={key:0,class:"d-flex justify-content-center py-4"},ft={class:"modal-footer"},mt=["aria-disabled"],wt=Q({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=Te(),C=F,N=x,v=ae(()=>C.workflowIdx),l=S({}),h=S(!1),_=S(!1),I=S(),w=S({active:!1,completed:0,total:0,message:""}),D=ae(()=>w.value.total?Math.min(100,Math.round(w.value.completed/w.value.total*100)):0);Ie(()=>v.value,async()=>{var e;(e=I.value)!=null&&e.classList.contains("show")&&await k()}),se(()=>{var e;(e=I.value)==null||e.addEventListener("show.bs.modal",M)}),re(()=>{var e;(e=I.value)==null||e.removeEventListener("show.bs.modal",M)});const M=async()=>{await k()},k=async()=>{if(!v.value){l.value={};return}_.value=!0;try{const{data:e}=await xe(v.value,"N");V(e),l.value=e}catch(e){console.log(e),p.error("Failed to load workflow run parameters.")}finally{_.value=!1}},V=e=>{var a;const t=(L.projectInfo.ns_id||L.projectInfo.name||"").trim();if(!t)return;const o=(a=e.workflowParams)==null?void 0:a.find(n=>{var f;return((f=n.paramKey)==null?void 0:f.trim().toUpperCase())==="NAMESPACE"});o&&(o.paramValue=t)},j=async()=>{if(!(h.value||_.value)){if(!l.value.workflowInfo){p.error("Failed to load workflow run parameters.");return}h.value=!0;try{if(await T(),!await he()||!await m())return;await d("Requesting workflow run");const{data:e}=await De(A());await b("Workflow run request completed"),e?(p.success("Workflow run request has been submitted."),O()):p.error("Failed to process workflow run request."),N("get-workflow-list")}catch(e){console.log(e),p.error("Failed to process workflow run request.")}finally{h.value=!1,u()}}},A=()=>{const e=l.value.workflowInfo;return{workflowInfo:{workflowIdx:e==null?void 0:e.workflowIdx},workflowParams:[...l.value.workflowParams||[]],workflowStageMappings:[]}},O=()=>{var e;I.value&&((e=ye.getInstance(I.value))==null||e.hide())},T=async()=>{w.value={active:!0,completed:0,total:i(),message:"Preparing pre-run validation"},await c()},u=()=>{w.value.active=!1},d=async e=>{w.value.message=e,await c()},b=async e=>{w.value.completed=Math.min(w.value.completed+1,w.value.total),w.value.message=e,await c()},c=async()=>{await Ne(),await new Promise(e=>{window.requestAnimationFrame(()=>e())})},i=()=>{const e=Y(),t=ie(e),o=ce(e),a=Math.max(1,ue().length),n=a*Number(t)+a*Number(o),f=P()&&G()?1:0;return Math.max(1,n+f+1)},m=async()=>{if(!P())return!0;const e=G();if(!e)return!0;try{await d("Running infra pre-run validation");const{data:t}=await Me(ge(),e);return await b("Infra pre-run validation completed"),q(t)?(p.error(`Infra pre-run validation failed: ${H(t)}`),!1):!0}catch(t){return console.log(t),p.error("Failed to process infra pre-run validation request."),!1}},P=()=>{const e=Y();return e.includes("infra-create")||e.includes("multi-csp-vm-deploy")},G=()=>{var a;const e=r("CSP_LIST").split(",").map(n=>n.trim()).filter(Boolean),o=(e.length>0?e.map(n=>U(`${te(n)}_`,n)):[U("",r("CSP")||r("PROVIDER"))]).filter(Boolean);return o.length===0?null:{name:r("INFRA_ID")||r("INFRA_PREFIX")||((a=l.value.workflowInfo)==null?void 0:a.workflowName)||"workflow-infra",description:r("INFRA_DESC")||"Workflow created infra",installMonAgent:r("INSTALL_MON_AGENT")||"no",policyOnPartialFailure:r("POLICY_ON_PARTIAL_FAILURE")||"continue",nodeGroups:o}},U=(e,t)=>{const o=r(`${e}REGION`)||r("REGION"),a=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,o),n=r(`${e}SPEC_ID`)||r("SPEC_ID"),f=r(`${e}IMAGE_ID`)||r("IMAGE_ID");if(!n||!f)return null;const g={name:R(e,t),nodeGroupSize:Number(r("INFRA_NODEGROUP_SIZE")||"1"),specId:n,imageId:f,rootDiskType:r("ROOT_DISK_TYPE")||"default",rootDiskSize:Number(r("ROOT_DISK_SIZE")||"50")};a&&(g.connectionName=a);const y=r(`${e}ZONE`)||r("ZONE");return y&&(g.zone=y),g},R=(e,t)=>{const o=r(`${e}NODEGROUP_NAME`);return o||(t?`${r("INFRA_NODEGROUP_PREFIX")||r("INFRA_NODEGROUP_NAME")||"ng"}-${te(t).toLowerCase().replace(/_/g,"-")}`:r("INFRA_NODEGROUP_NAME")||"g1")},q=e=>{if(!e||Z(e,["reviewStatus","status","validationStatus"]).map(a=>W(a)).some(a=>["error","failed","fail"].includes(a)))return!0;const o=JSON.stringify(e).toLowerCase();return o.includes('"reviewstatus":"error"')||o.includes('"status":"error"')||o.includes("sold out")},H=e=>Z(e,["message","details","detail","reason","errorMessage"]).map(o=>String(o||"").trim()).filter(Boolean)[0]||"The selected Image/Spec combination cannot create resources.",Z=(e,t)=>{if(Array.isArray(e))return e.flatMap(a=>Z(a,t));if(!e||typeof e!="object")return[];const o=t.map(a=>a.toLowerCase());return Object.entries(e).flatMap(([a,n])=>[...o.includes(a.toLowerCase())?[n]:[],...Z(n,t)])},he=async()=>{l.value.workflowParams;const e=Y(),t=ie(e),o=ce(e);if(!t&&!o)return!0;const a=ue(),n=[];if(a.length>0)for(const f of a){const g=`${te(f)}_`;o&&await le(g,f,n),t&&await ne(g,f,n)}else{const f=r("CSP")||r("PROVIDER");o&&await le("",f,n),t&&await ne("",f,n)}return n.length>0?(p.error(`Please reselect ${n.join(", ")} for the current Region/Connection.`),!1):!0},ne=async(e,t,o)=>{const a=`${e}SPEC_ID`,n=r(a),f=r(`${e}REGION`)||r("REGION"),g=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,f);if(!n||ke(n,g,f,t)){o.push(a);return}const y=ve(n);if(y.region&&f&&!pe(y.region,f)){o.push(a);return}await d(`Validating ${a} list`),await de("spec",n,t,f,g)||o.push(a),await b(`${a} list validation completed`)},le=async(e,t,o)=>{const a=`${e}IMAGE_ID`,n=r(a),f=r(`${e}SPEC_ID`),g=r(`${e}REGION`)||r("REGION"),y=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,g),X=Se(Y());if(X&&Ce(t))return;if(!n||ke(n,y,g,t)){o.push(a);return}const J=ve(n);if(J.region&&g&&!pe(J.region,g)){o.push(a);return}await d(`Validating ${a} list`),await de("image",n,t,g,y,f,X)||o.push(a),await b(`${a} list validation completed`)},Y=()=>(l.value.workflowStageMappings||[]).map(e=>String(e.workflowStageName||"").trim().toLowerCase()),ie=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),ce=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),Se=e=>e.some(t=>["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"].includes(t)),Ce=e=>["azure","ibm","ncp","tencent"].includes(W(e)),ue=()=>r("CSP_LIST").split(",").map(e=>e.trim()).filter(Boolean),de=async(e,t,o,a,n,f="",g=!1)=>{if(!t||!o||!a)return!1;try{const{data:y}=await Ge(ge(),e,{providerName:o,regionName:a,connectionName:n,matchedSpecId:e==="image"?f:"",isKubernetesImage:e==="image"&&g?"true":void 0}),X=fe((y==null?void 0:y.data)??y),J=W(t);return X.some(Pe=>Ee(Pe,e).some(Le=>W(Le)===J))}catch(y){return console.log(y),!1}},Ee=(e,t)=>e==null?[]:typeof e!="object"?[String(e)]:me(t==="image"?[e.id,e.name,e.imageId,e.cspImageId,e.cspImageName,e.imageName,e.displayName]:[e.id,e.name,e.specId,e.cspSpecId,e.cspSpecName,e.CspSpecName,e.specName,e.Name,e.VMSpecName]),fe=e=>{if(Array.isArray(e))return e;if(!e||typeof e!="object")return[];const t=["images","image","imageList","specs","spec","specList","resources","resource","resourceList","items","list","result","output"];for(const o of t)if(Array.isArray(e[o]))return e[o];for(const o of Object.values(e)){const a=fe(o);if(a.length>0)return a}return[]},me=e=>{const t=new Set;return e.map(o=>o==null?"":String(o).trim()).filter(o=>!o||t.has(o)?!1:(t.add(o),!0))},r=e=>{const t=we(e),o=(l.value.workflowParams||[]).find(a=>we(a.paramKey)===t);return String((o==null?void 0:o.paramValue)||"").trim()},we=e=>String(e||"").trim().toUpperCase(),te=e=>String(e||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),W=e=>String(e||"").trim().toLowerCase(),pe=(e,t)=>{const o=W(e),a=W(t);return!o||!a?!0:o===a||o.startsWith(`${a}-`)||a.startsWith(`${o}-`)},oe=(e,t)=>e&&t?`${e}-${t}`:"",ve=e=>{const t=String(e||"").split("+");return t.length<3?{provider:"",region:""}:{provider:t[0],region:t[1]}},ge=()=>r("NAMESPACE")||"system",ke=(e,t,o,a)=>{const n=W(e);return n?n===W(t)||n===W(o)||n===W(a):!0};return(e,t)=>{var o;return E(),$("div",{class:"modal modal-blur fade",id:"runWorkflow",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:I},[s("div",ot,[s("div",at,[t[3]||(t[3]=s("div",{class:"modal-status bg-info"},null,-1)),t[4]||(t[4]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Run Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),w.value.active?(E(),$("div",st,[s("div",rt,[s("span",nt,K(w.value.message),1),s("span",lt,K(w.value.completed)+" / "+K(w.value.total),1)]),s("div",it,[s("div",{class:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar",style:Be({width:`${D.value}%`}),"aria-valuenow":D.value,"aria-valuemin":"0","aria-valuemax":"100"},null,12,ct)])])):z("",!0),s("div",ut,[_.value?(E(),$("div",dt,t[1]||(t[1]=[s("div",{class:"spinner-border",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)]))):z("",!0),!_.value&&l.value.workflowParams?(E(),be(He,{key:1,"workflow-name":(o=l.value.workflowInfo)==null?void 0:o.workflowName,"workflow-param-data":l.value.workflowParams,"workflow-stage-mappings":l.value.workflowStageMappings||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(Ae,{key:2,popup:!0,"workflow-param-data":l.value.workflowParams,"event-listener-yn":"N"},null,8,["workflow-param-data"])):z("",!0)]),s("div",ft,[t[2]||(t[2]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("button",{type:"button",class:Ke(["btn btn-primary ms-auto",{disabled:h.value||_.value}]),"aria-disabled":h.value||_.value,onClick:t[0]||(t[0]=a=>j())},K(h.value?"Running...":"Run"),11,mt)])])])],512)}}}),pt=Ze(wt,[["__scopeId","data-v-cdce1b7e"]]),vt={class:"modal-dialog modal-xl",role:"document"},gt={class:"modal-content"},kt={class:"modal-body text-left py-4"},bt={class:"mb-5"},_t={key:0,class:"spinner-border",role:"status"},It={key:0},yt={class:"card mb-3"},Nt=["onClick"],ht={class:"card-title"},St={key:0,class:"card-body"},Ct=["value"],Et=3e3,Pt=Q({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(F,{emit:x}){const p=ee(),L=F,C=S(!1),N=S(),v=ae(()=>L.workflowIdx);Ie(v,async()=>{var u;(u=N.value)!=null&&u.classList.contains("show")&&(O(),await I(!0),A())}),se(()=>{var u,d;(u=N.value)==null||u.addEventListener("show.bs.modal",w),(d=N.value)==null||d.addEventListener("hidden.bs.modal",D)}),re(()=>{var u,d;(u=N.value)==null||u.removeEventListener("show.bs.modal",w),(d=N.value)==null||d.removeEventListener("hidden.bs.modal",D),O()});const l=S([]);let h,_=!1;const I=async(u=!0)=>{if(!v.value){l.value=[],C.value=!0,O();return}_||(_=!0,u&&(C.value=!1,l.value=[]),await Fe(v.value).then(({data:d})=>{var i;const b=Array.isArray(d)?d:[],c=k.value;l.value=b,b.some(m=>m.buildIdx===c)||(k.value=((i=b[0])==null?void 0:i.buildIdx)??0)}).catch(d=>{console.log(d),u&&p.error("Failed to load workflow logs.")}).finally(()=>{u&&(C.value=!0),_=!1}))},w=async()=>{await I(!0),A()},D=()=>{M()},M=()=>{O(),l.value=[],k.value=1},k=S(1),V=u=>{k.value===u?k.value=0:k.value=u},j=u=>u===0?"DB History":u,A=()=>{O(),!(!T()||!v.value)&&(h=setInterval(async()=>{await I(!1),(!T()||!v.value)&&O()},Et))},O=()=>{h&&(clearInterval(h),h=void 0)},T=()=>{var u;return!!((u=N.value)!=null&&u.classList.contains("show"))};return(u,d)=>(E(),$("div",{class:"modal",id:"workflowLog",tabindex:"-1",ref_key:"modalElement",ref:N},[s("div",vt,[s("div",gt,[d[3]||(d[3]=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s("div",kt,[s("h3",bt,[d[1]||(d[1]=ze(" Workflow Log ")),C.value?z("",!0):(E(),$("div",_t,d[0]||(d[0]=[s("span",{class:"visually-hidden"},"Loading...",-1)])))]),s("div",null,[l.value.length<=0?(E(),$("div",It,d[2]||(d[2]=[s("p",{class:"text-secondary"},"No Data",-1)]))):(E(!0),$(je,{key:1},Ue(l.value,b=>(E(),$("div",{key:b.buildIdx},[s("div",yt,[s("div",{class:"card-header",onClick:c=>V(b.buildIdx),style:{cursor:"pointer"}},[s("h3",ht,K(j(b.buildIdx)),1)],8,Nt),k.value===b.buildIdx?(E(),$("div",St,[s("textarea",{value:b.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,Ct)])):z("",!0)])]))),128))])]),s("div",{class:"modal-footer"},[s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:M}," Cancel ")])])])],512))}}),Lt={class:"card card-flush w-100"},Rt={class:"card-body"},$t={class:"workflow-list-table"},Ot=3e4,Ft=Q({__name:"WorkflowList",setup(F){const x=S(!0);ee();const p=S([]),L=S([]),C=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],N=new Map(C.map((c,i)=>[c,i]));se(async()=>{j(),await I(),h()}),re(()=>{_()});let v,l=!1;const h=()=>{_(),v=setInterval(()=>{I(!1)},Ot)},_=()=>{v&&(clearInterval(v),v=void 0)},I=async(c=!0)=>{if(!l){l=!0;try{c&&(x.value=!0),await Ve("N").then(({data:i})=>{p.value=D(M(i||[],!c))})}catch(i){console.log(i)}finally{c&&(x.value=!1),l=!1}}},w=c=>{var i,m;return String(((i=c.workflowInfo)==null?void 0:i.workflowIdx)||((m=c.workflowInfo)==null?void 0:m.workflowName)||"")},D=c=>[...c].sort((i,m)=>{const P=N.get(i.workflowInfo.workflowName)??C.length,G=N.get(m.workflowInfo.workflowName)??C.length;return P-G}),M=(c,i=!1)=>{if(p.value.length===0)return c;const m=new Map(c.map(R=>[w(R),R])),P=new Set,G=p.value.map(R=>{const q=w(R),H=m.get(q);return H?(P.add(q),H):i?R:null}).filter(R=>R!==null);if(i)return G;const U=c.filter(R=>!P.has(w(R)));return[...G,...U]},k=S(0),V=S(""),j=()=>{L.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",minWidth:220,widthGrow:3,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Purpose",field:"workflowInfo.workflowPurpose",minWidth:150,widthGrow:1.2,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Status",field:"workflowInfo.status",minWidth:150,widthGrow:1,formatter:u,variableHeight:!0},{title:"Params Count",formatter:T,minWidth:120,widthGrow:.8,hozAlign:"center"},{title:"Last Run Date",field:"runDate",minWidth:170,widthGrow:1.6,formatter:d,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Action",minWidth:260,widthGrow:2,formatter:b,cssClass:"workflow-action-cell",headerSort:!1,variableHeight:!0,cellClick:async(c,i)=>{const m=c.target,P=m==null?void 0:m.getAttribute("id");k.value=i.getRow().getData().workflowInfo.workflowIdx,P==="detail-btn"?_e.push("/web/workflows/workflow/detail/"+k.value):P==="delete-btn"?(V.value=i.getRow().getData().workflowInfo.workflowName,await A("deleteWorkflow")):P==="run-btn"?await A("runWorkflow"):P==="log-btn"&&await A("workflowLog")}}]},A=async c=>{await Ne();const i=document.getElementById(c);i&&ye.getOrCreateInstance(i).show()},O=()=>{_e.push("/web/workflows/workflow/new")},T=c=>`${(c._cell.row.data.workflowParams||[]).filter(m=>String((m==null?void 0:m.paramKey)||"").trim()).length}`,u=c=>{const i=c.getValue()||"-";return` +import{_ as Re}from"./TableHeader.vue_vue_type_script_setup_true_lang-CH8iOgmf.js";import{_ as $e}from"./request-Bkt8aQiS.js";import{e as Oe,d as We,g as xe,P as Ae,r as De,a as Me,b as Ge,c as Fe,f as Ve}from"./SearchableSelect-B-_1YT6N.js";import{d as Q,u as ee,a as $,b as s,t as K,h as E,l as Te,c as ae,r as S,w as Ie,o as se,m as re,j as z,n as Be,p as be,q as Ke,M as ye,s as Ne,x as ze,F as je,f as Ue,y as _e,i as B,z as qe}from"./index-B3pAGCoW.js";import{T as He}from"./TumblebugParamSelector-DzZGpJmW.js";import{_ as Ze}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Ye={class:"modal modal-blur fade",id:"deleteWorkflow",tabindex:"-1","aria-hidden":"true"},Xe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Je={class:"modal-content"},Qe={class:"modal-body py-4"},et={class:"modal-footer"},tt=Q({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=F,C=x,N=async()=>{const{data:v}=await Oe(L.workflowIdx);if(v){p.error("Workflows linked to an Event Listener cannot be deleted."),C("get-workflow-list");return}const{data:l}=await We(L.workflowIdx);l?p.success("Deleted successfully."):p.error("Failed to delete."),C("get-workflow-list")};return(v,l)=>(E(),$("div",Ye,[s("div",Xe,[s("div",Je,[l[2]||(l[2]=s("div",{class:"modal-status bg-danger"},null,-1)),l[3]||(l[3]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Delete Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),s("div",Qe,[s("h4",null,"Are you sure you want to delete "+K(L.workflowName)+"?",1)]),s("div",et,[l[1]||(l[1]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:l[0]||(l[0]=h=>N())}," Delete ")])])])]))}}),ot={class:"modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable",role:"document"},at={class:"modal-content"},st={key:0,class:"run-progress"},rt={class:"d-flex align-items-center justify-content-between mb-2"},nt={class:"text-muted"},lt={class:"text-muted"},it={class:"progress"},ct=["aria-valuenow"],ut={class:"modal-body py-4"},dt={key:0,class:"d-flex justify-content-center py-4"},ft={class:"modal-footer"},mt=["aria-disabled"],wt=Q({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=Te(),C=F,N=x,v=ae(()=>C.workflowIdx),l=S({}),h=S(!1),_=S(!1),I=S(),w=S({active:!1,completed:0,total:0,message:""}),D=ae(()=>w.value.total?Math.min(100,Math.round(w.value.completed/w.value.total*100)):0);Ie(()=>v.value,async()=>{var e;(e=I.value)!=null&&e.classList.contains("show")&&await k()}),se(()=>{var e;(e=I.value)==null||e.addEventListener("show.bs.modal",M)}),re(()=>{var e;(e=I.value)==null||e.removeEventListener("show.bs.modal",M)});const M=async()=>{await k()},k=async()=>{if(!v.value){l.value={};return}_.value=!0;try{const{data:e}=await xe(v.value,"N");V(e),l.value=e}catch(e){console.log(e),p.error("Failed to load workflow run parameters.")}finally{_.value=!1}},V=e=>{var a;const t=(L.projectInfo.ns_id||L.projectInfo.name||"").trim();if(!t)return;const o=(a=e.workflowParams)==null?void 0:a.find(n=>{var f;return((f=n.paramKey)==null?void 0:f.trim().toUpperCase())==="NAMESPACE"});o&&(o.paramValue=t)},j=async()=>{if(!(h.value||_.value)){if(!l.value.workflowInfo){p.error("Failed to load workflow run parameters.");return}h.value=!0;try{if(await T(),!await he()||!await m())return;await d("Requesting workflow run");const{data:e}=await De(A());await b("Workflow run request completed"),e?(p.success("Workflow run request has been submitted."),O()):p.error("Failed to process workflow run request."),N("get-workflow-list")}catch(e){console.log(e),p.error("Failed to process workflow run request.")}finally{h.value=!1,u()}}},A=()=>{const e=l.value.workflowInfo;return{workflowInfo:{workflowIdx:e==null?void 0:e.workflowIdx},workflowParams:[...l.value.workflowParams||[]],workflowStageMappings:[]}},O=()=>{var e;I.value&&((e=ye.getInstance(I.value))==null||e.hide())},T=async()=>{w.value={active:!0,completed:0,total:i(),message:"Preparing pre-run validation"},await c()},u=()=>{w.value.active=!1},d=async e=>{w.value.message=e,await c()},b=async e=>{w.value.completed=Math.min(w.value.completed+1,w.value.total),w.value.message=e,await c()},c=async()=>{await Ne(),await new Promise(e=>{window.requestAnimationFrame(()=>e())})},i=()=>{const e=Y(),t=ie(e),o=ce(e),a=Math.max(1,ue().length),n=a*Number(t)+a*Number(o),f=P()&&G()?1:0;return Math.max(1,n+f+1)},m=async()=>{if(!P())return!0;const e=G();if(!e)return!0;try{await d("Running infra pre-run validation");const{data:t}=await Me(ge(),e);return await b("Infra pre-run validation completed"),q(t)?(p.error(`Infra pre-run validation failed: ${H(t)}`),!1):!0}catch(t){return console.log(t),p.error("Failed to process infra pre-run validation request."),!1}},P=()=>{const e=Y();return e.includes("infra-create")||e.includes("multi-csp-vm-deploy")},G=()=>{var a;const e=r("CSP_LIST").split(",").map(n=>n.trim()).filter(Boolean),o=(e.length>0?e.map(n=>U(`${te(n)}_`,n)):[U("",r("CSP")||r("PROVIDER"))]).filter(Boolean);return o.length===0?null:{name:r("INFRA_ID")||r("INFRA_PREFIX")||((a=l.value.workflowInfo)==null?void 0:a.workflowName)||"workflow-infra",description:r("INFRA_DESC")||"Workflow created infra",installMonAgent:r("INSTALL_MON_AGENT")||"no",policyOnPartialFailure:r("POLICY_ON_PARTIAL_FAILURE")||"continue",nodeGroups:o}},U=(e,t)=>{const o=r(`${e}REGION`)||r("REGION"),a=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,o),n=r(`${e}SPEC_ID`)||r("SPEC_ID"),f=r(`${e}IMAGE_ID`)||r("IMAGE_ID");if(!n||!f)return null;const g={name:R(e,t),nodeGroupSize:Number(r("INFRA_NODEGROUP_SIZE")||"1"),specId:n,imageId:f,rootDiskType:r("ROOT_DISK_TYPE")||"default",rootDiskSize:Number(r("ROOT_DISK_SIZE")||"50")};a&&(g.connectionName=a);const y=r(`${e}ZONE`)||r("ZONE");return y&&(g.zone=y),g},R=(e,t)=>{const o=r(`${e}NODEGROUP_NAME`);return o||(t?`${r("INFRA_NODEGROUP_PREFIX")||r("INFRA_NODEGROUP_NAME")||"ng"}-${te(t).toLowerCase().replace(/_/g,"-")}`:r("INFRA_NODEGROUP_NAME")||"g1")},q=e=>{if(!e||Z(e,["reviewStatus","status","validationStatus"]).map(a=>W(a)).some(a=>["error","failed","fail"].includes(a)))return!0;const o=JSON.stringify(e).toLowerCase();return o.includes('"reviewstatus":"error"')||o.includes('"status":"error"')||o.includes("sold out")},H=e=>Z(e,["message","details","detail","reason","errorMessage"]).map(o=>String(o||"").trim()).filter(Boolean)[0]||"The selected Image/Spec combination cannot create resources.",Z=(e,t)=>{if(Array.isArray(e))return e.flatMap(a=>Z(a,t));if(!e||typeof e!="object")return[];const o=t.map(a=>a.toLowerCase());return Object.entries(e).flatMap(([a,n])=>[...o.includes(a.toLowerCase())?[n]:[],...Z(n,t)])},he=async()=>{l.value.workflowParams;const e=Y(),t=ie(e),o=ce(e);if(!t&&!o)return!0;const a=ue(),n=[];if(a.length>0)for(const f of a){const g=`${te(f)}_`;o&&await le(g,f,n),t&&await ne(g,f,n)}else{const f=r("CSP")||r("PROVIDER");o&&await le("",f,n),t&&await ne("",f,n)}return n.length>0?(p.error(`Please reselect ${n.join(", ")} for the current Region/Connection.`),!1):!0},ne=async(e,t,o)=>{const a=`${e}SPEC_ID`,n=r(a),f=r(`${e}REGION`)||r("REGION"),g=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,f);if(!n||ke(n,g,f,t)){o.push(a);return}const y=ve(n);if(y.region&&f&&!pe(y.region,f)){o.push(a);return}await d(`Validating ${a} list`),await de("spec",n,t,f,g)||o.push(a),await b(`${a} list validation completed`)},le=async(e,t,o)=>{const a=`${e}IMAGE_ID`,n=r(a),f=r(`${e}SPEC_ID`),g=r(`${e}REGION`)||r("REGION"),y=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,g),X=Se(Y());if(X&&Ce(t))return;if(!n||ke(n,y,g,t)){o.push(a);return}const J=ve(n);if(J.region&&g&&!pe(J.region,g)){o.push(a);return}await d(`Validating ${a} list`),await de("image",n,t,g,y,f,X)||o.push(a),await b(`${a} list validation completed`)},Y=()=>(l.value.workflowStageMappings||[]).map(e=>String(e.workflowStageName||"").trim().toLowerCase()),ie=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),ce=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),Se=e=>e.some(t=>["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"].includes(t)),Ce=e=>["azure","ibm","ncp","tencent"].includes(W(e)),ue=()=>r("CSP_LIST").split(",").map(e=>e.trim()).filter(Boolean),de=async(e,t,o,a,n,f="",g=!1)=>{if(!t||!o||!a)return!1;try{const{data:y}=await Ge(ge(),e,{providerName:o,regionName:a,connectionName:n,matchedSpecId:e==="image"?f:"",isKubernetesImage:e==="image"&&g?"true":void 0}),X=fe((y==null?void 0:y.data)??y),J=W(t);return X.some(Pe=>Ee(Pe,e).some(Le=>W(Le)===J))}catch(y){return console.log(y),!1}},Ee=(e,t)=>e==null?[]:typeof e!="object"?[String(e)]:me(t==="image"?[e.id,e.name,e.imageId,e.cspImageId,e.cspImageName,e.imageName,e.displayName]:[e.id,e.name,e.specId,e.cspSpecId,e.cspSpecName,e.CspSpecName,e.specName,e.Name,e.VMSpecName]),fe=e=>{if(Array.isArray(e))return e;if(!e||typeof e!="object")return[];const t=["images","image","imageList","specs","spec","specList","resources","resource","resourceList","items","list","result","output"];for(const o of t)if(Array.isArray(e[o]))return e[o];for(const o of Object.values(e)){const a=fe(o);if(a.length>0)return a}return[]},me=e=>{const t=new Set;return e.map(o=>o==null?"":String(o).trim()).filter(o=>!o||t.has(o)?!1:(t.add(o),!0))},r=e=>{const t=we(e),o=(l.value.workflowParams||[]).find(a=>we(a.paramKey)===t);return String((o==null?void 0:o.paramValue)||"").trim()},we=e=>String(e||"").trim().toUpperCase(),te=e=>String(e||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),W=e=>String(e||"").trim().toLowerCase(),pe=(e,t)=>{const o=W(e),a=W(t);return!o||!a?!0:o===a||o.startsWith(`${a}-`)||a.startsWith(`${o}-`)},oe=(e,t)=>e&&t?`${e}-${t}`:"",ve=e=>{const t=String(e||"").split("+");return t.length<3?{provider:"",region:""}:{provider:t[0],region:t[1]}},ge=()=>r("NAMESPACE")||"system",ke=(e,t,o,a)=>{const n=W(e);return n?n===W(t)||n===W(o)||n===W(a):!0};return(e,t)=>{var o;return E(),$("div",{class:"modal modal-blur fade",id:"runWorkflow",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:I},[s("div",ot,[s("div",at,[t[3]||(t[3]=s("div",{class:"modal-status bg-info"},null,-1)),t[4]||(t[4]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Run Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),w.value.active?(E(),$("div",st,[s("div",rt,[s("span",nt,K(w.value.message),1),s("span",lt,K(w.value.completed)+" / "+K(w.value.total),1)]),s("div",it,[s("div",{class:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar",style:Be({width:`${D.value}%`}),"aria-valuenow":D.value,"aria-valuemin":"0","aria-valuemax":"100"},null,12,ct)])])):z("",!0),s("div",ut,[_.value?(E(),$("div",dt,t[1]||(t[1]=[s("div",{class:"spinner-border",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)]))):z("",!0),!_.value&&l.value.workflowParams?(E(),be(He,{key:1,"workflow-name":(o=l.value.workflowInfo)==null?void 0:o.workflowName,"workflow-param-data":l.value.workflowParams,"workflow-stage-mappings":l.value.workflowStageMappings||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(Ae,{key:2,popup:!0,"workflow-param-data":l.value.workflowParams,"event-listener-yn":"N"},null,8,["workflow-param-data"])):z("",!0)]),s("div",ft,[t[2]||(t[2]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("button",{type:"button",class:Ke(["btn btn-primary ms-auto",{disabled:h.value||_.value}]),"aria-disabled":h.value||_.value,onClick:t[0]||(t[0]=a=>j())},K(h.value?"Running...":"Run"),11,mt)])])])],512)}}}),pt=Ze(wt,[["__scopeId","data-v-cdce1b7e"]]),vt={class:"modal-dialog modal-xl",role:"document"},gt={class:"modal-content"},kt={class:"modal-body text-left py-4"},bt={class:"mb-5"},_t={key:0,class:"spinner-border",role:"status"},It={key:0},yt={class:"card mb-3"},Nt=["onClick"],ht={class:"card-title"},St={key:0,class:"card-body"},Ct=["value"],Et=3e3,Pt=Q({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(F,{emit:x}){const p=ee(),L=F,C=S(!1),N=S(),v=ae(()=>L.workflowIdx);Ie(v,async()=>{var u;(u=N.value)!=null&&u.classList.contains("show")&&(O(),await I(!0),A())}),se(()=>{var u,d;(u=N.value)==null||u.addEventListener("show.bs.modal",w),(d=N.value)==null||d.addEventListener("hidden.bs.modal",D)}),re(()=>{var u,d;(u=N.value)==null||u.removeEventListener("show.bs.modal",w),(d=N.value)==null||d.removeEventListener("hidden.bs.modal",D),O()});const l=S([]);let h,_=!1;const I=async(u=!0)=>{if(!v.value){l.value=[],C.value=!0,O();return}_||(_=!0,u&&(C.value=!1,l.value=[]),await Fe(v.value).then(({data:d})=>{var i;const b=Array.isArray(d)?d:[],c=k.value;l.value=b,b.some(m=>m.buildIdx===c)||(k.value=((i=b[0])==null?void 0:i.buildIdx)??0)}).catch(d=>{console.log(d),u&&p.error("Failed to load workflow logs.")}).finally(()=>{u&&(C.value=!0),_=!1}))},w=async()=>{await I(!0),A()},D=()=>{M()},M=()=>{O(),l.value=[],k.value=1},k=S(1),V=u=>{k.value===u?k.value=0:k.value=u},j=u=>u===0?"DB History":u,A=()=>{O(),!(!T()||!v.value)&&(h=setInterval(async()=>{await I(!1),(!T()||!v.value)&&O()},Et))},O=()=>{h&&(clearInterval(h),h=void 0)},T=()=>{var u;return!!((u=N.value)!=null&&u.classList.contains("show"))};return(u,d)=>(E(),$("div",{class:"modal",id:"workflowLog",tabindex:"-1",ref_key:"modalElement",ref:N},[s("div",vt,[s("div",gt,[d[3]||(d[3]=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s("div",kt,[s("h3",bt,[d[1]||(d[1]=ze(" Workflow Log ")),C.value?z("",!0):(E(),$("div",_t,d[0]||(d[0]=[s("span",{class:"visually-hidden"},"Loading...",-1)])))]),s("div",null,[l.value.length<=0?(E(),$("div",It,d[2]||(d[2]=[s("p",{class:"text-secondary"},"No Data",-1)]))):(E(!0),$(je,{key:1},Ue(l.value,b=>(E(),$("div",{key:b.buildIdx},[s("div",yt,[s("div",{class:"card-header",onClick:c=>V(b.buildIdx),style:{cursor:"pointer"}},[s("h3",ht,K(j(b.buildIdx)),1)],8,Nt),k.value===b.buildIdx?(E(),$("div",St,[s("textarea",{value:b.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,Ct)])):z("",!0)])]))),128))])]),s("div",{class:"modal-footer"},[s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:M}," Cancel ")])])])],512))}}),Lt={class:"card card-flush w-100"},Rt={class:"card-body"},$t={class:"workflow-list-table"},Ot=3e4,Ft=Q({__name:"WorkflowList",setup(F){const x=S(!0);ee();const p=S([]),L=S([]),C=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],N=new Map(C.map((c,i)=>[c,i]));se(async()=>{j(),await I(),h()}),re(()=>{_()});let v,l=!1;const h=()=>{_(),v=setInterval(()=>{I(!1)},Ot)},_=()=>{v&&(clearInterval(v),v=void 0)},I=async(c=!0)=>{if(!l){l=!0;try{c&&(x.value=!0),await Ve("N").then(({data:i})=>{p.value=D(M(i||[],!c))})}catch(i){console.log(i)}finally{c&&(x.value=!1),l=!1}}},w=c=>{var i,m;return String(((i=c.workflowInfo)==null?void 0:i.workflowIdx)||((m=c.workflowInfo)==null?void 0:m.workflowName)||"")},D=c=>[...c].sort((i,m)=>{const P=N.get(i.workflowInfo.workflowName)??C.length,G=N.get(m.workflowInfo.workflowName)??C.length;return P-G}),M=(c,i=!1)=>{if(p.value.length===0)return c;const m=new Map(c.map(R=>[w(R),R])),P=new Set,G=p.value.map(R=>{const q=w(R),H=m.get(q);return H?(P.add(q),H):i?R:null}).filter(R=>R!==null);if(i)return G;const U=c.filter(R=>!P.has(w(R)));return[...G,...U]},k=S(0),V=S(""),j=()=>{L.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",minWidth:220,widthGrow:3,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Purpose",field:"workflowInfo.workflowPurpose",minWidth:150,widthGrow:1.2,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Status",field:"workflowInfo.status",minWidth:150,widthGrow:1,formatter:u,variableHeight:!0},{title:"Params Count",formatter:T,minWidth:120,widthGrow:.8,hozAlign:"center"},{title:"Last Run Date",field:"runDate",minWidth:170,widthGrow:1.6,formatter:d,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Action",minWidth:260,widthGrow:2,formatter:b,cssClass:"workflow-action-cell",headerSort:!1,variableHeight:!0,cellClick:async(c,i)=>{const m=c.target,P=m==null?void 0:m.getAttribute("id");k.value=i.getRow().getData().workflowInfo.workflowIdx,P==="detail-btn"?_e.push("/web/workflows/workflow/detail/"+k.value):P==="delete-btn"?(V.value=i.getRow().getData().workflowInfo.workflowName,await A("deleteWorkflow")):P==="run-btn"?await A("runWorkflow"):P==="log-btn"&&await A("workflowLog")}}]},A=async c=>{await Ne();const i=document.getElementById(c);i&&ye.getOrCreateInstance(i).show()},O=()=>{_e.push("/web/workflows/workflow/new")},T=c=>`${(c._cell.row.data.workflowParams||[]).filter(m=>String((m==null?void 0:m.paramKey)||"").trim()).length}`,u=c=>{const i=c.getValue()||"-";return`
{const{data:g}=await Oe(L.workflowIdx);if(g){p.error("Workflows linked to an Event Listener cannot be deleted."),C("get-workflow-list");return}const{data:l}=await We(L.workflowIdx);l?p.success("Deleted successfully."):p.error("Failed to delete."),C("get-workflow-list")};return(g,l)=>(E(),$("div",Ye,[s("div",Xe,[s("div",Je,[l[2]||(l[2]=s("div",{class:"modal-status bg-danger"},null,-1)),l[3]||(l[3]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Delete Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),s("div",Qe,[s("h4",null,"Are you sure you want to delete "+K(L.workflowName)+"?",1)]),s("div",et,[l[1]||(l[1]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:l[0]||(l[0]=h=>N())}," Delete ")])])])]))}}),ot={class:"modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable",role:"document"},at={class:"modal-content"},st={key:0,class:"run-progress"},rt={class:"d-flex align-items-center justify-content-between mb-2"},nt={class:"text-muted"},lt={class:"text-muted"},it={class:"progress"},ct=["aria-valuenow"],ut={class:"modal-body py-4"},dt={key:0,class:"d-flex justify-content-center py-4"},ft={class:"modal-footer"},mt=["aria-disabled"],wt=Q({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=Te(),C=F,N=x,g=ae(()=>C.workflowIdx),l=S({}),h=S(!1),_=S(!1),I=S(),w=S({active:!1,completed:0,total:0,message:""}),D=ae(()=>w.value.total?Math.min(100,Math.round(w.value.completed/w.value.total*100)):0);Ie(()=>g.value,async()=>{var e;(e=I.value)!=null&&e.classList.contains("show")&&await k()}),se(()=>{var e;(e=I.value)==null||e.addEventListener("show.bs.modal",M)}),re(()=>{var e;(e=I.value)==null||e.removeEventListener("show.bs.modal",M)});const M=async()=>{await k()},k=async()=>{if(!g.value){l.value={};return}_.value=!0;try{const{data:e}=await xe(g.value,"N");V(e),l.value=e}catch(e){console.log(e),p.error("Failed to load workflow run parameters.")}finally{_.value=!1}},V=e=>{var a;const t=(L.projectInfo.ns_id||L.projectInfo.name||"").trim();if(!t)return;const o=(a=e.workflowParams)==null?void 0:a.find(n=>{var f;return((f=n.paramKey)==null?void 0:f.trim().toUpperCase())==="NAMESPACE"});o&&(o.paramValue=t)},j=async()=>{if(!(h.value||_.value)){if(!l.value.workflowInfo){p.error("Failed to load workflow run parameters.");return}h.value=!0;try{if(await T(),!await he()||!await m())return;await d("Requesting workflow run");const{data:e}=await De(A());await b("Workflow run request completed"),e?(p.success("Workflow run request has been submitted."),O()):p.error("Failed to process workflow run request."),N("get-workflow-list")}catch(e){console.log(e),p.error("Failed to process workflow run request.")}finally{h.value=!1,u()}}},A=()=>{const e=l.value.workflowInfo;return{workflowInfo:{workflowIdx:e==null?void 0:e.workflowIdx},workflowParams:[...l.value.workflowParams||[]],workflowStageMappings:[]}},O=()=>{var e;I.value&&((e=ye.getInstance(I.value))==null||e.hide())},T=async()=>{w.value={active:!0,completed:0,total:i(),message:"Preparing pre-run validation"},await c()},u=()=>{w.value.active=!1},d=async e=>{w.value.message=e,await c()},b=async e=>{w.value.completed=Math.min(w.value.completed+1,w.value.total),w.value.message=e,await c()},c=async()=>{await Ne(),await new Promise(e=>{window.requestAnimationFrame(()=>e())})},i=()=>{const e=Y(),t=ie(e),o=ce(e),a=Math.max(1,ue().length),n=a*Number(t)+a*Number(o),f=P()&&G()?1:0;return Math.max(1,n+f+1)},m=async()=>{if(!P())return!0;const e=G();if(!e)return!0;try{await d("Running infra pre-run validation");const{data:t}=await Me(ve(),e);return await b("Infra pre-run validation completed"),q(t)?(p.error(`Infra pre-run validation failed: ${H(t)}`),!1):!0}catch(t){return console.log(t),p.error("Failed to process infra pre-run validation request."),!1}},P=()=>{const e=Y();return e.includes("infra-create")||e.includes("multi-csp-vm-deploy")},G=()=>{var a;const e=r("CSP_LIST").split(",").map(n=>n.trim()).filter(Boolean),o=(e.length>0?e.map(n=>U(`${te(n)}_`,n)):[U("",r("CSP")||r("PROVIDER"))]).filter(Boolean);return o.length===0?null:{name:r("INFRA_ID")||r("INFRA_PREFIX")||((a=l.value.workflowInfo)==null?void 0:a.workflowName)||"workflow-infra",description:r("INFRA_DESC")||"Workflow created infra",installMonAgent:r("INSTALL_MON_AGENT")||"no",policyOnPartialFailure:r("POLICY_ON_PARTIAL_FAILURE")||"continue",nodeGroups:o}},U=(e,t)=>{const o=r(`${e}REGION`)||r("REGION"),a=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,o),n=r(`${e}SPEC_ID`)||r("SPEC_ID"),f=r(`${e}IMAGE_ID`)||r("IMAGE_ID");if(!n||!f)return null;const v={name:R(e,t),nodeGroupSize:Number(r("INFRA_NODEGROUP_SIZE")||"1"),specId:n,imageId:f,rootDiskType:r("ROOT_DISK_TYPE")||"default",rootDiskSize:Number(r("ROOT_DISK_SIZE")||"50")};a&&(v.connectionName=a);const y=r(`${e}ZONE`)||r("ZONE");return y&&(v.zone=y),v},R=(e,t)=>{const o=r(`${e}NODEGROUP_NAME`);return o||(t?`${r("INFRA_NODEGROUP_PREFIX")||r("INFRA_NODEGROUP_NAME")||"ng"}-${te(t).toLowerCase().replace(/_/g,"-")}`:r("INFRA_NODEGROUP_NAME")||"g1")},q=e=>{if(!e||Z(e,["reviewStatus","status","validationStatus"]).map(a=>W(a)).some(a=>["error","failed","fail"].includes(a)))return!0;const o=JSON.stringify(e).toLowerCase();return o.includes('"reviewstatus":"error"')||o.includes('"status":"error"')||o.includes("sold out")},H=e=>Z(e,["message","details","detail","reason","errorMessage"]).map(o=>String(o||"").trim()).filter(Boolean)[0]||"The selected Image/Spec combination cannot create resources.",Z=(e,t)=>{if(Array.isArray(e))return e.flatMap(a=>Z(a,t));if(!e||typeof e!="object")return[];const o=t.map(a=>a.toLowerCase());return Object.entries(e).flatMap(([a,n])=>[...o.includes(a.toLowerCase())?[n]:[],...Z(n,t)])},he=async()=>{l.value.workflowParams;const e=Y(),t=ie(e),o=ce(e);if(!t&&!o)return!0;const a=ue(),n=[];if(a.length>0)for(const f of a){const v=`${te(f)}_`;o&&await le(v,f,n),t&&await ne(v,f,n)}else{const f=r("CSP")||r("PROVIDER");o&&await le("",f,n),t&&await ne("",f,n)}return n.length>0?(p.error(`Please reselect ${n.join(", ")} for the current Region/Connection.`),!1):!0},ne=async(e,t,o)=>{const a=`${e}SPEC_ID`,n=r(a),f=r(`${e}REGION`)||r("REGION"),v=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,f);if(!n||ke(n,v,f,t)){o.push(a);return}const y=ge(n);if(y.region&&f&&!pe(y.region,f)){o.push(a);return}await d(`Validating ${a} list`),await de("spec",n,t,f,v)||o.push(a),await b(`${a} list validation completed`)},le=async(e,t,o)=>{const a=`${e}IMAGE_ID`,n=r(a),f=r(`${e}SPEC_ID`),v=r(`${e}REGION`)||r("REGION"),y=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,v),X=Se(Y());if(X&&Ce(t))return;if(!n||ke(n,y,v,t)){o.push(a);return}const J=ge(n);if(J.region&&v&&!pe(J.region,v)){o.push(a);return}await d(`Validating ${a} list`),await de("image",n,t,v,y,f,X)||o.push(a),await b(`${a} list validation completed`)},Y=()=>(l.value.workflowStageMappings||[]).map(e=>String(e.workflowStageName||"").trim().toLowerCase()),ie=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),ce=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),Se=e=>e.some(t=>["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"].includes(t)),Ce=e=>["azure","ibm","ncp","tencent"].includes(W(e)),ue=()=>r("CSP_LIST").split(",").map(e=>e.trim()).filter(Boolean),de=async(e,t,o,a,n,f="",v=!1)=>{if(!t||!o||!a)return!1;try{const{data:y}=await Ge(ve(),e,{providerName:o,regionName:a,connectionName:n,matchedSpecId:e==="image"?f:"",isKubernetesImage:e==="image"&&v?"true":void 0}),X=fe((y==null?void 0:y.data)??y),J=W(t);return X.some(Pe=>Ee(Pe,e).some(Le=>W(Le)===J))}catch(y){return console.log(y),!1}},Ee=(e,t)=>e==null?[]:typeof e!="object"?[String(e)]:me(t==="image"?[e.id,e.name,e.imageId,e.cspImageId,e.cspImageName,e.imageName,e.displayName]:[e.id,e.name,e.specId,e.cspSpecId,e.cspSpecName,e.CspSpecName,e.specName,e.Name,e.VMSpecName]),fe=e=>{if(Array.isArray(e))return e;if(!e||typeof e!="object")return[];const t=["images","image","imageList","specs","spec","specList","resources","resource","resourceList","items","list","result","output"];for(const o of t)if(Array.isArray(e[o]))return e[o];for(const o of Object.values(e)){const a=fe(o);if(a.length>0)return a}return[]},me=e=>{const t=new Set;return e.map(o=>o==null?"":String(o).trim()).filter(o=>!o||t.has(o)?!1:(t.add(o),!0))},r=e=>{const t=we(e),o=(l.value.workflowParams||[]).find(a=>we(a.paramKey)===t);return String((o==null?void 0:o.paramValue)||"").trim()},we=e=>String(e||"").trim().toUpperCase(),te=e=>String(e||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),W=e=>String(e||"").trim().toLowerCase(),pe=(e,t)=>{const o=W(e),a=W(t);return!o||!a?!0:o===a||o.startsWith(`${a}-`)||a.startsWith(`${o}-`)},oe=(e,t)=>e&&t?`${e}-${t}`:"",ge=e=>{const t=String(e||"").split("+");return t.length<3?{provider:"",region:""}:{provider:t[0],region:t[1]}},ve=()=>r("NAMESPACE")||"system",ke=(e,t,o,a)=>{const n=W(e);return n?n===W(t)||n===W(o)||n===W(a):!0};return(e,t)=>{var o;return E(),$("div",{class:"modal modal-blur fade",id:"runWorkflow",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:I},[s("div",ot,[s("div",at,[t[3]||(t[3]=s("div",{class:"modal-status bg-info"},null,-1)),t[4]||(t[4]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Run Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),w.value.active?(E(),$("div",st,[s("div",rt,[s("span",nt,K(w.value.message),1),s("span",lt,K(w.value.completed)+" / "+K(w.value.total),1)]),s("div",it,[s("div",{class:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar",style:Be({width:`${D.value}%`}),"aria-valuenow":D.value,"aria-valuemin":"0","aria-valuemax":"100"},null,12,ct)])])):z("",!0),s("div",ut,[_.value?(E(),$("div",dt,[...t[1]||(t[1]=[s("div",{class:"spinner-border",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)])])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(He,{key:1,"workflow-name":(o=l.value.workflowInfo)==null?void 0:o.workflowName,"workflow-param-data":l.value.workflowParams,"workflow-stage-mappings":l.value.workflowStageMappings||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(Ae,{key:2,popup:!0,"workflow-param-data":l.value.workflowParams,"event-listener-yn":"N"},null,8,["workflow-param-data"])):z("",!0)]),s("div",ft,[t[2]||(t[2]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("button",{type:"button",class:Ke(["btn btn-primary ms-auto",{disabled:h.value||_.value}]),"aria-disabled":h.value||_.value,onClick:t[0]||(t[0]=a=>j())},K(h.value?"Running...":"Run"),11,mt)])])])],512)}}}),pt=Ze(wt,[["__scopeId","data-v-cdce1b7e"]]),gt={class:"modal-dialog modal-xl",role:"document"},vt={class:"modal-content"},kt={class:"modal-body text-left py-4"},bt={class:"mb-5"},_t={key:0,class:"spinner-border",role:"status"},It={key:0},yt={class:"card mb-3"},Nt=["onClick"],ht={class:"card-title"},St={key:0,class:"card-body"},Ct=["value"],Et=3e3,Pt=Q({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(F,{emit:x}){const p=ee(),L=F,C=S(!1),N=S(),g=ae(()=>L.workflowIdx);Ie(g,async()=>{var u;(u=N.value)!=null&&u.classList.contains("show")&&(O(),await I(!0),A())}),se(()=>{var u,d;(u=N.value)==null||u.addEventListener("show.bs.modal",w),(d=N.value)==null||d.addEventListener("hidden.bs.modal",D)}),re(()=>{var u,d;(u=N.value)==null||u.removeEventListener("show.bs.modal",w),(d=N.value)==null||d.removeEventListener("hidden.bs.modal",D),O()});const l=S([]);let h,_=!1;const I=async(u=!0)=>{if(!g.value){l.value=[],C.value=!0,O();return}_||(_=!0,u&&(C.value=!1,l.value=[]),await Fe(g.value).then(({data:d})=>{var i;const b=Array.isArray(d)?d:[],c=k.value;l.value=b,b.some(m=>m.buildIdx===c)||(k.value=((i=b[0])==null?void 0:i.buildIdx)??0)}).catch(d=>{console.log(d),u&&p.error("Failed to load workflow logs.")}).finally(()=>{u&&(C.value=!0),_=!1}))},w=async()=>{await I(!0),A()},D=()=>{M()},M=()=>{O(),l.value=[],k.value=1},k=S(1),V=u=>{k.value===u?k.value=0:k.value=u},j=u=>u===0?"DB History":u,A=()=>{O(),!(!T()||!g.value)&&(h=setInterval(async()=>{await I(!1),(!T()||!g.value)&&O()},Et))},O=()=>{h&&(clearInterval(h),h=void 0)},T=()=>{var u;return!!((u=N.value)!=null&&u.classList.contains("show"))};return(u,d)=>(E(),$("div",{class:"modal",id:"workflowLog",tabindex:"-1",ref_key:"modalElement",ref:N},[s("div",gt,[s("div",vt,[d[3]||(d[3]=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s("div",kt,[s("h3",bt,[d[1]||(d[1]=ze(" Workflow Log ",-1)),C.value?z("",!0):(E(),$("div",_t,[...d[0]||(d[0]=[s("span",{class:"visually-hidden"},"Loading...",-1)])]))]),s("div",null,[l.value.length<=0?(E(),$("div",It,[...d[2]||(d[2]=[s("p",{class:"text-secondary"},"No Data",-1)])])):(E(!0),$(je,{key:1},Ue(l.value,b=>(E(),$("div",{key:b.buildIdx},[s("div",yt,[s("div",{class:"card-header",onClick:c=>V(b.buildIdx),style:{cursor:"pointer"}},[s("h3",ht,K(j(b.buildIdx)),1)],8,Nt),k.value===b.buildIdx?(E(),$("div",St,[s("textarea",{value:b.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,Ct)])):z("",!0)])]))),128))])]),s("div",{class:"modal-footer"},[s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:M}," Cancel ")])])])],512))}}),Lt={class:"card card-flush w-100"},Rt={class:"card-body"},$t={class:"workflow-list-table"},Ot=3e4,Ft=Q({__name:"WorkflowList",setup(F){const x=S(!0);ee();const p=S([]),L=S([]),C=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],N=new Map(C.map((c,i)=>[c,i]));se(async()=>{j(),await I(),h()}),re(()=>{_()});let g,l=!1;const h=()=>{_(),g=setInterval(()=>{I(!1)},Ot)},_=()=>{g&&(clearInterval(g),g=void 0)},I=async(c=!0)=>{if(!l){l=!0;try{c&&(x.value=!0),await Ve("N").then(({data:i})=>{p.value=D(M(i||[],!c))})}catch(i){console.log(i)}finally{c&&(x.value=!1),l=!1}}},w=c=>{var i,m;return String(((i=c.workflowInfo)==null?void 0:i.workflowIdx)||((m=c.workflowInfo)==null?void 0:m.workflowName)||"")},D=c=>[...c].sort((i,m)=>{const P=N.get(i.workflowInfo.workflowName)??C.length,G=N.get(m.workflowInfo.workflowName)??C.length;return P-G}),M=(c,i=!1)=>{if(p.value.length===0)return c;const m=new Map(c.map(R=>[w(R),R])),P=new Set,G=p.value.map(R=>{const q=w(R),H=m.get(q);return H?(P.add(q),H):i?R:null}).filter(R=>R!==null);if(i)return G;const U=c.filter(R=>!P.has(w(R)));return[...G,...U]},k=S(0),V=S(""),j=()=>{L.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",minWidth:220,widthGrow:3,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Purpose",field:"workflowInfo.workflowPurpose",minWidth:150,widthGrow:1.2,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Status",field:"workflowInfo.status",minWidth:150,widthGrow:1,formatter:u,variableHeight:!0},{title:"Params Count",formatter:T,minWidth:120,widthGrow:.8,hozAlign:"center"},{title:"Last Run Date",field:"runDate",minWidth:170,widthGrow:1.6,formatter:d,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Action",minWidth:260,widthGrow:2,formatter:b,cssClass:"workflow-action-cell",headerSort:!1,variableHeight:!0,cellClick:async(c,i)=>{const m=c.target,P=m==null?void 0:m.getAttribute("id");k.value=i.getRow().getData().workflowInfo.workflowIdx,P==="detail-btn"?_e.push("/web/workflows/workflow/detail/"+k.value):P==="delete-btn"?(V.value=i.getRow().getData().workflowInfo.workflowName,await A("deleteWorkflow")):P==="run-btn"?await A("runWorkflow"):P==="log-btn"&&await A("workflowLog")}}]},A=async c=>{await Ne();const i=document.getElementById(c);i&&ye.getOrCreateInstance(i).show()},O=()=>{_e.push("/web/workflows/workflow/new")},T=c=>`${(c._cell.row.data.workflowParams||[]).filter(m=>String((m==null?void 0:m.paramKey)||"").trim()).length}`,u=c=>{const i=c.getValue()||"-";return` -
- - - ${i} - -
- `},d=c=>{const i=c.getValue();if(!i)return"-";const m=new Date(i);return Number.isNaN(m.getTime())?`${i}`:`${m.toLocaleString()}`},b=()=>` -
- - - - -
`;return(c,i)=>{const m=qe("b-overlay");return E(),$("div",null,[B(Re,{"header-title":"Workflow","new-btn-title":"New Workflow","popup-flag":!1,"popup-target":"",class:"mb-3",onClickNewBtn:O}),s("div",Lt,[s("div",Rt,[s("div",$t,[B($e,{columns:L.value,"table-data":p.value},null,8,["columns","table-data"])])])]),B(tt,{"workflow-name":V.value,"workflow-idx":k.value,onGetWorkflowList:I},null,8,["workflow-name","workflow-idx"]),B(pt,{"workflow-idx":k.value,onGetWorkflowList:I},null,8,["workflow-idx"]),B(Pt,{"workflow-idx":k.value},null,8,["workflow-idx"]),B(m,{show:x.value,id:"overlay-background",variant:"transparent",opacity:"1",blur:"1rem",rounded:"lg",style:{"z-index":"1000"}},null,8,["show"])])}}});export{Ft as default}; diff --git a/src/main/resources/static/assets/WorkflowStageList-D9_HprfG.js b/src/main/resources/static/assets/WorkflowStageList-D9_HprfG.js deleted file mode 100644 index 14f5865..0000000 --- a/src/main/resources/static/assets/WorkflowStageList-D9_HprfG.js +++ /dev/null @@ -1,17 +0,0 @@ -import{_ as R}from"./TableHeader.vue_vue_type_script_setup_true_lang-DI9Uu4Cl.js";import{s as v,_ as j}from"./request-B_1A5BoF.js";import{d as C,u as D,w as $,o as E,M as z,r as d,c as u,a as e,t as h,j as G,b as T,v as O,F as L,e as H,f as _,g as f,h as F,i as x}from"./index-DRhuj6I4.js";const J=()=>v.get("/workflowStageType/list"),K=()=>v.get("/workflowStage/list");function Q(s){return v.get("/workflowStage/"+s)}function X(s){return v.get(`/workflowStage/duplicate?workflowStageName=${s.workflowStageName}&workflowStageTypeName=${s.workflowStageTypeName}`)}function Y(s){return v.post("/workflowStage",s)}function Z(s){return v.patch(`/workflowStage/${s.workflowStageIdx}`,s)}function ee(s){return v.delete(`/workflowStage/${s}`)}function te(s){return v.get(`/workflowStage/default/script/${s}`)}const oe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},ae={class:"modal-content"},le={class:"modal-header"},se={class:"modal-title"},re={class:"modal-body py-4"},ne={class:"mb-3"},ie={style:{display:"flex","justify-content":"start"}},de={key:0},we={class:"grid gap-0 column-gap-3"},ue=["value"],fe={class:"mb-3"},ce={class:"grid gap-0 column-gap-3"},ge={class:"col"},me={key:1,class:"btn btn-success",style:{margin:"3px"}},ke={class:"mb-3"},Se={class:"mb-3"},pe={class:"modal-footer"},ve=C({__name:"WorkflowStageForm",props:{mode:{},workflowStageIdx:{},workflowStageName:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=d(),g=d(),r=s,k=N,i=F(()=>r.workflowStageIdx),W=F(()=>r.workflowStageName),m=d(!1);$(i,async()=>{b(),await w()}),E(async()=>{c.value&&(g.value=new z(c.value)),b(),await w()});const t=d({}),w=async()=>{m.value=!0,r.mode==="new"?(t.value.workflowStageIdx=0,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName="",t.value.workflowStageName="",t.value.workflowStageDesc="",t.value.workflowStageContent="",t.value.workflowStageOrder=0,p.value=!1,S.value=!1,m.value=!1,console.log("isInitializing",m.value)):await Q(r.workflowStageIdx).then(a=>{t.value=a.data,p.value=!0,m.value=!1})},y=d([]),b=async()=>{try{const{data:a}=await J();y.value=a}catch(a){console.log(a)}},S=d(!1),V=async()=>{S.value=!S.value,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName=""},B=async()=>{p.value=!1,y.value.forEach(a=>{t.value.workflowStageTypeIdx===a.workflowStageTypeIdx&&(t.value.workflowStageTypeName=a.workflowStageTypeName)}),await I(t.value.workflowStageTypeName)},I=async a=>{const{data:o}=await te(a);t.value.workflowStageContent=o[0].workflowStageContent},p=d(!1),M=async()=>{const a={workflowStageName:t.value.workflowStageName,workflowStageTypeName:t.value.workflowStageTypeName},{data:o}=await X(a);o?l.error("Name is already in use."):(l.success("Name is available."),p.value=!0)};$(()=>[t.value.workflowStageName,t.value.workflowStageTypeName],()=>{if(!m.value){if(W.value===t.value.workflowStageName){p.value=!0;return}p.value=!1}});const P=async()=>{if(!S.value&&(!t.value.workflowStageTypeIdx||t.value.workflowStageTypeIdx===0)){l.error("Please select Workflow Stage Type.");return}if(S.value&&!t.value.workflowStageTypeName){l.error("Please enter new Workflow Stage Type.");return}if(!t.value.workflowStageName){l.error("Please enter Workflow Stage Name.");return}if(!p.value){l.error("Please perform duplicate check.");return}if(!t.value.workflowStageContent){l.error("Please enter Script.");return}let a=!1;r.mode==="new"?a=await U():a=await A(),a&&(k("get-workflow-stage-list"),w(),g.value&&(g.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const o=document.querySelector(".modal-backdrop");o==null||o.remove()},150)))},U=async()=>{try{const{data:a}=await Y(t.value);return a?(l.success("Registered successfully."),!0):(l.error("Failed to register."),!1)}catch{return l.error("Failed to register."),!1}},A=async()=>{try{const{data:a}=await Z(t.value);return a?(l.success("Updated successfully."),!0):(l.error("Failed to update."),!1)}catch{return l.error("Failed to update."),!1}};return(a,o)=>(f(),u("div",{class:"modal modal-blur fade",id:"workflowStageForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",oe,[e("div",ae,[e("div",le,[e("h3",se,h(r.mode==="new"?"New":"Edit")+" Workflow Stage",1),o[8]||(o[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",re,[e("div",null,[e("div",ne,[e("div",ie,[o[10]||(o[10]=e("label",{class:"form-label required col"}," Workflow Stage Type ",-1)),r.mode==="new"?(f(),u("div",de,[e("input",{type:"checkBox",onChange:V},null,32),o[9]||(o[9]=e("label",{class:"ms-2"},"Add Workflow Type",-1))])):G("",!0)]),e("div",we,[S.value?T((f(),u("input",{key:1,type:"text",class:"form-control p-2 g-col-12",placeholder:"Please enter the Workflow Stage type you want to add","onUpdate:modelValue":o[1]||(o[1]=n=>t.value.workflowStageTypeName=n),onFocusout:o[2]||(o[2]=n=>I(t.value.workflowStageTypeName))},null,544)),[[_,t.value.workflowStageTypeName]]):T((f(),u("select",{key:0,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value.workflowStageTypeIdx=n),class:"form-select p-2 g-col-12",onChange:B},[o[11]||(o[11]=e("option",{value:0},"Select Workflow Stage Type",-1)),(f(!0),u(L,null,H(y.value,(n,q)=>(f(),u("option",{value:n.workflowStageTypeIdx,key:q},h(n.workflowStageTypeName),9,ue))),128))],544)),[[O,t.value.workflowStageTypeIdx]])])]),e("div",fe,[o[12]||(o[12]=e("label",{class:"form-label required"},"Workflow Stage Name",-1)),e("div",ce,[T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Name","onUpdate:modelValue":o[3]||(o[3]=n=>t.value.workflowStageName=n)},null,512),[[_,t.value.workflowStageName]]),e("div",ge,[p.value?(f(),u("button",me,"Duplicate Check")):(f(),u("button",{key:0,class:"btn btn-primary chk",onClick:M},"Duplicate Check"))])])]),e("div",ke,[o[13]||(o[13]=e("label",{class:"form-label"},"Workflow Stage Description",-1)),T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Description","onUpdate:modelValue":o[4]||(o[4]=n=>t.value.workflowStageDesc=n)},null,512),[[_,t.value.workflowStageDesc]])]),e("div",Se,[o[14]||(o[14]=e("label",{class:"form-label required"},"Script",-1)),T(e("textarea",{rows:"10",class:"form-control p-2 g-col-11",placeholder:"Enter the Script","onUpdate:modelValue":o[5]||(o[5]=n=>t.value.workflowStageContent=n)},null,512),[[_,t.value.workflowStageContent]])])])]),e("div",pe,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:o[6]||(o[6]=n=>w())}," Cancel "),e("button",{type:"button",class:"btn btn-primary ms-auto",onClick:o[7]||(o[7]=n=>P())},h(r.mode==="new"?"Regist":"Edit"),1)])])])],512))}}),ye={class:"modal modal-blur fade",id:"deleteWorkflowStage",tabindex:"-1","aria-hidden":"true"},be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Ne={class:"modal-content"},Te={class:"modal-body py-4"},We={class:"modal-footer"},_e=C({__name:"DeleteWorkflowStage",props:{workflowStageName:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=s,g=N,r=async()=>{const{data:k}=await ee(c.workflowStageIdx);k?l.success("Deleted successfully."):l.error("Failed to delete."),g("get-workflow-stage-list")};return(k,i)=>(f(),u("div",ye,[e("div",be,[e("div",Ne,[i[2]||(i[2]=e("div",{class:"modal-status bg-danger"},null,-1)),i[3]||(i[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete Workflow Stage"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",Te,[e("h4",null,"Are you sure you want to delete "+h(c.workflowStageName)+"?",1)]),e("div",We,[i[1]||(i[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:i[0]||(i[0]=W=>r())}," Delete ")])])])]))}}),xe={class:"card card-flush w-100"},Ie=C({__name:"WorkflowStageList",setup(s){const N=D(),l=d([]),c=d([]);E(async()=>{i(),await g()});const g=async()=>{try{const{data:w}=await K();l.value=w}catch(w){console.log(w),N.error("Failed to load data.")}},r=d(0),k=d(""),i=()=>{c.value=[{title:"Stage Type",field:"workflowStageTypeName",width:"27%"},{title:"Stage Name",field:"workflowStageName",width:"27%"},{title:"Stage Desc",field:"workflowStageDesc",width:"26%"},{title:"Action",width:"20%",formatter:W,cellClick:function(w,y){const b=w.target,S=b==null?void 0:b.getAttribute("id");r.value=y.getRow().getData().workflowStageIdx,k.value=y.getRow().getData().workflowStageName,S==="edit-btn"&&(m.value="edit")}}]},W=()=>` -
- - -
`,m=d("new"),t=()=>{r.value=0,m.value="new"};return(w,y)=>(f(),u(L,null,[x(R,{"header-title":"Workflow Stage","new-btn-title":"New Stage","popup-flag":!0,"popup-target":"#workflowStageForm",class:"mb-3",onClickNewBtn:t}),e("div",xe,[x(j,{columns:c.value,"table-data":l.value},null,8,["columns","table-data"]),x(ve,{mode:m.value,"workflow-stage-idx":r.value,"workflow-stage-name":k.value,onGetWorkflowStageList:g},null,8,["mode","workflow-stage-idx","workflow-stage-name"]),x(_e,{"workflow-stage-name":k.value,"workflow-stage-idx":r.value,onGetWorkflowStageList:g},null,8,["workflow-stage-name","workflow-stage-idx"])])],64))}});export{Ie as default}; diff --git a/src/main/resources/static/assets/WorkflowStageList-BGzTK1Rw.js b/src/main/resources/static/assets/WorkflowStageList-DdvnJZ9k.js similarity index 98% rename from src/main/resources/static/assets/WorkflowStageList-BGzTK1Rw.js rename to src/main/resources/static/assets/WorkflowStageList-DdvnJZ9k.js index 193b496..90d32a6 100644 --- a/src/main/resources/static/assets/WorkflowStageList-BGzTK1Rw.js +++ b/src/main/resources/static/assets/WorkflowStageList-DdvnJZ9k.js @@ -1,4 +1,4 @@ -import{_ as R}from"./TableHeader.vue_vue_type_script_setup_true_lang-l3eqvMpD.js";import{s as v,_ as j}from"./request-1ziJwdRS.js";import{d as C,u as D,r as d,c as $,w as F,o as E,M as z,a as u,b as e,t as h,j as G,e as T,v as O,F as L,f as H,g as _,h as f,i as x}from"./index-DhGk3pPk.js";const J=()=>v.get("/workflowStageType/list"),K=()=>v.get("/workflowStage/list");function Q(s){return v.get("/workflowStage/"+s)}function X(s){return v.get(`/workflowStage/duplicate?workflowStageName=${s.workflowStageName}&workflowStageTypeName=${s.workflowStageTypeName}`)}function Y(s){return v.post("/workflowStage",s)}function Z(s){return v.patch(`/workflowStage/${s.workflowStageIdx}`,s)}function ee(s){return v.delete(`/workflowStage/${s}`)}function te(s){return v.get(`/workflowStage/default/script/${s}`)}const oe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},ae={class:"modal-content"},le={class:"modal-header"},se={class:"modal-title"},re={class:"modal-body py-4"},ne={class:"mb-3"},ie={style:{display:"flex","justify-content":"start"}},de={key:0},we={class:"grid gap-0 column-gap-3"},ue=["value"],fe={class:"mb-3"},ce={class:"grid gap-0 column-gap-3"},ge={class:"col"},me={key:1,class:"btn btn-success",style:{margin:"3px"}},ke={class:"mb-3"},Se={class:"mb-3"},pe={class:"modal-footer"},ve=C({__name:"WorkflowStageForm",props:{mode:{},workflowStageIdx:{},workflowStageName:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=d(),g=d(),r=s,k=N,i=$(()=>r.workflowStageIdx),W=$(()=>r.workflowStageName),m=d(!1);F(i,async()=>{b(),await w()}),E(async()=>{c.value&&(g.value=new z(c.value)),b(),await w()});const t=d({}),w=async()=>{m.value=!0,r.mode==="new"?(t.value.workflowStageIdx=0,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName="",t.value.workflowStageName="",t.value.workflowStageDesc="",t.value.workflowStageContent="",t.value.workflowStageOrder=0,p.value=!1,S.value=!1,m.value=!1,console.log("isInitializing",m.value)):await Q(r.workflowStageIdx).then(a=>{t.value=a.data,p.value=!0,m.value=!1})},y=d([]),b=async()=>{try{const{data:a}=await J();y.value=a}catch(a){console.log(a)}},S=d(!1),V=async()=>{S.value=!S.value,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName=""},B=async()=>{p.value=!1,y.value.forEach(a=>{t.value.workflowStageTypeIdx===a.workflowStageTypeIdx&&(t.value.workflowStageTypeName=a.workflowStageTypeName)}),await I(t.value.workflowStageTypeName)},I=async a=>{const{data:o}=await te(a);t.value.workflowStageContent=o[0].workflowStageContent},p=d(!1),M=async()=>{const a={workflowStageName:t.value.workflowStageName,workflowStageTypeName:t.value.workflowStageTypeName},{data:o}=await X(a);o?l.error("Name is already in use."):(l.success("Name is available."),p.value=!0)};F(()=>[t.value.workflowStageName,t.value.workflowStageTypeName],()=>{if(!m.value){if(W.value===t.value.workflowStageName){p.value=!0;return}p.value=!1}});const P=async()=>{if(!S.value&&(!t.value.workflowStageTypeIdx||t.value.workflowStageTypeIdx===0)){l.error("Please select Workflow Stage Type.");return}if(S.value&&!t.value.workflowStageTypeName){l.error("Please enter new Workflow Stage Type.");return}if(!t.value.workflowStageName){l.error("Please enter Workflow Stage Name.");return}if(!p.value){l.error("Please perform duplicate check.");return}if(!t.value.workflowStageContent){l.error("Please enter Script.");return}let a=!1;r.mode==="new"?a=await U():a=await A(),a&&(k("get-workflow-stage-list"),w(),g.value&&(g.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const o=document.querySelector(".modal-backdrop");o==null||o.remove()},150)))},U=async()=>{try{const{data:a}=await Y(t.value);return a?(l.success("Registered successfully."),!0):(l.error("Failed to register."),!1)}catch{return l.error("Failed to register."),!1}},A=async()=>{try{const{data:a}=await Z(t.value);return a?(l.success("Updated successfully."),!0):(l.error("Failed to update."),!1)}catch{return l.error("Failed to update."),!1}};return(a,o)=>(f(),u("div",{class:"modal modal-blur fade",id:"workflowStageForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",oe,[e("div",ae,[e("div",le,[e("h3",se,h(r.mode==="new"?"New":"Edit")+" Workflow Stage",1),o[8]||(o[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",re,[e("div",null,[e("div",ne,[e("div",ie,[o[10]||(o[10]=e("label",{class:"form-label required col"}," Workflow Stage Type ",-1)),r.mode==="new"?(f(),u("div",de,[e("input",{type:"checkBox",onChange:V},null,32),o[9]||(o[9]=e("label",{class:"ms-2"},"Add Workflow Type",-1))])):G("",!0)]),e("div",we,[S.value?T((f(),u("input",{key:1,type:"text",class:"form-control p-2 g-col-12",placeholder:"Please enter the Workflow Stage type you want to add","onUpdate:modelValue":o[1]||(o[1]=n=>t.value.workflowStageTypeName=n),onFocusout:o[2]||(o[2]=n=>I(t.value.workflowStageTypeName))},null,544)),[[_,t.value.workflowStageTypeName]]):T((f(),u("select",{key:0,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value.workflowStageTypeIdx=n),class:"form-select p-2 g-col-12",onChange:B},[o[11]||(o[11]=e("option",{value:0},"Select Workflow Stage Type",-1)),(f(!0),u(L,null,H(y.value,(n,q)=>(f(),u("option",{value:n.workflowStageTypeIdx,key:q},h(n.workflowStageTypeName),9,ue))),128))],544)),[[O,t.value.workflowStageTypeIdx]])])]),e("div",fe,[o[12]||(o[12]=e("label",{class:"form-label required"},"Workflow Stage Name",-1)),e("div",ce,[T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Name","onUpdate:modelValue":o[3]||(o[3]=n=>t.value.workflowStageName=n)},null,512),[[_,t.value.workflowStageName]]),e("div",ge,[p.value?(f(),u("button",me,"Duplicate Check")):(f(),u("button",{key:0,class:"btn btn-primary chk",onClick:M},"Duplicate Check"))])])]),e("div",ke,[o[13]||(o[13]=e("label",{class:"form-label"},"Workflow Stage Description",-1)),T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Description","onUpdate:modelValue":o[4]||(o[4]=n=>t.value.workflowStageDesc=n)},null,512),[[_,t.value.workflowStageDesc]])]),e("div",Se,[o[14]||(o[14]=e("label",{class:"form-label required"},"Script",-1)),T(e("textarea",{rows:"10",class:"form-control p-2 g-col-11",placeholder:"Enter the Script","onUpdate:modelValue":o[5]||(o[5]=n=>t.value.workflowStageContent=n)},null,512),[[_,t.value.workflowStageContent]])])])]),e("div",pe,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:o[6]||(o[6]=n=>w())}," Cancel "),e("button",{type:"button",class:"btn btn-primary ms-auto",onClick:o[7]||(o[7]=n=>P())},h(r.mode==="new"?"Regist":"Edit"),1)])])])],512))}}),ye={class:"modal modal-blur fade",id:"deleteWorkflowStage",tabindex:"-1","aria-hidden":"true"},be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Ne={class:"modal-content"},Te={class:"modal-body py-4"},We={class:"modal-footer"},_e=C({__name:"DeleteWorkflowStage",props:{workflowStageName:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=s,g=N,r=async()=>{const{data:k}=await ee(c.workflowStageIdx);k?l.success("Deleted successfully."):l.error("Failed to delete."),g("get-workflow-stage-list")};return(k,i)=>(f(),u("div",ye,[e("div",be,[e("div",Ne,[i[2]||(i[2]=e("div",{class:"modal-status bg-danger"},null,-1)),i[3]||(i[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete Workflow Stage"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",Te,[e("h4",null,"Are you sure you want to delete "+h(c.workflowStageName)+"?",1)]),e("div",We,[i[1]||(i[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:i[0]||(i[0]=W=>r())}," Delete ")])])])]))}}),xe={class:"card card-flush w-100"},Ie=C({__name:"WorkflowStageList",setup(s){const N=D(),l=d([]),c=d([]);E(async()=>{i(),await g()});const g=async()=>{try{const{data:w}=await K();l.value=w}catch(w){console.log(w),N.error("Failed to load data.")}},r=d(0),k=d(""),i=()=>{c.value=[{title:"Stage Type",field:"workflowStageTypeName",width:"27%"},{title:"Stage Name",field:"workflowStageName",width:"27%"},{title:"Stage Desc",field:"workflowStageDesc",width:"26%"},{title:"Action",width:"20%",formatter:W,cellClick:function(w,y){const b=w.target,S=b==null?void 0:b.getAttribute("id");r.value=y.getRow().getData().workflowStageIdx,k.value=y.getRow().getData().workflowStageName,S==="edit-btn"&&(m.value="edit")}}]},W=()=>` +import{_ as R}from"./TableHeader.vue_vue_type_script_setup_true_lang-CH8iOgmf.js";import{s as v,_ as j}from"./request-Bkt8aQiS.js";import{d as C,u as D,r as d,c as $,w as F,o as E,M as z,a as u,b as e,t as h,j as G,e as T,v as O,F as L,f as H,g as _,h as f,i as x}from"./index-B3pAGCoW.js";const J=()=>v.get("/workflowStageType/list"),K=()=>v.get("/workflowStage/list");function Q(s){return v.get("/workflowStage/"+s)}function X(s){return v.get(`/workflowStage/duplicate?workflowStageName=${s.workflowStageName}&workflowStageTypeName=${s.workflowStageTypeName}`)}function Y(s){return v.post("/workflowStage",s)}function Z(s){return v.patch(`/workflowStage/${s.workflowStageIdx}`,s)}function ee(s){return v.delete(`/workflowStage/${s}`)}function te(s){return v.get(`/workflowStage/default/script/${s}`)}const oe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},ae={class:"modal-content"},le={class:"modal-header"},se={class:"modal-title"},re={class:"modal-body py-4"},ne={class:"mb-3"},ie={style:{display:"flex","justify-content":"start"}},de={key:0},we={class:"grid gap-0 column-gap-3"},ue=["value"],fe={class:"mb-3"},ce={class:"grid gap-0 column-gap-3"},ge={class:"col"},me={key:1,class:"btn btn-success",style:{margin:"3px"}},ke={class:"mb-3"},Se={class:"mb-3"},pe={class:"modal-footer"},ve=C({__name:"WorkflowStageForm",props:{mode:{},workflowStageIdx:{},workflowStageName:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=d(),g=d(),r=s,k=N,i=$(()=>r.workflowStageIdx),W=$(()=>r.workflowStageName),m=d(!1);F(i,async()=>{b(),await w()}),E(async()=>{c.value&&(g.value=new z(c.value)),b(),await w()});const t=d({}),w=async()=>{m.value=!0,r.mode==="new"?(t.value.workflowStageIdx=0,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName="",t.value.workflowStageName="",t.value.workflowStageDesc="",t.value.workflowStageContent="",t.value.workflowStageOrder=0,p.value=!1,S.value=!1,m.value=!1,console.log("isInitializing",m.value)):await Q(r.workflowStageIdx).then(a=>{t.value=a.data,p.value=!0,m.value=!1})},y=d([]),b=async()=>{try{const{data:a}=await J();y.value=a}catch(a){console.log(a)}},S=d(!1),V=async()=>{S.value=!S.value,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName=""},B=async()=>{p.value=!1,y.value.forEach(a=>{t.value.workflowStageTypeIdx===a.workflowStageTypeIdx&&(t.value.workflowStageTypeName=a.workflowStageTypeName)}),await I(t.value.workflowStageTypeName)},I=async a=>{const{data:o}=await te(a);t.value.workflowStageContent=o[0].workflowStageContent},p=d(!1),M=async()=>{const a={workflowStageName:t.value.workflowStageName,workflowStageTypeName:t.value.workflowStageTypeName},{data:o}=await X(a);o?l.error("Name is already in use."):(l.success("Name is available."),p.value=!0)};F(()=>[t.value.workflowStageName,t.value.workflowStageTypeName],()=>{if(!m.value){if(W.value===t.value.workflowStageName){p.value=!0;return}p.value=!1}});const P=async()=>{if(!S.value&&(!t.value.workflowStageTypeIdx||t.value.workflowStageTypeIdx===0)){l.error("Please select Workflow Stage Type.");return}if(S.value&&!t.value.workflowStageTypeName){l.error("Please enter new Workflow Stage Type.");return}if(!t.value.workflowStageName){l.error("Please enter Workflow Stage Name.");return}if(!p.value){l.error("Please perform duplicate check.");return}if(!t.value.workflowStageContent){l.error("Please enter Script.");return}let a=!1;r.mode==="new"?a=await U():a=await A(),a&&(k("get-workflow-stage-list"),w(),g.value&&(g.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const o=document.querySelector(".modal-backdrop");o==null||o.remove()},150)))},U=async()=>{try{const{data:a}=await Y(t.value);return a?(l.success("Registered successfully."),!0):(l.error("Failed to register."),!1)}catch{return l.error("Failed to register."),!1}},A=async()=>{try{const{data:a}=await Z(t.value);return a?(l.success("Updated successfully."),!0):(l.error("Failed to update."),!1)}catch{return l.error("Failed to update."),!1}};return(a,o)=>(f(),u("div",{class:"modal modal-blur fade",id:"workflowStageForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",oe,[e("div",ae,[e("div",le,[e("h3",se,h(r.mode==="new"?"New":"Edit")+" Workflow Stage",1),o[8]||(o[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",re,[e("div",null,[e("div",ne,[e("div",ie,[o[10]||(o[10]=e("label",{class:"form-label required col"}," Workflow Stage Type ",-1)),r.mode==="new"?(f(),u("div",de,[e("input",{type:"checkBox",onChange:V},null,32),o[9]||(o[9]=e("label",{class:"ms-2"},"Add Workflow Type",-1))])):G("",!0)]),e("div",we,[S.value?T((f(),u("input",{key:1,type:"text",class:"form-control p-2 g-col-12",placeholder:"Please enter the Workflow Stage type you want to add","onUpdate:modelValue":o[1]||(o[1]=n=>t.value.workflowStageTypeName=n),onFocusout:o[2]||(o[2]=n=>I(t.value.workflowStageTypeName))},null,544)),[[_,t.value.workflowStageTypeName]]):T((f(),u("select",{key:0,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value.workflowStageTypeIdx=n),class:"form-select p-2 g-col-12",onChange:B},[o[11]||(o[11]=e("option",{value:0},"Select Workflow Stage Type",-1)),(f(!0),u(L,null,H(y.value,(n,q)=>(f(),u("option",{value:n.workflowStageTypeIdx,key:q},h(n.workflowStageTypeName),9,ue))),128))],544)),[[O,t.value.workflowStageTypeIdx]])])]),e("div",fe,[o[12]||(o[12]=e("label",{class:"form-label required"},"Workflow Stage Name",-1)),e("div",ce,[T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Name","onUpdate:modelValue":o[3]||(o[3]=n=>t.value.workflowStageName=n)},null,512),[[_,t.value.workflowStageName]]),e("div",ge,[p.value?(f(),u("button",me,"Duplicate Check")):(f(),u("button",{key:0,class:"btn btn-primary chk",onClick:M},"Duplicate Check"))])])]),e("div",ke,[o[13]||(o[13]=e("label",{class:"form-label"},"Workflow Stage Description",-1)),T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Description","onUpdate:modelValue":o[4]||(o[4]=n=>t.value.workflowStageDesc=n)},null,512),[[_,t.value.workflowStageDesc]])]),e("div",Se,[o[14]||(o[14]=e("label",{class:"form-label required"},"Script",-1)),T(e("textarea",{rows:"10",class:"form-control p-2 g-col-11",placeholder:"Enter the Script","onUpdate:modelValue":o[5]||(o[5]=n=>t.value.workflowStageContent=n)},null,512),[[_,t.value.workflowStageContent]])])])]),e("div",pe,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:o[6]||(o[6]=n=>w())}," Cancel "),e("button",{type:"button",class:"btn btn-primary ms-auto",onClick:o[7]||(o[7]=n=>P())},h(r.mode==="new"?"Regist":"Edit"),1)])])])],512))}}),ye={class:"modal modal-blur fade",id:"deleteWorkflowStage",tabindex:"-1","aria-hidden":"true"},be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Ne={class:"modal-content"},Te={class:"modal-body py-4"},We={class:"modal-footer"},_e=C({__name:"DeleteWorkflowStage",props:{workflowStageName:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=s,g=N,r=async()=>{const{data:k}=await ee(c.workflowStageIdx);k?l.success("Deleted successfully."):l.error("Failed to delete."),g("get-workflow-stage-list")};return(k,i)=>(f(),u("div",ye,[e("div",be,[e("div",Ne,[i[2]||(i[2]=e("div",{class:"modal-status bg-danger"},null,-1)),i[3]||(i[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete Workflow Stage"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",Te,[e("h4",null,"Are you sure you want to delete "+h(c.workflowStageName)+"?",1)]),e("div",We,[i[1]||(i[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:i[0]||(i[0]=W=>r())}," Delete ")])])])]))}}),xe={class:"card card-flush w-100"},Ie=C({__name:"WorkflowStageList",setup(s){const N=D(),l=d([]),c=d([]);E(async()=>{i(),await g()});const g=async()=>{try{const{data:w}=await K();l.value=w}catch(w){console.log(w),N.error("Failed to load data.")}},r=d(0),k=d(""),i=()=>{c.value=[{title:"Stage Type",field:"workflowStageTypeName",width:"27%"},{title:"Stage Name",field:"workflowStageName",width:"27%"},{title:"Stage Desc",field:"workflowStageDesc",width:"26%"},{title:"Action",width:"20%",formatter:W,cellClick:function(w,y){const b=w.target,S=b==null?void 0:b.getAttribute("id");r.value=y.getRow().getData().workflowStageIdx,k.value=y.getRow().getData().workflowStageName,S==="edit-btn"&&(m.value="edit")}}]},W=()=>`