@kong-ui-public/entities-upstreams-targets 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -840,10 +840,10 @@ const de = {
840
840
  setup(e, { emit: a }) {
841
841
  const t = e;
842
842
  Kl((k) => ({
843
- "1df60db4": u.value ? "none" : `solid ${c(Jr)} ${c(Rr)}`,
844
- "21d1d34e": n.value && o.value ? "block" : "flex",
845
- "4d3dc7e7": n.value && o.value ? "100%" : t.slim ? "50%" : "25%",
846
- "4d400dc2": n.value && o.value ? "100%" : t.slim ? "50%" : "75%"
843
+ "23f3018c": u.value ? "none" : `solid ${c(Jr)} ${c(Rr)}`,
844
+ "3815ec6d": n.value && o.value ? "block" : "flex",
845
+ "1957f153": n.value && o.value ? "100%" : t.slim ? "50%" : "25%",
846
+ "195a372e": n.value && o.value ? "100%" : t.slim ? "50%" : "75%"
847
847
  }));
848
848
  const l = ct(), { i18n: { t: s, formatUnixTimeStamp: i } } = de.useI18n(), o = O(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), d = O(() => !!(t.item.tooltip || l["label-tooltip"])), n = O(() => t.item.type === se.Json || t.item.type === se.JsonArray), u = O(() => t.item.type === se.JsonArray), f = O(() => {
849
849
  switch (t.item.type) {
@@ -1092,7 +1092,7 @@ const de = {
1092
1092
  ]);
1093
1093
  };
1094
1094
  }
1095
- }), Nt = /* @__PURE__ */ be(ri, [["__scopeId", "data-v-307ab96d"]]);
1095
+ }), Nt = /* @__PURE__ */ be(ri, [["__scopeId", "data-v-e851fc7c"]]);
1096
1096
  /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
1097
1097
  function zl(e) {
1098
1098
  return typeof e > "u" || e === null;
@@ -3024,7 +3024,7 @@ const To = {
3024
3024
  ]), 1024);
3025
3025
  };
3026
3026
  }
3027
- }), Yo = /* @__PURE__ */ be(Qo, [["__scopeId", "data-v-24515123"]]), Zo = ["onReset", "onSubmit"], Go = {
3027
+ }), Yo = /* @__PURE__ */ be(Qo, [["__scopeId", "data-v-b3999889"]]), Zo = ["onReset", "onSubmit"], Go = {
3028
3028
  class: "form-actions",
3029
3029
  "data-testid": "form-actions"
3030
3030
  }, Xo = /* @__PURE__ */ le({
@@ -1,4 +1,4 @@
1
- (function(X,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","vue-router"],t):(X=typeof globalThis<"u"?globalThis:X||self,t(X["kong-ui-entities-upstreams-targets"]={},X.Vue,X.axios,X["kong-ui-public-i18n"],X.Kongponents,X.VueRouter))})(this,function(X,t,pr,Ve,ur,ze){"use strict";var Je=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(Je||{}),re=(e=>(e.Edit="edit",e.Create="create",e))(re||{}),de=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(de||{}),L=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(L||{}),z=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(z||{});function We(e={}){return{axiosInstance:pr.create({withCredentials:!0,timeout:3e4,...e})}}function fr(){return{debounce:(e,l)=>{let a;return(...r)=>{clearTimeout(a),a=window==null?void 0:window.setTimeout(()=>{e(...r)},l)}}}}const Qe="khcp-user-table-preferences",mr={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function gr(){const e=a=>{if(typeof a=="string")try{return JSON.parse(a)}catch(r){console.error("useTablePreferences(tryParseJson)",r);return}},l=()=>{const a=e(localStorage.getItem(Qe));return!a||!Object.keys(a).length?new Map:new Map(Object.entries(a))};return{setTablePreferences:(a,r)=>{try{const o=l();o.set(a,r),localStorage.setItem(Qe,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:a=>{const r=l();return(r==null?void 0:r.get(a))||void 0||mr},deleteAllTablePreferences:()=>{localStorage.removeItem(Qe)}}}const yr={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},kr={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},br={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},Cr={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},_r={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},wr={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Sr={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},xr={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Nr={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Vr={global:yr,deleteModal:kr,baseForm:br,baseTable:Cr,baseConfigCard:_r,filter:wr,debouncedFilter:Sr,errors:xr,toggleModal:Nr};function Ye(){const e=Ve.createI18n("en-us",Vr);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function bt(){const e=(a,r)=>(r==null?void 0:r[a])??void 0,l=(a,r)=>{if(a.length!==r.length)return!1;const o=new Set([...a,...r]);for(const s of o){const c=a.filter(i=>i===s).length,h=r.filter(i=>i===s).length;if(c!==h)return!1}return!0};return{getPropValue:e,objectsAreEqual:(a,r,o)=>{if(o){if(Object.keys(a).length===Object.keys(r).length)for(const s in a)if(Array.isArray(a[s])&&Array.isArray(r[s])){if(l(a[s],r[s]))continue;return!1}else{if(a[s]===r[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(a)===JSON.stringify(r)}catch{return!1}},sortAlpha:a=>(r,o)=>{let s=r[a]===void 0||r[a]===null?"":r[a],c=o[a]===void 0||o[a]===null?"":o[a];return Array.isArray(r[a])&&(s=r[a][0]),Array.isArray(o[a])&&(c=o[a][0]),s.localeCompare(c)},isValidUuid:a=>a?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(a):!1}}function Ir(e,l,a,r={fetchedItemsKey:"data",searchKeys:["id"]}){a||(a="100");const{axiosInstance:o}=We({headers:e.requestHeaders}),{i18n:{t:s}}=Ye(),{debounce:c}=fr(),h=c(async w=>{await v(w)},200),i=t.ref(!1),d=t.ref(""),u=t.ref(""),p=t.ref([]),n=t.ref([]),y=t.ref(void 0),b=t.unref(l);let f=`${e.apiBaseUrl}${b}`;e.app==="konnect"?f=f.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(f=f.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:m}=bt(),V=async()=>{try{i.value=!0;const{data:w}=await o.get(`${f}?size=${a}`);w!=null&&w.next||(y.value=r.fetchedItemsKey in w?w[r.fetchedItemsKey]:[]),n.value=r.fetchedItemsKey in w?w[r.fetchedItemsKey]:[],p.value=n.value}catch{p.value=[],d.value=s("debouncedFilter.errors.fetch")}finally{i.value=!1}},C=t.ref(""),v=async w=>{var x,U,F;if(C.value!==w)if(C.value=w||"",y.value===void 0)try{if(i.value=!0,d.value="",u.value="",e.app==="konnect"){let N=f+"";w&&(N+=`/${w}`);const{data:I}=await o.get(`${N}?size=${a}`);r.fetchedItemsKey in I?p.value=I[r.fetchedItemsKey]:I!=null&&I.id?p.value=[I]:p.value=[]}else if(w){const N=[];m(w)&&r.searchKeys.includes("id")?N.push((async()=>{const{data:B}=await o.get(`${f}/${w}`);return[B[r.fetchedItemsKey]??B]})()):N.push(...r.searchKeys.filter(B=>B!=="id").map(async B=>{const{data:H}=await o.get(`${f}?${B}=${w}`);return H[r.fetchedItemsKey]}));const I=await Promise.all(N),_=new Set;p.value=[],(x=I==null?void 0:I.forEach)==null||x.call(I,B=>{var H;(H=B==null?void 0:B.forEach)==null||H.call(B,D=>{_.has(D.id)||(_.add(D.id),p.value.push(D))})})}else p.value=n.value}catch(N){((U=N==null?void 0:N.response)==null?void 0:U.status)===404?u.value=s("debouncedFilter.errors.invalid"):(p.value=[],d.value=s("debouncedFilter.errors.fetch"))}finally{i.value=!1}else i.value=!0,u.value="",w?(p.value=(F=y.value)==null?void 0:F.filter(N=>{var I;let _=!1;for(const B of r.searchKeys){const H=typeof N[B]=="string"?(I=N[B])==null?void 0:I.toLowerCase():N[B];H!=null&&H.includes(w.toLowerCase())&&(_=!0)}return _}),(!p.value||!p.value.length)&&(u.value=s("debouncedFilter.errors.invalid"))):p.value=y.value,i.value=!1};return{loading:i,error:d,validationError:u,results:p,allRecords:y,loadItems:V,debouncedQueryChange:h}}function Br(e,l){const a=t.unref(l),r=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a));return r.value.search="",o=>`${r.value.href}/${o}`}function Tr(){const{i18n:{t:e}}=Ye();return{getMessageFromError:l=>{var a,r,o;if(!l)return e("errors.unexpected");if((a=l==null?void 0:l.response)!=null&&a.data){if(l.response.data.detail)return l.response.data.detail;if((r=l.response.data.details)!=null&&r.length)return l.response.data.details.map(s=>{let c=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(c=s.messages.join(", ")),s.field?`${s.field} - ${c}`:c}).join("; ");if(l.response.data.message){const{message:s}=l.response.data;return Array.isArray(s)?(o=s[0])!=null&&o.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof l.response.data=="string")return l.response.data;if(typeof l.response.data=="object")return Object.keys(l.response.data).map(s=>`${s} ${l.response.data[s]}`).join(", ")}return l.message||e("errors.unexpected")}}}function Hr(e){const l=window.location.origin,a=l.endsWith("/")?l:`${l}/`;try{const r=e.join("/"),o=`${a}${r}`,s=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!s&&new URL(o))return`${a}${r}`;throw new Error("Invalid url")}catch(r){return console.warn("Failed to build valid URL:",r),""}}function Ct(e,l){const a=t.ref(t.unref(e)),r=t.ref(t.unref(l)),o=t.computed(()=>!!(a.value.app==="konnect"||a.value.isExactMatch)),s=t.computed(()=>r.value.startsWith("/")?new URL(`${window.location.origin}${r.value}`):new URL(r.value));return c=>{const{page:h,pageSize:i,offset:d,sortColumnKey:u,sortColumnOrder:p,query:n}=c;try{let y=new URL(s.value.href);return o.value&&n?(y.search="",y=new URL(`${y.href}/${n}/`)):(o.value||new URLSearchParams(n).forEach((b,f)=>{y.searchParams.append(f,b)}),u&&y.searchParams.append("sort_by",u),p==="desc"&&y.searchParams.append("sort_desc","1"),y.searchParams.append("size",String(i))),d&&h!==1&&y.searchParams.append("offset",String(d)),y.href}catch(y){return console.error("RouteList(fetcher)",y),r.value}}}function Er(e,l,a="data"){const r=t.unref(l),{axiosInstance:o}=We({headers:e.requestHeaders}),s=Ct(e,r),c=t.ref({status:de.Idle});return{fetcher:async h=>{try{c.value={status:de.Loading};const i=s(h),{data:d}=await o.get(i),u=a&&a.replace(/[^\w-_]/gi,"");let p;d[u]&&Array.isArray(d[u])?p=d[u]:p=Object.keys(d).length?[d]:[];const n={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return c.value={status:de.Idle,response:n},n}catch(i){const d={data:[],total:0};return h.query&&i.response.status===404?(c.value={status:de.NoResults,response:d,error:i},d):(c.value={status:de.Error,response:d,error:i},d)}},fetcherState:c}}function Ar(){const e=(a,r="_")=>a?a.split(r).map(o=>o.toLowerCase()==="id"?o.toUpperCase():o.charAt(0).toUpperCase()+o.substring(1)).join(" "):"",l=/(?:^|[\s-:'"])\w/g;return{capitalize:a=>a?a.replace(l,r=>r.toUpperCase()):"",convertKeyToTitle:e}}const _t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,wt=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const l=e.match(_t);if(!l)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return l.shift(),l},St=e=>e==="*"||e==="x"||e==="X",xt=e=>{const l=parseInt(e,10);return isNaN(l)?e:l},Fr=(e,l)=>typeof e!=typeof l?[String(e),String(l)]:[e,l],qr=(e,l)=>{if(St(e)||St(l))return 0;const[a,r]=Fr(xt(e),xt(l));return a>r?1:a<r?-1:0},Nt=(e,l)=>{for(let a=0;a<Math.max(e.length,l.length);a++){const r=qr(e[a]||"0",l[a]||"0");if(r!==0)return r}return 0},Or=(e,l)=>{const a=wt(e),r=wt(l),o=a.pop(),s=r.pop(),c=Nt(a,r);return c!==0?c:o&&s?Nt(o.split("."),s.split(".")):o||s?o?-1:1:0},Vt=(e,l,a)=>{vr(a);const r=Or(e,l);return It[a].includes(r)},It={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Bt=Object.keys(It),vr=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Bt.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Bt.join("|")}`)},Ur=e=>typeof e=="string"&&/^[v\d]/.test(e)&&_t.test(e);function $r(e){const{gatewayInfo:l,supportedRange:a}=e;if(!l)return!0;const{edition:r,version:o}=l;if(!Ur(o))return console.error("Invalid version"),!1;const s=a[r];if(!s)return!1;const[c,h]=s;return!(c&&Vt(o,c,"<")||h&&Vt(o,h,">"))}function Mr(e){const l=t.ref(0),a=t.ref(0),r=t.ref(!1);return t.watch(e,o=>{o&&!r.value&&(l.value=o.offsetWidth,a.value=o.scrollWidth,r.value=!0)}),{isTruncated:t.computed(()=>l.value<a.value)}}const Y={useAxios:We,useDebouncedFilter:Ir,useDeleteUrlBuilder:Br,useErrors:Tr,useExternalLinkCreator:Hr,useFetcher:Er,useFetchUrlBuilder:Ct,useHelpers:bt,useStringHelpers:Ar,useI18n:Ye,useGatewayFeatureSupported:$r,useTruncationDetector:Mr},Dr={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},jr="Copy to clipboard",Kr={message:Dr,iconTitle:jr},Pr="kong-ui-copy-uuid-notify",Tt="24px",Lr=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Rr=e=>(t.pushScopeId("data-v-9971cc79"),e=e(),t.popScopeId(),e),zr=["aria-hidden"],Jr={key:0,"data-testid":"kui-icon-svg-title"},Wr=Rr(()=>t.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),Qr=t.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Tt,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const o=String(l.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return Tt}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(o,s)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Jr,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Wr],8,zr))]),_:1},8,["aria-hidden","style"]))}}),Yr=Lr(Qr,[["__scopeId","data-v-9971cc79"]]),Zr="16px",Gr={class:"kong-ui-copy-uuid"},Xr=["onClick"],Ht=15,eo=t.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:l}){const a=e,{t:r}=Ve.createI18n("en-us",Kr),o=a.notify||t.inject(Pr,()=>{}),s=t.computed(()=>a.idTooltip?{label:a.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:a.uuid}),c=t.computed(()=>!!(a.tooltip&&a.successTooltip)),h=t.ref(a.tooltip),i=t.computed(()=>a.tooltip?{label:h.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=t.computed(()=>{var n;return a.format==="redacted"?"*****":a.format==="deleted"?`*${(n=a.uuid)==null?void 0:n.substring(0,5)}`:a.uuid}),u=n=>{h.value=n,setTimeout(()=>{h.value=a.tooltip},1800)},p=n=>{var y,b;if(!n(a.uuid)){typeof o=="function"&&o({type:"error",message:r("message.fail")}),c.value?u(r("message.fail")):l("error",a.uuid);return}const f=((y=a.uuid)==null?void 0:y.length)>Ht,m=a.format==="hidden"||a.format==="redacted"?r("message.success.prefix"):`"${((b=a.uuid)==null?void 0:b.substring(0,Ht))+(f?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${m}${r("message.success.content")}`}),c.value?u(a.successTooltip):l("success",a.uuid)};return(n,y)=>{const b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Gr,[e.format!=="hidden"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),t.mergeProps({key:0},s.value,{"data-testid":"copy-id"}),{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},t.toDisplayString(d.value),3)]),_:1},16)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),t.mergeProps(i.value,{class:"uuid-icon-wrapper"}),{default:t.withCtx(()=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:f})=>[t.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:t.withModifiers(m=>p(f),["stop"])},[t.createVNode(t.unref(Yr),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:t.unref(Zr),title:t.unref(r)("iconTitle")},null,8,["color","decorative","size","title"])],8,Xr)]),_:1})]),_:1},16))])}}}),to=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Et=to(eo,[["__scopeId","data-v-0c07874b"]]),ao={key:0,class:"config-card-fieldset-title"},lo=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const l=e,{i18n:{t:a}}=Y.useI18n(),{convertKeyToTitle:r}=Y.useStringHelpers(),o=t.computed(()=>l.item.key??"json-array-item"),s=t.computed(()=>l.item.value??l.item),c=t.computed(()=>{const i=JSON.parse(JSON.stringify(s.value));return l.isArrayItem&&delete i.name,i}),h=t.computed(()=>{var i;return l.isArrayItem?(i=s.value)!=null&&i.name?r(s.value.name,"_"):a("baseConfigCard.general.entryTitle",{index:l.index}):""});return(i,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",ao,[t.createElementVNode("b",null,t.toDisplayString(h.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(c.value),(u,p)=>(t.openBlock(),t.createBlock(Ze,{key:`${o.value}-property-${p}`,item:{key:u,label:t.unref(r)(u),value:c.value[u]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),le=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},At=le(lo,[["__scopeId","data-v-68ca83ec"]]),ro=le(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:l}}=Y.useI18n();return(a,r)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:r[0]||(r[0]=s=>a.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(l)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),oo=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:l}}=Y.useI18n();return(a,r)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(l)("baseConfigCard.statusBadge.enabledLabel"):t.unref(l)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),no="#0044f4",so="#e0e4ea",io="#3a3f51",co="1px",ho="20px",po={class:"config-card-details-row"},uo=["data-testid"],fo=["data-testid"],mo=["data-testid"],go=["data-testid"],yo={key:1},ko=["data-testid"],bo=["data-testid"],Co=["data-testid"],_o=["data-testid"],wo={name:"ConfigCardItem",components:{CopyUuid:Et,JsonCardItem:At,StatusBadge:oo,InternalLinkItem:ro}},So=t.defineComponent({...wo,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:l}){const a=e;t.useCssVars(y=>({"1df60db4":d.value?"none":`solid ${t.unref(co)} ${t.unref(so)}`,"21d1d34e":i.value&&c.value?"block":"flex","4d3dc7e7":i.value&&c.value?"100%":a.slim?"50%":"25%","4d400dc2":i.value&&c.value?"100%":a.slim?"50%":"75%"}));const r=t.useSlots(),{i18n:{t:o,formatUnixTimeStamp:s}}=Y.useI18n(),c=t.computed(()=>a.item.value!==void 0&&a.item.value!==null&&a.item.value!==""),h=t.computed(()=>!!(a.item.tooltip||r["label-tooltip"])),i=t.computed(()=>a.item.type===L.Json||a.item.type===L.JsonArray),d=t.computed(()=>a.item.type===L.JsonArray),u=t.computed(()=>{switch(a.item.type){case L.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid`,"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case L.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case L.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case L.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case L.Date:return{tag:"div",attrs:{"data-testid":`${a.item.key}-date`},text:s(a.item.value)};case L.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${a.item.key}-badge-status`,status:a.item.value}};case L.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case L.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case L.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${a.item.key}-internal-link`,item:a.item,onNavigationClick:y=>{l("navigation-click",y)}}};case L.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${a.item.key}-external-link`,href:a.item.value},text:a.item.value};case L.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${a.item.key}-json-content`,item:a.item}};case L.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${a.item.key}-json-array-content`,item:a.item}};default:return{tag:"div",attrs:{"data-testid":`${a.item.key}-plain-text`},text:a.item.value}}}),p=t.ref(),{isTruncated:n}=Y.useTruncationDetector(p);return(y,b)=>{const f=t.resolveComponent("KLabel"),m=t.resolveComponent("KBadge"),V=t.resolveComponent("KMethodBadge"),C=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",po,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(y.$slots,"label",{item:e.item},()=>[t.createVNode(f,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[h.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(y.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,fo)]),key:"0"}:void 0]),1024)],!0)],8,uo),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(y.$slots,e.item.key,{rowValue:e.item.value},()=>[c.value?(t.openBlock(),t.createElementBlock("div",yo,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value.tag),t.normalizeProps(t.guardReactiveProps(u.value.attrs)),{default:t.withCtx(()=>[u.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(m,{key:`${e.item.key}-badge-tag-${w}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${w}`,"truncation-tooltip":v},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,ko)):t.createCommentVNode("",!0),u.value.additionalComponent==="CopyUuid"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(t.unref(Et),t.mergeProps(u.value.childAttrs,{key:`${e.item.key}-copy-uuid-${w}`,"data-testid":`${e.item.key}-copy-uuid-${w}`,uuid:v}),null,16,["data-testid","uuid"]))),128))],8,bo)):u.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(V,{key:`${e.item.key}-badge-method-${w}`,class:"config-badge","data-testid":`${e.item.key}-badge-method-${w}`,"is-rounded":"",label:v,method:t.unref(ur.MethodsArray).includes(v.toLowerCase())?v.toLowerCase():"custom"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,Co)):t.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${a.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(At,{key:`json-array-item-${w}`,index:w,"is-array-item":"",item:v},null,8,["index","item"]))),128))],8,_o)):(t.openBlock(),t.createBlock(C,{key:4,label:t.unref(n)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:p,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(u.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,go))],!0)],8,mo)])}}}),Ze=le(So,[["__scopeId","data-v-307ab96d"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ft(e){return typeof e>"u"||e===null}function xo(e){return typeof e=="object"&&e!==null}function No(e){return Array.isArray(e)?e:Ft(e)?[]:[e]}function Vo(e,l){var a,r,o,s;if(l)for(s=Object.keys(l),a=0,r=s.length;a<r;a+=1)o=s[a],e[o]=l[o];return e}function Io(e,l){var a="",r;for(r=0;r<l;r+=1)a+=e;return a}function Bo(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var To=Ft,Ho=xo,Eo=No,Ao=Io,Fo=Bo,qo=Vo,Q={isNothing:To,isObject:Ho,toArray:Eo,repeat:Ao,isNegativeZero:Fo,extend:qo};function qt(e,l){var a="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(a+='in "'+e.mark.name+'" '),a+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!l&&e.mark.snippet&&(a+=`
1
+ (function(X,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","vue-router"],t):(X=typeof globalThis<"u"?globalThis:X||self,t(X["kong-ui-entities-upstreams-targets"]={},X.Vue,X.axios,X["kong-ui-public-i18n"],X.Kongponents,X.VueRouter))})(this,function(X,t,pr,Ve,ur,ze){"use strict";var Je=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(Je||{}),re=(e=>(e.Edit="edit",e.Create="create",e))(re||{}),de=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(de||{}),L=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(L||{}),z=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(z||{});function We(e={}){return{axiosInstance:pr.create({withCredentials:!0,timeout:3e4,...e})}}function fr(){return{debounce:(e,l)=>{let a;return(...r)=>{clearTimeout(a),a=window==null?void 0:window.setTimeout(()=>{e(...r)},l)}}}}const Qe="khcp-user-table-preferences",mr={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function gr(){const e=a=>{if(typeof a=="string")try{return JSON.parse(a)}catch(r){console.error("useTablePreferences(tryParseJson)",r);return}},l=()=>{const a=e(localStorage.getItem(Qe));return!a||!Object.keys(a).length?new Map:new Map(Object.entries(a))};return{setTablePreferences:(a,r)=>{try{const o=l();o.set(a,r),localStorage.setItem(Qe,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:a=>{const r=l();return(r==null?void 0:r.get(a))||void 0||mr},deleteAllTablePreferences:()=>{localStorage.removeItem(Qe)}}}const yr={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},kr={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},br={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},Cr={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},_r={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},wr={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Sr={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},xr={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Nr={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Vr={global:yr,deleteModal:kr,baseForm:br,baseTable:Cr,baseConfigCard:_r,filter:wr,debouncedFilter:Sr,errors:xr,toggleModal:Nr};function Ye(){const e=Ve.createI18n("en-us",Vr);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function bt(){const e=(a,r)=>(r==null?void 0:r[a])??void 0,l=(a,r)=>{if(a.length!==r.length)return!1;const o=new Set([...a,...r]);for(const s of o){const c=a.filter(i=>i===s).length,h=r.filter(i=>i===s).length;if(c!==h)return!1}return!0};return{getPropValue:e,objectsAreEqual:(a,r,o)=>{if(o){if(Object.keys(a).length===Object.keys(r).length)for(const s in a)if(Array.isArray(a[s])&&Array.isArray(r[s])){if(l(a[s],r[s]))continue;return!1}else{if(a[s]===r[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(a)===JSON.stringify(r)}catch{return!1}},sortAlpha:a=>(r,o)=>{let s=r[a]===void 0||r[a]===null?"":r[a],c=o[a]===void 0||o[a]===null?"":o[a];return Array.isArray(r[a])&&(s=r[a][0]),Array.isArray(o[a])&&(c=o[a][0]),s.localeCompare(c)},isValidUuid:a=>a?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(a):!1}}function Ir(e,l,a,r={fetchedItemsKey:"data",searchKeys:["id"]}){a||(a="100");const{axiosInstance:o}=We({headers:e.requestHeaders}),{i18n:{t:s}}=Ye(),{debounce:c}=fr(),h=c(async w=>{await v(w)},200),i=t.ref(!1),d=t.ref(""),u=t.ref(""),p=t.ref([]),n=t.ref([]),y=t.ref(void 0),b=t.unref(l);let f=`${e.apiBaseUrl}${b}`;e.app==="konnect"?f=f.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(f=f.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:m}=bt(),V=async()=>{try{i.value=!0;const{data:w}=await o.get(`${f}?size=${a}`);w!=null&&w.next||(y.value=r.fetchedItemsKey in w?w[r.fetchedItemsKey]:[]),n.value=r.fetchedItemsKey in w?w[r.fetchedItemsKey]:[],p.value=n.value}catch{p.value=[],d.value=s("debouncedFilter.errors.fetch")}finally{i.value=!1}},C=t.ref(""),v=async w=>{var x,U,F;if(C.value!==w)if(C.value=w||"",y.value===void 0)try{if(i.value=!0,d.value="",u.value="",e.app==="konnect"){let N=f+"";w&&(N+=`/${w}`);const{data:I}=await o.get(`${N}?size=${a}`);r.fetchedItemsKey in I?p.value=I[r.fetchedItemsKey]:I!=null&&I.id?p.value=[I]:p.value=[]}else if(w){const N=[];m(w)&&r.searchKeys.includes("id")?N.push((async()=>{const{data:B}=await o.get(`${f}/${w}`);return[B[r.fetchedItemsKey]??B]})()):N.push(...r.searchKeys.filter(B=>B!=="id").map(async B=>{const{data:H}=await o.get(`${f}?${B}=${w}`);return H[r.fetchedItemsKey]}));const I=await Promise.all(N),_=new Set;p.value=[],(x=I==null?void 0:I.forEach)==null||x.call(I,B=>{var H;(H=B==null?void 0:B.forEach)==null||H.call(B,D=>{_.has(D.id)||(_.add(D.id),p.value.push(D))})})}else p.value=n.value}catch(N){((U=N==null?void 0:N.response)==null?void 0:U.status)===404?u.value=s("debouncedFilter.errors.invalid"):(p.value=[],d.value=s("debouncedFilter.errors.fetch"))}finally{i.value=!1}else i.value=!0,u.value="",w?(p.value=(F=y.value)==null?void 0:F.filter(N=>{var I;let _=!1;for(const B of r.searchKeys){const H=typeof N[B]=="string"?(I=N[B])==null?void 0:I.toLowerCase():N[B];H!=null&&H.includes(w.toLowerCase())&&(_=!0)}return _}),(!p.value||!p.value.length)&&(u.value=s("debouncedFilter.errors.invalid"))):p.value=y.value,i.value=!1};return{loading:i,error:d,validationError:u,results:p,allRecords:y,loadItems:V,debouncedQueryChange:h}}function Br(e,l){const a=t.unref(l),r=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a));return r.value.search="",o=>`${r.value.href}/${o}`}function Tr(){const{i18n:{t:e}}=Ye();return{getMessageFromError:l=>{var a,r,o;if(!l)return e("errors.unexpected");if((a=l==null?void 0:l.response)!=null&&a.data){if(l.response.data.detail)return l.response.data.detail;if((r=l.response.data.details)!=null&&r.length)return l.response.data.details.map(s=>{let c=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(c=s.messages.join(", ")),s.field?`${s.field} - ${c}`:c}).join("; ");if(l.response.data.message){const{message:s}=l.response.data;return Array.isArray(s)?(o=s[0])!=null&&o.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof l.response.data=="string")return l.response.data;if(typeof l.response.data=="object")return Object.keys(l.response.data).map(s=>`${s} ${l.response.data[s]}`).join(", ")}return l.message||e("errors.unexpected")}}}function Hr(e){const l=window.location.origin,a=l.endsWith("/")?l:`${l}/`;try{const r=e.join("/"),o=`${a}${r}`,s=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!s&&new URL(o))return`${a}${r}`;throw new Error("Invalid url")}catch(r){return console.warn("Failed to build valid URL:",r),""}}function Ct(e,l){const a=t.ref(t.unref(e)),r=t.ref(t.unref(l)),o=t.computed(()=>!!(a.value.app==="konnect"||a.value.isExactMatch)),s=t.computed(()=>r.value.startsWith("/")?new URL(`${window.location.origin}${r.value}`):new URL(r.value));return c=>{const{page:h,pageSize:i,offset:d,sortColumnKey:u,sortColumnOrder:p,query:n}=c;try{let y=new URL(s.value.href);return o.value&&n?(y.search="",y=new URL(`${y.href}/${n}/`)):(o.value||new URLSearchParams(n).forEach((b,f)=>{y.searchParams.append(f,b)}),u&&y.searchParams.append("sort_by",u),p==="desc"&&y.searchParams.append("sort_desc","1"),y.searchParams.append("size",String(i))),d&&h!==1&&y.searchParams.append("offset",String(d)),y.href}catch(y){return console.error("RouteList(fetcher)",y),r.value}}}function Er(e,l,a="data"){const r=t.unref(l),{axiosInstance:o}=We({headers:e.requestHeaders}),s=Ct(e,r),c=t.ref({status:de.Idle});return{fetcher:async h=>{try{c.value={status:de.Loading};const i=s(h),{data:d}=await o.get(i),u=a&&a.replace(/[^\w-_]/gi,"");let p;d[u]&&Array.isArray(d[u])?p=d[u]:p=Object.keys(d).length?[d]:[];const n={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return c.value={status:de.Idle,response:n},n}catch(i){const d={data:[],total:0};return h.query&&i.response.status===404?(c.value={status:de.NoResults,response:d,error:i},d):(c.value={status:de.Error,response:d,error:i},d)}},fetcherState:c}}function Ar(){const e=(a,r="_")=>a?a.split(r).map(o=>o.toLowerCase()==="id"?o.toUpperCase():o.charAt(0).toUpperCase()+o.substring(1)).join(" "):"",l=/(?:^|[\s-:'"])\w/g;return{capitalize:a=>a?a.replace(l,r=>r.toUpperCase()):"",convertKeyToTitle:e}}const _t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,wt=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const l=e.match(_t);if(!l)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return l.shift(),l},St=e=>e==="*"||e==="x"||e==="X",xt=e=>{const l=parseInt(e,10);return isNaN(l)?e:l},Fr=(e,l)=>typeof e!=typeof l?[String(e),String(l)]:[e,l],qr=(e,l)=>{if(St(e)||St(l))return 0;const[a,r]=Fr(xt(e),xt(l));return a>r?1:a<r?-1:0},Nt=(e,l)=>{for(let a=0;a<Math.max(e.length,l.length);a++){const r=qr(e[a]||"0",l[a]||"0");if(r!==0)return r}return 0},Or=(e,l)=>{const a=wt(e),r=wt(l),o=a.pop(),s=r.pop(),c=Nt(a,r);return c!==0?c:o&&s?Nt(o.split("."),s.split(".")):o||s?o?-1:1:0},Vt=(e,l,a)=>{vr(a);const r=Or(e,l);return It[a].includes(r)},It={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Bt=Object.keys(It),vr=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Bt.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Bt.join("|")}`)},Ur=e=>typeof e=="string"&&/^[v\d]/.test(e)&&_t.test(e);function $r(e){const{gatewayInfo:l,supportedRange:a}=e;if(!l)return!0;const{edition:r,version:o}=l;if(!Ur(o))return console.error("Invalid version"),!1;const s=a[r];if(!s)return!1;const[c,h]=s;return!(c&&Vt(o,c,"<")||h&&Vt(o,h,">"))}function Mr(e){const l=t.ref(0),a=t.ref(0),r=t.ref(!1);return t.watch(e,o=>{o&&!r.value&&(l.value=o.offsetWidth,a.value=o.scrollWidth,r.value=!0)}),{isTruncated:t.computed(()=>l.value<a.value)}}const Y={useAxios:We,useDebouncedFilter:Ir,useDeleteUrlBuilder:Br,useErrors:Tr,useExternalLinkCreator:Hr,useFetcher:Er,useFetchUrlBuilder:Ct,useHelpers:bt,useStringHelpers:Ar,useI18n:Ye,useGatewayFeatureSupported:$r,useTruncationDetector:Mr},Dr={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},jr="Copy to clipboard",Kr={message:Dr,iconTitle:jr},Pr="kong-ui-copy-uuid-notify",Tt="24px",Lr=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Rr=e=>(t.pushScopeId("data-v-9971cc79"),e=e(),t.popScopeId(),e),zr=["aria-hidden"],Jr={key:0,"data-testid":"kui-icon-svg-title"},Wr=Rr(()=>t.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),Qr=t.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Tt,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const o=String(l.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return Tt}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(o,s)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Jr,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Wr],8,zr))]),_:1},8,["aria-hidden","style"]))}}),Yr=Lr(Qr,[["__scopeId","data-v-9971cc79"]]),Zr="16px",Gr={class:"kong-ui-copy-uuid"},Xr=["onClick"],Ht=15,eo=t.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:l}){const a=e,{t:r}=Ve.createI18n("en-us",Kr),o=a.notify||t.inject(Pr,()=>{}),s=t.computed(()=>a.idTooltip?{label:a.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:a.uuid}),c=t.computed(()=>!!(a.tooltip&&a.successTooltip)),h=t.ref(a.tooltip),i=t.computed(()=>a.tooltip?{label:h.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=t.computed(()=>{var n;return a.format==="redacted"?"*****":a.format==="deleted"?`*${(n=a.uuid)==null?void 0:n.substring(0,5)}`:a.uuid}),u=n=>{h.value=n,setTimeout(()=>{h.value=a.tooltip},1800)},p=n=>{var y,b;if(!n(a.uuid)){typeof o=="function"&&o({type:"error",message:r("message.fail")}),c.value?u(r("message.fail")):l("error",a.uuid);return}const f=((y=a.uuid)==null?void 0:y.length)>Ht,m=a.format==="hidden"||a.format==="redacted"?r("message.success.prefix"):`"${((b=a.uuid)==null?void 0:b.substring(0,Ht))+(f?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${m}${r("message.success.content")}`}),c.value?u(a.successTooltip):l("success",a.uuid)};return(n,y)=>{const b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Gr,[e.format!=="hidden"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),t.mergeProps({key:0},s.value,{"data-testid":"copy-id"}),{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},t.toDisplayString(d.value),3)]),_:1},16)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),t.mergeProps(i.value,{class:"uuid-icon-wrapper"}),{default:t.withCtx(()=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:f})=>[t.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:t.withModifiers(m=>p(f),["stop"])},[t.createVNode(t.unref(Yr),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:t.unref(Zr),title:t.unref(r)("iconTitle")},null,8,["color","decorative","size","title"])],8,Xr)]),_:1})]),_:1},16))])}}}),to=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Et=to(eo,[["__scopeId","data-v-0c07874b"]]),ao={key:0,class:"config-card-fieldset-title"},lo=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const l=e,{i18n:{t:a}}=Y.useI18n(),{convertKeyToTitle:r}=Y.useStringHelpers(),o=t.computed(()=>l.item.key??"json-array-item"),s=t.computed(()=>l.item.value??l.item),c=t.computed(()=>{const i=JSON.parse(JSON.stringify(s.value));return l.isArrayItem&&delete i.name,i}),h=t.computed(()=>{var i;return l.isArrayItem?(i=s.value)!=null&&i.name?r(s.value.name,"_"):a("baseConfigCard.general.entryTitle",{index:l.index}):""});return(i,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",ao,[t.createElementVNode("b",null,t.toDisplayString(h.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(c.value),(u,p)=>(t.openBlock(),t.createBlock(Ze,{key:`${o.value}-property-${p}`,item:{key:u,label:t.unref(r)(u),value:c.value[u]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),le=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},At=le(lo,[["__scopeId","data-v-68ca83ec"]]),ro=le(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:l}}=Y.useI18n();return(a,r)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:r[0]||(r[0]=s=>a.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(l)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),oo=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:l}}=Y.useI18n();return(a,r)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(l)("baseConfigCard.statusBadge.enabledLabel"):t.unref(l)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),no="#0044f4",so="#e0e4ea",io="#3a3f51",co="1px",ho="20px",po={class:"config-card-details-row"},uo=["data-testid"],fo=["data-testid"],mo=["data-testid"],go=["data-testid"],yo={key:1},ko=["data-testid"],bo=["data-testid"],Co=["data-testid"],_o=["data-testid"],wo={name:"ConfigCardItem",components:{CopyUuid:Et,JsonCardItem:At,StatusBadge:oo,InternalLinkItem:ro}},So=t.defineComponent({...wo,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:l}){const a=e;t.useCssVars(y=>({"23f3018c":d.value?"none":`solid ${t.unref(co)} ${t.unref(so)}`,"3815ec6d":i.value&&c.value?"block":"flex","1957f153":i.value&&c.value?"100%":a.slim?"50%":"25%","195a372e":i.value&&c.value?"100%":a.slim?"50%":"75%"}));const r=t.useSlots(),{i18n:{t:o,formatUnixTimeStamp:s}}=Y.useI18n(),c=t.computed(()=>a.item.value!==void 0&&a.item.value!==null&&a.item.value!==""),h=t.computed(()=>!!(a.item.tooltip||r["label-tooltip"])),i=t.computed(()=>a.item.type===L.Json||a.item.type===L.JsonArray),d=t.computed(()=>a.item.type===L.JsonArray),u=t.computed(()=>{switch(a.item.type){case L.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid`,"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case L.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case L.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case L.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case L.Date:return{tag:"div",attrs:{"data-testid":`${a.item.key}-date`},text:s(a.item.value)};case L.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${a.item.key}-badge-status`,status:a.item.value}};case L.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case L.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case L.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${a.item.key}-internal-link`,item:a.item,onNavigationClick:y=>{l("navigation-click",y)}}};case L.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${a.item.key}-external-link`,href:a.item.value},text:a.item.value};case L.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${a.item.key}-json-content`,item:a.item}};case L.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${a.item.key}-json-array-content`,item:a.item}};default:return{tag:"div",attrs:{"data-testid":`${a.item.key}-plain-text`},text:a.item.value}}}),p=t.ref(),{isTruncated:n}=Y.useTruncationDetector(p);return(y,b)=>{const f=t.resolveComponent("KLabel"),m=t.resolveComponent("KBadge"),V=t.resolveComponent("KMethodBadge"),C=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",po,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(y.$slots,"label",{item:e.item},()=>[t.createVNode(f,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[h.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(y.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,fo)]),key:"0"}:void 0]),1024)],!0)],8,uo),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(y.$slots,e.item.key,{rowValue:e.item.value},()=>[c.value?(t.openBlock(),t.createElementBlock("div",yo,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value.tag),t.normalizeProps(t.guardReactiveProps(u.value.attrs)),{default:t.withCtx(()=>[u.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(m,{key:`${e.item.key}-badge-tag-${w}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${w}`,"truncation-tooltip":v},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,ko)):t.createCommentVNode("",!0),u.value.additionalComponent==="CopyUuid"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(t.unref(Et),t.mergeProps(u.value.childAttrs,{key:`${e.item.key}-copy-uuid-${w}`,"data-testid":`${e.item.key}-copy-uuid-${w}`,uuid:v}),null,16,["data-testid","uuid"]))),128))],8,bo)):u.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(V,{key:`${e.item.key}-badge-method-${w}`,class:"config-badge","data-testid":`${e.item.key}-badge-method-${w}`,"is-rounded":"",label:v,method:t.unref(ur.MethodsArray).includes(v.toLowerCase())?v.toLowerCase():"custom"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,Co)):t.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${a.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(v,w)=>(t.openBlock(),t.createBlock(At,{key:`json-array-item-${w}`,index:w,"is-array-item":"",item:v},null,8,["index","item"]))),128))],8,_o)):(t.openBlock(),t.createBlock(C,{key:4,label:t.unref(n)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:p,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(u.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,go))],!0)],8,mo)])}}}),Ze=le(So,[["__scopeId","data-v-e851fc7c"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ft(e){return typeof e>"u"||e===null}function xo(e){return typeof e=="object"&&e!==null}function No(e){return Array.isArray(e)?e:Ft(e)?[]:[e]}function Vo(e,l){var a,r,o,s;if(l)for(s=Object.keys(l),a=0,r=s.length;a<r;a+=1)o=s[a],e[o]=l[o];return e}function Io(e,l){var a="",r;for(r=0;r<l;r+=1)a+=e;return a}function Bo(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var To=Ft,Ho=xo,Eo=No,Ao=Io,Fo=Bo,qo=Vo,Q={isNothing:To,isObject:Ho,toArray:Eo,repeat:Ao,isNegativeZero:Fo,extend:qo};function qt(e,l){var a="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(a+='in "'+e.mark.name+'" '),a+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!l&&e.mark.snippet&&(a+=`
2
2
 
3
3
  `+e.mark.snippet),r+" "+a):r}function Ie(e,l){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=l,this.message=qt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ie.prototype=Object.create(Error.prototype),Ie.prototype.constructor=Ie,Ie.prototype.toString=function(e){return this.name+": "+qt(this,e)};var ee=Ie;function Ge(e,l,a,r,o){var s="",c="",h=Math.floor(o/2)-1;return r-l>h&&(s=" ... ",l=r-h+s.length),a-r>h&&(c=" ...",a=r+h-c.length),{str:s+e.slice(l,a).replace(/\t/g,"→")+c,pos:r-l+s.length}}function Xe(e,l){return Q.repeat(" ",l-e.length)+e}function Oo(e,l){if(l=Object.create(l||null),!e.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);for(var a=/\r?\n|\r|\0/g,r=[0],o=[],s,c=-1;s=a.exec(e.buffer);)o.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&c<0&&(c=r.length-2);c<0&&(c=r.length-1);var h="",i,d,u=Math.min(e.line+l.linesAfter,o.length).toString().length,p=l.maxLength-(l.indent+u+3);for(i=1;i<=l.linesBefore&&!(c-i<0);i++)d=Ge(e.buffer,r[c-i],o[c-i],e.position-(r[c]-r[c-i]),p),h=Q.repeat(" ",l.indent)+Xe((e.line-i+1).toString(),u)+" | "+d.str+`
4
4
  `+h;for(d=Ge(e.buffer,r[c],o[c],e.position,p),h+=Q.repeat(" ",l.indent)+Xe((e.line+1).toString(),u)+" | "+d.str+`
@@ -29,4 +29,4 @@
29
29
  `+e.slice(o,s),o=s+1),c=h;return i+=`
30
30
  `,e.length-o>l&&c>o?i+=e.slice(o,c)+`
31
31
  `+e.slice(c+1):i+=e.slice(o),i.slice(1)}function ws(e){for(var l="",a=0,r,o=0;o<e.length;a>=65536?o+=2:o++)a=Ee(e,o),r=G[a],!r&&He(a)?(l+=e[o],a>=65536&&(l+=e[o+1])):l+=r||us(a);return l}function Ss(e,l,a){var r="",o=e.tag,s,c,h;for(s=0,c=a.length;s<c;s+=1)h=a[s],e.replacer&&(h=e.replacer.call(a,String(s),h)),(ne(e,l,h,!1,!1)||typeof h>"u"&&ne(e,l,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=o,e.dump="["+r+"]"}function Fa(e,l,a,r){var o="",s=e.tag,c,h,i;for(c=0,h=a.length;c<h;c+=1)i=a[c],e.replacer&&(i=e.replacer.call(a,String(c),i)),(ne(e,l+1,i,!0,!0,!1,!0)||typeof i>"u"&&ne(e,l+1,null,!0,!0,!1,!0))&&((!r||o!=="")&&(o+=it(e,l)),e.dump&&Be===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function xs(e,l,a){var r="",o=e.tag,s=Object.keys(a),c,h,i,d,u;for(c=0,h=s.length;c<h;c+=1)u="",r!==""&&(u+=", "),e.condenseFlow&&(u+='"'),i=s[c],d=a[i],e.replacer&&(d=e.replacer.call(a,i,d)),ne(e,l,i,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ne(e,l,d,!1,!1)&&(u+=e.dump,r+=u));e.tag=o,e.dump="{"+r+"}"}function Ns(e,l,a,r){var o="",s=e.tag,c=Object.keys(a),h,i,d,u,p,n;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new ee("sortKeys must be a boolean or a function");for(h=0,i=c.length;h<i;h+=1)n="",(!r||o!=="")&&(n+=it(e,l)),d=c[h],u=a[d],e.replacer&&(u=e.replacer.call(a,d,u)),ne(e,l+1,d,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Be===e.dump.charCodeAt(0)?n+="?":n+="? "),n+=e.dump,p&&(n+=it(e,l)),ne(e,l+1,u,!0,p)&&(e.dump&&Be===e.dump.charCodeAt(0)?n+=":":n+=": ",n+=e.dump,o+=n));e.tag=s,e.dump=o||"{}"}function qa(e,l,a){var r,o,s,c,h,i;for(o=a?e.explicitTypes:e.implicitTypes,s=0,c=o.length;s<c;s+=1)if(h=o[s],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof l=="object"&&l instanceof h.instanceOf)&&(!h.predicate||h.predicate(l))){if(a?h.multi&&h.representName?e.tag=h.representName(l):e.tag=h.tag:e.tag="?",h.represent){if(i=e.styleMap[h.tag]||h.defaultStyle,ga.call(h.represent)==="[object Function]")r=h.represent(l,i);else if(ya.call(h.represent,i))r=h.represent[i](l,i);else throw new ee("!<"+h.tag+'> tag resolver accepts not "'+i+'" style');e.dump=r}return!0}return!1}function ne(e,l,a,r,o,s,c){e.tag=null,e.dump=a,qa(e,a,!1)||qa(e,a,!0);var h=ga.call(e.dump),i=r,d;r&&(r=e.flowLevel<0||e.flowLevel>l);var u=h==="[object Object]"||h==="[object Array]",p,n;if(u&&(p=e.duplicates.indexOf(a),n=p!==-1),(e.tag!==null&&e.tag!=="?"||n||e.indent!==2&&l>0)&&(o=!1),n&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(u&&n&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),h==="[object Object]")r&&Object.keys(e.dump).length!==0?(Ns(e,l,e.dump,o),n&&(e.dump="&ref_"+p+e.dump)):(xs(e,l,e.dump),n&&(e.dump="&ref_"+p+" "+e.dump));else if(h==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!c&&l>0?Fa(e,l-1,e.dump,o):Fa(e,l,e.dump,o),n&&(e.dump="&ref_"+p+e.dump)):(Ss(e,l,e.dump),n&&(e.dump="&ref_"+p+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&Cs(e,e.dump,l,s,i);else{if(h==="[object Undefined]"||e.skipInvalid)return!1;throw new ee("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function Vs(e,l){var a=[],r=[],o,s;for(dt(e,a,r),o=0,s=r.length;o<s;o+=1)l.duplicates.push(a[r[o]]);l.usedDuplicates=new Array(s)}function dt(e,l,a){var r,o,s;if(e!==null&&typeof e=="object")if(o=l.indexOf(e),o!==-1)a.indexOf(o)===-1&&a.push(o);else if(l.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)dt(e[o],l,a);else for(r=Object.keys(e),o=0,s=r.length;o<s;o+=1)dt(e[r[o]],l,a)}function Is(e,l){l=l||{};var a=new ms(l);a.noRefs||Vs(e,a);var r=e;return a.replacer&&(r=a.replacer.call({"":r},"",r)),ne(a,0,r,!0,!0)?a.dump+`
32
- `:""}var Bs=Is,Ts={dump:Bs};function ht(e,l){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var Hs=Z,Es=vt,As=Dt,Fs=Rt,qs=zt,Os=at,vs=ma.load,Us=ma.loadAll,$s=Ts.dump,Ms=ee,Ds={binary:Zt,float:Lt,map:Mt,null:jt,pairs:Xt,set:ea,timestamp:Qt,bool:Kt,int:Pt,merge:Yt,omap:Gt,seq:$t,str:Ut},js=ht("safeLoad","load"),Ks=ht("safeLoadAll","loadAll"),Ps=ht("safeDump","dump"),Ls={Type:Hs,Schema:Es,FAILSAFE_SCHEMA:As,JSON_SCHEMA:Fs,CORE_SCHEMA:qs,DEFAULT_SCHEMA:Os,load:vs,loadAll:Us,dump:$s,YAMLException:Ms,types:Ds,safeLoad:js,safeLoadAll:Ks,safeDump:Ps};const Rs={key:0,class:"config-card-display-form"},zs=["data-testid"],Js={key:0,class:"config-card-prop-section-title"},Ws={key:1,class:"config-card-display-json"},Qs={key:2,class:"config-card-display-yaml"},Ys=le(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const l=e,a=t.useSlots(),{i18n:{t:r}}=Y.useI18n(),o=h=>!!(h.tooltip||a[`${h.key}-label-tooltip`]),s=t.ref(""),c=t.ref("");return t.watch(()=>l.format,h=>{h==="json"?s.value=JSON.stringify(l.record,null,2):h==="yaml"&&(c.value=Ls.dump(l.record))},{immediate:!0}),(h,i)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Rs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,u=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${u}-props`,class:t.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(t.openBlock(),t.createElementBlock("div",Js,t.toDisplayString(u==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[u],p=>(t.openBlock(),t.createBlock(Ze,{key:p.key,item:p},t.createSlots({label:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:t.withCtx(({rowValue:n})=>[t.renderSlot(h.$slots,p.key,{row:p,rowValue:n},void 0,!0)]),_:2},[o(p)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,zs))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",Ws,[t.createVNode(d,{id:"config-card-codeblock",code:s.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",Qs,[t.createVNode(d,{id:"config-card-codeblock",code:c.value,language:"yaml",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),Oa="24px",Zs=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Gs=e=>(t.pushScopeId("data-v-dd88a2bb"),e=e(),t.popScopeId(),e),Xs=["aria-hidden"],ei={key:0,"data-testid":"kui-icon-svg-title"},ti=Gs(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),ai=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Oa,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const o=String(l.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return Oa}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(o,s)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",ei,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),ti],8,Xs))]),_:1},8,["aria-hidden","style"]))}}),li=Zs(ai,[["__scopeId","data-v-dd88a2bb"]]),ri={"data-testid":"config-card-title"},oi={class:"config-card-actions"},ni=["href"],si={key:2,class:"config-card-details-section"},ii={key:3,class:"config-card-details-section"},ci=["data-testid"],di={key:0,class:"config-card-prop-section-title"},hi=le(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:l}){var a;const r=e,o=t.useSlots(),{i18n:{t:s}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{convertKeyToTitle:h}=Y.useStringHelpers(),{axiosInstance:i}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),d=[{label:s("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),p=N=>{u.value=N==null?void 0:N.value},n={id:{type:L.ID,label:s("baseConfigCard.commonFields.id_label"),order:0,section:z.Basic},name:{order:1,section:z.Basic},enabled:{type:L.BadgeStatus,order:2,section:z.Basic},updated_at:{type:L.Date,label:s("baseConfigCard.commonFields.updated_at_label"),order:3,section:z.Basic},created_at:{type:L.Date,label:s("baseConfigCard.commonFields.created_at_label"),order:4,section:z.Basic},tags:{type:L.BadgeTag,order:-1,section:z.Basic}},y=t.ref(!1),b=t.ref(!1),f=t.ref(""),m=t.ref(),V=t.computed(()=>{var N,I,_;if(!m.value)return[];const B=[],H=Object.keys(m.value).length;for(const D in m.value){const q=(I=(N=r.configSchema)==null?void 0:N[D])==null?void 0:I.order,O=(_=n[D])==null?void 0:_.order;let j=H;(O||O===0)&&(j=O===-1?H+1:O),q&&(j=q===-1?H+1:q),B.push([D,j])}return B.sort(function(D,q){return D[1]-q[1]}),B.map(D=>{var q,O;const j=D[0],T=(q=m.value)==null?void 0:q[j],E=((O=r.configSchema)==null?void 0:O[j])||{},M=n[j];return{key:j,value:T,hidden:E.hidden||!1,type:E.type??((M==null?void 0:M.type)||L.Text),label:E.label??((M==null?void 0:M.label)||h(j)),tooltip:E.tooltip??((M==null?void 0:M.tooltip)||void 0),section:E.section??((M==null?void 0:M.section)||z.Advanced)}}).filter(D=>!D.hidden&&D.key!==r.pluginConfigKey)}),C=t.computed(()=>{var N,I;if(!m.value||!r.pluginConfigKey)return[];const _=m.value[r.pluginConfigKey]||{},B=Object.keys(_).length,H=[];for(const D in _){const q=(I=(N=r.pluginConfigSchema)==null?void 0:N[D])==null?void 0:I.order,O=_[D];let j=O!=null&&O!==""?B-1:B;q&&(j=q===-1?B+1:q),H.push([D,j])}return H.sort(function(D,q){return D[1]-q[1]}),H.map(D=>{var q;const O=D[0],j=_[O],T=((q=r.pluginConfigSchema)==null?void 0:q[O])||{};return{key:O,value:j,hidden:T.hidden||!1,type:T.type??L.Text,label:T.label??h(O),tooltip:T.tooltip??void 0,section:z.Plugin}}).filter(D=>!D.hidden)}),v=t.computed(()=>{var N,I,_,B;return{basic:(N=V.value)==null?void 0:N.filter(H=>H.section===z.Basic),advanced:(I=V.value)==null?void 0:I.filter(H=>H.section===z.Advanced),plugin:(B=C.value)==null?void 0:B.concat((_=V.value)==null?void 0:_.filter(H=>H.section===z.Plugin))}}),w=t.computed(()=>{const N=[];return v.value.basic.length&&N.push("basic"),v.value.advanced.length&&N.push("advanced"),v.value.plugin.length&&N.push("plugin"),N}),x=N=>!!(N.tooltip||o[`${N.key}-label-tooltip`]),U=t.computed(()=>{var N,I;let _=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((N=r.config)==null?void 0:N.controlPlaneId)||""):r.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(I=r.config)!=null&&I.workspace?`/${r.config.workspace}`:"")),_=_.replace(/{id}/gi,r.config.entityId),_}),F=N=>{m.value&&N(JSON.stringify(m.value))?l("copy:success",m.value):l("copy:error")};return t.watch(y,N=>{l("loading",N)},{immediate:!0}),t.onBeforeMount(async()=>{b.value=!1,y.value=!0;try{const{data:N}=await i.get(U.value);if(r.dataKey)if(typeof N[r.dataKey]<"u")m.value={...N[r.dataKey]};else throw new Error(s("errors.dataKeyUndefined",{dataKey:r.dataKey}));else m.value={...N};Object.keys(r.configSchema).filter(I=>r.configSchema[I].forceShow).forEach(I=>{m.value&&typeof m.value[I]>"u"&&(m.value[I]=null)}),l("fetch:success",N)}catch(N){const I=c(N);f.value=I.startsWith("code")?s("baseConfigCard.errors.load"):I,b.value=!0,l("fetch:error",N)}finally{y.value=!1}}),(N,I)=>{const _=t.resolveComponent("KLabel"),B=t.resolveComponent("KSelect"),H=t.resolveComponent("KButton"),D=t.resolveComponent("KClipboardProvider"),q=t.resolveComponent("KSkeleton"),O=t.resolveComponent("KEmptyState"),j=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(j,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",oi,[t.renderSlot(N.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(_,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(B,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(H,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(li),{size:t.unref(ho)},null,8,["size"])],8,ni)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(D,{key:3},{default:t.withCtx(({copyToClipboard:T})=>[!y.value&&!b.value?(t.openBlock(),t.createBlock(H,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:E=>F(T)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(q,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):b.value?(t.openBlock(),t.createBlock(O,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(f.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",si,[t.createVNode(Ys,{format:u.value,"prop-list-types":w.value,"property-collections":v.value,record:m.value},t.createSlots({_:2},[t.renderList(Object.keys(N.$slots),T=>({name:T,fn:t.withCtx(({row:E,rowValue:M})=>[t.renderSlot(N.$slots,T,{row:E,rowValue:M},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",ii,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,T=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${T}-props`,class:t.normalizeClass(`config-card-details-${T}-props`),"data-testid":`config-card-details-${T}-props`},[T!=="basic"?(t.openBlock(),t.createElementBlock("div",di,t.toDisplayString(T==="advanced"?t.unref(s)("baseConfigCard.sections.advanced"):t.unref(s)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value[T],E=>(t.openBlock(),t.createBlock(Ze,{key:E.key,item:E},t.createSlots({label:t.withCtx(()=>[t.renderSlot(N.$slots,`${E.key}-label`,{row:E},void 0,!0)]),[E.key]:t.withCtx(({rowValue:M})=>[t.renderSlot(N.$slots,E.key,{row:E,rowValue:M},void 0,!0)]),_:2},[x(E)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(N.$slots,`${E.key}-label-tooltip`,{row:E},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,ci))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",ri,[t.renderSlot(N.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-24515123"]]),pi=["onReset","onSubmit"],ui={class:"form-actions","data-testid":"form-actions"},va=le(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:l}){var a;const r=e,o=ze.useRouter(),{i18n:{t:s}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{axiosInstance:h}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),i=t.ref(!1),d=t.ref(!1),u=t.ref(""),p=t.computed(()=>r.canSubmit===!1||r.isReadonly),n=t.computed(()=>{var m,V;if(!r.editId)return"";let C=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||""):r.config.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,(V=r.config)!=null&&V.workspace?`/${r.config.workspace}`:"")),C=C.replace(/{id}/gi,r.editId),C}),y=()=>{r.config.cancelRoute?o.push(r.config.cancelRoute):b()},b=()=>{l("cancel")},f=()=>{p.value||l("submit")};return t.watch(()=>i.value,m=>{l("loading",m)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,i.value=!0;const{data:m}=await h.get(n.value);l("fetch:success",m)}catch(m){const V=c(m);u.value=V.startsWith("code")?s("baseForm.errors.edit"):V,d.value=!0,l("fetch:error",m)}finally{i.value=!1}}),(m,V)=>{const C=t.resolveComponent("KSkeleton"),v=t.resolveComponent("KEmptyState"),w=t.resolveComponent("KAlert"),x=t.resolveComponent("KButton"),U=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(U,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[i.value?(t.openBlock(),t.createBlock(C,{key:0,type:"form"})):d.value?(t.openBlock(),t.createBlock(v,{key:1,"cta-text":t.unref(s)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":y,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(b,["prevent"]),onSubmit:t.withModifiers(f,["prevent"])},[t.renderSlot(m.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(w,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ui,[t.renderSlot(m.$slots,"form-actions",{},()=>[t.createVNode(x,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(x,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,pi))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),fi={key:0,"data-testid":"first-col"},mi=le(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const l=e,a=t.computed(()=>{var f;return((f=l.rowEl)==null?void 0:f.querySelector(`[data-testid="${l.keyName}"]`))||null}),r=t.computed(()=>{var f;return((f=a.value)==null?void 0:f.querySelector('[data-testid="first-col"]'))||null}),o=t.computed(()=>{var f,m;const V=(f=l.rowEl)==null?void 0:f.querySelectorAll("td");return V?((m=V[0])==null?void 0:m.getAttribute("data-testid"))===l.keyName:!1});let s;const c=()=>{s&&(s.disconnect(),s=void 0)},h=()=>{var f,m,V;d.value=((f=r.value)==null?void 0:f.getBoundingClientRect().width)||0,u.value=((m=a.value)==null?void 0:m.clientWidth)||0,p.value=((V=i.value)==null?void 0:V.innerText)||""},i=t.ref({}),d=t.ref(0),u=t.ref(0),p=t.ref(""),n=t.computed(()=>[r.value,a.value]),y=t.watch(n,f=>{if(o.value&&(c(),"ResizeObserver"in window&&window)){s=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{!Array.isArray(m)||!m.length||h()})});for(const m of f)m&&s.observe(m)}},{immediate:!0,flush:"post",deep:!0}),b=t.computed(()=>o.value?d.value>u.value:!1);return t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()}),(f,m)=>{const V=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[o.value?(t.openBlock(),t.createElementBlock("span",fi,[t.createVNode(V,{label:b.value?p.value:"","max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):t.renderSlot(f.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),gi={class:"toolbar-container"},yi={key:0,class:"toolbar-button-container"},ki=["data-testid"],Ua=le(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.computed(()=>{var w,x;return typeof a.errorMessage=="string"?{hasError:!!a.errorMessage,title:a.errorMessage,message:void 0}:{hasError:!!a.errorMessage,title:(w=a.errorMessage)==null?void 0:w.title,message:(x=a.errorMessage)==null?void 0:x.message}}),s=t.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),c=w=>w.hasData||!!a.query,h=t.computed(()=>{const w=[];return Object.keys(a.tableHeaders).forEach(x=>{const U=a.tableHeaders[x];w.push({label:U.label??x,key:x,sortable:U.sortable??!1})}),a.enableEntityActions&&w.push({key:"actions",hideLabel:!0}),w}),i=w=>({"data-rowid":w.id,"data-testid":w.name,...a.rowAttributes(w)}),d=t.ref({}),u=w=>{var x;return(x=d.value)==null?void 0:x.$el.querySelector(`[data-rowid="${w.id}"]`)},p=w=>{const x={"data-testid":w.headerKey,...a.cellAttributes(w)};return w.colIndex===0&&(x.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),x},n=()=>{l("empty-state-cta-clicked"),y()},y=()=>{l("clear-search-input")},b=t.computed(()=>a.disableRowClick?void 0:(w,x)=>{l("click:row",x)}),f=w=>{l("sort",w)},{setTablePreferences:m,getTablePreferences:V}=gr(),C=t.computed(()=>{const w=V(a.preferencesStorageKey);return{...a.initialFetcherParams,...w}}),v=w=>{a.preferencesStorageKey&&m(a.preferencesStorageKey,w)};return(w,x)=>{const U=t.resolveComponent("KIcon"),F=t.resolveComponent("KButton"),N=t.resolveComponent("KDropdown"),I=t.resolveComponent("KTable"),_=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(_,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(I,{ref_key:"tableRefs",ref:d,"cache-identifier":s.value,"cell-attrs":p,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-message":o.value.message,"error-state-title":o.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":o.value.hasError,headers:h.value,"hide-pagination-when-optional":"","initial-fetcher-params":C.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":i,"search-input":e.query,onKtableEmptyStateCtaClicked:n,"onRow:click":b.value,onSort:x[0]||(x[0]=B=>f(B)),"onUpdate:tablePreferences":v},t.createSlots({toolbar:t.withCtx(({state:B})=>[t.withDirectives(t.createElementVNode("div",gi,[t.renderSlot(w.$slots,"toolbar-filter",{},void 0,!0),w.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",yi,[t.renderSlot(w.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,c(B)]])]),actions:t.withCtx(({row:B,rowKey:H,rowValue:D})=>[t.createElementVNode("div",{class:"actions-container","data-testid":B.name},[t.createVNode(N,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(w.$slots,"actions",{row:B,rowKey:H,rowValue:D},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(F,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(U,{color:t.unref(io),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,ki)]),_:2},[t.renderList(e.tableHeaders,(B,H)=>({name:H,fn:t.withCtx(({row:D,rowKey:q,rowValue:O})=>[t.createVNode(mi,{"key-name":String(H),"row-el":u(D)},{default:t.withCtx(()=>[t.renderSlot(w.$slots,H,{row:D,rowKey:q,rowValue:O},()=>[t.createTextVNode(t.toDisplayString(O),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),bi={key:0,class:"kong-ui-entity-delete-error"},Ci={key:1,class:"description"},$a=le(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:l}){const a=e,{i18nT:r}=Y.useI18n(),o=t.computed(()=>a.needConfirm?a.entityName:""),s=()=>{l("cancel")},c=()=>{l("proceed")};return(h,i)=>{const d=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:s,onProceed:c},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",bi,[t.createVNode(d,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||h.$slots.description?(t.openBlock(),t.createElementBlock("div",Ci,[t.renderSlot(h.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(a.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),_i={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},wi={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Si=["fill"],xi={mask:"url(#mask0_180_20349)"},Ni=["fill"],Ma=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${no})`}},setup(e){return(l,a)=>(t.openBlock(),t.createElementBlock("svg",_i,[t.createElementVNode("mask",wi,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,Si)]),t.createElementVNode("g",xi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,Ni)])]))}}),Vi={key:1,class:"kong-ui-entity-filter"},Ii={class:"menu-item-title"},Bi={class:"menu-item-indicator"},Ti={class:"menu-item-body"},Hi=["for"],Ei={class:"menu-item-buttons"},Ai={class:"filter-clear-button-container"},Fi=le(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.ref(!1),s=t.ref({}),c=t.computed(()=>{const m=[];return new URLSearchParams(a.modelValue).forEach((V,C)=>{V!==""&&m.push(C)}),m}),h=t.computed(()=>{const m=a.config.fields;return Object.keys(m).filter(V=>m[V].searchable).map(V=>({label:m[V].label||V,value:V}))});t.watch(()=>a.modelValue,m=>{s.value={},new URLSearchParams(m).forEach((V,C)=>{s.value[C]=V})});const i=()=>{o.value=!o.value},d=m=>{l("update:modelValue",m)},u=m=>`filter-${m}`,p=m=>{var V,C;return(((C=(V=a.config.schema)==null?void 0:V[m])==null?void 0:C.values)??[]).map(v=>({value:v,label:v}))},n=m=>{var V,C;return((C=(V=a.config.schema)==null?void 0:V[m])==null?void 0:C.type)??"text"},y=m=>{s.value={...s.value,[m]:""},f()},b=()=>{s.value={},f(!0)},f=(m=!1)=>{const V=Object.keys(s.value).reduce((C,v)=>(s.value[v]&&(C[v]=`${s.value[v]}`),C),{});m&&(o.value=!1),l("update:modelValue",new URLSearchParams(V).toString())};return(m,V)=>{const C=t.resolveComponent("KInput"),v=t.resolveComponent("KButton"),w=t.resolveComponent("KSelect"),x=t.resolveComponent("KMenuItem"),U=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{before:t.withCtx(()=>[t.createVNode(Ma)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",Vi,[t.createVNode(v,{appearance:"tertiary","data-testid":"filter-button",onClick:i},{default:t.withCtx(()=>[t.createVNode(Ma),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(c.value.length>0?`(${c.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:i},null,512),[[t.vShow,o.value]]),t.withDirectives(t.createVNode(U,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(F,N)=>(t.openBlock(),t.createBlock(x,{key:F.value,"data-testid":F.value,expandable:"","last-menu-item":N===h.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",Ii,[t.createTextVNode(t.toDisplayString(F.label)+" ",1),t.withDirectives(t.createElementVNode("span",Bi,null,512),[[t.vShow,c.value.includes(F.value)]])])]),itemBody:t.withCtx(()=>{var I,_;return[t.createElementVNode("div",Ti,[t.createElementVNode("label",{class:"menu-item-label",for:u(F.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,Hi),((_=(I=e.config.schema)==null?void 0:I[F.value])==null?void 0:_.type)==="select"?(t.openBlock(),t.createBlock(w,{key:0,id:u(F.value),modelValue:s.value[F.value],"onUpdate:modelValue":B=>s.value[F.value]=B,appearance:"select",items:p(F.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(C,{key:1,id:u(F.value),modelValue:s.value[F.value],"onUpdate:modelValue":B=>s.value[F.value]=B,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:n(F.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Ei,[t.createVNode(v,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:V[0]||(V[0]=B=>f(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(v,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:B=>y(F.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createElementVNode("div",Ai,[t.createVNode(v,{appearance:"tertiary",size:"small",onClick:b},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[t.vShow,o.value]])]))}}}),[["__scopeId","data-v-5dbd1737"]]),se=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const l=e,a=t.ref(void 0),r=t.computed(()=>a.value===!0||a.value!==void 0&&l.forceShow===!0);return t.watch(()=>l.authFunction,async()=>{a.value=await l.authFunction()},{immediate:!0}),(o,s)=>r.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:a.value}):t.createCommentVNode("",!0)}}),qi={class:"form-section-wrapper"},Oi={key:0,class:"form-section-title"},vi={key:1,class:"form-section-description"},Ui={key:2,class:"form-section-footer"},$i={class:"form-section-content"},Ae=le(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const l=t.useSlots();return(a,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",qi,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",Oi,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(l).description?(t.openBlock(),t.createElementBlock("div",vi,[t.renderSlot(a.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(l).footer?(t.openBlock(),t.createElementBlock("div",Ui,[t.renderSlot(a.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",$i,[t.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:je,useDeleteUrlBuilder:Da,useErrors:ja,useExternalLinkCreator:Zc,useFetchUrlBuilder:Gc,useFetcher:Ka,useDebouncedFilter:Pa,useStringHelpers:Xc,useHelpers:Mi,useGatewayFeatureSupported:ed,useTruncationDetector:td}=Y,Di={upstreams:{list:{table_headers:{id:"ID",name:"Name",slots:"Slots",tags:"Tags"},empty_state:{title:"Configure a New Upstream",description:"Upstreams are used to load balance incoming requests."},toolbar_actions:{new_upstream:"New Upstream"}},title:"Upstreams",search:{placeholder:"Filter by exact name or ID"},actions:{create:"New Upstream",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details"},delete:{title:"Delete an Upstream",description:"This action cannot be reversed so make sure to check upstream usage before deleting."},errors:{general:"Upstreams could not be retrieved",delete:"The upstream could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{errors:{name_required:"Name is required",should_be_integer:"Field should contain an integer",in_range:"Accepts an integer in the range of 10 - 65536"},general_info:{title:"General Information",help:"General information will help identify and manage this Upstream."},load_balancing:{title:"Load Balancing",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},health_check:{title:"Health Checks & Circuit Breakers",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},active_health_check:{title:"Active Health Checks",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},passive_health_check:{title:"Passive Health Checks",help:"Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},buttons:{view_documentation:"View documentation"},algorithms:{round_robin_label:"Round Robin",least_connections_label:"Least Connections",consistent_hashing_label:"Consistent Hashing",latency_label:"Latency"},hash_labels:{none:"None",consumer:"Consumer",ip:"IP",header:"Header",cookie:"Cookie",path:"Path",query_argument:"Query Argument",uri_capture:"URI Capture"},hash_tooltips:{hash_on_header:{text:"The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",hash_on:"hash_on",header:"header"},hash_on_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",hash_on:"hash_on",uri_capture:"uri_capture"},hash_on_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",hash_on:"hash_on",query_arg:"query_arg"},hash_on_cookie:{text:"The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},hash_on_cookie_path:{text:"The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},slots:{text:"The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",algorithm:"algorithm",round_robin:"round-robin",consistent_hashing:"consistent-hashing"},tags:"An optional set of strings associated with the Upstream for grouping and filtering.",hash_fallback:{text:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",hash_on:"hash_on",cookie:"cookie"},hash_fallback_header:{text:"The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",hash_fallback:"hash_fallback",header:"header"},hash_fallback_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",hash_fallback:"hash_fallback",query_arg:"query_arg"},hash_fallback_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",hash_fallback:"hash_fallback",uri_capture:"uri_capture"},host_header:{text:"The hostname to be used as {host} header when proxying requests through Kong.",host:"Host"},client_certificate:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},healthcheck_type_labels:{http:"HTTP",https:"HTTPS",tcp:"TCP",grsp:"gRPC",grsps:"gRPCs"},healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},passive_healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},passive_unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},fields:{name:{label:"Name",placeholder:"Enter or select a host",tooltip:"This is a hostname, which must be equal to the {host} of a Service.",host:"host"},host_header:{label:"Host Header"},client_certificate:{label:"Client Certificate",placeholder:"Select or enter a Certificate ID",tooltip:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Upstream for grouping and filtering."},algorithm:{label:"Algorithm",tooltip:"Which load balancing algorithm to use."},slots:{label:"Slots",help:"Accepts an integer in the range of 10 - 65536"},hash_on:{label:"Hash on",help:"What to use as hashing input.",tooltip:"What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."},hash_fallback:{label:"Hash Fallback",help:"What to use as hashing input if the primary hash_on does not return a hash",tooltip:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}.",hash_on:"hash_on",cookie:"cookie"},active_health_checks:{label:"Active Health Checks",help:"Actively probe the targets for their health."},passive_health_checks:{label:"Passive Health Checks / Circuit Breakers",help:"Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},healthchecks_threshold:{label:"Healthchecks Threshold"},header:{label:"Header"},headers:{label:"Headers",tooltip_active:"Header values can be separated by commas (value1, value2, value3)."},cookie:{label:"Cookie"},cookie_path:{label:"Cookie Path"},query_argument:{label:"Query Argument"},uri_capture:{label:"URI Capture"},active_healthcheck_type:{label:"Active Health Check Type"},http_path:{label:"HTTP Path"},timeout:{label:"Timeout"},concurrency:{label:"Concurrency"},https_sni:{label:"HTTPS SNI"},verify_ssl:{label:"Verify the SSL certificate when performing active health checks using HTTPS"},interval:{label:"Interval",help:"A value of zero indicates that active probes for healthy targets are disabled."},successes:{label:"Successes"},http_statuses:{label:"HTTP Statuses"},http_failures:{label:"HTTP Failures"},tcp_failures:{label:"TCP Failures"},timeouts:{label:"Timeouts"},passive_health_check_type:{label:"Passive Health Check Type"}}},labels:{created_at:"Created at"}},targets:{list:{table_headers:{id:"ID",target_address:"Target Address",weight:"Weight",tags:"Tags"},empty_state:{title:"Configure a New Target",description:"A target is an IP address/hostname with a port that identifies an instance of a backend service."},toolbar_actions:{new_target:"New Target"}},title:"Targets",actions:{create:"New Target",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",mark_healthy:"Mark Healthy",mark_unhealthy:"Mark Unhealthy"},delete:{title:"Delete a Target",description:"This action cannot be reversed so make sure to check target usage before deleting."},errors:{general:"Targets could not be retrieved",delete:"The target could not be deleted at this time.",copy:"Failed to copy to clipboard",weight:"Value must be in range 0 to 65535"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{create:{title:"New Target"},edit:{title:"Edit Target"},buttons:{save:"Save",cancel:"Cancel"},fields:{target:{label:"Target Address",placeholder:"Enter IP/hostname and port",tooltip:"The target address (IP or hostname) and port. If omitted the port defaults to 8000."},weight:{label:"Weight",tooltip:"The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}}}}};function ji(){const e=Ve.createI18n("en-us",Di);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function Fe(e){const{replaceId:l=!1}=e,a=t.ref([]);return{addedItems:a,trackNewItems:(o,s)=>{if(s){const c={...o};l&&(c.value=o.label),a.value.push(c)}else a.value=a.value.filter(c=>c.value!==o.value)}}}const Ke=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],pt=10,ut=65536,Ki=0,Pi=65535,Ce=0,_e=255,La=0,Ra=255,Li=0,Ri=65535,za=0,Ja=65535,zi=0,Ji=2**31,ft=["200","302"],mt=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],gt=["429","404","500","501","502","503","504","505"],yt=["429","500","503"];function Pe(){const e=i=>/^\d+$/.test(i),l=(i,d,u)=>{if(e(i)){const p=Number(i);return p>=d&&p<=u}else return!1},a=i=>i.map(d=>Number(d)),r=i=>i.map(d=>d.toString()),o=()=>({name:"",hostHeader:"",clientCertificate:"",tags:"",algorithm:"round-robin",slots:"10000",hashOn:"none",hashFallback:"none",hashOnHeader:"",hashOnCookie:"",hashOnCookiePath:"/",hashOnQueryArgument:"",hashOnUriCapture:"",hashFallbackHeader:"",hashFallbackQueryArgument:"",hashFallbackUriCapture:"",activeHealthSwitch:!1,passiveHealthSwitch:!1,healthchecksThreshold:"0",activeHealthCheck:{type:"http",httpPath:"/",timeout:"1",concurrency:"10",httpsSni:"",verifySsl:!1,headers:[{key:"",values:""}],interval:"0",successes:"5",httpStatuses:ft,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:gt,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:mt,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:yt,tcpFailures:"5"}});return{isInteger:e,inRange:l,stringToNumberArray:a,numberToStringArray:r,upstreamsResponseToFields:i=>{var u,p,n,y,b,f,m,V,C,v,w,x,U,F,N,I,_,B,H,D,q,O,j,T,E,M,$,S,g,k,K,R,ae,P,W,fe,qe,Ne,Qa,Ya,Za,Ga,Xa,el,tl,al,ll,rl,ol,nl,sl,il,cl,dl,hl,pl,ul,fl,ml,gl,yl,kl,bl,Cl,_l,wl,Sl,xl,Nl,Vl,Il,Bl,Tl,Hl,El,Al,Fl,ql,Ol,vl,Ul,$l,Ml,Dl,jl,Kl,Pl,Ll,Rl,zl,Jl,Wl,Ql,Yl,Zl,Gl,Xl,er,tr,ar,lr,rr,or,nr,sr,ir,cr,dr,hr;const d=o();return d.name=i.name||"",d.algorithm=i.algorithm||"round-robin",d.hostHeader=i.host_header||"",d.clientCertificate=i.client_certificate?(u=i.client_certificate)==null?void 0:u.id:"",d.tags=((p=i.tags)==null?void 0:p.join(", "))||"",d.slots=i.slots!==null&&i.slots!==void 0?i.slots.toString():"10000",d.hashOn=i.hash_on||"none",d.hashFallback=i.hash_fallback||"none",d.hashOnHeader=i.hash_on_header||"",d.hashOnCookie=i.hash_on_cookie||"",d.hashOnCookiePath=i.hash_on_cookie_path||"/",d.hashOnQueryArgument=i.hash_on_query_arg||"",d.hashOnUriCapture=i.hash_on_uri_capture||"",d.hashFallbackHeader=i.hash_fallback_header||"",d.hashFallbackQueryArgument=i.hash_fallback_query_arg||"",d.hashFallbackUriCapture=i.hash_fallback_uri_capture||"",d.healthchecksThreshold=i.healthchecks.threshold!==null&&i.healthchecks.threshold!==void 0?i.healthchecks.threshold.toString():"",d.activeHealthSwitch=((y=(n=i.healthchecks.active)==null?void 0:n.healthy)==null?void 0:y.interval)!==0||((f=(b=i.healthchecks.active)==null?void 0:b.unhealthy)==null?void 0:f.interval)!==0,d.activeHealthCheck.type=((m=i.healthchecks.active)==null?void 0:m.type)||"http",d.activeHealthCheck.httpPath=((V=i.healthchecks.active)==null?void 0:V.http_path)||"/",d.activeHealthCheck.timeout=((C=i.healthchecks.active)==null?void 0:C.timeout)!==null&&((v=i.healthchecks.active)==null?void 0:v.timeout)!==void 0?(x=(w=i.healthchecks.active)==null?void 0:w.timeout)==null?void 0:x.toString():"",d.activeHealthCheck.concurrency=((U=i.healthchecks.active)==null?void 0:U.concurrency)!==null&&((F=i.healthchecks.active)==null?void 0:F.concurrency)!==void 0?(I=(N=i.healthchecks.active)==null?void 0:N.concurrency)==null?void 0:I.toString():"",d.activeHealthCheck.httpsSni=((_=i.healthchecks.active)==null?void 0:_.https_sni)||"",d.activeHealthCheck.verifySsl=((B=i.healthchecks.active)==null?void 0:B.https_verify_certificate)||!1,d.activeHealthCheck.headers=(H=i.healthchecks.active)!=null&&H.headers&&Object.entries((D=i.healthchecks.active)==null?void 0:D.headers).length>0?Object.entries((q=i.healthchecks.active)==null?void 0:q.headers).map(([jc,kt])=>({key:jc,values:kt==null?void 0:kt.join(", ")})):[{key:"",values:""}],d.activeHealthCheck.interval=((j=(O=i.healthchecks.active)==null?void 0:O.healthy)==null?void 0:j.interval)!==null&&((E=(T=i.healthchecks.active)==null?void 0:T.healthy)==null?void 0:E.interval)!==void 0?(S=($=(M=i.healthchecks.active)==null?void 0:M.healthy)==null?void 0:$.interval)==null?void 0:S.toString():"0",d.activeHealthCheck.interval=((k=(g=i.healthchecks.active)==null?void 0:g.healthy)==null?void 0:k.interval)!==null&&((R=(K=i.healthchecks.active)==null?void 0:K.healthy)==null?void 0:R.interval)!==void 0?(W=(P=(ae=i.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:P.interval)==null?void 0:W.toString():"0",d.activeHealthCheck.successes=((qe=(fe=i.healthchecks.active)==null?void 0:fe.healthy)==null?void 0:qe.successes)!==null&&((Qa=(Ne=i.healthchecks.active)==null?void 0:Ne.healthy)==null?void 0:Qa.successes)!==void 0?(Ga=(Za=(Ya=i.healthchecks.active)==null?void 0:Ya.healthy)==null?void 0:Za.successes)==null?void 0:Ga.toString():"0",d.activeHealthCheck.httpStatuses=(el=(Xa=i.healthchecks.active)==null?void 0:Xa.healthy)!=null&&el.http_statuses?r(((al=(tl=i.healthchecks.active)==null?void 0:tl.healthy)==null?void 0:al.http_statuses)||[]):ft,d.activeHealthCheck.unhealthyInterval=((rl=(ll=i.healthchecks.active)==null?void 0:ll.unhealthy)==null?void 0:rl.interval)!==null&&((nl=(ol=i.healthchecks.active)==null?void 0:ol.unhealthy)==null?void 0:nl.interval)!==void 0?(cl=(il=(sl=i.healthchecks.active)==null?void 0:sl.unhealthy)==null?void 0:il.interval)==null?void 0:cl.toString():"0",d.activeHealthCheck.httpFailures=((hl=(dl=i.healthchecks.active)==null?void 0:dl.unhealthy)==null?void 0:hl.http_failures)!==null&&((ul=(pl=i.healthchecks.active)==null?void 0:pl.unhealthy)==null?void 0:ul.http_failures)!==void 0?(gl=(ml=(fl=i.healthchecks.active)==null?void 0:fl.unhealthy)==null?void 0:ml.http_failures)==null?void 0:gl.toString():"0",d.activeHealthCheck.unhealthyTimeouts=((kl=(yl=i.healthchecks.active)==null?void 0:yl.unhealthy)==null?void 0:kl.timeouts)!==null&&((Cl=(bl=i.healthchecks.active)==null?void 0:bl.unhealthy)==null?void 0:Cl.timeouts)!==void 0?(Sl=(wl=(_l=i.healthchecks.active)==null?void 0:_l.unhealthy)==null?void 0:wl.timeouts)==null?void 0:Sl.toString():"0",d.activeHealthCheck.unhealthyHttpStatuses=(Nl=(xl=i.healthchecks.active)==null?void 0:xl.unhealthy)!=null&&Nl.http_statuses?r(((Il=(Vl=i.healthchecks.active)==null?void 0:Vl.unhealthy)==null?void 0:Il.http_statuses)||[]):gt,d.passiveHealthSwitch=((Tl=(Bl=i.healthchecks.passive)==null?void 0:Bl.healthy)==null?void 0:Tl.successes)!==0||((El=(Hl=i.healthchecks.passive)==null?void 0:Hl.unhealthy)==null?void 0:El.timeouts)!==0||((Fl=(Al=i.healthchecks.passive)==null?void 0:Al.unhealthy)==null?void 0:Fl.tcp_failures)!==0||((Ol=(ql=i.healthchecks.passive)==null?void 0:ql.unhealthy)==null?void 0:Ol.http_failures)!==0,d.passiveHealthCheck.type=((vl=i.healthchecks.passive)==null?void 0:vl.type)||"http",d.passiveHealthCheck.successes=(($l=(Ul=i.healthchecks.passive)==null?void 0:Ul.healthy)==null?void 0:$l.successes)!==null&&((Dl=(Ml=i.healthchecks.passive)==null?void 0:Ml.healthy)==null?void 0:Dl.successes)!==void 0?(Pl=(Kl=(jl=i.healthchecks.passive)==null?void 0:jl.healthy)==null?void 0:Kl.successes)==null?void 0:Pl.toString():"0",d.passiveHealthCheck.httpStatuses=(Rl=(Ll=i.healthchecks.passive)==null?void 0:Ll.healthy)!=null&&Rl.http_statuses?r(((Jl=(zl=i.healthchecks.passive)==null?void 0:zl.healthy)==null?void 0:Jl.http_statuses)||[]):mt,d.passiveHealthCheck.timeouts=((Ql=(Wl=i.healthchecks.passive)==null?void 0:Wl.unhealthy)==null?void 0:Ql.timeouts)!==null&&((Zl=(Yl=i.healthchecks.passive)==null?void 0:Yl.unhealthy)==null?void 0:Zl.timeouts)!==void 0?(er=(Xl=(Gl=i.healthchecks.passive)==null?void 0:Gl.unhealthy)==null?void 0:Xl.timeouts)==null?void 0:er.toString():"0",d.passiveHealthCheck.tcpFailures=((ar=(tr=i.healthchecks.passive)==null?void 0:tr.unhealthy)==null?void 0:ar.tcp_failures)!==null&&((rr=(lr=i.healthchecks.passive)==null?void 0:lr.unhealthy)==null?void 0:rr.tcp_failures)!==void 0?(sr=(nr=(or=i.healthchecks.passive)==null?void 0:or.unhealthy)==null?void 0:nr.tcp_failures)==null?void 0:sr.toString():"",d.passiveHealthCheck.unhealthyHttpStatuses=(cr=(ir=i.healthchecks.passive)==null?void 0:ir.unhealthy)!=null&&cr.http_statuses?r(((hr=(dr=i.healthchecks.passive)==null?void 0:dr.unhealthy)==null?void 0:hr.http_statuses)||[]):yt,d},getDefaultUpstreamFields:o,objectsAreEqual:(i,d)=>{try{return JSON.stringify(i)===JSON.stringify(d)}catch{return!1}},cloneDeep:i=>JSON.parse(JSON.stringify(i))}}const ie={useI18n:ji,useMultiselectCreation:Fe,useHelpers:Pe},we="/api/runtime_groups/{controlPlaneId}",Se="/{workspace}",xe={list:{konnect:`${we}/upstreams`,kongManager:`${Se}/upstreams`},form:{konnect:{getServices:`${we}/services`,getCertificates:`${we}/certificates`,validate:`${we}/v1/schemas/json/upstream/validate`,create:`${we}/upstreams`,edit:`${we}/upstreams/{id}`},kongManager:{getServices:`${Se}/services`,getCertificates:`${Se}/certificates`,validate:`${Se}/schemas/upstreams/validate`,create:`${Se}/upstreams`,edit:`${Se}/upstreams/{id}`}}},rd="",Wi={class:"kong-ui-entities-upstreams-list"},Qi={class:"upstream-name"},Yi=t.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:l}){var j;const a=e,{i18n:{t:r}}=ie.useI18n(),o=ze.useRouter(),{axiosInstance:s}=je({headers:(j=a.config)==null?void 0:j.requestHeaders}),c=t.ref(1),h=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),i={name:{label:r("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:r("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:r("upstreams.list.table_headers.tags"),sortable:!1}},d=i,u=t.computed(()=>{var E,M;let T=`${a.config.apiBaseUrl}${xe.list[a.config.app]}`;return a.config.app==="konnect"?T=T.replace(/{controlPlaneId}/gi,((E=a.config)==null?void 0:E.controlPlaneId)||""):a.config.app==="kongManager"&&(T=T.replace(/\/{workspace}/gi,(M=a.config)!=null&&M.workspace?`/${a.config.workspace}`:"")),T}),p=t.ref(""),n=t.computed(()=>{const T=a.config.app==="konnect"||a.config.isExactMatch;if(T)return{isExactMatch:T,placeholder:r("upstreams.search.placeholder")};const{name:E,slots:M}=i;return{isExactMatch:T,fields:{name:E,slots:M},schema:a.config.filterSchema}}),{fetcher:y,fetcherState:b}=Ka(a.config,u.value),f=()=>{p.value=""},m=()=>{c.value++},V=t.ref(null),C=(T,E)=>{const M=T.id;if(!E(M)){l("copy:error",{entity:T,field:"id",message:r("upstreams.errors.copy")});return}l("copy:success",{entity:T,field:"id",message:r("upstreams.copy.success",{val:M})})},v=(T,E)=>{const M=JSON.stringify(T);if(!E(M)){l("copy:error",{entity:T,message:r("upstreams.errors.copy")});return}l("copy:success",{entity:T,message:r("upstreams.copy.success_brief")})},w=async T=>{var M;await((M=a.canRetrieve)==null?void 0:M.call(a,T))&&o.push(a.config.getViewRoute(T.id))},x=T=>({label:r("upstreams.actions.view"),to:a.config.getViewRoute(T)}),U=T=>({label:r("upstreams.actions.edit"),to:a.config.getEditRoute(T)}),F=t.ref(void 0),N=t.ref(!1),I=t.ref(!1),_=t.ref(""),B=Da(a.config,u.value),H=T=>{F.value=T,N.value=!0},D=()=>{N.value=!1},q=async()=>{var T,E,M;if((T=F.value)!=null&&T.id){I.value=!0;try{await s.delete(B(F.value.id)),I.value=!1,N.value=!1,c.value++,l("delete:success",F.value)}catch($){_.value=((M=(E=$.response)==null?void 0:E.data)==null?void 0:M.message)||$.message||r("upstreams.errors.delete"),l("error",$)}finally{I.value=!1}}};t.watch(b,T=>{var E,M,$;if(T.status===de.Error){V.value={title:r("upstreams.errors.general")},($=(M=(E=T.error)==null?void 0:E.response)==null?void 0:M.data)!=null&&$.message&&(V.value.message=T.error.response.data.message),l("error",T.error);return}V.value=null});const O=t.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:r("upstreams.list.empty_state.description"),title:r("upstreams.title")});return t.onBeforeMount(async()=>{await a.canCreate()&&(O.value.title=r("upstreams.list.empty_state.title"),O.value.ctaText=r("upstreams.actions.create"))}),(T,E)=>{const M=t.resolveComponent("KButton"),$=t.resolveComponent("KBadge"),S=t.resolveComponent("KTruncate"),g=t.resolveComponent("KDropdownItem"),k=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Wi,[t.createVNode(t.unref(Ua),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":h.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":V.value,fetcher:t.unref(y),"fetcher-cache-key":c.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":t.unref(d),onClearSearchInput:f,"onClick:row":E[1]||(E[1]=K=>w(K)),onSort:m},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(Fi),{modelValue:p.value,"onUpdate:modelValue":E[0]||(E[0]=K=>p.value=K),config:n.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(M,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:e.config.createRoute},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:t.withCtx(({rowValue:K})=>[t.createElementVNode("span",Qi,t.toDisplayString(K),1)]),tags:t.withCtx(({rowValue:K})=>[t.createVNode(S,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(K,R=>(t.openBlock(),t.createBlock($,{key:R,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:K})=>[t.createVNode(k,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-id",onClick:ae=>C(K,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(k,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-json",onClick:ae=>v(K,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canRetrieve(K)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-view","has-divider":"",item:x(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(K)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-edit",item:U(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(K)},{default:t.withCtx(()=>[t.createVNode(g,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:R=>H(K)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref($a),{"action-pending":I.value,description:t.unref(r)("upstreams.delete.description"),"entity-name":F.value&&(F.value.name||F.value.id),"entity-type":t.unref(Je).Upstream,error:_.value,title:t.unref(r)("upstreams.delete.title"),visible:N.value,onCancel:D,onProceed:q},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),od="",ce=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Zi=ce(Yi,[["__scopeId","data-v-b5f46bd8"]]),Le={list:{konnect:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},Gi={class:"kong-ui-entities-target-form"},Xi={class:"target-form-container"},ec={key:0,class:"target-form-info"},tc=t.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:l}){var w;const a=e;t.useCssVars(x=>({"36f73404":v.value}));const{i18n:{t:r}}=ie.useI18n(),{getMessageFromError:o}=ja(),{axiosInstance:s}=je({headers:(w=a.config)==null?void 0:w.requestHeaders}),c=t.computed(()=>{var x;return Le.form[a.config.app].edit.replace(/{upstreamId}/gi,((x=a.config)==null?void 0:x.upstreamId)||"")}),h=t.computed(()=>a.targetId?re.Edit:re.Create),i=t.computed(()=>h.value===re.Edit?r("targets.form.edit.title"):r("targets.form.create.title")),d=t.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),u=t.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},n=t.computed(()=>{const x=parseInt(d.fields.weight.toString(),10);return x<0||x>65535}),y=t.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.target&&!!d.fields.weight&&!n.value),b=x=>{var U;d.fields.target=(x==null?void 0:x.target)||"",d.fields.weight=(x==null?void 0:x.weight)??"",d.fields.tags=((U=x==null?void 0:x.tags)==null?void 0:U.join(", "))||"",Object.assign(u,d.fields)},f=()=>{d.errorMessage="",l("cancel")},m=t.computed(()=>{var U,F;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app].validate}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((U=a.config)==null?void 0:U.controlPlaneId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(F=a.config)!=null&&F.workspace?`/${a.config.workspace}`:"")),x=x.replace(/{id}/gi,a.targetId),x}),V=t.computed(()=>{var U,F,N,I;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app][h.value]}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((U=a.config)==null?void 0:U.controlPlaneId)||"").replace(/{upstreamId}/gi,((F=a.config)==null?void 0:F.upstreamId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(N=a.config)!=null&&N.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((I=a.config)==null?void 0:I.upstreamId)||"")),x=x.replace(/{id}/gi,a.targetId),x}),C=async()=>{var x,U,F,N,I;try{d.isReadonly=!0,d.errorMessage="";const _={target:d.fields.target,weight:parseInt(d.fields.weight),tags:(F=(U=(x=d.fields.tags)==null?void 0:x.split(","))==null?void 0:U.map(H=>String(H||"").trim()))==null?void 0:F.filter(H=>H!==""),upstream:{id:a.config.upstreamId}};let B;if(await s.post(m.value,_),h.value==="create"?B=await s.post(V.value,_):h.value==="edit"&&(B=((N=a.config)==null?void 0:N.app)==="konnect"?await s.put(V.value,_):await s.patch(V.value,_)),B){const{data:H}=B;d.fields.target=(H==null?void 0:H.name)||"",d.fields.weight=(H==null?void 0:H.weight)??100,d.fields.tags=((I=H==null?void 0:H.tags)==null?void 0:I.join(", "))||"",l("update",H),Object.assign(d.fields,p)}}catch(_){d.errorMessage=o(_),l("error",_)}finally{d.isReadonly=!1}},v=t.computed(()=>d.isReadonly?"inline-flex":"none");return t.watch(()=>a.targetId,()=>{Object.assign(d.fields,p)}),(x,U)=>{const F=t.resolveComponent("KInput"),N=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(N,{"action-button-text":t.unref(r)("targets.form.buttons.save"),"action-pending":!y.value||d.isReadonly,"cancel-button-text":t.unref(r)("targets.form.buttons.cancel"),"is-visible":e.isVisible,title:i.value,onCanceled:f,onProceed:C},{"body-content":t.withCtx(()=>[t.createElementVNode("div",Gi,[t.createVNode(t.unref(va),{config:e.config,"edit-id":e.targetId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:f,"onFetch:error":U[3]||(U[3]=I=>x.$emit("error",I)),"onFetch:success":b,onLoading:U[4]||(U[4]=I=>x.$emit("loading",I))},{default:t.withCtx(()=>[t.createElementVNode("div",Xi,[x.$slots.info?(t.openBlock(),t.createElementBlock("div",ec,[t.renderSlot(x.$slots,"info",{},void 0,!0)])):t.createCommentVNode("",!0),t.createVNode(F,{modelValue:d.fields.target,"onUpdate:modelValue":U[0]||(U[0]=I=>d.fields.target=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:t.unref(r)("targets.form.fields.target.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.target.tooltip")},placeholder:t.unref(r)("targets.form.fields.target.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),t.createVNode(F,{modelValue:d.fields.weight,"onUpdate:modelValue":U[1]||(U[1]=I=>d.fields.weight=I),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight",error:n.value,"error-message":t.unref(r)("targets.errors.weight"),label:t.unref(r)("targets.form.fields.weight.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","error","error-message","label","label-attributes","readonly"]),t.createVNode(F,{modelValue:d.fields.tags,"onUpdate:modelValue":U[2]||(U[2]=I=>d.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:t.unref(r)("targets.form.fields.tags.help"),label:t.unref(r)("targets.form.fields.tags.label"),placeholder:t.unref(r)("targets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","error-message","fetch-url","is-readonly"])])]),_:3},8,["action-button-text","action-pending","cancel-button-text","is-visible","title"])}}}),nd="",Wa=ce(tc,[["__scopeId","data-v-d291c3d9"]]),ac={class:"kong-ui-entities-targets-list"},lc={class:"target-address"},rc=t.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.upstreamId||e.app==="kongManager"&&(typeof e.canMarkHealthy>"u"||typeof e.canMarkUnhealthy>"u"))},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(e,{emit:l}){var M;const a=e,{i18n:{t:r}}=ie.useI18n(),{axiosInstance:o}=je({headers:(M=a.config)==null?void 0:M.requestHeaders}),s=t.ref(1),c=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),i={target:{label:r("targets.list.table_headers.target_address"),sortable:!0},weight:{label:r("targets.list.table_headers.weight"),sortable:!0},tags:{label:r("targets.list.table_headers.tags"),sortable:!1}},d=t.computed(()=>{var S,g,k,K;let $=`${a.config.apiBaseUrl}${Le.list[a.config.app]}`;return a.config.app==="konnect"?$=$.replace(/{controlPlaneId}/gi,((S=a.config)==null?void 0:S.controlPlaneId)||"").replace(/{upstreamId}/gi,((g=a.config)==null?void 0:g.upstreamId)||""):a.config.app==="kongManager"&&($=$.replace(/\/{workspace}/gi,(k=a.config)!=null&&k.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((K=a.config)==null?void 0:K.upstreamId)||"")),$}),{fetcher:u,fetcherState:p}=Ka(a.config,d.value),n=()=>{s.value++},y=t.ref(null),b=()=>{O.value=!0},f=($,S)=>{const g=$.id;if(!S(g)){l("copy:error",{entity:$,field:"id",message:r("targets.errors.copy")});return}l("copy:success",{entity:$,field:"id",message:r("targets.copy.success",{val:g})})},m=($,S)=>{const g=JSON.stringify($);if(!S(g)){l("copy:error",{entity:$,message:r("targets.errors.copy")});return}l("copy:success",{entity:$,message:r("targets.copy.success_brief")})},V=$=>{q.value=$,O.value=!0},C=$=>a.config.app==="konnect"?!1:a.config.canMarkHealthy($),v=$=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy($),w=t.ref(void 0),x=t.ref(!1),U=t.ref(!1),F=t.ref(""),N=Da(a.config,d.value),I=$=>{w.value=$,x.value=!0},_=()=>{x.value=!1},B=async()=>{var $,S,g;if(($=w.value)!=null&&$.id){U.value=!0;try{await o.delete(N(w.value.id)),U.value=!1,x.value=!1,s.value++,l("delete:success",w.value)}catch(k){F.value=((g=(S=k.response)==null?void 0:S.data)==null?void 0:g.message)||k.message||r("targets.errors.delete"),l("error",k)}finally{U.value=!1}}};t.watch(p,$=>{var S,g,k;if($.status===de.Error){y.value={title:r("targets.errors.general")},(k=(g=(S=$.error)==null?void 0:S.response)==null?void 0:g.data)!=null&&k.message&&(y.value.message=$.error.response.data.message),l("error",$.error);return}y.value=null});const H=t.ref({ctaText:void 0,message:r("targets.list.empty_state.description"),title:r("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});t.onBeforeMount(async()=>{await a.canCreate()&&(H.value.title=r("targets.list.empty_state.title"),H.value.ctaText=r("targets.actions.create"))});const D=t.computed(()=>({app:a.config.app,apiBaseUrl:a.config.apiBaseUrl,upstreamId:a.config.upstreamId,...a.config.app==="konnect"&&{controlPlaneId:a.config.controlPlaneId},...a.config.app==="kongManager"&&{workspace:a.config.workspace,requestHeaders:a.config.requestHeaders}})),q=t.ref(""),O=t.ref(!1),j=$=>{q.value?l("update:target",$):l("create:target",$),T()},T=()=>{E(),s.value++},E=()=>{O.value=!1,q.value=""};return($,S)=>{const g=t.resolveComponent("KButton"),k=t.resolveComponent("KBadge"),K=t.resolveComponent("KTruncate"),R=t.resolveComponent("KDropdownItem"),ae=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",ac,[t.createVNode(t.unref(Ua),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":c.value,"empty-state-options":H.value,"enable-entity-actions":"","error-message":y.value,fetcher:t.unref(u),"fetcher-cache-key":s.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":t.unref(i),onEmptyStateCtaClicked:S[1]||(S[1]=()=>a.config.createRoute?void 0:b()),onSort:n},{"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(g,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:S[0]||(S[0]=()=>a.config.createRoute?void 0:b())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:t.withCtx(({rowValue:P})=>[t.createElementVNode("span",lc,t.toDisplayString(P),1)]),tags:t.withCtx(({rowValue:P})=>[t.createVNode(K,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P,W=>(t.openBlock(),t.createBlock(k,{key:W,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(W),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:P})=>[t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:fe=>f(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:fe=>m(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-edit","has-divider":"",onClick:W=>V(P.id)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>C(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-healthy",onClick:W=>l("health-actions:healthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>v(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-unhealthy",onClick:W=>l("health-actions:unhealthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(P)},{default:t.withCtx(()=>[t.createVNode(R,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:W=>I(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),t.createVNode(t.unref($a),{"action-pending":U.value,description:t.unref(r)("targets.delete.description"),"entity-type":t.unref(Je).Target,error:F.value,"need-confirm":!1,title:t.unref(r)("targets.delete.title"),visible:x.value,onCancel:_,onProceed:B},null,8,["action-pending","description","entity-type","error","title","visible"]),t.createVNode(Wa,{config:D.value,"is-visible":O.value,"target-id":q.value,onCancel:E,onUpdate:j},t.createSlots({_:2},[$.$slots["form-info"]?{name:"info",fn:t.withCtx(()=>[t.renderSlot($.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),sd="",oc=ce(rc,[["__scopeId","data-v-d9b501fd"]]),nc={key:1},sc=t.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(e,{emit:l}){var _,B,H,D;const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{debouncedQueryChange:s,loading:c,loadItems:h,results:i,allRecords:d}=Pa(a.config,(B=xe.form[(_=a.config)==null?void 0:_.app])==null?void 0:B.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:u,loading:p,loadItems:n,results:y}=Pa(a.config,(D=xe.form[(H=a.config)==null?void 0:H.app])==null?void 0:D.getCertificates),b=t.ref(""),f=t.computed(()=>{var q;return!!a.name&&!((q=d.value)!=null&&q.some(O=>O.host===a.name))}),m=t.computed(()=>{var O,j,T;const q=f.value&&a.name.includes((O=b.value)==null?void 0:O.toLowerCase());return(T=i.value)==null?void 0:T.map(E=>({label:E.host,value:E.id})).concat(q?[{label:a.name,value:((j=v.value)==null?void 0:j.value)||a.name}]:[])}),V=t.computed(()=>{var q;return(q=y.value)==null?void 0:q.map(O=>({label:O.id,value:O.id}))}),C=t.ref(""),v=t.ref({value:"",label:""}),w=t.computed(()=>{var q,O;return((q=m.value.find(j=>j.value===C.value))==null?void 0:q.label)||((O=v.value)==null?void 0:O.label)}),x=q=>{b.value=q,s(q)},U=q=>{v.value=q},F=()=>{v.value={value:"",label:""}},N=q=>{C.value=q,l("update:name",w.value)},I=t.ref(!1);return t.onBeforeMount(async()=>{var q,O;try{I.value=!0,await h(),a.name&&(C.value=((O=(q=m.value.find(j=>j.label===a.name))==null?void 0:q.value)==null?void 0:O.toString())||a.name),await n()}finally{I.value=!1}}),(q,O)=>{const j=t.resolveComponent("KSkeleton"),T=t.resolveComponent("KSelect"),E=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-general-info",description:t.unref(o)("upstreams.form.general_info.help"),title:t.unref(o)("upstreams.form.general_info.title")},{default:t.withCtx(()=>[I.value?(t.openBlock(),t.createBlock(j,{key:0,type:"form"})):(t.openBlock(),t.createElementBlock("div",nc,[t.createVNode(T,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:m.value,label:t.unref(o)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:t.unref(c),"model-value":C.value,placeholder:t.unref(o)("upstreams.form.fields.name.placeholder"),readonly:e.readonly,required:"",width:"100%","onItem:added":U,"onItem:removed":F,onQueryChange:x,"onUpdate:modelValue":N},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),t.createVNode(E,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:t.unref(o)("upstreams.form.fields.host_header.label"),"model-value":e.hostHeader,readonly:e.readonly,type:"text","onUpdate:modelValue":O[0]||(O[0]=M=>l("update:host-header",M))},null,8,["label","model-value","readonly"]),t.createVNode(T,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:V.value,label:t.unref(o)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:t.unref(p),"model-value":e.clientCertificate,placeholder:t.unref(o)("upstreams.form.fields.client_certificate.placeholder"),readonly:e.readonly,width:"100%",onQueryChange:t.unref(u),"onUpdate:modelValue":O[1]||(O[1]=M=>l("update:client-certificate",M))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),t.createVNode(E,{autocomplete:"off","data-testid":"upstreams-form-tags",help:t.unref(o)("upstreams.form.fields.tags.help"),label:t.unref(o)("upstreams.form.fields.tags.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":e.tags,placeholder:t.unref(o)("upstreams.form.fields.tags.placeholder"),readonly:e.readonly,type:"text","onUpdate:modelValue":O[2]||(O[2]=M=>l("update:tags",M))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),id="",ic=ce(sc,[["__scopeId","data-v-02065a3d"]]),Re={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},cc={class:"fields-group-title"},dc={class:"fields-group-text"},hc={class:"fields-group-title"},pc={class:"fields-group-text"},uc=t.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{algorithm:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(e,{emit:l}){const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{inRange:s}=Pe(),c=t.ref([{label:o("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:o("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:o("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:o("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),h=t.ref([{label:o("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:o("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:o("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:o("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:o("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:o("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:o("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:o("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);t.watch(()=>a.hashOn,(u,p)=>{p==="header"&&u!==p&&l("update:hash-on-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-on-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-on-uri-capture",""),(u==="cookie"||u==="none")&&(l("update:hash-fallback","none"),l("update:hash-fallback-header",""),l("update:hash-fallback-query-argument",""),l("update:hash-fallback-uri-capture",""))}),t.watch(()=>a.hashFallback,(u,p)=>{p==="header"&&u!==p&&l("update:hash-fallback-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-fallback-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-fallback-uri-capture","")});const i=t.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),d=t.computed(()=>a.slots?s(a.slots,pt,ut)?"":o("upstreams.form.errors.in_range"):"");return(u,p)=>{const n=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KSelect"),b=t.resolveComponent("KInput"),f=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-load-balancing",title:t.unref(o)("upstreams.form.load_balancing.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.load_balancing.help"))+" ",1),t.createVNode(n,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(y,{appearance:"select",class:"algorithm-select",items:c.value,label:t.unref(o)("upstreams.form.fields.algorithm.label"),"model-value":e.algorithm,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=m=>l("update:algorithm",m))},null,8,["items","label","model-value","readonly"]),t.createVNode(b,{autocomplete:"off","data-testid":"upstreams-form-slots",error:!!d.value,"error-message":d.value,help:t.unref(o)("upstreams.form.fields.slots.help"),label:t.unref(o)("upstreams.form.fields.slots.label"),max:t.unref(ut),min:t.unref(pt),"model-value":e.slots,readonly:e.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=m=>l("update:slots",m))},null,8,["error","error-message","help","label","max","min","model-value","readonly"]),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",cc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.label")),1),t.createElementVNode("p",dc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.help")),1),t.createVNode(y,{appearance:"select",class:"hash-on-select",items:h.value,label:t.unref(o)("upstreams.form.fields.hash_on.label"),"model-value":e.hashOn,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=m=>l("update:hash-on",m))},null,8,["items","label","model-value","readonly"]),e.hashOn==="header"?(t.openBlock(),t.createBlock(b,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashOnHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=m=>l("update:hash-on-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashOn==="query_arg"?(t.openBlock(),t.createBlock(b,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashOnQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=m=>l("update:hash-on-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="uri_capture"?(t.openBlock(),t.createBlock(b,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashOnUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=m=>l("update:hash-on-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1}),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",hc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.label")),1),t.createElementVNode("p",pc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.help")),1),t.createVNode(y,{appearance:"select",class:"hash-fallback-select",disabled:i.value,items:h.value,label:t.unref(o)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":e.hashFallback,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=m=>l("update:hash-fallback",m))},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),e.hashFallback==="header"?(t.openBlock(),t.createBlock(b,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashFallbackHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=m=>l("update:hash-fallback-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashFallback==="query_arg"?(t.openBlock(),t.createBlock(b,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashFallbackQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=m=>l("update:hash-fallback-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="uri_capture"?(t.openBlock(),t.createBlock(b,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashFallbackUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=m=>l("update:hash-fallback-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),cd="",fc=ce(uc,[["__scopeId","data-v-678db4c1"]]),mc={class:"fields-group-title"},gc={class:"fields-group-text"},yc={class:"fields-group-title"},kc={class:"fields-group-text"},bc=t.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(e,{emit:l}){const{i18n:{t:a}}=ie.useI18n();return(r,o)=>{const s=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KInputSwitch"),h=t.resolveComponent("KCard"),i=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-healthchecks",title:t.unref(a)("upstreams.form.health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.health_check.help"))+" ",1),t.createVNode(s,{"hide-icon":"",href:t.unref(Re).loadBalancing},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",mc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.label")),1),t.createElementVNode("p",gc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.help")),1),t.createVNode(c,{class:"active-health-switch","data-testid":"active-health-switch",disabled:e.readonly,"model-value":e.activeHealthSwitch,onChange:o[0]||(o[0]=d=>l("update:active-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",yc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),t.createElementVNode("p",kc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),t.createVNode(c,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:e.readonly,"model-value":e.passiveHealthSwitch,onChange:o[1]||(o[1]=d=>l("update:passive-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(i,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:t.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:t.unref(Pi),min:t.unref(Ki),"model-value":e.healthchecksThreshold,readonly:e.readonly,type:"number","onUpdate:modelValue":o[2]||(o[2]=d=>l("update:healthchecks-threshold",d))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),dd="",Cc=ce(bc,[["__scopeId","data-v-7fda4841"]]),_c={key:2},wc={class:"fields-group-title"},Sc={class:"fields-group-text"},xc={class:"fields-group-title"},Nc={class:"fields-group-text"},Vc=t.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},interval:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},httpFailures:{type:String,required:!0},tcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:interval","update:successes","update:http-statuses","update:unhealthy-interval","update:http-failures","update:tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),{objectsAreEqual:o}=Pe(),s=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),c=t.computed(()=>a.type==="https"||a.type==="grpcs"),h=t.computed(()=>a.type==="tcp"),{trackNewItems:i}=Fe({replaceId:!0}),{trackNewItems:d}=Fe({replaceId:!0});t.watch(()=>a.type,(b,f)=>{f==="tcp"&&b!==f&&l("update:tcp-failures","5"),(f==="https"||f==="grpcs")&&b!==f&&(l("update:https-sni",""),l("update:verify-ssl",!1)),f!=="tcp"&&b==="tcp"&&(l("update:http-path","/"),l("update:http-statuses",ft),l("update:unhealthy-http-statuses",gt))});const u=t.ref([{key:"",values:""}]);t.watch(()=>a.headers,b=>{o(u.value,b)||(u.value=[...b])},{immediate:!0,deep:!0});const p=()=>{l("update:headers",u.value)},n=()=>{u.value.push({key:"",values:""}),p()},y=b=>{b===0&&u.value.length===1?u.value[0]={key:"",values:""}:u.value.splice(b,1),p()};return(b,f)=>{const m=t.resolveComponent("KExternalLink"),V=t.resolveComponent("KSelect"),C=t.resolveComponent("KInput"),v=t.resolveComponent("KCheckbox"),w=t.resolveComponent("KLabel"),x=t.resolveComponent("KIcon"),U=t.resolveComponent("KButton"),F=t.resolveComponent("KMultiselect"),N=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-active-healthcheck",title:t.unref(r)("upstreams.form.active_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.active_health_check.help"))+" ",1),t.createVNode(m,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>{var I;return[t.createVNode(V,{appearance:"select",class:"active-healthcheck-type-select",items:s.value,label:t.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":f[0]||(f[0]=_=>l("update:type",_))},null,8,["items","label","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:t.unref(r)("upstreams.form.fields.http_path.label"),"model-value":e.httpPath,readonly:e.readonly,type:"text","onUpdate:modelValue":f[1]||(f[1]=_=>l("update:http-path",_))},null,8,["label","model-value","readonly"])),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:t.unref(r)("upstreams.form.fields.timeout.label"),max:t.unref(Ri),min:t.unref(Li),"model-value":e.timeout,readonly:e.readonly,type:"number","onUpdate:modelValue":f[2]||(f[2]=_=>l("update:timeout",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:t.unref(r)("upstreams.form.fields.concurrency.label"),max:t.unref(Ji),min:t.unref(zi),"model-value":e.concurrency,readonly:e.readonly,type:"number","onUpdate:modelValue":f[3]||(f[3]=_=>l("update:concurrency",_))},null,8,["label","max","min","model-value","readonly"]),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:t.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":e.httpsSni,readonly:e.readonly,type:"text","onUpdate:modelValue":f[4]||(f[4]=_=>l("update:https-sni",_))},null,8,["label","model-value","readonly"]),t.createVNode(v,{"data-testid":"active-healthcheck-verify-ssl",disabled:e.readonly,label:t.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":e.verifySsl,"onUpdate:modelValue":f[5]||(f[5]=_=>l("update:verify-ssl",_))},null,8,["disabled","label","model-value"])],64)):t.createCommentVNode("",!0),((I=e.config)==null?void 0:I.app)==="kongManager"?(t.openBlock(),t.createElementBlock("div",_c,[t.createVNode(w,{info:t.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,B)=>(t.openBlock(),t.createElementBlock("div",{key:`${_.header}_${B}`,class:t.normalizeClass(["headers-row",{"margin-top-6":B>0}])},[t.createVNode(C,{modelValue:u.value[B].key,"onUpdate:modelValue":H=>u.value[B].key=H,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${B+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(C,{modelValue:u.value[B].values,"onUpdate:modelValue":H=>u.value[B].values=H,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${B+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(U,{appearance:"tertiary",class:"btn-remove","data-testid":"btn-remove-header",onClick:H=>y(B)},{icon:t.withCtx(()=>[t.createVNode(x,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),u.value&&B===u.value.length-1?(t.openBlock(),t.createBlock(U,{key:0,appearance:"tertiary",class:"btn-add-header","data-testid":"btn-add-header",onClick:n},{icon:t.withCtx(()=>[t.createVNode(x,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):t.createCommentVNode("",!0)],2))),128))])])):t.createCommentVNode("",!0),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",wc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.label")),1),t.createElementVNode("p",Sc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.help")),1),t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(Ja),min:t.unref(za),"model-value":e.interval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[6]||(f[6]=_=>l("update:interval",_))},null,8,["help","label","max","min","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":f[7]||(f[7]=_=>l("update:successes",_))},null,8,["label","max","min","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(F,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[8]||(f[8]=_=>t.unref(i)(_,!0)),"onItem:removed":f[9]||(f[9]=_=>t.unref(i)(_,!1)),"onUpdate:modelValue":f[10]||(f[10]=_=>l("update:http-statuses",_))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",xc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.label")),1),t.createElementVNode("p",Nc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.help")),1),t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(Ja),min:t.unref(za),"model-value":e.unhealthyInterval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[11]||(f[11]=_=>l("update:unhealthy-interval",_))},null,8,["help","label","max","min","model-value","readonly"]),h.value?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[12]||(f[12]=_=>l("update:tcp-failures",_))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[13]||(f[13]=_=>l("update:http-failures",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(F,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[14]||(f[14]=_=>t.unref(d)(_,!0)),"onItem:removed":f[15]||(f[15]=_=>t.unref(d)(_,!1)),"onUpdate:modelValue":f[16]||(f[16]=_=>l("update:unhealthy-http-statuses",_))},null,8,["items","label","model-value","readonly"])],64)),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Ra),min:t.unref(La),"model-value":e.unhealthyTimeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":f[17]||(f[17]=_=>l("update:unhealthy-timeouts",_))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),hd="",Ic=ce(Vc,[["__scopeId","data-v-0a7d6cda"]]),Bc={class:"fields-group-title"},Tc={class:"fields-group-text"},Hc={class:"fields-group-title"},Ec={class:"fields-group-text"},Ac=t.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},timeouts:{type:String,required:!0},httpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},tcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:successes","update:http-statuses","update:timeouts","update:http-failures","update:unhealthy-http-statuses","update:tcp-failures"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),o=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),s=t.computed(()=>a.type==="tcp"),{trackNewItems:c}=Fe({replaceId:!0}),{trackNewItems:h}=Fe({replaceId:!0});return t.watch(()=>a.type,(i,d)=>{d==="tcp"&&i!==d&&l("update:tcp-failures","5"),d!=="tcp"&&i==="tcp"&&(l("update:http-statuses",mt),l("update:unhealthy-http-statuses",yt))}),(i,d)=>{const u=t.resolveComponent("KExternalLink"),p=t.resolveComponent("KSelect"),n=t.resolveComponent("KInput"),y=t.resolveComponent("KMultiselect"),b=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:t.unref(r)("upstreams.form.passive_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),t.createVNode(u,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(p,{appearance:"select",class:"passive-healthcheck-type-select",items:o.value,label:t.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>l("update:type",f))},null,8,["items","label","model-value","readonly"]),t.createVNode(b,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Bc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.label")),1),t.createElementVNode("p",Tc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=f=>l("update:successes",f))},null,8,["label","max","min","model-value","readonly"]),s.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(y,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[2]||(d[2]=f=>t.unref(c)(f,!0)),"onItem:removed":d[3]||(d[3]=f=>t.unref(c)(f,!1)),"onUpdate:modelValue":d[4]||(d[4]=f=>l("update:http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(b,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Hc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.label")),1),t.createElementVNode("p",Ec,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Ra),min:t.unref(La),"model-value":e.timeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":d[5]||(d[5]=f=>l("update:timeouts",f))},null,8,["label","max","min","model-value","readonly"]),s.value?(t.openBlock(),t.createBlock(n,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>l("update:tcp-failures",f))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(n,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>l("update:http-failures",f))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(y,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[8]||(d[8]=f=>t.unref(h)(f,!0)),"onItem:removed":d[9]||(d[9]=f=>t.unref(h)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>l("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),pd="",Fc=ce(Ac,[["__scopeId","data-v-6d6854e3"]]),qc={class:"kong-ui-entities-upstreams-form"},Oc=t.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||(e==null?void 0:e.app)==="konnect"&&!(e!=null&&e.controlPlaneId)||(e==null?void 0:e.app)==="kongManager"&&typeof(e==null?void 0:e.workspace)!="string"||!(e!=null&&e.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:l}){var $;const a=e,{inRange:r,stringToNumberArray:o,upstreamsResponseToFields:s,getDefaultUpstreamFields:c,objectsAreEqual:h,cloneDeep:i}=Pe(),{axiosInstance:d}=je({headers:($=a.config)==null?void 0:$.requestHeaders}),{getMessageFromError:u}=ja(),p=ze.useRouter(),n=t.reactive({fields:c(),readonly:!1,errorMessage:""}),y=t.reactive(c()),b=t.computed(()=>!h(n.fields,y)),f=S=>{n.fields.activeHealthCheck.interval=S?"5":"0",n.fields.activeHealthCheck.successes=S?"5":"0",n.fields.activeHealthCheck.httpFailures=S?"5":"0",n.fields.activeHealthCheck.unhealthyInterval=S?"5":"0"},m=S=>{n.fields.passiveHealthCheck.timeouts=S?"5":"0",n.fields.passiveHealthCheck.successes=S?"80":"0"},V=t.computed(()=>n.fields.slots?r(n.fields.slots,pt,ut):!0),C=t.computed(()=>n.fields.hashOn==="header"?!!n.fields.hashOnHeader:!0),v=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookie:!0),w=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookiePath:!0),x=t.computed(()=>n.fields.hashOn==="query_arg"?!!n.fields.hashOnQueryArgument:!0),U=t.computed(()=>n.fields.hashOn==="uri_capture"?!!n.fields.hashOnUriCapture:!0),F=t.computed(()=>n.fields.hashFallback==="header"?!!n.fields.hashFallbackHeader:!0),N=t.computed(()=>n.fields.hashFallback==="query_arg"?!!n.fields.hashFallbackQueryArgument:!0),I=t.computed(()=>n.fields.hashFallback==="uri_capture"?!!n.fields.hashFallbackUriCapture:!0),_=t.computed(()=>!!n.fields.name&&V.value&&C.value&&v.value&&w.value&&x.value&&U.value&&F.value&&N.value&&I.value),B=t.computed(()=>a.upstreamId?re.Edit:re.Create),H=t.computed(()=>{var S,g;return(g=xe.form[(S=a.config)==null?void 0:S.app])==null?void 0:g.edit}),D=S=>{Object.assign(n.fields,s(S)),Object.assign(y,i(n.fields))},q=()=>{var S;p.push(((S=a.config)==null?void 0:S.cancelRoute)||{name:"upstreams-list"})},O=S=>{l("loading",S)},j=S=>{l("error",S)},T=()=>{var g,k,K,R,ae;const S={name:n.fields.name,slots:Number(n.fields.slots),algorithm:n.fields.algorithm,hash_on:n.fields.hashOn,hash_fallback:n.fields.hashFallback,healthchecks:{}};return n.fields.hostHeader&&(S.host_header=n.fields.hostHeader),n.fields.clientCertificate&&(S.client_certificate={id:n.fields.clientCertificate}),n.fields.healthchecksThreshold&&(S.healthchecks.threshold=Number(n.fields.healthchecksThreshold)),n.fields.tags&&(S.tags=(k=(g=n.fields.tags.split(","))==null?void 0:g.map(P=>String(P||"").trim()))==null?void 0:k.filter(P=>P!=="")),n.fields.hashOn==="header"&&(S.hash_on_header=n.fields.hashOnHeader),(n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie")&&(S.hash_on_cookie=n.fields.hashOnCookie,S.hash_on_cookie_path=n.fields.hashOnCookiePath),n.fields.hashOn==="query_arg"&&(S.hash_on_query_arg=n.fields.hashOnQueryArgument),n.fields.hashOn==="uri_capture"&&(S.hash_on_uri_capture=n.fields.hashOnUriCapture),n.fields.hashFallback==="header"&&(S.hash_fallback_header=n.fields.hashFallbackHeader),n.fields.hashFallback==="query_arg"&&(S.hash_fallback_query_arg=n.fields.hashFallbackQueryArgument),n.fields.hashFallback==="uri_capture"&&(S.hash_fallback_uri_capture=n.fields.hashFallbackUriCapture),n.fields.activeHealthSwitch?(S.healthchecks.active={type:n.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},n.fields.activeHealthCheck.timeout&&(S.healthchecks.active.timeout=Number(n.fields.activeHealthCheck.timeout)),n.fields.activeHealthCheck.concurrency&&(S.healthchecks.active.concurrency=Number(n.fields.activeHealthCheck.concurrency)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpPath&&(S.healthchecks.active.http_path=n.fields.activeHealthCheck.httpPath),((K=a.config)==null?void 0:K.app)==="kongManager"&&(n.fields.activeHealthCheck.headers.length===0?S.healthchecks.active.headers=[]:S.healthchecks.active.headers=n.fields.activeHealthCheck.headers.reduce((P,W)=>{var fe,qe;return W.key?{...P,[W.key]:(qe=(fe=W.values.split(","))==null?void 0:fe.map(Ne=>String(Ne||"").trim()))==null?void 0:qe.filter(Ne=>Ne!=="")}:{...P}},{})),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&n.fields.activeHealthCheck.httpsSni&&(S.healthchecks.active.https_sni=n.fields.activeHealthCheck.httpsSni),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&(S.healthchecks.active.https_verify_certificate=n.fields.activeHealthCheck.verifySsl),n.fields.activeHealthCheck.interval&&(S.healthchecks.active.healthy.interval=Number(n.fields.activeHealthCheck.interval)),n.fields.activeHealthCheck.successes&&(S.healthchecks.active.healthy.successes=Number(n.fields.activeHealthCheck.successes)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpStatuses&&(S.healthchecks.active.healthy.http_statuses=o(n.fields.activeHealthCheck.httpStatuses)),n.fields.activeHealthCheck.unhealthyInterval&&(S.healthchecks.active.unhealthy.interval=Number(n.fields.activeHealthCheck.unhealthyInterval)),n.fields.activeHealthCheck.unhealthyTimeouts&&(S.healthchecks.active.unhealthy.timeouts=Number(n.fields.activeHealthCheck.unhealthyTimeouts)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.active.unhealthy.http_statuses=o(n.fields.activeHealthCheck.unhealthyHttpStatuses)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpFailures&&(S.healthchecks.active.unhealthy.http_failures=Number(n.fields.activeHealthCheck.httpFailures)),n.fields.activeHealthCheck.type==="tcp"&&n.fields.activeHealthCheck.tcpFailures&&(S.healthchecks.active.unhealthy.tcp_failures=Number(n.fields.activeHealthCheck.tcpFailures))):((R=a.config)==null?void 0:R.app)==="kongManager"&&B.value===re.Edit&&(S.healthchecks.active={type:n.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),n.fields.passiveHealthSwitch?(S.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},n.fields.passiveHealthCheck.successes&&(S.healthchecks.passive.healthy.successes=Number(n.fields.passiveHealthCheck.successes)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpStatuses&&(S.healthchecks.passive.healthy.http_statuses=o(n.fields.passiveHealthCheck.httpStatuses)),n.fields.passiveHealthCheck.timeouts&&(S.healthchecks.passive.unhealthy.timeouts=Number(n.fields.passiveHealthCheck.timeouts)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.passive.unhealthy.http_statuses=o(n.fields.passiveHealthCheck.unhealthyHttpStatuses)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpFailures&&(S.healthchecks.passive.unhealthy.http_failures=Number(n.fields.passiveHealthCheck.httpFailures)),n.fields.passiveHealthCheck.type==="tcp"&&n.fields.passiveHealthCheck.tcpFailures&&(S.healthchecks.passive.unhealthy.tcp_failures=Number(n.fields.passiveHealthCheck.tcpFailures))):((ae=a.config)==null?void 0:ae.app)==="kongManager"&&B.value===re.Edit&&(S.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),S},E=S=>{var k,K,R,ae,P,W;let g=`${(k=a.config)==null?void 0:k.apiBaseUrl}${xe.form[(K=a.config)==null?void 0:K.app][S]}`;return((R=a.config)==null?void 0:R.app)==="konnect"?g=g.replace(/{controlPlaneId}/gi,((ae=a.config)==null?void 0:ae.controlPlaneId)||""):((P=a.config)==null?void 0:P.app)==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"")),g=g.replace(/{id}/gi,a.upstreamId),g},M=async()=>{var S;try{n.readonly=!0,await d.post(E("validate"),T());let g;B.value===re.Create?g=await d.post(E("create"),T()):B.value===re.Edit&&(g=((S=a.config)==null?void 0:S.app)==="konnect"?await d.put(E("edit"),T()):await d.patch(E("edit"),T())),l("update",g==null?void 0:g.data)}catch(g){n.errorMessage=u(g),l("error",g)}finally{n.readonly=!1}};return(S,g)=>(t.openBlock(),t.createElementBlock("div",qc,[t.createVNode(t.unref(va),{"can-submit":_.value&&b.value,config:e.config,"edit-id":e.upstreamId,"error-message":n.errorMessage,"fetch-url":H.value,"is-readonly":n.readonly,onCancel:q,"onFetch:error":j,"onFetch:success":D,onLoading:O,onSubmit:M},{default:t.withCtx(()=>[t.createVNode(ic,{"client-certificate":n.fields.clientCertificate,"onUpdate:clientCertificate":g[0]||(g[0]=k=>n.fields.clientCertificate=k),"host-header":n.fields.hostHeader,"onUpdate:hostHeader":g[1]||(g[1]=k=>n.fields.hostHeader=k),name:n.fields.name,"onUpdate:name":g[2]||(g[2]=k=>n.fields.name=k),tags:n.fields.tags,"onUpdate:tags":g[3]||(g[3]=k=>n.fields.tags=k),config:e.config,readonly:n.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),t.createVNode(fc,{algorithm:n.fields.algorithm,"onUpdate:algorithm":g[4]||(g[4]=k=>n.fields.algorithm=k),"hash-fallback":n.fields.hashFallback,"onUpdate:hashFallback":g[5]||(g[5]=k=>n.fields.hashFallback=k),"hash-fallback-header":n.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":g[6]||(g[6]=k=>n.fields.hashFallbackHeader=k),"hash-fallback-query-argument":n.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":g[7]||(g[7]=k=>n.fields.hashFallbackQueryArgument=k),"hash-fallback-uri-capture":n.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":g[8]||(g[8]=k=>n.fields.hashFallbackUriCapture=k),"hash-on":n.fields.hashOn,"onUpdate:hashOn":g[9]||(g[9]=k=>n.fields.hashOn=k),"hash-on-cookie":n.fields.hashOnCookie,"onUpdate:hashOnCookie":g[10]||(g[10]=k=>n.fields.hashOnCookie=k),"hash-on-cookie-path":n.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":g[11]||(g[11]=k=>n.fields.hashOnCookiePath=k),"hash-on-header":n.fields.hashOnHeader,"onUpdate:hashOnHeader":g[12]||(g[12]=k=>n.fields.hashOnHeader=k),"hash-on-query-argument":n.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":g[13]||(g[13]=k=>n.fields.hashOnQueryArgument=k),"hash-on-uri-capture":n.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":g[14]||(g[14]=k=>n.fields.hashOnUriCapture=k),slots:n.fields.slots,"onUpdate:slots":g[15]||(g[15]=k=>n.fields.slots=k),readonly:n.readonly},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","readonly"]),t.createVNode(Cc,{"active-health-switch":n.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[g[16]||(g[16]=k=>n.fields.activeHealthSwitch=k),f],"healthchecks-threshold":n.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":g[17]||(g[17]=k=>n.fields.healthchecksThreshold=k),"passive-health-switch":n.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[g[18]||(g[18]=k=>n.fields.passiveHealthSwitch=k),m],readonly:n.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),n.fields.activeHealthSwitch?(t.openBlock(),t.createBlock(Ic,{key:0,concurrency:n.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":g[19]||(g[19]=k=>n.fields.activeHealthCheck.concurrency=k),headers:n.fields.activeHealthCheck.headers,"onUpdate:headers":g[20]||(g[20]=k=>n.fields.activeHealthCheck.headers=k),"http-failures":n.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":g[21]||(g[21]=k=>n.fields.activeHealthCheck.httpFailures=k),"http-path":n.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":g[22]||(g[22]=k=>n.fields.activeHealthCheck.httpPath=k),"http-statuses":n.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[23]||(g[23]=k=>n.fields.activeHealthCheck.httpStatuses=k),"https-sni":n.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":g[24]||(g[24]=k=>n.fields.activeHealthCheck.httpsSni=k),interval:n.fields.activeHealthCheck.interval,"onUpdate:interval":g[25]||(g[25]=k=>n.fields.activeHealthCheck.interval=k),successes:n.fields.activeHealthCheck.successes,"onUpdate:successes":g[26]||(g[26]=k=>n.fields.activeHealthCheck.successes=k),"tcp-failures":n.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[27]||(g[27]=k=>n.fields.activeHealthCheck.tcpFailures=k),timeout:n.fields.activeHealthCheck.timeout,"onUpdate:timeout":g[28]||(g[28]=k=>n.fields.activeHealthCheck.timeout=k),type:n.fields.activeHealthCheck.type,"onUpdate:type":g[29]||(g[29]=k=>n.fields.activeHealthCheck.type=k),"unhealthy-http-statuses":n.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[30]||(g[30]=k=>n.fields.activeHealthCheck.unhealthyHttpStatuses=k),"unhealthy-interval":n.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":g[31]||(g[31]=k=>n.fields.activeHealthCheck.unhealthyInterval=k),"unhealthy-timeouts":n.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":g[32]||(g[32]=k=>n.fields.activeHealthCheck.unhealthyTimeouts=k),"verify-ssl":n.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":g[33]||(g[33]=k=>n.fields.activeHealthCheck.verifySsl=k),config:e.config,readonly:n.readonly},null,8,["concurrency","headers","http-failures","http-path","http-statuses","https-sni","interval","successes","tcp-failures","timeout","type","unhealthy-http-statuses","unhealthy-interval","unhealthy-timeouts","verify-ssl","config","readonly"])):t.createCommentVNode("",!0),n.fields.passiveHealthSwitch?(t.openBlock(),t.createBlock(Fc,{key:1,"http-failures":n.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":g[34]||(g[34]=k=>n.fields.passiveHealthCheck.httpFailures=k),"http-statuses":n.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[35]||(g[35]=k=>n.fields.passiveHealthCheck.httpStatuses=k),successes:n.fields.passiveHealthCheck.successes,"onUpdate:successes":g[36]||(g[36]=k=>n.fields.passiveHealthCheck.successes=k),"tcp-failures":n.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[37]||(g[37]=k=>n.fields.passiveHealthCheck.tcpFailures=k),timeouts:n.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":g[38]||(g[38]=k=>n.fields.passiveHealthCheck.timeouts=k),type:n.fields.passiveHealthCheck.type,"onUpdate:type":g[39]||(g[39]=k=>n.fields.passiveHealthCheck.type=k),"unhealthy-http-statuses":n.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[40]||(g[40]=k=>n.fields.passiveHealthCheck.unhealthyHttpStatuses=k),readonly:n.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):t.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),ud="",vc=ce(Oc,[["__scopeId","data-v-810fb7b7"]]),Uc=t.createElementVNode("code",null,"10",-1),$c=t.createElementVNode("code",null,"65536",-1),Mc={"data-testid":"client_certificate-plain-text"},Dc=t.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const l=e,{i18n:{t:a},i18nT:r}=ie.useI18n(),{getPropValue:o}=Mi(),s=t.computed(()=>xe.form[l.config.app].edit),c=t.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:z.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:z.Basic},hash_on:{order:7,section:z.Basic},hash_on_header:{order:8,section:z.Basic},hash_on_uri_capture:{order:9,section:z.Basic},hash_on_query_arg:{order:10,section:z.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:z.Basic},hash_on_cookie_path:{order:12,section:z.Basic},healthchecks:{order:13,section:z.Basic,type:L.Json},tags:{order:14,tooltip:a("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${a("upstreams.form.fields.hash_fallback.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:a("upstreams.form.hash_tooltips.client_certificate")}});return(h,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(hi),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":c.value,"fetch-url":s.value,"hide-title":e.hideTitle,"onCopy:success":i[0]||(i[0]=d=>h.$emit("copy:success",d)),"onFetch:error":i[1]||(i[1]=d=>h.$emit("fetch:error",d)),"onFetch:success":i[2]||(i[2]=d=>h.$emit("fetch:success",d)),onLoading:i[3]||(i[3]=d=>h.$emit("loading",d))},{"name-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":t.withCtx(({row:d})=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(d.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:t.withCtx(()=>[Uc]),max:t.withCtx(()=>[$c]),_:1})]),"hash_fallback-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:t.withCtx(d=>{var u;return[t.createElementVNode("div",null,[t.createElementVNode("div",Mc,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(o)("rowValue",d))==null?void 0:u.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});X.TargetForm=Wa,X.TargetsList=oc,X.UpstreamsConfigCard=Dc,X.UpstreamsForm=vc,X.UpstreamsList=Zi,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
32
+ `:""}var Bs=Is,Ts={dump:Bs};function ht(e,l){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var Hs=Z,Es=vt,As=Dt,Fs=Rt,qs=zt,Os=at,vs=ma.load,Us=ma.loadAll,$s=Ts.dump,Ms=ee,Ds={binary:Zt,float:Lt,map:Mt,null:jt,pairs:Xt,set:ea,timestamp:Qt,bool:Kt,int:Pt,merge:Yt,omap:Gt,seq:$t,str:Ut},js=ht("safeLoad","load"),Ks=ht("safeLoadAll","loadAll"),Ps=ht("safeDump","dump"),Ls={Type:Hs,Schema:Es,FAILSAFE_SCHEMA:As,JSON_SCHEMA:Fs,CORE_SCHEMA:qs,DEFAULT_SCHEMA:Os,load:vs,loadAll:Us,dump:$s,YAMLException:Ms,types:Ds,safeLoad:js,safeLoadAll:Ks,safeDump:Ps};const Rs={key:0,class:"config-card-display-form"},zs=["data-testid"],Js={key:0,class:"config-card-prop-section-title"},Ws={key:1,class:"config-card-display-json"},Qs={key:2,class:"config-card-display-yaml"},Ys=le(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const l=e,a=t.useSlots(),{i18n:{t:r}}=Y.useI18n(),o=h=>!!(h.tooltip||a[`${h.key}-label-tooltip`]),s=t.ref(""),c=t.ref("");return t.watch(()=>l.format,h=>{h==="json"?s.value=JSON.stringify(l.record,null,2):h==="yaml"&&(c.value=Ls.dump(l.record))},{immediate:!0}),(h,i)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Rs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,u=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${u}-props`,class:t.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(t.openBlock(),t.createElementBlock("div",Js,t.toDisplayString(u==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[u],p=>(t.openBlock(),t.createBlock(Ze,{key:p.key,item:p},t.createSlots({label:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:t.withCtx(({rowValue:n})=>[t.renderSlot(h.$slots,p.key,{row:p,rowValue:n},void 0,!0)]),_:2},[o(p)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,zs))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",Ws,[t.createVNode(d,{id:"config-card-codeblock",code:s.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",Qs,[t.createVNode(d,{id:"config-card-codeblock",code:c.value,language:"yaml",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),Oa="24px",Zs=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Gs=e=>(t.pushScopeId("data-v-dd88a2bb"),e=e(),t.popScopeId(),e),Xs=["aria-hidden"],ei={key:0,"data-testid":"kui-icon-svg-title"},ti=Gs(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),ai=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Oa,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const o=String(l.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return Oa}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(o,s)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",ei,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),ti],8,Xs))]),_:1},8,["aria-hidden","style"]))}}),li=Zs(ai,[["__scopeId","data-v-dd88a2bb"]]),ri={"data-testid":"config-card-title"},oi={class:"config-card-actions"},ni=["href"],si={key:2,class:"config-card-details-section"},ii={key:3,class:"config-card-details-section"},ci=["data-testid"],di={key:0,class:"config-card-prop-section-title"},hi=le(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:l}){var a;const r=e,o=t.useSlots(),{i18n:{t:s}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{convertKeyToTitle:h}=Y.useStringHelpers(),{axiosInstance:i}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),d=[{label:s("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),p=N=>{u.value=N==null?void 0:N.value},n={id:{type:L.ID,label:s("baseConfigCard.commonFields.id_label"),order:0,section:z.Basic},name:{order:1,section:z.Basic},enabled:{type:L.BadgeStatus,order:2,section:z.Basic},updated_at:{type:L.Date,label:s("baseConfigCard.commonFields.updated_at_label"),order:3,section:z.Basic},created_at:{type:L.Date,label:s("baseConfigCard.commonFields.created_at_label"),order:4,section:z.Basic},tags:{type:L.BadgeTag,order:-1,section:z.Basic}},y=t.ref(!1),b=t.ref(!1),f=t.ref(""),m=t.ref(),V=t.computed(()=>{var N,I,_;if(!m.value)return[];const B=[],H=Object.keys(m.value).length;for(const D in m.value){const q=(I=(N=r.configSchema)==null?void 0:N[D])==null?void 0:I.order,O=(_=n[D])==null?void 0:_.order;let j=H;(O||O===0)&&(j=O===-1?H+1:O),q&&(j=q===-1?H+1:q),B.push([D,j])}return B.sort(function(D,q){return D[1]-q[1]}),B.map(D=>{var q,O;const j=D[0],T=(q=m.value)==null?void 0:q[j],E=((O=r.configSchema)==null?void 0:O[j])||{},M=n[j];return{key:j,value:T,hidden:E.hidden||!1,type:E.type??((M==null?void 0:M.type)||L.Text),label:E.label??((M==null?void 0:M.label)||h(j)),tooltip:E.tooltip??((M==null?void 0:M.tooltip)||void 0),section:E.section??((M==null?void 0:M.section)||z.Advanced)}}).filter(D=>!D.hidden&&D.key!==r.pluginConfigKey)}),C=t.computed(()=>{var N,I;if(!m.value||!r.pluginConfigKey)return[];const _=m.value[r.pluginConfigKey]||{},B=Object.keys(_).length,H=[];for(const D in _){const q=(I=(N=r.pluginConfigSchema)==null?void 0:N[D])==null?void 0:I.order,O=_[D];let j=O!=null&&O!==""?B-1:B;q&&(j=q===-1?B+1:q),H.push([D,j])}return H.sort(function(D,q){return D[1]-q[1]}),H.map(D=>{var q;const O=D[0],j=_[O],T=((q=r.pluginConfigSchema)==null?void 0:q[O])||{};return{key:O,value:j,hidden:T.hidden||!1,type:T.type??L.Text,label:T.label??h(O),tooltip:T.tooltip??void 0,section:z.Plugin}}).filter(D=>!D.hidden)}),v=t.computed(()=>{var N,I,_,B;return{basic:(N=V.value)==null?void 0:N.filter(H=>H.section===z.Basic),advanced:(I=V.value)==null?void 0:I.filter(H=>H.section===z.Advanced),plugin:(B=C.value)==null?void 0:B.concat((_=V.value)==null?void 0:_.filter(H=>H.section===z.Plugin))}}),w=t.computed(()=>{const N=[];return v.value.basic.length&&N.push("basic"),v.value.advanced.length&&N.push("advanced"),v.value.plugin.length&&N.push("plugin"),N}),x=N=>!!(N.tooltip||o[`${N.key}-label-tooltip`]),U=t.computed(()=>{var N,I;let _=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((N=r.config)==null?void 0:N.controlPlaneId)||""):r.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(I=r.config)!=null&&I.workspace?`/${r.config.workspace}`:"")),_=_.replace(/{id}/gi,r.config.entityId),_}),F=N=>{m.value&&N(JSON.stringify(m.value))?l("copy:success",m.value):l("copy:error")};return t.watch(y,N=>{l("loading",N)},{immediate:!0}),t.onBeforeMount(async()=>{b.value=!1,y.value=!0;try{const{data:N}=await i.get(U.value);if(r.dataKey)if(typeof N[r.dataKey]<"u")m.value={...N[r.dataKey]};else throw new Error(s("errors.dataKeyUndefined",{dataKey:r.dataKey}));else m.value={...N};Object.keys(r.configSchema).filter(I=>r.configSchema[I].forceShow).forEach(I=>{m.value&&typeof m.value[I]>"u"&&(m.value[I]=null)}),l("fetch:success",N)}catch(N){const I=c(N);f.value=I.startsWith("code")?s("baseConfigCard.errors.load"):I,b.value=!0,l("fetch:error",N)}finally{y.value=!1}}),(N,I)=>{const _=t.resolveComponent("KLabel"),B=t.resolveComponent("KSelect"),H=t.resolveComponent("KButton"),D=t.resolveComponent("KClipboardProvider"),q=t.resolveComponent("KSkeleton"),O=t.resolveComponent("KEmptyState"),j=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(j,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",oi,[t.renderSlot(N.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(_,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(B,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(H,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(li),{size:t.unref(ho)},null,8,["size"])],8,ni)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(D,{key:3},{default:t.withCtx(({copyToClipboard:T})=>[!y.value&&!b.value?(t.openBlock(),t.createBlock(H,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:E=>F(T)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(q,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):b.value?(t.openBlock(),t.createBlock(O,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(f.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",si,[t.createVNode(Ys,{format:u.value,"prop-list-types":w.value,"property-collections":v.value,record:m.value},t.createSlots({_:2},[t.renderList(Object.keys(N.$slots),T=>({name:T,fn:t.withCtx(({row:E,rowValue:M})=>[t.renderSlot(N.$slots,T,{row:E,rowValue:M},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",ii,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,T=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${T}-props`,class:t.normalizeClass(`config-card-details-${T}-props`),"data-testid":`config-card-details-${T}-props`},[T!=="basic"?(t.openBlock(),t.createElementBlock("div",di,t.toDisplayString(T==="advanced"?t.unref(s)("baseConfigCard.sections.advanced"):t.unref(s)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value[T],E=>(t.openBlock(),t.createBlock(Ze,{key:E.key,item:E},t.createSlots({label:t.withCtx(()=>[t.renderSlot(N.$slots,`${E.key}-label`,{row:E},void 0,!0)]),[E.key]:t.withCtx(({rowValue:M})=>[t.renderSlot(N.$slots,E.key,{row:E,rowValue:M},void 0,!0)]),_:2},[x(E)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(N.$slots,`${E.key}-label-tooltip`,{row:E},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,ci))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",ri,[t.renderSlot(N.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-b3999889"]]),pi=["onReset","onSubmit"],ui={class:"form-actions","data-testid":"form-actions"},va=le(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:l}){var a;const r=e,o=ze.useRouter(),{i18n:{t:s}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{axiosInstance:h}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),i=t.ref(!1),d=t.ref(!1),u=t.ref(""),p=t.computed(()=>r.canSubmit===!1||r.isReadonly),n=t.computed(()=>{var m,V;if(!r.editId)return"";let C=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||""):r.config.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,(V=r.config)!=null&&V.workspace?`/${r.config.workspace}`:"")),C=C.replace(/{id}/gi,r.editId),C}),y=()=>{r.config.cancelRoute?o.push(r.config.cancelRoute):b()},b=()=>{l("cancel")},f=()=>{p.value||l("submit")};return t.watch(()=>i.value,m=>{l("loading",m)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,i.value=!0;const{data:m}=await h.get(n.value);l("fetch:success",m)}catch(m){const V=c(m);u.value=V.startsWith("code")?s("baseForm.errors.edit"):V,d.value=!0,l("fetch:error",m)}finally{i.value=!1}}),(m,V)=>{const C=t.resolveComponent("KSkeleton"),v=t.resolveComponent("KEmptyState"),w=t.resolveComponent("KAlert"),x=t.resolveComponent("KButton"),U=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(U,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[i.value?(t.openBlock(),t.createBlock(C,{key:0,type:"form"})):d.value?(t.openBlock(),t.createBlock(v,{key:1,"cta-text":t.unref(s)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":y,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(b,["prevent"]),onSubmit:t.withModifiers(f,["prevent"])},[t.renderSlot(m.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(w,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ui,[t.renderSlot(m.$slots,"form-actions",{},()=>[t.createVNode(x,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(x,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(s)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,pi))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),fi={key:0,"data-testid":"first-col"},mi=le(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const l=e,a=t.computed(()=>{var f;return((f=l.rowEl)==null?void 0:f.querySelector(`[data-testid="${l.keyName}"]`))||null}),r=t.computed(()=>{var f;return((f=a.value)==null?void 0:f.querySelector('[data-testid="first-col"]'))||null}),o=t.computed(()=>{var f,m;const V=(f=l.rowEl)==null?void 0:f.querySelectorAll("td");return V?((m=V[0])==null?void 0:m.getAttribute("data-testid"))===l.keyName:!1});let s;const c=()=>{s&&(s.disconnect(),s=void 0)},h=()=>{var f,m,V;d.value=((f=r.value)==null?void 0:f.getBoundingClientRect().width)||0,u.value=((m=a.value)==null?void 0:m.clientWidth)||0,p.value=((V=i.value)==null?void 0:V.innerText)||""},i=t.ref({}),d=t.ref(0),u=t.ref(0),p=t.ref(""),n=t.computed(()=>[r.value,a.value]),y=t.watch(n,f=>{if(o.value&&(c(),"ResizeObserver"in window&&window)){s=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{!Array.isArray(m)||!m.length||h()})});for(const m of f)m&&s.observe(m)}},{immediate:!0,flush:"post",deep:!0}),b=t.computed(()=>o.value?d.value>u.value:!1);return t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()}),(f,m)=>{const V=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:i,class:"content-wrapper"},[o.value?(t.openBlock(),t.createElementBlock("span",fi,[t.createVNode(V,{label:b.value?p.value:"","max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):t.renderSlot(f.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),gi={class:"toolbar-container"},yi={key:0,class:"toolbar-button-container"},ki=["data-testid"],Ua=le(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.computed(()=>{var w,x;return typeof a.errorMessage=="string"?{hasError:!!a.errorMessage,title:a.errorMessage,message:void 0}:{hasError:!!a.errorMessage,title:(w=a.errorMessage)==null?void 0:w.title,message:(x=a.errorMessage)==null?void 0:x.message}}),s=t.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),c=w=>w.hasData||!!a.query,h=t.computed(()=>{const w=[];return Object.keys(a.tableHeaders).forEach(x=>{const U=a.tableHeaders[x];w.push({label:U.label??x,key:x,sortable:U.sortable??!1})}),a.enableEntityActions&&w.push({key:"actions",hideLabel:!0}),w}),i=w=>({"data-rowid":w.id,"data-testid":w.name,...a.rowAttributes(w)}),d=t.ref({}),u=w=>{var x;return(x=d.value)==null?void 0:x.$el.querySelector(`[data-rowid="${w.id}"]`)},p=w=>{const x={"data-testid":w.headerKey,...a.cellAttributes(w)};return w.colIndex===0&&(x.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),x},n=()=>{l("empty-state-cta-clicked"),y()},y=()=>{l("clear-search-input")},b=t.computed(()=>a.disableRowClick?void 0:(w,x)=>{l("click:row",x)}),f=w=>{l("sort",w)},{setTablePreferences:m,getTablePreferences:V}=gr(),C=t.computed(()=>{const w=V(a.preferencesStorageKey);return{...a.initialFetcherParams,...w}}),v=w=>{a.preferencesStorageKey&&m(a.preferencesStorageKey,w)};return(w,x)=>{const U=t.resolveComponent("KIcon"),F=t.resolveComponent("KButton"),N=t.resolveComponent("KDropdown"),I=t.resolveComponent("KTable"),_=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(_,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(I,{ref_key:"tableRefs",ref:d,"cache-identifier":s.value,"cell-attrs":p,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-message":o.value.message,"error-state-title":o.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":o.value.hasError,headers:h.value,"hide-pagination-when-optional":"","initial-fetcher-params":C.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":i,"search-input":e.query,onKtableEmptyStateCtaClicked:n,"onRow:click":b.value,onSort:x[0]||(x[0]=B=>f(B)),"onUpdate:tablePreferences":v},t.createSlots({toolbar:t.withCtx(({state:B})=>[t.withDirectives(t.createElementVNode("div",gi,[t.renderSlot(w.$slots,"toolbar-filter",{},void 0,!0),w.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",yi,[t.renderSlot(w.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,c(B)]])]),actions:t.withCtx(({row:B,rowKey:H,rowValue:D})=>[t.createElementVNode("div",{class:"actions-container","data-testid":B.name},[t.createVNode(N,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(w.$slots,"actions",{row:B,rowKey:H,rowValue:D},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(F,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(U,{color:t.unref(io),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,ki)]),_:2},[t.renderList(e.tableHeaders,(B,H)=>({name:H,fn:t.withCtx(({row:D,rowKey:q,rowValue:O})=>[t.createVNode(mi,{"key-name":String(H),"row-el":u(D)},{default:t.withCtx(()=>[t.renderSlot(w.$slots,H,{row:D,rowKey:q,rowValue:O},()=>[t.createTextVNode(t.toDisplayString(O),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),bi={key:0,class:"kong-ui-entity-delete-error"},Ci={key:1,class:"description"},$a=le(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:l}){const a=e,{i18nT:r}=Y.useI18n(),o=t.computed(()=>a.needConfirm?a.entityName:""),s=()=>{l("cancel")},c=()=>{l("proceed")};return(h,i)=>{const d=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:s,onProceed:c},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",bi,[t.createVNode(d,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||h.$slots.description?(t.openBlock(),t.createElementBlock("div",Ci,[t.renderSlot(h.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(a.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),_i={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},wi={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Si=["fill"],xi={mask:"url(#mask0_180_20349)"},Ni=["fill"],Ma=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${no})`}},setup(e){return(l,a)=>(t.openBlock(),t.createElementBlock("svg",_i,[t.createElementVNode("mask",wi,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,Si)]),t.createElementVNode("g",xi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,Ni)])]))}}),Vi={key:1,class:"kong-ui-entity-filter"},Ii={class:"menu-item-title"},Bi={class:"menu-item-indicator"},Ti={class:"menu-item-body"},Hi=["for"],Ei={class:"menu-item-buttons"},Ai={class:"filter-clear-button-container"},Fi=le(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.ref(!1),s=t.ref({}),c=t.computed(()=>{const m=[];return new URLSearchParams(a.modelValue).forEach((V,C)=>{V!==""&&m.push(C)}),m}),h=t.computed(()=>{const m=a.config.fields;return Object.keys(m).filter(V=>m[V].searchable).map(V=>({label:m[V].label||V,value:V}))});t.watch(()=>a.modelValue,m=>{s.value={},new URLSearchParams(m).forEach((V,C)=>{s.value[C]=V})});const i=()=>{o.value=!o.value},d=m=>{l("update:modelValue",m)},u=m=>`filter-${m}`,p=m=>{var V,C;return(((C=(V=a.config.schema)==null?void 0:V[m])==null?void 0:C.values)??[]).map(v=>({value:v,label:v}))},n=m=>{var V,C;return((C=(V=a.config.schema)==null?void 0:V[m])==null?void 0:C.type)??"text"},y=m=>{s.value={...s.value,[m]:""},f()},b=()=>{s.value={},f(!0)},f=(m=!1)=>{const V=Object.keys(s.value).reduce((C,v)=>(s.value[v]&&(C[v]=`${s.value[v]}`),C),{});m&&(o.value=!1),l("update:modelValue",new URLSearchParams(V).toString())};return(m,V)=>{const C=t.resolveComponent("KInput"),v=t.resolveComponent("KButton"),w=t.resolveComponent("KSelect"),x=t.resolveComponent("KMenuItem"),U=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{before:t.withCtx(()=>[t.createVNode(Ma)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",Vi,[t.createVNode(v,{appearance:"tertiary","data-testid":"filter-button",onClick:i},{default:t.withCtx(()=>[t.createVNode(Ma),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(c.value.length>0?`(${c.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:i},null,512),[[t.vShow,o.value]]),t.withDirectives(t.createVNode(U,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(F,N)=>(t.openBlock(),t.createBlock(x,{key:F.value,"data-testid":F.value,expandable:"","last-menu-item":N===h.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",Ii,[t.createTextVNode(t.toDisplayString(F.label)+" ",1),t.withDirectives(t.createElementVNode("span",Bi,null,512),[[t.vShow,c.value.includes(F.value)]])])]),itemBody:t.withCtx(()=>{var I,_;return[t.createElementVNode("div",Ti,[t.createElementVNode("label",{class:"menu-item-label",for:u(F.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,Hi),((_=(I=e.config.schema)==null?void 0:I[F.value])==null?void 0:_.type)==="select"?(t.openBlock(),t.createBlock(w,{key:0,id:u(F.value),modelValue:s.value[F.value],"onUpdate:modelValue":B=>s.value[F.value]=B,appearance:"select",items:p(F.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(C,{key:1,id:u(F.value),modelValue:s.value[F.value],"onUpdate:modelValue":B=>s.value[F.value]=B,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:n(F.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Ei,[t.createVNode(v,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:V[0]||(V[0]=B=>f(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(v,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:B=>y(F.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createElementVNode("div",Ai,[t.createVNode(v,{appearance:"tertiary",size:"small",onClick:b},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[t.vShow,o.value]])]))}}}),[["__scopeId","data-v-5dbd1737"]]),se=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const l=e,a=t.ref(void 0),r=t.computed(()=>a.value===!0||a.value!==void 0&&l.forceShow===!0);return t.watch(()=>l.authFunction,async()=>{a.value=await l.authFunction()},{immediate:!0}),(o,s)=>r.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:a.value}):t.createCommentVNode("",!0)}}),qi={class:"form-section-wrapper"},Oi={key:0,class:"form-section-title"},vi={key:1,class:"form-section-description"},Ui={key:2,class:"form-section-footer"},$i={class:"form-section-content"},Ae=le(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const l=t.useSlots();return(a,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",qi,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",Oi,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(l).description?(t.openBlock(),t.createElementBlock("div",vi,[t.renderSlot(a.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(l).footer?(t.openBlock(),t.createElementBlock("div",Ui,[t.renderSlot(a.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",$i,[t.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:je,useDeleteUrlBuilder:Da,useErrors:ja,useExternalLinkCreator:Zc,useFetchUrlBuilder:Gc,useFetcher:Ka,useDebouncedFilter:Pa,useStringHelpers:Xc,useHelpers:Mi,useGatewayFeatureSupported:ed,useTruncationDetector:td}=Y,Di={upstreams:{list:{table_headers:{id:"ID",name:"Name",slots:"Slots",tags:"Tags"},empty_state:{title:"Configure a New Upstream",description:"Upstreams are used to load balance incoming requests."},toolbar_actions:{new_upstream:"New Upstream"}},title:"Upstreams",search:{placeholder:"Filter by exact name or ID"},actions:{create:"New Upstream",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details"},delete:{title:"Delete an Upstream",description:"This action cannot be reversed so make sure to check upstream usage before deleting."},errors:{general:"Upstreams could not be retrieved",delete:"The upstream could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{errors:{name_required:"Name is required",should_be_integer:"Field should contain an integer",in_range:"Accepts an integer in the range of 10 - 65536"},general_info:{title:"General Information",help:"General information will help identify and manage this Upstream."},load_balancing:{title:"Load Balancing",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},health_check:{title:"Health Checks & Circuit Breakers",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},active_health_check:{title:"Active Health Checks",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},passive_health_check:{title:"Passive Health Checks",help:"Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},buttons:{view_documentation:"View documentation"},algorithms:{round_robin_label:"Round Robin",least_connections_label:"Least Connections",consistent_hashing_label:"Consistent Hashing",latency_label:"Latency"},hash_labels:{none:"None",consumer:"Consumer",ip:"IP",header:"Header",cookie:"Cookie",path:"Path",query_argument:"Query Argument",uri_capture:"URI Capture"},hash_tooltips:{hash_on_header:{text:"The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",hash_on:"hash_on",header:"header"},hash_on_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",hash_on:"hash_on",uri_capture:"uri_capture"},hash_on_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",hash_on:"hash_on",query_arg:"query_arg"},hash_on_cookie:{text:"The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},hash_on_cookie_path:{text:"The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},slots:{text:"The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",algorithm:"algorithm",round_robin:"round-robin",consistent_hashing:"consistent-hashing"},tags:"An optional set of strings associated with the Upstream for grouping and filtering.",hash_fallback:{text:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",hash_on:"hash_on",cookie:"cookie"},hash_fallback_header:{text:"The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",hash_fallback:"hash_fallback",header:"header"},hash_fallback_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",hash_fallback:"hash_fallback",query_arg:"query_arg"},hash_fallback_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",hash_fallback:"hash_fallback",uri_capture:"uri_capture"},host_header:{text:"The hostname to be used as {host} header when proxying requests through Kong.",host:"Host"},client_certificate:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},healthcheck_type_labels:{http:"HTTP",https:"HTTPS",tcp:"TCP",grsp:"gRPC",grsps:"gRPCs"},healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},passive_healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},passive_unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},fields:{name:{label:"Name",placeholder:"Enter or select a host",tooltip:"This is a hostname, which must be equal to the {host} of a Service.",host:"host"},host_header:{label:"Host Header"},client_certificate:{label:"Client Certificate",placeholder:"Select or enter a Certificate ID",tooltip:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Upstream for grouping and filtering."},algorithm:{label:"Algorithm",tooltip:"Which load balancing algorithm to use."},slots:{label:"Slots",help:"Accepts an integer in the range of 10 - 65536"},hash_on:{label:"Hash on",help:"What to use as hashing input.",tooltip:"What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."},hash_fallback:{label:"Hash Fallback",help:"What to use as hashing input if the primary hash_on does not return a hash",tooltip:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}.",hash_on:"hash_on",cookie:"cookie"},active_health_checks:{label:"Active Health Checks",help:"Actively probe the targets for their health."},passive_health_checks:{label:"Passive Health Checks / Circuit Breakers",help:"Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},healthchecks_threshold:{label:"Healthchecks Threshold"},header:{label:"Header"},headers:{label:"Headers",tooltip_active:"Header values can be separated by commas (value1, value2, value3)."},cookie:{label:"Cookie"},cookie_path:{label:"Cookie Path"},query_argument:{label:"Query Argument"},uri_capture:{label:"URI Capture"},active_healthcheck_type:{label:"Active Health Check Type"},http_path:{label:"HTTP Path"},timeout:{label:"Timeout"},concurrency:{label:"Concurrency"},https_sni:{label:"HTTPS SNI"},verify_ssl:{label:"Verify the SSL certificate when performing active health checks using HTTPS"},interval:{label:"Interval",help:"A value of zero indicates that active probes for healthy targets are disabled."},successes:{label:"Successes"},http_statuses:{label:"HTTP Statuses"},http_failures:{label:"HTTP Failures"},tcp_failures:{label:"TCP Failures"},timeouts:{label:"Timeouts"},passive_health_check_type:{label:"Passive Health Check Type"}}},labels:{created_at:"Created at"}},targets:{list:{table_headers:{id:"ID",target_address:"Target Address",weight:"Weight",tags:"Tags"},empty_state:{title:"Configure a New Target",description:"A target is an IP address/hostname with a port that identifies an instance of a backend service."},toolbar_actions:{new_target:"New Target"}},title:"Targets",actions:{create:"New Target",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",mark_healthy:"Mark Healthy",mark_unhealthy:"Mark Unhealthy"},delete:{title:"Delete a Target",description:"This action cannot be reversed so make sure to check target usage before deleting."},errors:{general:"Targets could not be retrieved",delete:"The target could not be deleted at this time.",copy:"Failed to copy to clipboard",weight:"Value must be in range 0 to 65535"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{create:{title:"New Target"},edit:{title:"Edit Target"},buttons:{save:"Save",cancel:"Cancel"},fields:{target:{label:"Target Address",placeholder:"Enter IP/hostname and port",tooltip:"The target address (IP or hostname) and port. If omitted the port defaults to 8000."},weight:{label:"Weight",tooltip:"The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}}}}};function ji(){const e=Ve.createI18n("en-us",Di);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function Fe(e){const{replaceId:l=!1}=e,a=t.ref([]);return{addedItems:a,trackNewItems:(o,s)=>{if(s){const c={...o};l&&(c.value=o.label),a.value.push(c)}else a.value=a.value.filter(c=>c.value!==o.value)}}}const Ke=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],pt=10,ut=65536,Ki=0,Pi=65535,Ce=0,_e=255,La=0,Ra=255,Li=0,Ri=65535,za=0,Ja=65535,zi=0,Ji=2**31,ft=["200","302"],mt=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],gt=["429","404","500","501","502","503","504","505"],yt=["429","500","503"];function Pe(){const e=i=>/^\d+$/.test(i),l=(i,d,u)=>{if(e(i)){const p=Number(i);return p>=d&&p<=u}else return!1},a=i=>i.map(d=>Number(d)),r=i=>i.map(d=>d.toString()),o=()=>({name:"",hostHeader:"",clientCertificate:"",tags:"",algorithm:"round-robin",slots:"10000",hashOn:"none",hashFallback:"none",hashOnHeader:"",hashOnCookie:"",hashOnCookiePath:"/",hashOnQueryArgument:"",hashOnUriCapture:"",hashFallbackHeader:"",hashFallbackQueryArgument:"",hashFallbackUriCapture:"",activeHealthSwitch:!1,passiveHealthSwitch:!1,healthchecksThreshold:"0",activeHealthCheck:{type:"http",httpPath:"/",timeout:"1",concurrency:"10",httpsSni:"",verifySsl:!1,headers:[{key:"",values:""}],interval:"0",successes:"5",httpStatuses:ft,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:gt,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:mt,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:yt,tcpFailures:"5"}});return{isInteger:e,inRange:l,stringToNumberArray:a,numberToStringArray:r,upstreamsResponseToFields:i=>{var u,p,n,y,b,f,m,V,C,v,w,x,U,F,N,I,_,B,H,D,q,O,j,T,E,M,$,S,g,k,K,R,ae,P,W,fe,qe,Ne,Qa,Ya,Za,Ga,Xa,el,tl,al,ll,rl,ol,nl,sl,il,cl,dl,hl,pl,ul,fl,ml,gl,yl,kl,bl,Cl,_l,wl,Sl,xl,Nl,Vl,Il,Bl,Tl,Hl,El,Al,Fl,ql,Ol,vl,Ul,$l,Ml,Dl,jl,Kl,Pl,Ll,Rl,zl,Jl,Wl,Ql,Yl,Zl,Gl,Xl,er,tr,ar,lr,rr,or,nr,sr,ir,cr,dr,hr;const d=o();return d.name=i.name||"",d.algorithm=i.algorithm||"round-robin",d.hostHeader=i.host_header||"",d.clientCertificate=i.client_certificate?(u=i.client_certificate)==null?void 0:u.id:"",d.tags=((p=i.tags)==null?void 0:p.join(", "))||"",d.slots=i.slots!==null&&i.slots!==void 0?i.slots.toString():"10000",d.hashOn=i.hash_on||"none",d.hashFallback=i.hash_fallback||"none",d.hashOnHeader=i.hash_on_header||"",d.hashOnCookie=i.hash_on_cookie||"",d.hashOnCookiePath=i.hash_on_cookie_path||"/",d.hashOnQueryArgument=i.hash_on_query_arg||"",d.hashOnUriCapture=i.hash_on_uri_capture||"",d.hashFallbackHeader=i.hash_fallback_header||"",d.hashFallbackQueryArgument=i.hash_fallback_query_arg||"",d.hashFallbackUriCapture=i.hash_fallback_uri_capture||"",d.healthchecksThreshold=i.healthchecks.threshold!==null&&i.healthchecks.threshold!==void 0?i.healthchecks.threshold.toString():"",d.activeHealthSwitch=((y=(n=i.healthchecks.active)==null?void 0:n.healthy)==null?void 0:y.interval)!==0||((f=(b=i.healthchecks.active)==null?void 0:b.unhealthy)==null?void 0:f.interval)!==0,d.activeHealthCheck.type=((m=i.healthchecks.active)==null?void 0:m.type)||"http",d.activeHealthCheck.httpPath=((V=i.healthchecks.active)==null?void 0:V.http_path)||"/",d.activeHealthCheck.timeout=((C=i.healthchecks.active)==null?void 0:C.timeout)!==null&&((v=i.healthchecks.active)==null?void 0:v.timeout)!==void 0?(x=(w=i.healthchecks.active)==null?void 0:w.timeout)==null?void 0:x.toString():"",d.activeHealthCheck.concurrency=((U=i.healthchecks.active)==null?void 0:U.concurrency)!==null&&((F=i.healthchecks.active)==null?void 0:F.concurrency)!==void 0?(I=(N=i.healthchecks.active)==null?void 0:N.concurrency)==null?void 0:I.toString():"",d.activeHealthCheck.httpsSni=((_=i.healthchecks.active)==null?void 0:_.https_sni)||"",d.activeHealthCheck.verifySsl=((B=i.healthchecks.active)==null?void 0:B.https_verify_certificate)||!1,d.activeHealthCheck.headers=(H=i.healthchecks.active)!=null&&H.headers&&Object.entries((D=i.healthchecks.active)==null?void 0:D.headers).length>0?Object.entries((q=i.healthchecks.active)==null?void 0:q.headers).map(([jc,kt])=>({key:jc,values:kt==null?void 0:kt.join(", ")})):[{key:"",values:""}],d.activeHealthCheck.interval=((j=(O=i.healthchecks.active)==null?void 0:O.healthy)==null?void 0:j.interval)!==null&&((E=(T=i.healthchecks.active)==null?void 0:T.healthy)==null?void 0:E.interval)!==void 0?(S=($=(M=i.healthchecks.active)==null?void 0:M.healthy)==null?void 0:$.interval)==null?void 0:S.toString():"0",d.activeHealthCheck.interval=((k=(g=i.healthchecks.active)==null?void 0:g.healthy)==null?void 0:k.interval)!==null&&((R=(K=i.healthchecks.active)==null?void 0:K.healthy)==null?void 0:R.interval)!==void 0?(W=(P=(ae=i.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:P.interval)==null?void 0:W.toString():"0",d.activeHealthCheck.successes=((qe=(fe=i.healthchecks.active)==null?void 0:fe.healthy)==null?void 0:qe.successes)!==null&&((Qa=(Ne=i.healthchecks.active)==null?void 0:Ne.healthy)==null?void 0:Qa.successes)!==void 0?(Ga=(Za=(Ya=i.healthchecks.active)==null?void 0:Ya.healthy)==null?void 0:Za.successes)==null?void 0:Ga.toString():"0",d.activeHealthCheck.httpStatuses=(el=(Xa=i.healthchecks.active)==null?void 0:Xa.healthy)!=null&&el.http_statuses?r(((al=(tl=i.healthchecks.active)==null?void 0:tl.healthy)==null?void 0:al.http_statuses)||[]):ft,d.activeHealthCheck.unhealthyInterval=((rl=(ll=i.healthchecks.active)==null?void 0:ll.unhealthy)==null?void 0:rl.interval)!==null&&((nl=(ol=i.healthchecks.active)==null?void 0:ol.unhealthy)==null?void 0:nl.interval)!==void 0?(cl=(il=(sl=i.healthchecks.active)==null?void 0:sl.unhealthy)==null?void 0:il.interval)==null?void 0:cl.toString():"0",d.activeHealthCheck.httpFailures=((hl=(dl=i.healthchecks.active)==null?void 0:dl.unhealthy)==null?void 0:hl.http_failures)!==null&&((ul=(pl=i.healthchecks.active)==null?void 0:pl.unhealthy)==null?void 0:ul.http_failures)!==void 0?(gl=(ml=(fl=i.healthchecks.active)==null?void 0:fl.unhealthy)==null?void 0:ml.http_failures)==null?void 0:gl.toString():"0",d.activeHealthCheck.unhealthyTimeouts=((kl=(yl=i.healthchecks.active)==null?void 0:yl.unhealthy)==null?void 0:kl.timeouts)!==null&&((Cl=(bl=i.healthchecks.active)==null?void 0:bl.unhealthy)==null?void 0:Cl.timeouts)!==void 0?(Sl=(wl=(_l=i.healthchecks.active)==null?void 0:_l.unhealthy)==null?void 0:wl.timeouts)==null?void 0:Sl.toString():"0",d.activeHealthCheck.unhealthyHttpStatuses=(Nl=(xl=i.healthchecks.active)==null?void 0:xl.unhealthy)!=null&&Nl.http_statuses?r(((Il=(Vl=i.healthchecks.active)==null?void 0:Vl.unhealthy)==null?void 0:Il.http_statuses)||[]):gt,d.passiveHealthSwitch=((Tl=(Bl=i.healthchecks.passive)==null?void 0:Bl.healthy)==null?void 0:Tl.successes)!==0||((El=(Hl=i.healthchecks.passive)==null?void 0:Hl.unhealthy)==null?void 0:El.timeouts)!==0||((Fl=(Al=i.healthchecks.passive)==null?void 0:Al.unhealthy)==null?void 0:Fl.tcp_failures)!==0||((Ol=(ql=i.healthchecks.passive)==null?void 0:ql.unhealthy)==null?void 0:Ol.http_failures)!==0,d.passiveHealthCheck.type=((vl=i.healthchecks.passive)==null?void 0:vl.type)||"http",d.passiveHealthCheck.successes=(($l=(Ul=i.healthchecks.passive)==null?void 0:Ul.healthy)==null?void 0:$l.successes)!==null&&((Dl=(Ml=i.healthchecks.passive)==null?void 0:Ml.healthy)==null?void 0:Dl.successes)!==void 0?(Pl=(Kl=(jl=i.healthchecks.passive)==null?void 0:jl.healthy)==null?void 0:Kl.successes)==null?void 0:Pl.toString():"0",d.passiveHealthCheck.httpStatuses=(Rl=(Ll=i.healthchecks.passive)==null?void 0:Ll.healthy)!=null&&Rl.http_statuses?r(((Jl=(zl=i.healthchecks.passive)==null?void 0:zl.healthy)==null?void 0:Jl.http_statuses)||[]):mt,d.passiveHealthCheck.timeouts=((Ql=(Wl=i.healthchecks.passive)==null?void 0:Wl.unhealthy)==null?void 0:Ql.timeouts)!==null&&((Zl=(Yl=i.healthchecks.passive)==null?void 0:Yl.unhealthy)==null?void 0:Zl.timeouts)!==void 0?(er=(Xl=(Gl=i.healthchecks.passive)==null?void 0:Gl.unhealthy)==null?void 0:Xl.timeouts)==null?void 0:er.toString():"0",d.passiveHealthCheck.tcpFailures=((ar=(tr=i.healthchecks.passive)==null?void 0:tr.unhealthy)==null?void 0:ar.tcp_failures)!==null&&((rr=(lr=i.healthchecks.passive)==null?void 0:lr.unhealthy)==null?void 0:rr.tcp_failures)!==void 0?(sr=(nr=(or=i.healthchecks.passive)==null?void 0:or.unhealthy)==null?void 0:nr.tcp_failures)==null?void 0:sr.toString():"",d.passiveHealthCheck.unhealthyHttpStatuses=(cr=(ir=i.healthchecks.passive)==null?void 0:ir.unhealthy)!=null&&cr.http_statuses?r(((hr=(dr=i.healthchecks.passive)==null?void 0:dr.unhealthy)==null?void 0:hr.http_statuses)||[]):yt,d},getDefaultUpstreamFields:o,objectsAreEqual:(i,d)=>{try{return JSON.stringify(i)===JSON.stringify(d)}catch{return!1}},cloneDeep:i=>JSON.parse(JSON.stringify(i))}}const ie={useI18n:ji,useMultiselectCreation:Fe,useHelpers:Pe},we="/api/runtime_groups/{controlPlaneId}",Se="/{workspace}",xe={list:{konnect:`${we}/upstreams`,kongManager:`${Se}/upstreams`},form:{konnect:{getServices:`${we}/services`,getCertificates:`${we}/certificates`,validate:`${we}/v1/schemas/json/upstream/validate`,create:`${we}/upstreams`,edit:`${we}/upstreams/{id}`},kongManager:{getServices:`${Se}/services`,getCertificates:`${Se}/certificates`,validate:`${Se}/schemas/upstreams/validate`,create:`${Se}/upstreams`,edit:`${Se}/upstreams/{id}`}}},rd="",Wi={class:"kong-ui-entities-upstreams-list"},Qi={class:"upstream-name"},Yi=t.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:l}){var j;const a=e,{i18n:{t:r}}=ie.useI18n(),o=ze.useRouter(),{axiosInstance:s}=je({headers:(j=a.config)==null?void 0:j.requestHeaders}),c=t.ref(1),h=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),i={name:{label:r("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:r("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:r("upstreams.list.table_headers.tags"),sortable:!1}},d=i,u=t.computed(()=>{var E,M;let T=`${a.config.apiBaseUrl}${xe.list[a.config.app]}`;return a.config.app==="konnect"?T=T.replace(/{controlPlaneId}/gi,((E=a.config)==null?void 0:E.controlPlaneId)||""):a.config.app==="kongManager"&&(T=T.replace(/\/{workspace}/gi,(M=a.config)!=null&&M.workspace?`/${a.config.workspace}`:"")),T}),p=t.ref(""),n=t.computed(()=>{const T=a.config.app==="konnect"||a.config.isExactMatch;if(T)return{isExactMatch:T,placeholder:r("upstreams.search.placeholder")};const{name:E,slots:M}=i;return{isExactMatch:T,fields:{name:E,slots:M},schema:a.config.filterSchema}}),{fetcher:y,fetcherState:b}=Ka(a.config,u.value),f=()=>{p.value=""},m=()=>{c.value++},V=t.ref(null),C=(T,E)=>{const M=T.id;if(!E(M)){l("copy:error",{entity:T,field:"id",message:r("upstreams.errors.copy")});return}l("copy:success",{entity:T,field:"id",message:r("upstreams.copy.success",{val:M})})},v=(T,E)=>{const M=JSON.stringify(T);if(!E(M)){l("copy:error",{entity:T,message:r("upstreams.errors.copy")});return}l("copy:success",{entity:T,message:r("upstreams.copy.success_brief")})},w=async T=>{var M;await((M=a.canRetrieve)==null?void 0:M.call(a,T))&&o.push(a.config.getViewRoute(T.id))},x=T=>({label:r("upstreams.actions.view"),to:a.config.getViewRoute(T)}),U=T=>({label:r("upstreams.actions.edit"),to:a.config.getEditRoute(T)}),F=t.ref(void 0),N=t.ref(!1),I=t.ref(!1),_=t.ref(""),B=Da(a.config,u.value),H=T=>{F.value=T,N.value=!0},D=()=>{N.value=!1},q=async()=>{var T,E,M;if((T=F.value)!=null&&T.id){I.value=!0;try{await s.delete(B(F.value.id)),I.value=!1,N.value=!1,c.value++,l("delete:success",F.value)}catch($){_.value=((M=(E=$.response)==null?void 0:E.data)==null?void 0:M.message)||$.message||r("upstreams.errors.delete"),l("error",$)}finally{I.value=!1}}};t.watch(b,T=>{var E,M,$;if(T.status===de.Error){V.value={title:r("upstreams.errors.general")},($=(M=(E=T.error)==null?void 0:E.response)==null?void 0:M.data)!=null&&$.message&&(V.value.message=T.error.response.data.message),l("error",T.error);return}V.value=null});const O=t.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:r("upstreams.list.empty_state.description"),title:r("upstreams.title")});return t.onBeforeMount(async()=>{await a.canCreate()&&(O.value.title=r("upstreams.list.empty_state.title"),O.value.ctaText=r("upstreams.actions.create"))}),(T,E)=>{const M=t.resolveComponent("KButton"),$=t.resolveComponent("KBadge"),S=t.resolveComponent("KTruncate"),g=t.resolveComponent("KDropdownItem"),k=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Wi,[t.createVNode(t.unref(Ua),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":h.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":V.value,fetcher:t.unref(y),"fetcher-cache-key":c.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":t.unref(d),onClearSearchInput:f,"onClick:row":E[1]||(E[1]=K=>w(K)),onSort:m},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(Fi),{modelValue:p.value,"onUpdate:modelValue":E[0]||(E[0]=K=>p.value=K),config:n.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(M,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:e.config.createRoute},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:t.withCtx(({rowValue:K})=>[t.createElementVNode("span",Qi,t.toDisplayString(K),1)]),tags:t.withCtx(({rowValue:K})=>[t.createVNode(S,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(K,R=>(t.openBlock(),t.createBlock($,{key:R,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:K})=>[t.createVNode(k,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-id",onClick:ae=>C(K,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(k,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-json",onClick:ae=>v(K,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canRetrieve(K)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-view","has-divider":"",item:x(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(K)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-edit",item:U(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(K)},{default:t.withCtx(()=>[t.createVNode(g,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:R=>H(K)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref($a),{"action-pending":I.value,description:t.unref(r)("upstreams.delete.description"),"entity-name":F.value&&(F.value.name||F.value.id),"entity-type":t.unref(Je).Upstream,error:_.value,title:t.unref(r)("upstreams.delete.title"),visible:N.value,onCancel:D,onProceed:q},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),od="",ce=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Zi=ce(Yi,[["__scopeId","data-v-b5f46bd8"]]),Le={list:{konnect:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},Gi={class:"kong-ui-entities-target-form"},Xi={class:"target-form-container"},ec={key:0,class:"target-form-info"},tc=t.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:l}){var w;const a=e;t.useCssVars(x=>({"36f73404":v.value}));const{i18n:{t:r}}=ie.useI18n(),{getMessageFromError:o}=ja(),{axiosInstance:s}=je({headers:(w=a.config)==null?void 0:w.requestHeaders}),c=t.computed(()=>{var x;return Le.form[a.config.app].edit.replace(/{upstreamId}/gi,((x=a.config)==null?void 0:x.upstreamId)||"")}),h=t.computed(()=>a.targetId?re.Edit:re.Create),i=t.computed(()=>h.value===re.Edit?r("targets.form.edit.title"):r("targets.form.create.title")),d=t.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),u=t.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},n=t.computed(()=>{const x=parseInt(d.fields.weight.toString(),10);return x<0||x>65535}),y=t.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.target&&!!d.fields.weight&&!n.value),b=x=>{var U;d.fields.target=(x==null?void 0:x.target)||"",d.fields.weight=(x==null?void 0:x.weight)??"",d.fields.tags=((U=x==null?void 0:x.tags)==null?void 0:U.join(", "))||"",Object.assign(u,d.fields)},f=()=>{d.errorMessage="",l("cancel")},m=t.computed(()=>{var U,F;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app].validate}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((U=a.config)==null?void 0:U.controlPlaneId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(F=a.config)!=null&&F.workspace?`/${a.config.workspace}`:"")),x=x.replace(/{id}/gi,a.targetId),x}),V=t.computed(()=>{var U,F,N,I;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app][h.value]}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((U=a.config)==null?void 0:U.controlPlaneId)||"").replace(/{upstreamId}/gi,((F=a.config)==null?void 0:F.upstreamId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(N=a.config)!=null&&N.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((I=a.config)==null?void 0:I.upstreamId)||"")),x=x.replace(/{id}/gi,a.targetId),x}),C=async()=>{var x,U,F,N,I;try{d.isReadonly=!0,d.errorMessage="";const _={target:d.fields.target,weight:parseInt(d.fields.weight),tags:(F=(U=(x=d.fields.tags)==null?void 0:x.split(","))==null?void 0:U.map(H=>String(H||"").trim()))==null?void 0:F.filter(H=>H!==""),upstream:{id:a.config.upstreamId}};let B;if(await s.post(m.value,_),h.value==="create"?B=await s.post(V.value,_):h.value==="edit"&&(B=((N=a.config)==null?void 0:N.app)==="konnect"?await s.put(V.value,_):await s.patch(V.value,_)),B){const{data:H}=B;d.fields.target=(H==null?void 0:H.name)||"",d.fields.weight=(H==null?void 0:H.weight)??100,d.fields.tags=((I=H==null?void 0:H.tags)==null?void 0:I.join(", "))||"",l("update",H),Object.assign(d.fields,p)}}catch(_){d.errorMessage=o(_),l("error",_)}finally{d.isReadonly=!1}},v=t.computed(()=>d.isReadonly?"inline-flex":"none");return t.watch(()=>a.targetId,()=>{Object.assign(d.fields,p)}),(x,U)=>{const F=t.resolveComponent("KInput"),N=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(N,{"action-button-text":t.unref(r)("targets.form.buttons.save"),"action-pending":!y.value||d.isReadonly,"cancel-button-text":t.unref(r)("targets.form.buttons.cancel"),"is-visible":e.isVisible,title:i.value,onCanceled:f,onProceed:C},{"body-content":t.withCtx(()=>[t.createElementVNode("div",Gi,[t.createVNode(t.unref(va),{config:e.config,"edit-id":e.targetId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:f,"onFetch:error":U[3]||(U[3]=I=>x.$emit("error",I)),"onFetch:success":b,onLoading:U[4]||(U[4]=I=>x.$emit("loading",I))},{default:t.withCtx(()=>[t.createElementVNode("div",Xi,[x.$slots.info?(t.openBlock(),t.createElementBlock("div",ec,[t.renderSlot(x.$slots,"info",{},void 0,!0)])):t.createCommentVNode("",!0),t.createVNode(F,{modelValue:d.fields.target,"onUpdate:modelValue":U[0]||(U[0]=I=>d.fields.target=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:t.unref(r)("targets.form.fields.target.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.target.tooltip")},placeholder:t.unref(r)("targets.form.fields.target.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),t.createVNode(F,{modelValue:d.fields.weight,"onUpdate:modelValue":U[1]||(U[1]=I=>d.fields.weight=I),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight",error:n.value,"error-message":t.unref(r)("targets.errors.weight"),label:t.unref(r)("targets.form.fields.weight.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","error","error-message","label","label-attributes","readonly"]),t.createVNode(F,{modelValue:d.fields.tags,"onUpdate:modelValue":U[2]||(U[2]=I=>d.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:t.unref(r)("targets.form.fields.tags.help"),label:t.unref(r)("targets.form.fields.tags.label"),placeholder:t.unref(r)("targets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","error-message","fetch-url","is-readonly"])])]),_:3},8,["action-button-text","action-pending","cancel-button-text","is-visible","title"])}}}),nd="",Wa=ce(tc,[["__scopeId","data-v-d291c3d9"]]),ac={class:"kong-ui-entities-targets-list"},lc={class:"target-address"},rc=t.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.upstreamId||e.app==="kongManager"&&(typeof e.canMarkHealthy>"u"||typeof e.canMarkUnhealthy>"u"))},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(e,{emit:l}){var M;const a=e,{i18n:{t:r}}=ie.useI18n(),{axiosInstance:o}=je({headers:(M=a.config)==null?void 0:M.requestHeaders}),s=t.ref(1),c=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),i={target:{label:r("targets.list.table_headers.target_address"),sortable:!0},weight:{label:r("targets.list.table_headers.weight"),sortable:!0},tags:{label:r("targets.list.table_headers.tags"),sortable:!1}},d=t.computed(()=>{var S,g,k,K;let $=`${a.config.apiBaseUrl}${Le.list[a.config.app]}`;return a.config.app==="konnect"?$=$.replace(/{controlPlaneId}/gi,((S=a.config)==null?void 0:S.controlPlaneId)||"").replace(/{upstreamId}/gi,((g=a.config)==null?void 0:g.upstreamId)||""):a.config.app==="kongManager"&&($=$.replace(/\/{workspace}/gi,(k=a.config)!=null&&k.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((K=a.config)==null?void 0:K.upstreamId)||"")),$}),{fetcher:u,fetcherState:p}=Ka(a.config,d.value),n=()=>{s.value++},y=t.ref(null),b=()=>{O.value=!0},f=($,S)=>{const g=$.id;if(!S(g)){l("copy:error",{entity:$,field:"id",message:r("targets.errors.copy")});return}l("copy:success",{entity:$,field:"id",message:r("targets.copy.success",{val:g})})},m=($,S)=>{const g=JSON.stringify($);if(!S(g)){l("copy:error",{entity:$,message:r("targets.errors.copy")});return}l("copy:success",{entity:$,message:r("targets.copy.success_brief")})},V=$=>{q.value=$,O.value=!0},C=$=>a.config.app==="konnect"?!1:a.config.canMarkHealthy($),v=$=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy($),w=t.ref(void 0),x=t.ref(!1),U=t.ref(!1),F=t.ref(""),N=Da(a.config,d.value),I=$=>{w.value=$,x.value=!0},_=()=>{x.value=!1},B=async()=>{var $,S,g;if(($=w.value)!=null&&$.id){U.value=!0;try{await o.delete(N(w.value.id)),U.value=!1,x.value=!1,s.value++,l("delete:success",w.value)}catch(k){F.value=((g=(S=k.response)==null?void 0:S.data)==null?void 0:g.message)||k.message||r("targets.errors.delete"),l("error",k)}finally{U.value=!1}}};t.watch(p,$=>{var S,g,k;if($.status===de.Error){y.value={title:r("targets.errors.general")},(k=(g=(S=$.error)==null?void 0:S.response)==null?void 0:g.data)!=null&&k.message&&(y.value.message=$.error.response.data.message),l("error",$.error);return}y.value=null});const H=t.ref({ctaText:void 0,message:r("targets.list.empty_state.description"),title:r("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});t.onBeforeMount(async()=>{await a.canCreate()&&(H.value.title=r("targets.list.empty_state.title"),H.value.ctaText=r("targets.actions.create"))});const D=t.computed(()=>({app:a.config.app,apiBaseUrl:a.config.apiBaseUrl,upstreamId:a.config.upstreamId,...a.config.app==="konnect"&&{controlPlaneId:a.config.controlPlaneId},...a.config.app==="kongManager"&&{workspace:a.config.workspace,requestHeaders:a.config.requestHeaders}})),q=t.ref(""),O=t.ref(!1),j=$=>{q.value?l("update:target",$):l("create:target",$),T()},T=()=>{E(),s.value++},E=()=>{O.value=!1,q.value=""};return($,S)=>{const g=t.resolveComponent("KButton"),k=t.resolveComponent("KBadge"),K=t.resolveComponent("KTruncate"),R=t.resolveComponent("KDropdownItem"),ae=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",ac,[t.createVNode(t.unref(Ua),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":c.value,"empty-state-options":H.value,"enable-entity-actions":"","error-message":y.value,fetcher:t.unref(u),"fetcher-cache-key":s.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":t.unref(i),onEmptyStateCtaClicked:S[1]||(S[1]=()=>a.config.createRoute?void 0:b()),onSort:n},{"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(g,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:S[0]||(S[0]=()=>a.config.createRoute?void 0:b())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:t.withCtx(({rowValue:P})=>[t.createElementVNode("span",lc,t.toDisplayString(P),1)]),tags:t.withCtx(({rowValue:P})=>[t.createVNode(K,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P,W=>(t.openBlock(),t.createBlock(k,{key:W,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(W),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:P})=>[t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:fe=>f(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:fe=>m(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-edit","has-divider":"",onClick:W=>V(P.id)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>C(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-healthy",onClick:W=>l("health-actions:healthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>v(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-unhealthy",onClick:W=>l("health-actions:unhealthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(P)},{default:t.withCtx(()=>[t.createVNode(R,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:W=>I(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),t.createVNode(t.unref($a),{"action-pending":U.value,description:t.unref(r)("targets.delete.description"),"entity-type":t.unref(Je).Target,error:F.value,"need-confirm":!1,title:t.unref(r)("targets.delete.title"),visible:x.value,onCancel:_,onProceed:B},null,8,["action-pending","description","entity-type","error","title","visible"]),t.createVNode(Wa,{config:D.value,"is-visible":O.value,"target-id":q.value,onCancel:E,onUpdate:j},t.createSlots({_:2},[$.$slots["form-info"]?{name:"info",fn:t.withCtx(()=>[t.renderSlot($.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),sd="",oc=ce(rc,[["__scopeId","data-v-d9b501fd"]]),nc={key:1},sc=t.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(e,{emit:l}){var _,B,H,D;const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{debouncedQueryChange:s,loading:c,loadItems:h,results:i,allRecords:d}=Pa(a.config,(B=xe.form[(_=a.config)==null?void 0:_.app])==null?void 0:B.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:u,loading:p,loadItems:n,results:y}=Pa(a.config,(D=xe.form[(H=a.config)==null?void 0:H.app])==null?void 0:D.getCertificates),b=t.ref(""),f=t.computed(()=>{var q;return!!a.name&&!((q=d.value)!=null&&q.some(O=>O.host===a.name))}),m=t.computed(()=>{var O,j,T;const q=f.value&&a.name.includes((O=b.value)==null?void 0:O.toLowerCase());return(T=i.value)==null?void 0:T.map(E=>({label:E.host,value:E.id})).concat(q?[{label:a.name,value:((j=v.value)==null?void 0:j.value)||a.name}]:[])}),V=t.computed(()=>{var q;return(q=y.value)==null?void 0:q.map(O=>({label:O.id,value:O.id}))}),C=t.ref(""),v=t.ref({value:"",label:""}),w=t.computed(()=>{var q,O;return((q=m.value.find(j=>j.value===C.value))==null?void 0:q.label)||((O=v.value)==null?void 0:O.label)}),x=q=>{b.value=q,s(q)},U=q=>{v.value=q},F=()=>{v.value={value:"",label:""}},N=q=>{C.value=q,l("update:name",w.value)},I=t.ref(!1);return t.onBeforeMount(async()=>{var q,O;try{I.value=!0,await h(),a.name&&(C.value=((O=(q=m.value.find(j=>j.label===a.name))==null?void 0:q.value)==null?void 0:O.toString())||a.name),await n()}finally{I.value=!1}}),(q,O)=>{const j=t.resolveComponent("KSkeleton"),T=t.resolveComponent("KSelect"),E=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-general-info",description:t.unref(o)("upstreams.form.general_info.help"),title:t.unref(o)("upstreams.form.general_info.title")},{default:t.withCtx(()=>[I.value?(t.openBlock(),t.createBlock(j,{key:0,type:"form"})):(t.openBlock(),t.createElementBlock("div",nc,[t.createVNode(T,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:m.value,label:t.unref(o)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:t.unref(c),"model-value":C.value,placeholder:t.unref(o)("upstreams.form.fields.name.placeholder"),readonly:e.readonly,required:"",width:"100%","onItem:added":U,"onItem:removed":F,onQueryChange:x,"onUpdate:modelValue":N},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),t.createVNode(E,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:t.unref(o)("upstreams.form.fields.host_header.label"),"model-value":e.hostHeader,readonly:e.readonly,type:"text","onUpdate:modelValue":O[0]||(O[0]=M=>l("update:host-header",M))},null,8,["label","model-value","readonly"]),t.createVNode(T,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:V.value,label:t.unref(o)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:t.unref(p),"model-value":e.clientCertificate,placeholder:t.unref(o)("upstreams.form.fields.client_certificate.placeholder"),readonly:e.readonly,width:"100%",onQueryChange:t.unref(u),"onUpdate:modelValue":O[1]||(O[1]=M=>l("update:client-certificate",M))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),t.createVNode(E,{autocomplete:"off","data-testid":"upstreams-form-tags",help:t.unref(o)("upstreams.form.fields.tags.help"),label:t.unref(o)("upstreams.form.fields.tags.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":e.tags,placeholder:t.unref(o)("upstreams.form.fields.tags.placeholder"),readonly:e.readonly,type:"text","onUpdate:modelValue":O[2]||(O[2]=M=>l("update:tags",M))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),id="",ic=ce(sc,[["__scopeId","data-v-02065a3d"]]),Re={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},cc={class:"fields-group-title"},dc={class:"fields-group-text"},hc={class:"fields-group-title"},pc={class:"fields-group-text"},uc=t.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{algorithm:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(e,{emit:l}){const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{inRange:s}=Pe(),c=t.ref([{label:o("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:o("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:o("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:o("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),h=t.ref([{label:o("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:o("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:o("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:o("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:o("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:o("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:o("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:o("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);t.watch(()=>a.hashOn,(u,p)=>{p==="header"&&u!==p&&l("update:hash-on-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-on-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-on-uri-capture",""),(u==="cookie"||u==="none")&&(l("update:hash-fallback","none"),l("update:hash-fallback-header",""),l("update:hash-fallback-query-argument",""),l("update:hash-fallback-uri-capture",""))}),t.watch(()=>a.hashFallback,(u,p)=>{p==="header"&&u!==p&&l("update:hash-fallback-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-fallback-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-fallback-uri-capture","")});const i=t.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),d=t.computed(()=>a.slots?s(a.slots,pt,ut)?"":o("upstreams.form.errors.in_range"):"");return(u,p)=>{const n=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KSelect"),b=t.resolveComponent("KInput"),f=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-load-balancing",title:t.unref(o)("upstreams.form.load_balancing.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.load_balancing.help"))+" ",1),t.createVNode(n,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(y,{appearance:"select",class:"algorithm-select",items:c.value,label:t.unref(o)("upstreams.form.fields.algorithm.label"),"model-value":e.algorithm,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=m=>l("update:algorithm",m))},null,8,["items","label","model-value","readonly"]),t.createVNode(b,{autocomplete:"off","data-testid":"upstreams-form-slots",error:!!d.value,"error-message":d.value,help:t.unref(o)("upstreams.form.fields.slots.help"),label:t.unref(o)("upstreams.form.fields.slots.label"),max:t.unref(ut),min:t.unref(pt),"model-value":e.slots,readonly:e.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=m=>l("update:slots",m))},null,8,["error","error-message","help","label","max","min","model-value","readonly"]),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",cc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.label")),1),t.createElementVNode("p",dc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.help")),1),t.createVNode(y,{appearance:"select",class:"hash-on-select",items:h.value,label:t.unref(o)("upstreams.form.fields.hash_on.label"),"model-value":e.hashOn,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=m=>l("update:hash-on",m))},null,8,["items","label","model-value","readonly"]),e.hashOn==="header"?(t.openBlock(),t.createBlock(b,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashOnHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=m=>l("update:hash-on-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashOn==="query_arg"?(t.openBlock(),t.createBlock(b,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashOnQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=m=>l("update:hash-on-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="uri_capture"?(t.openBlock(),t.createBlock(b,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashOnUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=m=>l("update:hash-on-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1}),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",hc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.label")),1),t.createElementVNode("p",pc,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.help")),1),t.createVNode(y,{appearance:"select",class:"hash-fallback-select",disabled:i.value,items:h.value,label:t.unref(o)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":e.hashFallback,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=m=>l("update:hash-fallback",m))},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),e.hashFallback==="header"?(t.openBlock(),t.createBlock(b,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashFallbackHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=m=>l("update:hash-fallback-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(b,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashFallback==="query_arg"?(t.openBlock(),t.createBlock(b,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashFallbackQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=m=>l("update:hash-fallback-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="uri_capture"?(t.openBlock(),t.createBlock(b,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashFallbackUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=m=>l("update:hash-fallback-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),cd="",fc=ce(uc,[["__scopeId","data-v-678db4c1"]]),mc={class:"fields-group-title"},gc={class:"fields-group-text"},yc={class:"fields-group-title"},kc={class:"fields-group-text"},bc=t.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(e,{emit:l}){const{i18n:{t:a}}=ie.useI18n();return(r,o)=>{const s=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KInputSwitch"),h=t.resolveComponent("KCard"),i=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-healthchecks",title:t.unref(a)("upstreams.form.health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.health_check.help"))+" ",1),t.createVNode(s,{"hide-icon":"",href:t.unref(Re).loadBalancing},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",mc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.label")),1),t.createElementVNode("p",gc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.help")),1),t.createVNode(c,{class:"active-health-switch","data-testid":"active-health-switch",disabled:e.readonly,"model-value":e.activeHealthSwitch,onChange:o[0]||(o[0]=d=>l("update:active-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",yc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),t.createElementVNode("p",kc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),t.createVNode(c,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:e.readonly,"model-value":e.passiveHealthSwitch,onChange:o[1]||(o[1]=d=>l("update:passive-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(i,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:t.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:t.unref(Pi),min:t.unref(Ki),"model-value":e.healthchecksThreshold,readonly:e.readonly,type:"number","onUpdate:modelValue":o[2]||(o[2]=d=>l("update:healthchecks-threshold",d))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),dd="",Cc=ce(bc,[["__scopeId","data-v-7fda4841"]]),_c={key:2},wc={class:"fields-group-title"},Sc={class:"fields-group-text"},xc={class:"fields-group-title"},Nc={class:"fields-group-text"},Vc=t.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},interval:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},httpFailures:{type:String,required:!0},tcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:interval","update:successes","update:http-statuses","update:unhealthy-interval","update:http-failures","update:tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),{objectsAreEqual:o}=Pe(),s=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),c=t.computed(()=>a.type==="https"||a.type==="grpcs"),h=t.computed(()=>a.type==="tcp"),{trackNewItems:i}=Fe({replaceId:!0}),{trackNewItems:d}=Fe({replaceId:!0});t.watch(()=>a.type,(b,f)=>{f==="tcp"&&b!==f&&l("update:tcp-failures","5"),(f==="https"||f==="grpcs")&&b!==f&&(l("update:https-sni",""),l("update:verify-ssl",!1)),f!=="tcp"&&b==="tcp"&&(l("update:http-path","/"),l("update:http-statuses",ft),l("update:unhealthy-http-statuses",gt))});const u=t.ref([{key:"",values:""}]);t.watch(()=>a.headers,b=>{o(u.value,b)||(u.value=[...b])},{immediate:!0,deep:!0});const p=()=>{l("update:headers",u.value)},n=()=>{u.value.push({key:"",values:""}),p()},y=b=>{b===0&&u.value.length===1?u.value[0]={key:"",values:""}:u.value.splice(b,1),p()};return(b,f)=>{const m=t.resolveComponent("KExternalLink"),V=t.resolveComponent("KSelect"),C=t.resolveComponent("KInput"),v=t.resolveComponent("KCheckbox"),w=t.resolveComponent("KLabel"),x=t.resolveComponent("KIcon"),U=t.resolveComponent("KButton"),F=t.resolveComponent("KMultiselect"),N=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-active-healthcheck",title:t.unref(r)("upstreams.form.active_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.active_health_check.help"))+" ",1),t.createVNode(m,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>{var I;return[t.createVNode(V,{appearance:"select",class:"active-healthcheck-type-select",items:s.value,label:t.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":f[0]||(f[0]=_=>l("update:type",_))},null,8,["items","label","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:t.unref(r)("upstreams.form.fields.http_path.label"),"model-value":e.httpPath,readonly:e.readonly,type:"text","onUpdate:modelValue":f[1]||(f[1]=_=>l("update:http-path",_))},null,8,["label","model-value","readonly"])),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:t.unref(r)("upstreams.form.fields.timeout.label"),max:t.unref(Ri),min:t.unref(Li),"model-value":e.timeout,readonly:e.readonly,type:"number","onUpdate:modelValue":f[2]||(f[2]=_=>l("update:timeout",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:t.unref(r)("upstreams.form.fields.concurrency.label"),max:t.unref(Ji),min:t.unref(zi),"model-value":e.concurrency,readonly:e.readonly,type:"number","onUpdate:modelValue":f[3]||(f[3]=_=>l("update:concurrency",_))},null,8,["label","max","min","model-value","readonly"]),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:t.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":e.httpsSni,readonly:e.readonly,type:"text","onUpdate:modelValue":f[4]||(f[4]=_=>l("update:https-sni",_))},null,8,["label","model-value","readonly"]),t.createVNode(v,{"data-testid":"active-healthcheck-verify-ssl",disabled:e.readonly,label:t.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":e.verifySsl,"onUpdate:modelValue":f[5]||(f[5]=_=>l("update:verify-ssl",_))},null,8,["disabled","label","model-value"])],64)):t.createCommentVNode("",!0),((I=e.config)==null?void 0:I.app)==="kongManager"?(t.openBlock(),t.createElementBlock("div",_c,[t.createVNode(w,{info:t.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,B)=>(t.openBlock(),t.createElementBlock("div",{key:`${_.header}_${B}`,class:t.normalizeClass(["headers-row",{"margin-top-6":B>0}])},[t.createVNode(C,{modelValue:u.value[B].key,"onUpdate:modelValue":H=>u.value[B].key=H,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${B+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(C,{modelValue:u.value[B].values,"onUpdate:modelValue":H=>u.value[B].values=H,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${B+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(U,{appearance:"tertiary",class:"btn-remove","data-testid":"btn-remove-header",onClick:H=>y(B)},{icon:t.withCtx(()=>[t.createVNode(x,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),u.value&&B===u.value.length-1?(t.openBlock(),t.createBlock(U,{key:0,appearance:"tertiary",class:"btn-add-header","data-testid":"btn-add-header",onClick:n},{icon:t.withCtx(()=>[t.createVNode(x,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):t.createCommentVNode("",!0)],2))),128))])])):t.createCommentVNode("",!0),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",wc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.label")),1),t.createElementVNode("p",Sc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.help")),1),t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(Ja),min:t.unref(za),"model-value":e.interval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[6]||(f[6]=_=>l("update:interval",_))},null,8,["help","label","max","min","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":f[7]||(f[7]=_=>l("update:successes",_))},null,8,["label","max","min","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(F,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[8]||(f[8]=_=>t.unref(i)(_,!0)),"onItem:removed":f[9]||(f[9]=_=>t.unref(i)(_,!1)),"onUpdate:modelValue":f[10]||(f[10]=_=>l("update:http-statuses",_))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",xc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.label")),1),t.createElementVNode("p",Nc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.help")),1),t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(Ja),min:t.unref(za),"model-value":e.unhealthyInterval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[11]||(f[11]=_=>l("update:unhealthy-interval",_))},null,8,["help","label","max","min","model-value","readonly"]),h.value?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[12]||(f[12]=_=>l("update:tcp-failures",_))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[13]||(f[13]=_=>l("update:http-failures",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(F,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[14]||(f[14]=_=>t.unref(d)(_,!0)),"onItem:removed":f[15]||(f[15]=_=>t.unref(d)(_,!1)),"onUpdate:modelValue":f[16]||(f[16]=_=>l("update:unhealthy-http-statuses",_))},null,8,["items","label","model-value","readonly"])],64)),t.createVNode(C,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Ra),min:t.unref(La),"model-value":e.unhealthyTimeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":f[17]||(f[17]=_=>l("update:unhealthy-timeouts",_))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),hd="",Ic=ce(Vc,[["__scopeId","data-v-0a7d6cda"]]),Bc={class:"fields-group-title"},Tc={class:"fields-group-text"},Hc={class:"fields-group-title"},Ec={class:"fields-group-text"},Ac=t.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},timeouts:{type:String,required:!0},httpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},tcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:successes","update:http-statuses","update:timeouts","update:http-failures","update:unhealthy-http-statuses","update:tcp-failures"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),o=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),s=t.computed(()=>a.type==="tcp"),{trackNewItems:c}=Fe({replaceId:!0}),{trackNewItems:h}=Fe({replaceId:!0});return t.watch(()=>a.type,(i,d)=>{d==="tcp"&&i!==d&&l("update:tcp-failures","5"),d!=="tcp"&&i==="tcp"&&(l("update:http-statuses",mt),l("update:unhealthy-http-statuses",yt))}),(i,d)=>{const u=t.resolveComponent("KExternalLink"),p=t.resolveComponent("KSelect"),n=t.resolveComponent("KInput"),y=t.resolveComponent("KMultiselect"),b=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:t.unref(r)("upstreams.form.passive_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),t.createVNode(u,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(p,{appearance:"select",class:"passive-healthcheck-type-select",items:o.value,label:t.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>l("update:type",f))},null,8,["items","label","model-value","readonly"]),t.createVNode(b,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Bc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.label")),1),t.createElementVNode("p",Tc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=f=>l("update:successes",f))},null,8,["label","max","min","model-value","readonly"]),s.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(y,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[2]||(d[2]=f=>t.unref(c)(f,!0)),"onItem:removed":d[3]||(d[3]=f=>t.unref(c)(f,!1)),"onUpdate:modelValue":d[4]||(d[4]=f=>l("update:http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(b,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Hc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.label")),1),t.createElementVNode("p",Ec,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Ra),min:t.unref(La),"model-value":e.timeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":d[5]||(d[5]=f=>l("update:timeouts",f))},null,8,["label","max","min","model-value","readonly"]),s.value?(t.openBlock(),t.createBlock(n,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>l("update:tcp-failures",f))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(n,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>l("update:http-failures",f))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(y,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Ke),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[8]||(d[8]=f=>t.unref(h)(f,!0)),"onItem:removed":d[9]||(d[9]=f=>t.unref(h)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>l("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),pd="",Fc=ce(Ac,[["__scopeId","data-v-6d6854e3"]]),qc={class:"kong-ui-entities-upstreams-form"},Oc=t.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||(e==null?void 0:e.app)==="konnect"&&!(e!=null&&e.controlPlaneId)||(e==null?void 0:e.app)==="kongManager"&&typeof(e==null?void 0:e.workspace)!="string"||!(e!=null&&e.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:l}){var $;const a=e,{inRange:r,stringToNumberArray:o,upstreamsResponseToFields:s,getDefaultUpstreamFields:c,objectsAreEqual:h,cloneDeep:i}=Pe(),{axiosInstance:d}=je({headers:($=a.config)==null?void 0:$.requestHeaders}),{getMessageFromError:u}=ja(),p=ze.useRouter(),n=t.reactive({fields:c(),readonly:!1,errorMessage:""}),y=t.reactive(c()),b=t.computed(()=>!h(n.fields,y)),f=S=>{n.fields.activeHealthCheck.interval=S?"5":"0",n.fields.activeHealthCheck.successes=S?"5":"0",n.fields.activeHealthCheck.httpFailures=S?"5":"0",n.fields.activeHealthCheck.unhealthyInterval=S?"5":"0"},m=S=>{n.fields.passiveHealthCheck.timeouts=S?"5":"0",n.fields.passiveHealthCheck.successes=S?"80":"0"},V=t.computed(()=>n.fields.slots?r(n.fields.slots,pt,ut):!0),C=t.computed(()=>n.fields.hashOn==="header"?!!n.fields.hashOnHeader:!0),v=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookie:!0),w=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookiePath:!0),x=t.computed(()=>n.fields.hashOn==="query_arg"?!!n.fields.hashOnQueryArgument:!0),U=t.computed(()=>n.fields.hashOn==="uri_capture"?!!n.fields.hashOnUriCapture:!0),F=t.computed(()=>n.fields.hashFallback==="header"?!!n.fields.hashFallbackHeader:!0),N=t.computed(()=>n.fields.hashFallback==="query_arg"?!!n.fields.hashFallbackQueryArgument:!0),I=t.computed(()=>n.fields.hashFallback==="uri_capture"?!!n.fields.hashFallbackUriCapture:!0),_=t.computed(()=>!!n.fields.name&&V.value&&C.value&&v.value&&w.value&&x.value&&U.value&&F.value&&N.value&&I.value),B=t.computed(()=>a.upstreamId?re.Edit:re.Create),H=t.computed(()=>{var S,g;return(g=xe.form[(S=a.config)==null?void 0:S.app])==null?void 0:g.edit}),D=S=>{Object.assign(n.fields,s(S)),Object.assign(y,i(n.fields))},q=()=>{var S;p.push(((S=a.config)==null?void 0:S.cancelRoute)||{name:"upstreams-list"})},O=S=>{l("loading",S)},j=S=>{l("error",S)},T=()=>{var g,k,K,R,ae;const S={name:n.fields.name,slots:Number(n.fields.slots),algorithm:n.fields.algorithm,hash_on:n.fields.hashOn,hash_fallback:n.fields.hashFallback,healthchecks:{}};return n.fields.hostHeader&&(S.host_header=n.fields.hostHeader),n.fields.clientCertificate&&(S.client_certificate={id:n.fields.clientCertificate}),n.fields.healthchecksThreshold&&(S.healthchecks.threshold=Number(n.fields.healthchecksThreshold)),n.fields.tags&&(S.tags=(k=(g=n.fields.tags.split(","))==null?void 0:g.map(P=>String(P||"").trim()))==null?void 0:k.filter(P=>P!=="")),n.fields.hashOn==="header"&&(S.hash_on_header=n.fields.hashOnHeader),(n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie")&&(S.hash_on_cookie=n.fields.hashOnCookie,S.hash_on_cookie_path=n.fields.hashOnCookiePath),n.fields.hashOn==="query_arg"&&(S.hash_on_query_arg=n.fields.hashOnQueryArgument),n.fields.hashOn==="uri_capture"&&(S.hash_on_uri_capture=n.fields.hashOnUriCapture),n.fields.hashFallback==="header"&&(S.hash_fallback_header=n.fields.hashFallbackHeader),n.fields.hashFallback==="query_arg"&&(S.hash_fallback_query_arg=n.fields.hashFallbackQueryArgument),n.fields.hashFallback==="uri_capture"&&(S.hash_fallback_uri_capture=n.fields.hashFallbackUriCapture),n.fields.activeHealthSwitch?(S.healthchecks.active={type:n.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},n.fields.activeHealthCheck.timeout&&(S.healthchecks.active.timeout=Number(n.fields.activeHealthCheck.timeout)),n.fields.activeHealthCheck.concurrency&&(S.healthchecks.active.concurrency=Number(n.fields.activeHealthCheck.concurrency)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpPath&&(S.healthchecks.active.http_path=n.fields.activeHealthCheck.httpPath),((K=a.config)==null?void 0:K.app)==="kongManager"&&(n.fields.activeHealthCheck.headers.length===0?S.healthchecks.active.headers=[]:S.healthchecks.active.headers=n.fields.activeHealthCheck.headers.reduce((P,W)=>{var fe,qe;return W.key?{...P,[W.key]:(qe=(fe=W.values.split(","))==null?void 0:fe.map(Ne=>String(Ne||"").trim()))==null?void 0:qe.filter(Ne=>Ne!=="")}:{...P}},{})),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&n.fields.activeHealthCheck.httpsSni&&(S.healthchecks.active.https_sni=n.fields.activeHealthCheck.httpsSni),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&(S.healthchecks.active.https_verify_certificate=n.fields.activeHealthCheck.verifySsl),n.fields.activeHealthCheck.interval&&(S.healthchecks.active.healthy.interval=Number(n.fields.activeHealthCheck.interval)),n.fields.activeHealthCheck.successes&&(S.healthchecks.active.healthy.successes=Number(n.fields.activeHealthCheck.successes)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpStatuses&&(S.healthchecks.active.healthy.http_statuses=o(n.fields.activeHealthCheck.httpStatuses)),n.fields.activeHealthCheck.unhealthyInterval&&(S.healthchecks.active.unhealthy.interval=Number(n.fields.activeHealthCheck.unhealthyInterval)),n.fields.activeHealthCheck.unhealthyTimeouts&&(S.healthchecks.active.unhealthy.timeouts=Number(n.fields.activeHealthCheck.unhealthyTimeouts)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.active.unhealthy.http_statuses=o(n.fields.activeHealthCheck.unhealthyHttpStatuses)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpFailures&&(S.healthchecks.active.unhealthy.http_failures=Number(n.fields.activeHealthCheck.httpFailures)),n.fields.activeHealthCheck.type==="tcp"&&n.fields.activeHealthCheck.tcpFailures&&(S.healthchecks.active.unhealthy.tcp_failures=Number(n.fields.activeHealthCheck.tcpFailures))):((R=a.config)==null?void 0:R.app)==="kongManager"&&B.value===re.Edit&&(S.healthchecks.active={type:n.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),n.fields.passiveHealthSwitch?(S.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},n.fields.passiveHealthCheck.successes&&(S.healthchecks.passive.healthy.successes=Number(n.fields.passiveHealthCheck.successes)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpStatuses&&(S.healthchecks.passive.healthy.http_statuses=o(n.fields.passiveHealthCheck.httpStatuses)),n.fields.passiveHealthCheck.timeouts&&(S.healthchecks.passive.unhealthy.timeouts=Number(n.fields.passiveHealthCheck.timeouts)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.passive.unhealthy.http_statuses=o(n.fields.passiveHealthCheck.unhealthyHttpStatuses)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpFailures&&(S.healthchecks.passive.unhealthy.http_failures=Number(n.fields.passiveHealthCheck.httpFailures)),n.fields.passiveHealthCheck.type==="tcp"&&n.fields.passiveHealthCheck.tcpFailures&&(S.healthchecks.passive.unhealthy.tcp_failures=Number(n.fields.passiveHealthCheck.tcpFailures))):((ae=a.config)==null?void 0:ae.app)==="kongManager"&&B.value===re.Edit&&(S.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),S},E=S=>{var k,K,R,ae,P,W;let g=`${(k=a.config)==null?void 0:k.apiBaseUrl}${xe.form[(K=a.config)==null?void 0:K.app][S]}`;return((R=a.config)==null?void 0:R.app)==="konnect"?g=g.replace(/{controlPlaneId}/gi,((ae=a.config)==null?void 0:ae.controlPlaneId)||""):((P=a.config)==null?void 0:P.app)==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"")),g=g.replace(/{id}/gi,a.upstreamId),g},M=async()=>{var S;try{n.readonly=!0,await d.post(E("validate"),T());let g;B.value===re.Create?g=await d.post(E("create"),T()):B.value===re.Edit&&(g=((S=a.config)==null?void 0:S.app)==="konnect"?await d.put(E("edit"),T()):await d.patch(E("edit"),T())),l("update",g==null?void 0:g.data)}catch(g){n.errorMessage=u(g),l("error",g)}finally{n.readonly=!1}};return(S,g)=>(t.openBlock(),t.createElementBlock("div",qc,[t.createVNode(t.unref(va),{"can-submit":_.value&&b.value,config:e.config,"edit-id":e.upstreamId,"error-message":n.errorMessage,"fetch-url":H.value,"is-readonly":n.readonly,onCancel:q,"onFetch:error":j,"onFetch:success":D,onLoading:O,onSubmit:M},{default:t.withCtx(()=>[t.createVNode(ic,{"client-certificate":n.fields.clientCertificate,"onUpdate:clientCertificate":g[0]||(g[0]=k=>n.fields.clientCertificate=k),"host-header":n.fields.hostHeader,"onUpdate:hostHeader":g[1]||(g[1]=k=>n.fields.hostHeader=k),name:n.fields.name,"onUpdate:name":g[2]||(g[2]=k=>n.fields.name=k),tags:n.fields.tags,"onUpdate:tags":g[3]||(g[3]=k=>n.fields.tags=k),config:e.config,readonly:n.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),t.createVNode(fc,{algorithm:n.fields.algorithm,"onUpdate:algorithm":g[4]||(g[4]=k=>n.fields.algorithm=k),"hash-fallback":n.fields.hashFallback,"onUpdate:hashFallback":g[5]||(g[5]=k=>n.fields.hashFallback=k),"hash-fallback-header":n.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":g[6]||(g[6]=k=>n.fields.hashFallbackHeader=k),"hash-fallback-query-argument":n.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":g[7]||(g[7]=k=>n.fields.hashFallbackQueryArgument=k),"hash-fallback-uri-capture":n.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":g[8]||(g[8]=k=>n.fields.hashFallbackUriCapture=k),"hash-on":n.fields.hashOn,"onUpdate:hashOn":g[9]||(g[9]=k=>n.fields.hashOn=k),"hash-on-cookie":n.fields.hashOnCookie,"onUpdate:hashOnCookie":g[10]||(g[10]=k=>n.fields.hashOnCookie=k),"hash-on-cookie-path":n.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":g[11]||(g[11]=k=>n.fields.hashOnCookiePath=k),"hash-on-header":n.fields.hashOnHeader,"onUpdate:hashOnHeader":g[12]||(g[12]=k=>n.fields.hashOnHeader=k),"hash-on-query-argument":n.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":g[13]||(g[13]=k=>n.fields.hashOnQueryArgument=k),"hash-on-uri-capture":n.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":g[14]||(g[14]=k=>n.fields.hashOnUriCapture=k),slots:n.fields.slots,"onUpdate:slots":g[15]||(g[15]=k=>n.fields.slots=k),readonly:n.readonly},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","readonly"]),t.createVNode(Cc,{"active-health-switch":n.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[g[16]||(g[16]=k=>n.fields.activeHealthSwitch=k),f],"healthchecks-threshold":n.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":g[17]||(g[17]=k=>n.fields.healthchecksThreshold=k),"passive-health-switch":n.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[g[18]||(g[18]=k=>n.fields.passiveHealthSwitch=k),m],readonly:n.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),n.fields.activeHealthSwitch?(t.openBlock(),t.createBlock(Ic,{key:0,concurrency:n.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":g[19]||(g[19]=k=>n.fields.activeHealthCheck.concurrency=k),headers:n.fields.activeHealthCheck.headers,"onUpdate:headers":g[20]||(g[20]=k=>n.fields.activeHealthCheck.headers=k),"http-failures":n.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":g[21]||(g[21]=k=>n.fields.activeHealthCheck.httpFailures=k),"http-path":n.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":g[22]||(g[22]=k=>n.fields.activeHealthCheck.httpPath=k),"http-statuses":n.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[23]||(g[23]=k=>n.fields.activeHealthCheck.httpStatuses=k),"https-sni":n.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":g[24]||(g[24]=k=>n.fields.activeHealthCheck.httpsSni=k),interval:n.fields.activeHealthCheck.interval,"onUpdate:interval":g[25]||(g[25]=k=>n.fields.activeHealthCheck.interval=k),successes:n.fields.activeHealthCheck.successes,"onUpdate:successes":g[26]||(g[26]=k=>n.fields.activeHealthCheck.successes=k),"tcp-failures":n.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[27]||(g[27]=k=>n.fields.activeHealthCheck.tcpFailures=k),timeout:n.fields.activeHealthCheck.timeout,"onUpdate:timeout":g[28]||(g[28]=k=>n.fields.activeHealthCheck.timeout=k),type:n.fields.activeHealthCheck.type,"onUpdate:type":g[29]||(g[29]=k=>n.fields.activeHealthCheck.type=k),"unhealthy-http-statuses":n.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[30]||(g[30]=k=>n.fields.activeHealthCheck.unhealthyHttpStatuses=k),"unhealthy-interval":n.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":g[31]||(g[31]=k=>n.fields.activeHealthCheck.unhealthyInterval=k),"unhealthy-timeouts":n.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":g[32]||(g[32]=k=>n.fields.activeHealthCheck.unhealthyTimeouts=k),"verify-ssl":n.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":g[33]||(g[33]=k=>n.fields.activeHealthCheck.verifySsl=k),config:e.config,readonly:n.readonly},null,8,["concurrency","headers","http-failures","http-path","http-statuses","https-sni","interval","successes","tcp-failures","timeout","type","unhealthy-http-statuses","unhealthy-interval","unhealthy-timeouts","verify-ssl","config","readonly"])):t.createCommentVNode("",!0),n.fields.passiveHealthSwitch?(t.openBlock(),t.createBlock(Fc,{key:1,"http-failures":n.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":g[34]||(g[34]=k=>n.fields.passiveHealthCheck.httpFailures=k),"http-statuses":n.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[35]||(g[35]=k=>n.fields.passiveHealthCheck.httpStatuses=k),successes:n.fields.passiveHealthCheck.successes,"onUpdate:successes":g[36]||(g[36]=k=>n.fields.passiveHealthCheck.successes=k),"tcp-failures":n.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[37]||(g[37]=k=>n.fields.passiveHealthCheck.tcpFailures=k),timeouts:n.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":g[38]||(g[38]=k=>n.fields.passiveHealthCheck.timeouts=k),type:n.fields.passiveHealthCheck.type,"onUpdate:type":g[39]||(g[39]=k=>n.fields.passiveHealthCheck.type=k),"unhealthy-http-statuses":n.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[40]||(g[40]=k=>n.fields.passiveHealthCheck.unhealthyHttpStatuses=k),readonly:n.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):t.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),ud="",vc=ce(Oc,[["__scopeId","data-v-810fb7b7"]]),Uc=t.createElementVNode("code",null,"10",-1),$c=t.createElementVNode("code",null,"65536",-1),Mc={"data-testid":"client_certificate-plain-text"},Dc=t.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const l=e,{i18n:{t:a},i18nT:r}=ie.useI18n(),{getPropValue:o}=Mi(),s=t.computed(()=>xe.form[l.config.app].edit),c=t.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:z.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:z.Basic},hash_on:{order:7,section:z.Basic},hash_on_header:{order:8,section:z.Basic},hash_on_uri_capture:{order:9,section:z.Basic},hash_on_query_arg:{order:10,section:z.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:z.Basic},hash_on_cookie_path:{order:12,section:z.Basic},healthchecks:{order:13,section:z.Basic,type:L.Json},tags:{order:14,tooltip:a("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${a("upstreams.form.fields.hash_fallback.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:a("upstreams.form.hash_tooltips.client_certificate")}});return(h,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(hi),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":c.value,"fetch-url":s.value,"hide-title":e.hideTitle,"onCopy:success":i[0]||(i[0]=d=>h.$emit("copy:success",d)),"onFetch:error":i[1]||(i[1]=d=>h.$emit("fetch:error",d)),"onFetch:success":i[2]||(i[2]=d=>h.$emit("fetch:success",d)),onLoading:i[3]||(i[3]=d=>h.$emit("loading",d))},{"name-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":t.withCtx(({row:d})=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(d.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:t.withCtx(()=>[Uc]),max:t.withCtx(()=>[$c]),_:1})]),"hash_fallback-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:t.withCtx(d=>{var u;return[t.createElementVNode("div",null,[t.createElementVNode("div",Mc,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(o)("rowValue",d))==null?void 0:u.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});X.TargetForm=Wa,X.TargetsList=oc,X.UpstreamsConfigCard=Dc,X.UpstreamsForm=vc,X.UpstreamsList=Zi,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-0c07874b]{align-items:center;display:flex}.kong-ui-copy-uuid .uuid-container[data-v-0c07874b]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-0c07874b]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-0c07874b]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-0c07874b]{display:flex}.config-card-details-row[data-v-307ab96d]{border-bottom:var(--1df60db4);display:var(--21d1d34e);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-307ab96d]{width:var(--4d3dc7e7)}.config-card-details-row .config-card-details-label label[data-v-307ab96d]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-307ab96d]{width:var(--4d400dc2)}.config-card-details-row .config-card-details-value .truncated[data-v-307ab96d]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-307ab96d]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-307ab96d] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-307ab96d]{display:flex}.config-card-details-row .config-badge[data-v-307ab96d]{margin-right:4px}.config-card-details-row[data-v-307ab96d] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-307ab96d] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-307ab96d] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-6c45e9e4]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-24515123] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-24515123]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-24515123]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-24515123]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-24515123] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-24515123]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-81612aef]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-81612aef]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-81612aef] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-e42a20c9] [role=button]{display:inline}.content-wrapper[data-v-e42a20c9] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-499a771c]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-499a771c]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-499a771c]{float:right}.kong-ui-entity-base-table .actions-container[data-v-499a771c] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-499a771c]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-5dbd1737]{width:100%}.kong-ui-entity-filter[data-v-5dbd1737]{display:flex;position:relative}.kong-ui-entity-filter[data-v-5dbd1737] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-5dbd1737] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-5dbd1737]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-5dbd1737]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-5dbd1737] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-5dbd1737] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-5dbd1737]{align-items:center;display:flex}.menu-item-indicator[data-v-5dbd1737]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-5dbd1737]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-5dbd1737] .k-input{padding-bottom:4px!important;padding-top:4px!important;width:auto}.menu-item-body[data-v-5dbd1737] .k-input-wrapper{width:100%}.menu-item-body[data-v-5dbd1737] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-5dbd1737] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-5dbd1737]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-5dbd1737]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-5dbd1737]{padding:0 20px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-77c479ff]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-77c479ff]{display:flex}.kong-ui-public-entity-link .entity-link-icon[data-v-77c479ff]{color:#0044f4;margin-left:4px}.kong-ui-public-entity-link .entity-link-label[data-v-77c479ff]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-77c479ff]{margin-left:6px}.kong-ui-entities-upstreams-list .kong-ui-entity-filter-input[data-v-b5f46bd8]{width:300px}.kong-ui-entities-upstreams-list .upstream-name[data-v-b5f46bd8]{font-weight:600}[data-v-d291c3d9] .kong-card{padding:0}[data-v-d291c3d9] .kong-card.border{border:0!important}[data-v-d291c3d9] .kong-card.borderTop{border-top:0!important}[data-v-d291c3d9] .k-prompt-proceed .kong-icon-spinner{display:var(--36f73404)}.kong-ui-entities-target-form[data-v-d291c3d9]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-d291c3d9],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-d291c3d9],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-d291c3d9] p{color:#000933;font-size:14px;line-height:24px;margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-d291c3d9]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-d291c3d9]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-d291c3d9] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-d291c3d9] .form-actions{display:none!important}.kong-ui-entities-targets-list .target-address[data-v-d9b501fd]{font-weight:600}.margin-bottom-6[data-v-02065a3d]{margin-bottom:24px}.fields-group-title[data-v-678db4c1]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-678db4c1]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-678db4c1]{margin-top:24px}.fields-group-title[data-v-7fda4841]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-7fda4841]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-bottom-6[data-v-0a7d6cda]{margin-bottom:24px}.margin-top-6[data-v-0a7d6cda]{margin-top:24px}.fields-group-title[data-v-0a7d6cda]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-0a7d6cda]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-0a7d6cda]{align-items:center;column-gap:16px;display:flex}.fields-group-title[data-v-6d6854e3]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-6d6854e3]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-6d6854e3]{margin-top:24px}.kong-ui-entities-upstreams-form[data-v-810fb7b7]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-upstreams-form[data-v-810fb7b7] .form-section-wrapper{column-gap:64px}}
1
+ .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-0c07874b]{align-items:center;display:flex}.kong-ui-copy-uuid .uuid-container[data-v-0c07874b]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-0c07874b]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-0c07874b]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-0c07874b]{display:flex}.config-card-details-row[data-v-e851fc7c]{align-items:center;border-bottom:var(--23f3018c);display:var(--3815ec6d);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-e851fc7c]{width:var(--1957f153)}.config-card-details-row .config-card-details-label label[data-v-e851fc7c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-e851fc7c]{width:var(--195a372e)}.config-card-details-row .config-card-details-value .truncated[data-v-e851fc7c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-e851fc7c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-e851fc7c] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-e851fc7c]{display:flex}.config-card-details-row .config-badge[data-v-e851fc7c]{margin-right:4px}.config-card-details-row[data-v-e851fc7c] .k-label{margin-bottom:0}.config-card-details-row[data-v-e851fc7c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-e851fc7c] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-6c45e9e4]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .k-card-title[data-v-b3999889]{margin-bottom:0}.kong-ui-entity-base-config-card[data-v-b3999889] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-b3999889]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-b3999889]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-b3999889]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-b3999889] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-b3999889]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-81612aef]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-81612aef]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-81612aef] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-e42a20c9] [role=button]{display:inline}.content-wrapper[data-v-e42a20c9] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-499a771c]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-499a771c]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-499a771c]{float:right}.kong-ui-entity-base-table .actions-container[data-v-499a771c] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-499a771c]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-5dbd1737]{width:100%}.kong-ui-entity-filter[data-v-5dbd1737]{display:flex;position:relative}.kong-ui-entity-filter[data-v-5dbd1737] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-5dbd1737] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-5dbd1737]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-5dbd1737]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-5dbd1737] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-5dbd1737] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-5dbd1737]{align-items:center;display:flex}.menu-item-indicator[data-v-5dbd1737]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-5dbd1737]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-5dbd1737] .k-input{padding-bottom:4px!important;padding-top:4px!important;width:auto}.menu-item-body[data-v-5dbd1737] .k-input-wrapper{width:100%}.menu-item-body[data-v-5dbd1737] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-5dbd1737] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-5dbd1737]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-5dbd1737]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-5dbd1737]{padding:0 20px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-77c479ff]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-77c479ff]{display:flex}.kong-ui-public-entity-link .entity-link-icon[data-v-77c479ff]{color:#0044f4;margin-left:4px}.kong-ui-public-entity-link .entity-link-label[data-v-77c479ff]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-77c479ff]{align-items:center;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-77c479ff]{margin-left:6px}.kong-ui-entities-upstreams-list .kong-ui-entity-filter-input[data-v-b5f46bd8]{width:300px}.kong-ui-entities-upstreams-list .upstream-name[data-v-b5f46bd8]{font-weight:600}[data-v-d291c3d9] .kong-card{padding:0}[data-v-d291c3d9] .kong-card.border{border:0!important}[data-v-d291c3d9] .kong-card.borderTop{border-top:0!important}[data-v-d291c3d9] .k-prompt-proceed .kong-icon-spinner{display:var(--36f73404)}.kong-ui-entities-target-form[data-v-d291c3d9]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-d291c3d9],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-d291c3d9],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-d291c3d9] p{color:#000933;font-size:14px;line-height:24px;margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-d291c3d9]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-d291c3d9]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-d291c3d9] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-d291c3d9] .form-actions{display:none!important}.kong-ui-entities-targets-list .target-address[data-v-d9b501fd]{font-weight:600}.margin-bottom-6[data-v-02065a3d]{margin-bottom:24px}.fields-group-title[data-v-678db4c1]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-678db4c1]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-678db4c1]{margin-top:24px}.fields-group-title[data-v-7fda4841]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-7fda4841]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-bottom-6[data-v-0a7d6cda]{margin-bottom:24px}.margin-top-6[data-v-0a7d6cda]{margin-top:24px}.fields-group-title[data-v-0a7d6cda]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-0a7d6cda]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-0a7d6cda]{align-items:center;column-gap:16px;display:flex}.fields-group-title[data-v-6d6854e3]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-6d6854e3]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-6d6854e3]{margin-top:24px}.kong-ui-entities-upstreams-form[data-v-810fb7b7]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-upstreams-form[data-v-810fb7b7] .form-section-wrapper{column-gap:64px}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-upstreams-targets",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-upstreams-targets.umd.js",
6
6
  "module": "./dist/entities-upstreams-targets.es.js",
@@ -49,7 +49,7 @@
49
49
  "errorLimit": "900KB"
50
50
  },
51
51
  "dependencies": {
52
- "@kong-ui-public/entities-shared": "^2.0.8"
52
+ "@kong-ui-public/entities-shared": "^2.0.9"
53
53
  },
54
54
  "scripts": {
55
55
  "dev": "cross-env USE_SANDBOX=true vite",